CN117523034A - Cam curve optimization method, equipment and storage medium - Google Patents

Cam curve optimization method, equipment and storage medium Download PDF

Info

Publication number
CN117523034A
CN117523034A CN202311548093.7A CN202311548093A CN117523034A CN 117523034 A CN117523034 A CN 117523034A CN 202311548093 A CN202311548093 A CN 202311548093A CN 117523034 A CN117523034 A CN 117523034A
Authority
CN
China
Prior art keywords
point
abnormal
points
cam curve
curve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311548093.7A
Other languages
Chinese (zh)
Inventor
吴积荣
李小丽
折宝林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Inovance Technology Co Ltd
Original Assignee
Shenzhen Inovance Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Inovance Technology Co Ltd filed Critical Shenzhen Inovance Technology Co Ltd
Priority to CN202311548093.7A priority Critical patent/CN117523034A/en
Publication of CN117523034A publication Critical patent/CN117523034A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Abstract

The application discloses a cam curve optimization method, equipment and storage medium, and relates to the field of motion control, wherein the method comprises the following steps: displaying a cam curve optimization interface, wherein the cam curve optimization interface comprises at least one of an abnormal cam curve, a single-point optimization control and a curve fitting optimization control; determining and displaying a first correction point corresponding to a target abnormal point of the abnormal cam curve in response to a triggering operation for the single-point optimization control; or, in response to a trigger operation of the curve fitting optimization control, determining and displaying a plurality of second correction points corresponding to a plurality of abnormal points in a target area of the abnormal cam curve; an optimized cam curve determined based on the first correction point or the plurality of second correction points is displayed. The cam curve control method and device solve the problem that cam curve is not smooth and affects cam motion control, and achieve the effect of reducing impact and fluctuation in the cam motion control process through optimization of the cam curve.

Description

Cam curve optimization method, equipment and storage medium
Technical Field
The present disclosure relates to the field of motion control technologies, and in particular, to a cam curve optimization method, apparatus, and storage medium.
Background
In industrial universal automation control, the cam motion follows the planned motion of the spindle from the shaft according to a set cam profile, which refers to the motion profile of the cam drive follower. In cam motion control, the use of cam curves is indispensable, and there are two general types, one is a key node curve, the key node is adopted for curve description, and each node is described by using independent various curves; the other is a densification point curve, wherein densification points are adopted for curve description, and each densification point is connected with each other in a straight line for description.
At present, in the related art, the densification points generated from the outside are supported to be imported into development software to obtain densification point curves, but the densification point curves are not supported to be subjected to fairing treatment, so if the input densification points have concave-convex changes to cause the curves to be not smooth, the cam can be caused to fluctuate or impact from axial movement, and the service life, the running efficiency, the stability and the like of equipment are affected.
Therefore, it is an urgent problem to be solved to propose a method for optimizing cam curve.
Disclosure of Invention
The main purpose of the present application is: a cam curve optimization method, equipment and storage medium are provided, and the technical problem that cam curve is not smooth and cam motion control is affected in the related technology is solved.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, the present application provides a cam curve optimization method, including:
displaying a cam curve optimization interface, wherein the cam curve optimization interface comprises at least one of an abnormal cam curve, a single-point optimization control and a curve fitting optimization control;
determining and displaying a first correction point corresponding to a target abnormal point of the abnormal cam curve in response to a triggering operation for the single-point optimization control; or, in response to a trigger operation of the curve fitting optimization control, determining and displaying a plurality of second correction points corresponding to a plurality of abnormal points in a target area of the abnormal cam curve;
an optimized cam curve determined based on the first correction point or the plurality of second correction points is displayed.
Optionally, in the cam curve optimization method, the step of determining and displaying a first correction point corresponding to the target abnormal point of the abnormal cam curve includes:
determining a target abnormal point, a plurality of points before the target abnormal point and a plurality of points with the same number after the target abnormal point, and obtaining a plurality of points with continuous total number of singular numbers; wherein the middle point in the plurality of points is a target abnormal point;
calculating at least one first slope between a first point of the plurality of points and a point before the target abnormal point and at least one second slope between a last point of the plurality of points and a point after the target abnormal point according to the position information of each point;
Calculating a third slope between a previous point of the target outlier and the virtual point and a fourth slope between the virtual point and a subsequent point of the target outlier based on the arithmetic progression relation;
constructing a virtual point corresponding to the target abnormal point according to the position information of the previous point of the target abnormal point, the position information of the next point of the target abnormal point, the third slope and the fourth slope, and obtaining a first correction point corresponding to the target abnormal point;
the first correction point is displayed.
Optionally, in the cam curve optimization method, the step of determining the target outlier includes:
determining a target outlier based on an interactive operation instruction generated by the operation of selecting the outlier by the user; or,
and determining the point corresponding to the abnormal slope as a target abnormal point by comparing slopes between all adjacent two points.
Optionally, in the cam curve optimization method, the step of determining and displaying a plurality of second correction points corresponding to a plurality of abnormal points in the target area of the abnormal cam curve includes:
determining a target area, wherein the target area comprises a plurality of abnormal points;
performing curve fitting on a plurality of abnormal points by using a polynomial least square method to obtain a target fitting curve;
determining points corresponding to the abnormal points and positioned on the target fitting curve according to the main shaft positions of the abnormal points to obtain a plurality of second correction points corresponding to the abnormal points;
A plurality of second correction points is displayed.
Optionally, in the cam curve optimization method, the step of determining the target area includes:
determining a target area based on an interactive operation instruction generated by the operation of selecting the area where the plurality of abnormal points are located by a user; or,
determining a plurality of points corresponding to the abnormal slope by comparing slopes between all adjacent two points;
determining a starting point of a plurality of points spaced before a first point of the plurality of points and an ending point of a plurality of points spaced after a last point of the plurality of points;
and obtaining a target area comprising a plurality of abnormal points according to all points between the starting point and the ending point.
Optionally, in the cam curve optimization method, the step of performing curve fitting on the plurality of outliers by using a polynomial least square method to obtain the target fitted curve includes:
performing curve fitting on a plurality of abnormal points by using quadratic function fitting, cubic function fitting and penta polynomial fitting respectively to obtain three fitting curves;
determining the position of each fitting point from the axis on the fitting curve according to each fitting curve; the fitting point is a point corresponding to the main shaft position of the abnormal point and the main shaft position of the fitting curve;
Calculating error values according to the slave axis positions of the abnormal points and the slave axis positions of the fitting points;
and selecting one fitting curve from the three fitting curves according to the error value to obtain a target fitting curve.
Optionally, in the cam curve optimization method, before the step of displaying the cam curve optimization interface, the method further includes:
acquiring an initial cam curve, wherein the initial cam curve is a densification point curve;
detecting abnormal conditions of an initial cam curve;
and determining the content of the cam curve optimization interface according to the abnormal condition.
Optionally, in the cam curve optimization method, the step of detecting an abnormal condition of the initial cam curve includes:
detecting the slope between two adjacent densification points on the initial cam curve;
judging whether the initial cam curve is abnormal or not according to the slope;
if the initial cam curve is judged to be abnormal, the initial cam curve is determined to be an abnormal cam curve;
determining an anomaly type of the anomaly cam profile to select at least one of a single-point optimization control and a curve fit optimization control to be displayed on the cam profile optimization interface based on the anomaly type.
In a second aspect, the present application provides a cam curve optimization device comprising a processor and a memory, wherein the memory stores a cam curve optimization program, which when executed by the processor, implements a cam curve optimization method as described above.
In a third aspect, the present application provides a controller comprising:
the instruction receiving module is used for receiving the cam optimization instruction;
and the optimization execution module is used for realizing the cam curve optimization method according to the cam optimization instruction.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by one or more processors, implements a cam curve optimization method as described above.
The above technical solutions provided by the present application may have the following advantages or at least achieve the following technical effects:
according to the cam curve optimization method, the equipment and the storage medium, the cam curve is optimized by displaying the abnormal cam curve and at least one of the single-point optimization control and the curve fitting optimization control, and selecting a single-point optimization mode or a curve fitting optimization mode, so that an optimized cam curve is obtained, and the purpose of cam motion control based on the optimized cam curve is achieved; when a single-point optimization mode is selected, a first correction point corresponding to a target abnormal point of an abnormal cam curve is determined and displayed in response to a triggering operation for the single-point optimization control, then an optimized cam curve is obtained according to the first correction point, abnormal point reconstruction can be performed according to the condition that only one or a few points in the cam curve are abnormal, the optimization mode is simple, and the optimized cam curve can be obtained quickly; when a curve fitting optimization mode is selected, a plurality of second correction points corresponding to a plurality of abnormal points in a target area of an abnormal cam curve are determined and displayed in response to triggering operation of a curve fitting optimization control, and then an optimized cam curve is obtained according to the plurality of second correction points, so that curve optimization can be performed for the condition that more abnormal points exist in the cam curve, the optimization efficiency is high, and the optimized cam curve can be accurately obtained; the visual cam curve optimization mode provided by the method is not only convenient for a user to know the optimization condition of the cam curve, but also reduces the impact and fluctuation in the cam motion control process through the optimization of the cam curve, and improves the execution efficiency of the cam and the service life of the machine.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to the drawings provided without inventive effort to a person skilled in the art.
FIG. 1 is a schematic flow chart of a first embodiment of a cam curve optimization method of the present application;
FIG. 2 is a schematic diagram of a hardware configuration of a cam curve optimization device according to the present application;
fig. 3 is a schematic application scenario diagram of a first embodiment of the cam curve optimization method of the present application;
FIG. 4 is a schematic diagram of an initial cam curve in a second embodiment of the cam curve optimization method of the present application;
FIG. 5 is a schematic view of an optimized cam curve in a second embodiment of the cam curve optimization method of the present application;
FIG. 6 is a schematic diagram of an initial cam curve in a third embodiment of a cam curve optimization method of the present application;
FIG. 7 is a schematic view of an optimized cam curve in a third embodiment of the cam curve optimization method of the present application;
fig. 8 is a schematic diagram of functional modules of a first embodiment of the controller of the present application.
The realization, functional characteristics and advantages of the present application will be further described with reference to the embodiments, referring to the attached drawings.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that in this application the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element. In the present application, unless explicitly specified and limited otherwise, the terms "coupled," "secured," and the like are to be construed broadly, and for example, "coupled" may be either permanently coupled, detachably coupled, or integral; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium; the communication between the two elements can be realized, or the interaction relationship between the two elements can be realized. In this application, where there is a description relating to "first," "second," etc., the description of "first," "second," etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the present application, suffixes such as "module", "part" or "unit" for representing elements are used only for facilitating the description of the present application, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be. In addition, the technical solutions of the embodiments may be combined with each other, but on the basis that those skilled in the art can implement the embodiments, when the technical solutions are contradictory or cannot be implemented, it should be considered that the combination of the technical solutions does not exist and is not within the protection scope of the present application.
In view of the technical problem that cam curves are not smooth and influence cam motion control in the related art, the application provides a cam curve optimization method, equipment, a controller and a storage medium. The following detailed description is made by way of specific examples and implementations with reference to the accompanying drawings.
Example 1
Referring to fig. 1, a first embodiment of a cam curve optimization method of the present application is presented, and the cam curve optimization method can be applied to a cam curve optimization system formed by connecting a cam curve optimization device, a controller, or a cam curve optimization device with an IDE (Integrated Development Environment, integrated development environment, application program for providing program development function) with the controller.
The cam curve optimizing device refers to terminal equipment or network equipment capable of realizing network connection, and can be terminal equipment such as mobile phones, computers, tablet computers, portable computers, embedded industrial personal computers and the like, and can also be network equipment such as servers, cloud platforms and the like. The controller is a device capable of realizing communication connection and cam motion control, and can be a control device such as a digital signal processor (Digital Signal Processor, DSP), a programmable logic controller (Programmable Logic Controller, PLC) and the like.
As shown in fig. 2, a schematic diagram of the hardware structure of the cam curve optimizing apparatus is shown. The cam curve optimizing apparatus may include: a processor 1001, such as a CPU (Central Processing Unit ), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005.
In particular, communication bus 1002 is configured to enable connective communication between these components; the user interface 1003 is used for connecting the client and communicating data with the client, and the user interface 1003 may include an output unit and an input unit; the network interface 1004 is used to connect to and communicate data with a background server, and the network interface 1004 may include an input/output interface; the memory 1005 is used for storing various types of data, which may include, for example, instructions of any application program or method in the cam curve optimization device, and application program related data, and the memory 1005 may be a built-in memory; optionally, the memory 1005 may also be a storage device independent of the processor 1001, and with continued reference to fig. 2, the memory 1005 may include an operating system, a network communication module, a user interface module, and a cam curve optimization program; the processor 1001 is configured to call a cam curve optimization program stored in the memory 1005, and perform the following operations:
Displaying a cam curve optimization interface, wherein the cam curve optimization interface comprises at least one of an abnormal cam curve, a single-point optimization control and a curve fitting optimization control; determining and displaying a first correction point corresponding to a target abnormal point of the abnormal cam curve in response to a triggering operation for the single-point optimization control; or, in response to a trigger operation of the curve fitting optimization control, determining and displaying a plurality of second correction points corresponding to a plurality of abnormal points in a target area of the abnormal cam curve; an optimized cam curve determined based on the first correction point or the plurality of second correction points is displayed.
Based on the above-described cam curve optimization apparatus, the cam curve optimization method of the present embodiment is described in detail below in conjunction with the flowchart shown in fig. 1. The method may comprise the steps of:
step S200: and displaying a cam curve optimization interface, wherein the cam curve optimization interface comprises an abnormal cam curve and at least one of a single-point optimization control and a curve fitting optimization control.
Specifically, the cam curve optimization device displays a cam curve optimization interface, specifically displays an abnormal cam curve and at least one of a single-point optimization control and a curve fitting optimization control, so that a user can execute a triggering operation on the single-point optimization control or the curve fitting optimization control.
Specifically, the abnormal cam curve may be determined based on an initial cam curve, where the initial cam curve is a cam curve to be compiled, and may be a densification point cam curve, specifically, the cam curve optimizing device may acquire the initial cam curve by means of introducing the cam curve optimizing device by a user, or may be sent to the controller by means of an instruction after introducing the cam curve optimizing device by the user, so that the controller acquires the initial cam curve. When the method is applied to the controller, a user can firstly guide the initial cam curve into the cam curve optimizing device serving as the upper computer, namely the cam curve optimizing device with the IDE, then the cam curve optimizing device generates a cam optimizing instruction containing the initial cam curve, the cam optimizing instruction is sent to the controller, the controller receives the cam optimizing instruction, the initial cam curve is obtained, and the follow-up steps are carried out.
Because not all initial cam curves have the problem of concave-convex points or non-smooth points, whether the initial cam curves are abnormal or not can be detected first. The initial cam curve can be displayed through the cam curve optimizing equipment, then the user directly observes, judges whether the abnormality exists, and then determines whether the abnormality exists in the initial cam curve according to the interactive operation of the user so as to obtain the abnormal cam curve, or whether the abnormality exists in the initial cam curve can be implicitly determined by selecting whether the optimization needs to be performed after the observation of the user. When the user selects the corresponding yes to have abnormality or yes to be optimized, the follow-up steps can be carried out. The abnormal condition result detected at this time includes the presence or absence of an abnormality.
Alternatively, when an abnormality of the initial cam curve is detected to obtain an abnormal cam curve, the abnormality type of the abnormal cam curve may be further determined, for example, whether there is only one abnormality or a plurality of abnormalities, if the plurality of abnormalities are isolated or continuous. The above problems can be determined by the user observing on the cam curve optimizing device and then carrying out interactive operation, and can also be realized by a built-in program of the cam curve optimizing device. The slope between any two adjacent points can be determined according to the positions of the two points because the densification points on the cam curve of the densification points are connected by adopting a straight line. On the cam curve of the smooth densification point, a certain rule exists among all slopes, when one slope does not accord with the whole rule or obviously stands out, the slope can be identified to have abnormality, and the point corresponding to the slope is an abnormal point. In this case, the detected abnormality results include four cases, i.e., no abnormality, a single point abnormality, a plurality of spaced point abnormalities, and a plurality of consecutive point abnormalities.
Specifically, when an abnormal cam curve is obtained due to the abnormality of the initial cam curve, a user can select an optimization mode, namely a single-point optimization mode or a curve fitting optimization mode, on a cam curve optimization interface of the cam curve optimization device by himself, and the method is realized by triggering a single-point optimization control or a curve fitting optimization control on the cam curve optimization interface. The cam curve optimizing equipment can correspondingly select the display control according to the detected specific abnormal condition, even automatically trigger the display control to select an optimizing mode, for example, a single-point optimizing mode or a curve fitting optimizing mode can be automatically selected when the abnormal condition is detected, and no processing is performed when the abnormal condition is detected to be absent; for example, when a single-point abnormality is detected, the single-point optimization control is automatically triggered to select a single-point optimization mode, when a plurality of spaced-apart point abnormalities are detected, the single-point optimization control is automatically triggered to sequentially optimize each abnormal point in the single-point optimization mode, and when a plurality of continuous point abnormalities are detected, the curve fitting optimization control is automatically triggered to select a curve fitting optimization mode, and the curve fitting optimization mode can be specifically selected according to actual conditions.
Step S400: determining and displaying a first correction point corresponding to a target abnormal point of the abnormal cam curve in response to a triggering operation for the single-point optimization control; or,
step S600: and determining and displaying a plurality of second correction points corresponding to the plurality of abnormal points in the target area of the abnormal cam curve in response to the triggering operation of the curve fitting optimization control.
Specifically, if the user triggers a single-point optimization control on the cam curve optimization interface, the selection of a single-point optimization mode is indicated to optimize the abnormal cam curve; and if the user triggers the curve fitting optimization control on the cam curve optimization interface, the curve fitting optimization mode is selected to optimize the abnormal cam curve.
In one embodiment, when a single point optimization mode is selected, a target outlier on the outlier cam curve is reconstructed to obtain a first correction point. When the user autonomously selects the single-point optimization mode, a target abnormal point can be selected on the abnormal cam curve, so that the cam curve optimization equipment reconstructs the target abnormal point to obtain a first correction point. Or when the cam curve optimizing device automatically selects the single-point optimizing mode according to the abnormal condition, the cam curve optimizing device can automatically determine a target abnormal point on the abnormal cam curve and reconstruct the target abnormal point to obtain a first correction point.
The method for reconstructing the target abnormal point to obtain the first corrected point includes selecting a plurality of continuous densification points near the target abnormal point, for example, selecting the first two points of the target abnormal point and the second two points of the target abnormal point to obtain five continuous densification points, wherein the target abnormal point is the third densification point. Theoretically, five densification points have four straight lines, and the four straight lines necessarily have four slopes; slope 1 corresponding to the first densification point may be calculated from the positions of the first densification point and the second densification point, slope 4 corresponding to the fourth densification point may be calculated from the positions of the fourth densification point and the fifth densification point, and slope 3 between the virtual point and the subsequent point of the target abnormal point (the fourth densification point) may be calculated by combining slope 1 and slope 4, that is, slope 2 corresponding to the second densification point, that is, slope 2 between the previous point of the target abnormal point (the second densification point) and the virtual point (the virtual point corresponding to the third densification point to be constructed), according to the relationship existing in the preset densification point curve, for example, the arithmetic series relationship; then, a virtual point can be constructed according to the position of the second densification point, the position of the fourth densification point, the slope 2 and the slope 3, and the position of the virtual point is determined and used as a first correction point.
The number of points before and after the target abnormal point, that is, the total number of the plurality of densification points in succession, may be set according to the actual situation, and is not limited thereto. For example, when more points are selected and then the slope between the previous point of the target abnormal point and the virtual point and the slope between the virtual point and the next point of the target abnormal point are determined according to the more slopes and the preset slope relationship, the first correction point can be more accurate, so that the first correction point can be more accurate. Here, both the principal axis coordinates and the secondary axis coordinates of the first correction point may change.
When the abnormal condition is that a plurality of points with intervals are abnormal, reconstructing one abnormal point according to the mode to obtain a first correction point, repeating the steps, and sequentially reconstructing the rest abnormal points to obtain a plurality of first correction points, so as to obtain an optimized cam curve according to the plurality of first correction points.
In another embodiment, when the curve fitting optimization mode is selected, curve fitting is performed on a plurality of abnormal points in a target area on the abnormal cam curve, and a plurality of second correction points corresponding to the plurality of abnormal points are obtained. When the user selects the curve fitting optimization mode autonomously, a target area containing a plurality of abnormal points can be selected on the abnormal cam curve, so that the cam curve optimizing equipment performs curve fitting on the abnormal points in the target area, and then a plurality of fitting points corresponding to the abnormal points are selected on the fitted curve to obtain a plurality of second correction points. Or when the cam curve optimizing device automatically selects the curve fitting optimizing mode according to the abnormal condition, the cam curve optimizing device can automatically determine a target area on the abnormal cam curve and perform curve fitting on a plurality of abnormal points in the target area to obtain a plurality of second correction points.
The method for performing curve fitting on a plurality of abnormal points in a target area to obtain a plurality of second correction points corresponding to the plurality of abnormal points comprises the steps of performing curve fitting on the plurality of abnormal points in the target area by using a polynomial least square method to obtain a fitting curve, using the fitting curve as a target fitting curve, or performing curve fitting on the plurality of abnormal points in the target area by using different least square methods to obtain a plurality of corresponding fitting curves, and selecting one fitting curve as the target fitting curve; and correspondingly determining fitting points on the target fitting curve at the same main axis position according to the main axis positions of the plurality of abnormal points in the target area, and taking the fitting points as a plurality of second correction points after determining the positions of the fitting points with the same number as the plurality of abnormal points.
The number of the plurality of abnormal points in the target region may be set according to the actual situation, and is not limited thereto. For example, in order to ensure the fitting accuracy, a plurality of normal points can be additionally selected before the first abnormal point and a plurality of normal points can be additionally selected after the last abnormal point, so that a larger range of target areas can be formed; at this time, all the densification points under the target area may be used as the aforementioned plurality of abnormal points to correspondingly determine a plurality of second correction points, or curve fitting may be performed according to all the densification points under the target area, but determination may be performed only for actual abnormal points when determining fitting points, and a plurality of selected normal points may be omitted, so as to obtain a plurality of second correction points having a number smaller than the number of points in the target area but corresponding to the actual plurality of abnormal points.
When the abnormal condition is a point abnormality having a plurality of intervals, the plurality of abnormal points may be reconstructed in the above manner, that is, the plurality of abnormal points and the normal points thereof are each a plurality of points in the target region, and then the plurality of points are curve-fitted to obtain a plurality of second correction points corresponding to the plurality of points or a plurality of second correction points corresponding to the plurality of abnormal points having intervals.
Step S800: an optimized cam curve determined based on the first correction point or the plurality of second correction points is displayed.
Specifically, when a single point abnormality exists in the abnormal cam curve, after a first correction point is obtained, the first correction point can be used for replacing a target abnormal point on the abnormal cam curve, and then the optimized cam curve can be obtained. When the abnormal cam curve has multi-point abnormality, after a plurality of second correction points are obtained, the plurality of abnormal points in the target area on the abnormal cam curve can be replaced by the plurality of second correction points, and the optimized cam curve can be obtained.
Optionally, when there are a plurality of points at intervals abnormal in the abnormal cam curve, after repeating step S400 to obtain a plurality of first correction points, replacing the original plurality of abnormal points at intervals with the plurality of first correction points to obtain an optimized cam curve, or executing step S400 for the first abnormal point and replacing the obtained first correction point with the first abnormal point, and then returning to execute step S400, reconstructing the first correction point for the next abnormal point, and repeating the steps until all the replacement is completed to obtain the optimized cam curve; the method aims at the situation that when a plurality of abnormal points which are not far apart exist, the first correction point after replacing the first abnormal point is taken as the basis for constructing the virtual point of the subsequent abnormal point, and the accuracy of the subsequently constructed virtual point can be ensured, so that the optimized cam curve is prevented from deviating too much from reality, and the cam motion control error is avoided.
Optionally, when the abnormal cam curve has a plurality of points at intervals abnormal, after selecting the curve fitting optimization mode and executing the step S600 to obtain a plurality of second correction points, the plurality of second correction points are used to replace the original abnormal points at intervals to obtain an optimized cam curve; this approach can more quickly obtain an optimized cam curve and ensure accuracy than the manner of repeatedly performing the step S400 or the manner of repeatedly performing the steps S400 and S800 when there are a plurality of abnormal points which are not far apart although there are intervals.
In an alternative implementation of this embodiment, before the step S200 of displaying the cam curve optimization interface, the method may further include:
step S110: acquiring an initial cam curve, wherein the initial cam curve can be a densification point curve;
step S120: detecting abnormal conditions of an initial cam curve;
step S130: and determining the content of the cam curve optimization interface according to the abnormal condition.
Specifically, after the cam curve optimizing device obtains the initial cam curve, the content of the cam curve optimizing interface may be correspondingly determined based on manual selection of a user or automatic selection of the cam curve optimizing device, including determining the initial cam curve as an abnormal cam curve and serving as one of the display contents of the cam curve optimizing interface. When the cam curve optimization device automatically selects, abnormal condition detection can be performed first, and then at least one of the single-point optimization control and the curve fitting optimization control is displayed by correspondingly configuring the cam curve optimization interface based on the obtained abnormal condition.
It will be appreciated that further embodiments of acquiring the initial cam curve and detecting anomalies in the initial cam curve may also refer to the detailed description of the foregoing and will not be repeated here.
Further, step S120 "detecting an abnormal condition of the initial cam curve" may include:
step S121: detecting the slope between two adjacent densification points on the initial cam curve;
step S122: judging whether the initial cam curve is abnormal or not according to the slope;
step S123: if the initial cam curve is judged to be abnormal, the initial cam curve is determined to be an abnormal cam curve;
step S124: determining an anomaly type of the anomaly cam profile to select at least one of a single-point optimization control and a curve fit optimization control to be displayed on the cam profile optimization interface based on the anomaly type.
Specifically, the exception types may include single point exceptions, multi-point exceptions. When the anomaly type is single-point anomaly, a single-point optimization mode can be adopted, the cam curve optimization interface can only display a single-point optimization control, then trigger or automatically trigger based on user selection, and can also simultaneously display the single-point optimization control and the curve fitting optimization control so as to manually trigger based on user selection of the single-point optimization control; when the anomaly type is multi-point anomaly, a curve fitting optimization mode can be adopted, and then the cam curve optimization interface can only display curve fitting optimization controls, then trigger or automatically trigger based on user selection, and can also simultaneously display single-point optimization controls and curve fitting optimization controls so as to manually trigger based on user selection of the curve fitting optimization controls.
Alternatively, the exception types may also include single point exceptions, multi-point interval exceptions, multi-point continuous exceptions. When the anomaly type is single-point anomaly, a single-point optimization mode can be adopted; when the anomaly type is a multi-point interval anomaly, a single-point optimization mode can be adopted to reconstruct virtual points of a plurality of anomaly points in sequence to obtain a plurality of first correction points, or a curve fitting optimization mode can be adopted to take the plurality of anomaly points and normal points in the middle of the plurality of anomaly points as target areas, and curve fitting is carried out on all points in the target areas together to obtain second correction points corresponding to the plurality of anomaly points; when the anomaly type is a multipoint continuous anomaly, a curve fitting optimization mode can be adopted.
In a specific implementation manner of the present embodiment, as shown in fig. 3, an application scenario schematic diagram of the present embodiment is shown, and the cam curve optimization method may also be applied to the application scenario shown in fig. 3, where the scenario includes a cam curve optimization device with an IDE and a controller, and the cam curve optimization device is connected to the controller.
A user can introduce a densification point cam curve on the IDE to obtain an initial cam curve; it is then determined whether to select densification point UI (user interface) optimization based on the user's interaction.
If the densification point UI optimization is selected, selecting an optimization mode, namely selecting a single-point optimization mode or a curve fitting optimization mode according to abnormal conditions and display contents of a cam curve optimization interface; when single-point optimization is selected, a user inputs optimization settings on a UI, such as selecting a target abnormal point, selecting a region, namely selecting a region formed by a plurality of normal points before and after the target abnormal point and the target abnormal point, so as to optimize the target abnormal point, obtain an optimized cam curve and output; when curve fitting optimization is selected, a user inputs one or more fitting curve types on a UI to obtain one or more fitting curves, and selects fitting numbers, such as selecting a target area comprising a plurality of abnormal points, wherein the target area comprises a plurality of abnormal points, and the fitting points are corresponding to the plurality of abnormal points, so that target area optimization is performed to obtain an optimized cam curve and output; wherein outputting the optimized cam curve includes generating control instructions based on the optimized cam curve and sending the control instructions to the controller to implement the cam motion control.
If the densification point UI optimization is not selected, the IDE may directly output the cam curve to be compiled, that is, directly output the imported densification point cam curve, specifically may output the densification point cam curve to the controller in a command manner, so that the controller receives the command, parses the command to obtain the cam curve to be compiled, that is, the initial cam curve, and then the controller may optimize the cam curve according to the usage requirement and the command, so as to implement the cam curve optimization method of the embodiment, where the optimization process may be online optimization implemented at the bottom layer of the controller. The instructions may be obtained by compiling a cam curve table according to user input, and in the online optimization process of the controller, the controller may also call the instructions output by the IDE according to the need to perform corresponding optimization parameter setting, or define specific setting contents in the instructions received at the beginning directly, for example, design the instructions as follows:
MC_CamTableOptimize(CAM_TABLE*pCamTable,INT32 startNode,INT32 endNode,INT16 optimizationType);
Wherein, pCamTable represents a cam curve table to be optimized, optimizationType represents an optimization mode (e.g. 0 represents a single-point optimization mode, 1 represents a curve fitting optimization mode), startNode represents a starting point of an initial cam curve on the cam curve table to be optimized, and endNode represents an ending point of the initial cam curve on the cam curve table to be optimized; the controller may perform cam curve optimization with the start point and the end point as initial cam curves to obtain optimized cam curves, and then directly perform cam motion control according to the optimized cam curves.
Therefore, the cam curve optimization method of the embodiment can perform visual curve optimization in a UI interaction mode on the IDE, and can perform on-line automatic curve optimization on the bottom layer of the controller in a mode of receiving instructions on the controller.
According to the cam curve optimization method provided by the embodiment, the cam curve is optimized by displaying the abnormal cam curve and at least one of the single-point optimization control and the curve fitting optimization control, and selecting a single-point optimization mode or a curve fitting optimization mode, so that an optimized cam curve is obtained, and the purpose of cam motion control based on the optimized cam curve is achieved; different optimization modes can be selected according to different abnormal conditions, so that an optimized cam curve can be obtained rapidly and accurately; the visual cam curve optimization mode provided by the method is not only convenient for a user to know the optimization condition of the cam curve, but also reduces the impact and fluctuation in the cam motion control process through the optimization of the cam curve, and improves the execution efficiency of the cam and the service life of the machine.
Example two
Based on the same technical idea, a second embodiment of the cam curve optimization method of the present application is presented, which is applied to a cam curve optimization apparatus. The cam curve optimization method of the present embodiment is described in detail below.
Further, when the single-point optimization mode is selected, the cam curve optimization apparatus performs step S400. The "determining and displaying the first correction point corresponding to the target abnormal point of the abnormal cam curve" in this step S400 may include:
step S410: determining a target abnormal point, a plurality of points before the target abnormal point and a plurality of points with the same number after the target abnormal point, and obtaining a plurality of points with continuous total number of singular numbers; wherein the middle point in the plurality of points is a target abnormal point;
step S420: calculating at least one first slope between a first point of the plurality of points and a point before the target abnormal point and at least one second slope between a last point of the plurality of points and a point after the target abnormal point according to the position information of each point;
step S430: calculating a third slope between a previous point of the target outlier and the virtual point and a fourth slope between the virtual point and a subsequent point of the target outlier based on the arithmetic progression relation;
Step S440: constructing a virtual point corresponding to the target abnormal point according to the position information of the previous point of the target abnormal point, the position information of the next point of the target abnormal point, the third slope and the fourth slope, and obtaining a first correction point corresponding to the target abnormal point;
step S450: the first correction point is displayed.
FIG. 4 is a schematic view of an abnormal cam curve according to the present embodiment; FIG. 5 is a schematic view of an optimized cam curve according to the present embodiment; in fig. 4, the abnormal cam curve is a densification point curve, and has a plurality of densification points, as shown in the dashed line box in fig. 4, there are sometimes one or two densification points that are significantly convex and cannot form a smooth curve with other densification points, and thus, the abnormal cam curve can be regarded as an abnormal point, and there are two abnormal points in fig. 4. Based on the case of fig. 4, the user may manually select or the cam curve optimization device automatically selects the single-point optimization mode to perform the cam curve optimization, and the following will describe in detail by taking the abnormal point in the first dotted line box of the optimization fig. 4 as an example:
after the cam curve optimizing device determines the target abnormal point, marking the target abnormal point as N3, then determining two points before the target abnormal point, namely N1 and N2, and two points after the target abnormal point, namely N4 and N5, so as to obtain five continuous points, wherein N3 is the middle point in the five points, and the first dotted line rectangular box is shown in fig. 5;
According to the position information of the five points, calculating a first slope between N1 and N2, namely a slope k1, and a second slope between N4 and N5, namely a slope k4; the position information may be coordinates formed by a spindle position and a slave axis position, and may be expressed as (mPos, sPos), and the specific calculation formula is:
wherein the position of the point N1 is (mPos 1, sPos 1), the position of the point N2 is (mPos 2, sPos 2), the position of the point N4 is (mPos 4, sPos 4), and the position of the point N5 is (mPos 5, sPos 5);
in order to ensure smoothness of the curve, the slope between the five points may be constructed as an arithmetic progression, however, other regularity relationships may exist in practical applications, which is not limited herein, and in this embodiment, the third slope between N2 and the virtual point N3', i.e. the slope k2, and the fourth slope between the virtual points N3' and N4, i.e. the slope k3, are calculated based on the arithmetic progression relationship, and the specific calculation formula is:
finally, the position (m, s) of the virtual point N3' is calculated according to the position information of N2 and N4, the third slope and the fourth slope, and the specific calculation formula is as follows:
the position of the virtual point N3' can be obtained, and the virtual point N3' corresponding to the target abnormal point N3 is constructed, and the virtual point N3' is the first correction point.
Similarly, the optimization can be repeatedly performed on other abnormal points in fig. 4 in the manner described above, and finally, the abnormal points are replaced by the first correction point obtained by the optimization, such as the circular black points in fig. 5, and two abnormal points are replaced, so that an optimized densification point curve, namely an optimized cam curve, is formed.
In an alternative implementation of this embodiment, the "determining the target outlier" in step S410 may include:
step S411: determining a target outlier based on an interactive operation instruction generated by the operation of selecting the outlier by the user; or,
step S412: and determining the point corresponding to the abnormal slope as a target abnormal point by comparing slopes between all adjacent two points.
In the implementation process, the abnormal point of the target can be determined by a user in a mode of selecting the abnormal point by a mouse according to the abnormal cam curve shown in fig. 4 displayed on the UI interface; correspondingly, when a plurality of points before and a plurality of points with the same number after the target abnormal point are determined to obtain a plurality of points with the total number of singular numbers, other points can be selected by a mode that a user operates a mouse to select an area, so that a plurality of points with the most middle point as the target abnormal point are obtained.
The determination of the target abnormal point may also be automatically determined by the cam curve optimizing device, specifically by calculating the slopes between all adjacent two points on the abnormal cam curve, then comparing the slopes, screening the slopes obviously not following the rule based on the rule of gradual increment or decrement and the like, so as to obtain the abnormal slope, for example, obtaining that two continuous slopes are abnormal, then indicating that the common point of the two slopes is the abnormal point, and determining the target abnormal point in this way. For example, in fig. 5, the slope between N1 and N2 is substantially identical to the slope between any other two points in front of the slope, or is generally within a certain preset range, the slope between N4 and N5 is also substantially identical to the slope between any two points behind the slope, or is within a certain preset range, but the slope between N2 and N3 and the slope between N3 and N4 are obviously deviated from the rules of other slopes or deviate from the aforesaid preset range, so that the point N3 can be identified as an abnormal point, and thus the cam curve optimizing device can automatically determine that the target abnormal point is N3.
The embodiment can manually and visually determine the target abnormal point, can automatically determine the target abnormal point, can meet the purpose of user-defined optimization, ensures that a user knows the optimization result in time, can meet the purpose of automatic equipment optimization, and reduces the labor workload.
Further details of the implementation of the above method steps may be referred to the description of the implementation of the embodiment one, and for brevity of description, the detailed description will not be repeated here.
According to the cam curve optimization method provided by the embodiment, a single-point optimization mode is selected, the target abnormal point on the abnormal cam curve is reconstructed to obtain the first correction point, then the optimized cam curve is obtained according to the first correction point, curve optimization can be performed on the condition that only one or a few points in the cam curve are abnormal, the optimization mode is simple, and the optimized cam curve can be obtained quickly.
Example III
Based on the same technical idea, a third embodiment of the cam curve optimization method of the present application is presented, which is applied to a cam curve optimization apparatus. The cam curve optimization method of the present embodiment is described in detail below.
Further, when the curve fitting optimization mode is selected, the cam curve optimization apparatus performs step S600. The "determining and displaying the plurality of second correction points corresponding to the plurality of abnormal points in the target region of the abnormal cam curve" in this step S600 may include:
step S610: determining a target area, wherein the target area comprises a plurality of abnormal points;
Step S620: performing curve fitting on a plurality of abnormal points by using a polynomial least square method to obtain a target fitting curve;
step S630: determining points corresponding to the abnormal points and positioned on the target fitting curve according to the main shaft positions of the abnormal points to obtain a plurality of second correction points corresponding to the abnormal points;
step S640: a plurality of second correction points is displayed.
FIG. 6 is a schematic view of an abnormal cam curve according to the present embodiment; FIG. 7 is a schematic view of an optimized cam curve according to the present embodiment; in fig. 6, the abnormal cam curve has a plurality of densification points as a densification point curve, and as shown in the dashed line box in fig. 6, there are a plurality of irregularly densely distributed densification points, which are significantly convex with respect to other densification points on the curve, and cannot form a smooth curve with other densification points, and thus can be regarded as abnormal points, and in fig. 6, there are a plurality of consecutive abnormal points. Based on the situation of fig. 6, the user may manually select or the cam curve optimization device automatically selects the curve fitting optimization mode to perform the cam curve optimization, and the following will describe in detail taking the abnormal points in the dashed line box of the optimization fig. 6 as an example:
after the cam curve optimizing apparatus determines the target area, as in the area of the dashed box in fig. 6, all points in the target area are marked as N1, N2, N3 … N (N-2), N (N-1), nn in sequence; optionally, when determining the target area, all the abnormal points can be directly used as the target area, and two normal points can be selected before and after the abnormal points to ensure the accuracy of curve fitting, for example, two points N1 and N2 are selected before and two points N (N-1) and N N are selected after the abnormal points N3-N (N-2);
According to n points in the target area, performing curve fitting on the n points by using a polynomial least square method to obtain a target fitting curve; optionally, when curve fitting is performed, a plurality of different fitting modes can be selected to perform a plurality of fitting modes, and a most suitable fitting curve, such as a fitting curve with the smallest error with the actual n points, is selected as a target fitting curve after a plurality of fitting curves are obtained;
finally, according to the target fitting curve, according to the abnormal points before fitting, the abnormal points are the main shaft positions of a plurality of abnormal points such as a point N3-point N (N-2), points on the target fitting curve corresponding to the same main shaft position are determined, the positions of the corresponding multiple fitting points of the abnormal points are sampled, the positions of the corresponding multiple fitting points of the abnormal points can be obtained, the virtual points are second correction points, such as N3'… N (N-2)', in FIG. 7, and the second correction points are the second correction points, so that one-time optimization of the abnormal points is realized, and finally the optimized second correction points can replace the abnormal points, such as a circular black point N3'… N (N-2)', in FIG. 7, so that the optimized densification point curve, namely the optimized cam curve, is formed.
In an alternative implementation manner of this embodiment, step S610 "determining the target area" may include:
Step S611: determining a target area based on an interactive operation instruction generated by the operation of selecting the area where the plurality of abnormal points are located by a user; or,
step S612: determining a plurality of points corresponding to the abnormal slope by comparing slopes between all adjacent two points;
step S613: determining a starting point of a plurality of points spaced before a first point of the plurality of points and an ending point of a plurality of points spaced after a last point of the plurality of points;
step S614: and obtaining a target area comprising a plurality of abnormal points according to all points between the starting point and the ending point.
In the implementation process, the target area can be determined by a user aiming at the abnormal cam curve displayed on the UI interface and shown in FIG. 6 in a mode of selecting an area or a plurality of abnormal points by a mouse;
the determination target area can also be automatically determined by the cam curve optimization equipment, specifically, the slopes between all adjacent two points on the abnormal cam curve are calculated, then the slopes are compared, the slopes which obviously do not follow the rule are screened out based on the gradual increment or decrement rule and the like of the slopes, the abnormal slopes are obtained, for example, a plurality of continuous slopes are obtained, the common point among the plurality of slopes is the abnormal point, a plurality of abnormal points are determined in this way, and the abnormal points are determined as the target area; or on the basis of the plurality of abnormal points, determining a normal point which is two points apart before the first abnormal point of the plurality of abnormal points as a starting point, and determining a normal point which is two points apart after the last abnormal point of the plurality of abnormal points as an ending point; and determining the starting point and the ending point on the abnormal cam curve and all points in the middle of the starting point and the ending point as target areas. For example, in fig. 7, the slope between N3-N (N-2) is obviously deviated from the law of other slopes or the preset range of the cam curve, so that the point N3-N (N-2) can be considered as an abnormal point, then, in order to ensure that the fitted curve is consistent with the change trend of the front and rear points, and ensure that the slope trend corresponding to the N3 point is consistent with the slope trend before the N3 point and the slope trend corresponding to the N (N-2) is consistent with the slope trend after the N (N-2), the point N2 and the point N1 before the N3 point are also classified as a target area, and the point N (N-1) and the point N after the N (N-2) are also classified as a target area, so that when the point on the target curve is determined, the second correction point can be redetermined for all the N points, or only the second correction point can be determined for the N3-N (N-2).
In an optional implementation manner of this embodiment, step S620 "performing curve fitting on the plurality of outliers by using a polynomial least square method" to obtain a target fitted curve "may include:
step S621: performing curve fitting on a plurality of abnormal points by using quadratic function fitting, cubic function fitting and penta polynomial fitting respectively to obtain three fitting curves;
step S622: determining the position of each fitting point from the axis on the fitting curve according to each fitting curve; the fitting point is a point corresponding to the main shaft position of the abnormal point and the main shaft position of the fitting curve;
step S623: calculating error values according to the slave axis positions of the abnormal points and the slave axis positions of the fitting points;
step S624: and selecting one fitting curve from the three fitting curves according to the error value to obtain a target fitting curve.
Performing curve fitting by using multiple fitting modes such as quadratic function fitting, cubic function fitting, penta-polynomial fitting and the like for a plurality of points in the target area to obtain three or more fitting curves; and then, aiming at each fitting curve, determining fitting points of which the main axis positions correspond to the main axis positions of a plurality of points in a target area on the fitting curve, collecting the slave axis positions of the fitting points, calculating the difference values between the slave axis positions of the fitting points and the slave axis positions of the plurality of points in the corresponding target area to obtain a plurality of difference values, and then, carrying out summation averaging based on the difference values of the plurality of points to obtain error values of the fitting curve based on an original cam curve.
According to the cam curve optimization method provided by the embodiment, a curve fitting optimization mode is selected, curve fitting is conducted on a plurality of abnormal points in a target area on an abnormal cam curve to obtain a plurality of second correction points, then an optimized cam curve is obtained according to the plurality of second correction points, curve optimization can be conducted on the condition that more abnormal points exist in the cam curve, optimization efficiency is high, and the optimized cam curve can be accurately obtained; the method is mainly used for a scene which cannot achieve curve smoothness through a single-point optimization method, and if an ideal smooth effect is difficult to achieve through the single-point optimization method by selecting a target abnormal point for a plurality of abnormal points, a series of points can be selected for curve fitting optimization.
Example IV
Based on the same technical concept, referring to the hardware structure diagram of fig. 2, the present embodiment provides a cam curve optimizing apparatus. The cam profile optimization device may include a processor and a memory having stored therein a cam profile optimization program that, when executed by the processor, performs all or a portion of the steps of the various embodiments of the cam profile optimization method of the present application.
Specifically, the cam curve optimizing device refers to terminal devices or network devices capable of realizing network connection, and can be terminal devices such as mobile phones, computers, tablet computers, portable computers, embedded industrial computers and the like, and can also be network devices such as servers and cloud platforms.
It will be appreciated that the cam curve optimization device may also include a communication bus, a user interface and a network interface. Wherein the communication bus is used for realizing connection communication among the components; the user interface is used for connecting the client and carrying out data communication with the client, and can comprise an output unit such as a display screen, a loudspeaker and the like, and an input unit such as a keyboard, a microphone and the like; the network interface is used for connecting with the background server and carrying out data communication with the background server, and can comprise an input/output interface, such as a standard wired interface and a wireless interface, such as a Wi-Fi interface; the Memory is used to store various types of data, which may include, for example, instructions of any application or method in the cam curve optimization device, as well as application related data, and may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), read-Only Memory (ROM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic Memory, flash Memory, magnetic or optical disk, etc.; optionally, the memory may also be a processor-independent storage device; the processor, which may be an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), digital Signal Processor (DSP), digital signal processing device (Digital Signal Processing Device, DSPD), programmable Logic Controller (PLC), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor or other electronic component for performing all or part of the steps of the various embodiments of the cam profile optimization method described above, is used to invoke the cam profile optimization program stored in the memory and to perform the cam profile optimization method described above.
It should be noted that the hardware configuration shown in fig. 2 does not constitute a limitation of the cam curve optimizing apparatus of the present application, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
Example five
Based on the same technical concept, a first embodiment of the controller is provided, and the controller can be a virtual module, applied to a cam curve optimizing device, can be a physical module, can be used as a device capable of realizing communication connection and cam motion control, can be used as a physical control device, and is applied to a cam curve optimizing system, and the system can comprise the cam curve optimizing device with IDE and the controller, and the controller is connected with the cam curve optimizing device.
The controller provided in this embodiment is described in detail below with reference to the functional block diagram shown in fig. 8, and the controller may include:
the instruction receiving module is used for receiving the cam optimization instruction;
and the optimization execution module is used for realizing all or part of steps of each embodiment of the cam curve optimization method according to the cam optimization instruction.
Further, the optimization execution module may include:
The display unit is used for acquiring a cam curve optimization interface and controlling the cam curve optimization equipment to display so that the instruction receiving module receives corresponding triggering operation, and the cam curve optimization interface comprises an abnormal cam curve and at least one of a single-point optimization control and a curve fitting optimization control;
the optimization unit is used for responding to the triggering operation of the single-point optimization control, determining a first correction point corresponding to a target abnormal point of the abnormal cam curve, and controlling the cam curve optimization equipment to display; or, in response to triggering operation of the curve fitting optimization control, determining a plurality of second correction points corresponding to a plurality of abnormal points in a target area of the abnormal cam curve, and controlling the cam curve optimization equipment to display;
and the output unit is used for outputting the optimized cam curve determined based on the first correction point or the second correction points and controlling the cam curve optimizing device to display.
Optionally, the optimization execution module may further include:
the acquisition unit is used for acquiring an initial cam curve, wherein the initial cam curve is a densification point curve;
the detection unit is used for detecting abnormal conditions of the initial cam curve;
and the configuration unit is used for determining the content of the cam curve optimization interface according to the abnormal condition.
It can be understood that the functions that can be implemented by the above modules or units may also refer to more implementation manners of the cam curve optimization method in the first embodiment or the second embodiment, which are not described herein.
In particular, the controller may be an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Controller (PLC), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components for performing all or part of the steps of the various embodiments of the cam curve optimization method as described above.
It should be noted that, the functions that can be achieved by each module in the controller and the technical effects that can be achieved by the corresponding modules in the controller may refer to descriptions of specific embodiments in each embodiment of the cam curve optimization method in the present application, and for brevity of description, details are not repeated here.
Example six
Based on the same inventive concept, the present embodiment provides a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic memory, a magnetic disk, an optical disk, a server, etc., on which a computer program is stored, which computer program is executable by one or more processors, and which computer program, when executed by the processors, can implement the cam profile optimization method of the present application.
It should be noted that, the foregoing embodiment numbers are merely for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments. The above embodiments are only optional embodiments of the present application, and not limiting the scope of the patent application, and all equivalent structures or equivalent processes using the descriptions and the contents of the present application or directly or indirectly applied to other related technical fields are included in the scope of the patent protection of the present application under the inventive concept of the present application.

Claims (10)

1. A method of cam curve optimization, the method comprising:
displaying a cam curve optimization interface, wherein the cam curve optimization interface comprises an abnormal cam curve and at least one of a single-point optimization control and a curve fitting optimization control;
responding to the triggering operation of the single-point optimization control, and determining and displaying a first correction point corresponding to a target abnormal point of the abnormal cam curve; or, in response to the triggering operation of the curve fitting optimization control, determining and displaying a plurality of second correction points corresponding to a plurality of abnormal points in a target area of the abnormal cam curve;
an optimized cam curve determined based on the first correction point or the plurality of second correction points is displayed.
2. The cam curve optimizing method according to claim 1, wherein the step of determining and displaying a first correction point corresponding to a target abnormal point of the abnormal cam curve includes:
determining a target abnormal point, a plurality of points before the target abnormal point and a plurality of points with the same number after the target abnormal point, and obtaining a plurality of points with continuous total number of singular numbers; wherein the middle point of the plurality of points is the target outlier;
calculating at least one first slope between a first point of the plurality of points and a point before the target abnormal point and at least one second slope between a last point of the plurality of points and a point after the target abnormal point according to the position information of each point;
calculating a third slope between a previous point of the target outlier and a virtual point and a fourth slope between the virtual point and a subsequent point of the target outlier based on an arithmetic progression relationship;
constructing the virtual point corresponding to the target abnormal point according to the position information of the previous point of the target abnormal point, the position information of the next point of the target abnormal point, the third slope and the fourth slope to obtain a first correction point corresponding to the target abnormal point;
And displaying the first correction point.
3. The cam curve optimization method of claim 2 wherein the step of determining the target outlier comprises:
determining a target outlier based on an interactive operation instruction generated by the operation of selecting the outlier by the user; or,
and determining the point corresponding to the abnormal slope as a target abnormal point by comparing slopes between all adjacent two points.
4. The cam curve optimizing method according to claim 1, wherein the step of determining and displaying a plurality of second correction points corresponding to a plurality of abnormal points in the target area of the abnormal cam curve includes:
determining a target area, the target area comprising a plurality of outliers;
performing curve fitting on the abnormal points by using a polynomial least square method to obtain a target fitting curve;
determining points corresponding to the abnormal points and positioned on the target fitting curve according to the main shaft positions of the abnormal points, and obtaining a plurality of second correction points corresponding to the abnormal points;
displaying the plurality of second correction points.
5. The cam curve optimization method of claim 4 wherein the step of determining the target area comprises:
Determining a target area based on an interactive operation instruction generated by the operation of selecting the area where the plurality of abnormal points are located by a user; or,
determining a plurality of points corresponding to the abnormal slope by comparing slopes between all adjacent two points;
determining a starting point of a plurality of points spaced before a first point of the plurality of points and an ending point of a plurality of points spaced after a last point of the plurality of points;
and obtaining a target area comprising a plurality of abnormal points according to all points between the starting point and the ending point.
6. The cam curve optimization method of claim 4 wherein the step of curve fitting the plurality of outliers using a polynomial least squares method to obtain a target fitted curve comprises:
performing curve fitting on the abnormal points by using quadratic function fitting, cubic function fitting and penta polynomial fitting respectively to obtain three fitting curves;
determining the position of each fitting point from the axis of each fitting curve; the fitting point is a point of which the main axis position on the fitting curve corresponds to the main axis position of the abnormal point;
calculating error values according to the slave axis positions of the abnormal points and the slave axis positions of the fitting points;
And selecting one fitting curve from the three fitting curves according to the error value to obtain a target fitting curve.
7. The cam curve optimization method of any one of claims 1 to 6 wherein prior to the step of displaying a cam curve optimization interface, the method further comprises:
acquiring an initial cam curve, wherein the initial cam curve is a densification point curve;
detecting an abnormal condition of the initial cam curve;
and determining the content of the cam curve optimization interface according to the abnormal condition.
8. The cam curve optimizing method of claim 7, wherein the step of detecting an abnormality of the initial cam curve includes:
detecting the slope between two adjacent densification points on the initial cam curve;
judging whether the initial cam curve is abnormal or not according to the slope;
if the initial cam curve is judged to be abnormal, determining the initial cam curve as an abnormal cam curve;
determining an anomaly type of the anomaly cam curve to select at least one of a single-point optimization control and a curve fit optimization control to be displayed on the cam curve optimization interface according to the anomaly type.
9. A cam curve optimization device, characterized in that it comprises a processor and a memory on which a cam curve optimization program is stored, which, when executed by the processor, implements the cam curve optimization method according to any one of claims 1 to 8.
10. A computer-readable storage medium, on which a computer program is stored which, when executed by one or more processors, implements the cam curve optimization method of any one of claims 1 to 8.
CN202311548093.7A 2023-11-17 2023-11-17 Cam curve optimization method, equipment and storage medium Pending CN117523034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311548093.7A CN117523034A (en) 2023-11-17 2023-11-17 Cam curve optimization method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311548093.7A CN117523034A (en) 2023-11-17 2023-11-17 Cam curve optimization method, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117523034A true CN117523034A (en) 2024-02-06

Family

ID=89765978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311548093.7A Pending CN117523034A (en) 2023-11-17 2023-11-17 Cam curve optimization method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117523034A (en)

Similar Documents

Publication Publication Date Title
US20210326799A1 (en) Devices, methods, and systems for multi-user commissioning
CN106528980B (en) Water chilling unit model selection method and device
US9213478B2 (en) Visualization interaction design for cross-platform utilization
US10901875B2 (en) Evaluating and presenting software testing project status indicators
CN110704043A (en) Special effect implementation method and device, electronic equipment and storage medium
CN105492903A (en) Chromatograph mass spectrometer
US20220189425A1 (en) Image quality compensation method for liquid crystal display device, device and terminal equipment
CN110531301B (en) Calibration method and calibration device for output power of radio frequency power supply
CN102622233A (en) System and method for automatically generating user interface applicable to certain interactive terminal equipment
CN106648281B (en) Screenshot method and device
CN117523034A (en) Cam curve optimization method, equipment and storage medium
CN110413161A (en) Arrrangement method, device and electronic equipment
US9756451B2 (en) Terminal apparatus and information processing method
CN105892443B (en) The diagnostic device and method of operation for monitoring control loop
CN113597623A (en) Apparatus and method for determining cooking ability index
CN115994709A (en) Data index calculation method, device, computer equipment and storage medium
TW201222179A (en) System design device
CN112169313B (en) Game interface setting method and device, electronic equipment and storage medium
CN109739453B (en) Splicing wall resolution ratio automatic configuration method and related equipment
US11573680B2 (en) Systems and methods to control navigation within an interactive networked application between instances of enterprise software applications
US20230304919A1 (en) Setting device, computer-readable recording medium that records program, environment forming device, and setting method
KR20190109996A (en) Method for operating software for application development
JP6516100B2 (en) POWER MANAGEMENT SYSTEM, POWER MANAGEMENT DEVICE, POWER MANAGEMENT METHOD, AND CONTROL PROGRAM
KR102402491B1 (en) Method for displaying information on data fluctuation and apparatus thereof
JP7060467B2 (en) Information processing equipment, information processing methods and programs

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination