WO2023019751A1 - 基于数控加工系统的曲线拟合方法、电子设备和存储介质 - Google Patents

基于数控加工系统的曲线拟合方法、电子设备和存储介质 Download PDF

Info

Publication number
WO2023019751A1
WO2023019751A1 PCT/CN2021/128422 CN2021128422W WO2023019751A1 WO 2023019751 A1 WO2023019751 A1 WO 2023019751A1 CN 2021128422 W CN2021128422 W CN 2021128422W WO 2023019751 A1 WO2023019751 A1 WO 2023019751A1
Authority
WO
WIPO (PCT)
Prior art keywords
endpoint
rotation direction
helix
line segment
current
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.)
Ceased
Application number
PCT/CN2021/128422
Other languages
English (en)
French (fr)
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.)
Wuyi University Fujian
Original Assignee
Wuyi University Fujian
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 Wuyi University Fujian filed Critical Wuyi University Fujian
Publication of WO2023019751A1 publication Critical patent/WO2023019751A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of program data in numerical form
    • G05B19/19Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of program data in numerical form characterised by positioning or contouring control systems, e.g. to control position from one programmed point to another or to control movement along a programmed continuous path
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/35Nc in input of data, input till input file format
    • G05B2219/35349Display part, programmed locus and tool path, traject, dynamic locus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • the invention relates to the technical field of numerical control machining, in particular to a curve fitting method based on a numerical control machining system, electronic equipment and a computer-readable storage medium.
  • the numerical control system is a special computer system that performs part or all of the numerical control functions according to the control program stored in the computer memory, and is equipped with an interface circuit and a servo drive device.
  • CNC systems and related automation products are mainly for CNC machine tools.
  • Existing CNC machine tools can be divided into three-axis, four-axis and five-axis machining centers according to the number of control axes.
  • the input data of the three-axis CNC system is mostly straight lines and arcs, and the input data of the four-axis and five-axis CNC systems for a straight line.
  • frequent acceleration and deceleration will occur if the existing straight line processing method is directly applied, which affects both the processing efficiency and the processing effect.
  • a curve fitting method is generally used to improve processing efficiency and processing effect.
  • the existing curve fitting technology mainly adopts A-spline, B-spline, C-spline and NURBS spline, but A-spline cannot achieve smooth acceleration, while B, C, and NURBS spline either the fitting curve transition is not smooth, or Real-time calculation is time-consuming and requires high hardware, which brings inconvenience to users.
  • the present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, the present invention proposes a curve fitting method based on a numerical control machining system, an electronic device and a computer-readable storage medium, which can realize fast curve fitting under the condition that the speed and acceleration are both smooth.
  • the embodiment of the present invention provides a curve fitting method based on a numerical control machining system, including:
  • the line segment to be fitted includes a plurality of straight line segments connected in sequence;
  • a first helix and a second helix are generated based on the least squares method, and there is a partially overlapping curve between the first helix and the second helix;
  • the adjacent straight line segments include a first adjacent line segment and a second adjacent line segment, and the first adjacent line segment partially overlaps with the second adjacent line segment , the generation of the first helix and the second helix based on the least squares method includes:
  • the first helix is obtained according to the first initial endpoint, the first current endpoint, the first rotation direction and the first rotation center, and according to the second initial endpoint, the second The current end point, the second rotation direction and the second rotation center result in the second helix.
  • the first rotation direction and the second rotation direction are obtained by the following formula:
  • the V 0 represents the first rotation direction and the second rotation direction
  • the p 0 represents the first current endpoint and the second current endpoint
  • the p -1 represents the first rotation direction start point and the second start point
  • the p 1 represents the first end point and the second end point
  • the ⁇ represents a three-dimensional vector cross product
  • represents the Euclidean distance between the three-dimensional vector p -1 and p 0
  • represents the Euclidean distance between the three-dimensional vector p 0 and p 1 .
  • the first rotation center and the second rotation center are obtained by the following formula:
  • the C represents the first rotation center and the second rotation center
  • the V 0 represents the first rotation direction and the second rotation direction
  • the p 0 represents the first current endpoint and the second current endpoint
  • the p -1 represents the first initial endpoint and the second initial endpoint
  • the n represents a preset constant and n ⁇ 1
  • the i represents the satisfaction of 1 ⁇ i ⁇
  • the maximum constant of n, and the j represents the maximum constant satisfying 2 ⁇ j ⁇ n.
  • the first rotation direction and the first rotation center are obtained according to the first current endpoint, the first start endpoint, and the first end endpoint, and according to the After the second current endpoint, the second start endpoint and the second end endpoint obtain the second rotation direction and the second rotation center, it further includes:
  • the first rotation direction, the first current endpoint, the first start endpoint and the first end endpoint determine whether the first adjacent line segment can be fitted, and according to the The preset error value, the second rotation direction, the second current endpoint, the second start endpoint, and the second end endpoint are used to determine whether the second adjacent line segment can be fitted.
  • the determination of the Whether the first adjacent line segment can be fitted, and according to the preset error value, the second rotation direction, the second current endpoint, the second starting endpoint and the second ending endpoint, determine the Whether the second adjacent line segment can be fitted including:
  • the preset fitting judgment formula is as follows:
  • the ⁇ max represents the preset error value
  • the V 0 represents the first rotation direction and the second rotation direction
  • the p 0 represents the first current endpoint and the second current endpoint
  • the p -1 represents the first start endpoint and the second start endpoint
  • the p 1 represents the first end endpoint and the second end endpoint
  • represents the Euclidean distance between the three-dimensional vector p -1 and p 1
  • represents the Euclidean distance between the three-dimensional vector p -1 and p 0
  • represents the Euclidean distance between the three-dimensional vector p 0 and p 1 .
  • performing smooth transition processing on the partially overlapping curves to obtain fitted curve segments includes:
  • first helix and the second helix are at the same preset rotation angle, taking a first three-dimensional position of the first helix and a second three-dimensional position of the second helix;
  • the partially overlapping curves are replaced with the smooth curves.
  • the smooth curve is obtained by the following formula:
  • the f(u) represents the smooth curve
  • an embodiment of the present invention provides an electronic device, the electronic device includes a memory, a processor, and a computer program stored in the memory and operable on the processor, and the processor executes the When the computer program is described, the curve fitting method based on the numerical control machining system described in any one embodiment of the first aspect is realized.
  • the embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make the computer perform any one of the above first aspects.
  • the curve fitting method based on the numerical control machining system described in the embodiment.
  • One or more technical solutions provided in the embodiments of the present application have at least the following beneficial effects: by obtaining a line segment to be fitted including a plurality of sequentially connected straight line segments, and then for each pair of adjacent straight line segments, based on the least squares Multiplication generates the first spiral and the second spiral with partially overlapping curves, and then performs smooth transition processing on the partially overlapping curves, which can be obtained according to the first spiral, the partially overlapping curve after smooth transition processing, and the second spiral The fitted curve segment.
  • the line segment to be fitted can be fitted into the first helix and the second helix, and the partially overlapping curve after the first helix undergoes smooth transition processing can be smoothly transitioned to the second helix , so as to realize the rapid fitting of the curve under the condition of smooth transition of velocity and acceleration.
  • Fig. 1 is the step flowchart of the curve fitting method based on numerical control machining system of an embodiment of the present invention
  • Fig. 2 is the step flowchart of the curve fitting method based on the numerical control machining system of another embodiment of the present invention
  • Fig. 3 is the step flowchart of the curve fitting method based on the numerical control machining system of another embodiment of the present invention.
  • Fig. 4 is the flow chart of the steps of the curve fitting method based on the numerical control machining system according to another embodiment of the present invention.
  • FIG. 5 is a flow chart of steps of a curve fitting method based on a numerical control machining system according to another embodiment of the present invention.
  • FIG. 6 is a block diagram of an electronic device according to an embodiment of the present invention.
  • orientation descriptions such as up, down, front, back, left, right, etc. indicated orientations or positional relationships are based on the orientations or positional relationships shown in the drawings, and are only In order to facilitate the description of the present invention and simplify the description, it does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.
  • an embodiment of the present invention provides a curve fitting method based on a numerical control machining system.
  • the curve fitting method based on the numerical control machining system specifically includes but is not limited to the following steps S100 , S200 and S300 .
  • Step S100 Acquiring a line segment to be fitted, which includes a plurality of straight line segments connected in sequence;
  • the line segments to be fitted include a large number of continuous small straight lines. It can be understood that this embodiment does not limit the number and length of the straight line segments.
  • Step S200 For each pair of adjacent straight line segments, generate a first helix and a second helix based on the least squares method, and the first helix and the second helix have partially overlapping curves;
  • the partly overlapping curve is the transition part between the first helix and the second helix, therefore, the partly overlapping curve can be represented by either the first helix or the second helix.
  • Step S300 Perform smooth transition processing on partially overlapping curves to obtain fitted curve segments.
  • first spiral and the second spiral are smooth line segments, and the partially overlapping curve is the transition part between the first spiral and the second spiral, therefore, after smoothing the partially overlapping curve , you can get the smooth curve segment after fitting.
  • the line segments to be fitted including multiple sequentially connected straight line segments are obtained first, and then for each pair of adjacent straight line segments, the existing part is generated based on the least squares method
  • the first helix of the overlapping curve and the second helix of the overlapping curve, and then perform smooth transition processing on the partially overlapping curve, and the fitted curve can be obtained according to the first helix, the partially overlapping curve after smooth transition processing, and the second helix curve segment.
  • the line segment to be fitted can be fitted into the first helix and the second helix, and the partially overlapping curve after the first helix undergoes smooth transition processing can be smoothly transitioned to the second helix , so as to realize the rapid fitting of the curve under the condition of smooth transition of velocity and acceleration.
  • adjacent straight line segments include a first adjacent line segment and a second adjacent line segment, and the first adjacent line segment partially overlaps with the second adjacent line segment.
  • step S200 it may specifically include but not It is limited to the following steps S210, S220 and S230.
  • Step S210 Acquiring the first current endpoint, the first starting endpoint and the first ending endpoint of the first adjacent line segment, and acquiring the second current endpoint, the second starting endpoint and the second ending endpoint of the second adjacent line segment;
  • Step S220 Obtain the first rotation direction and the first rotation center according to the first current endpoint, the first start endpoint and the first end endpoint, and obtain the second rotation according to the second current endpoint, the second start endpoint and the second end endpoint orientation and second center of rotation;
  • Step S230 Obtain the first helix according to the first starting endpoint, the first current endpoint, the first rotation direction and the first rotation center, and obtain the first spiral line according to the second starting endpoint, the second current endpoint, the second rotation direction and the second rotation The center gets the second helix.
  • the first rotation direction and the first rotation center can be calculated from the first current endpoint, the first starting endpoint, and the first ending endpoint of the first adjacent line segment, and then the first starting endpoint, the first current endpoint,
  • the first rotation direction and the first rotation center can be calculated to obtain the first spiral line corresponding to the first adjacent line segment;
  • the second current end point, the second start end point and the second end end point of the second adjacent line segment can be Calculate the second rotation direction and the second rotation center, and then calculate the second helix corresponding to the second adjacent line segment from the second starting end point, the second current end point, the second rotation direction and the second rotation center .
  • first rotation direction and the second rotation direction are obtained by the following formula:
  • V 0 represents the first rotation direction and the second rotation direction
  • p 0 represents the first current end point and the second current end point
  • p -1 represents the first start point and the second start point
  • p 1 represents the first end point and the second end point
  • represents the three-dimensional vector cross product
  • represents the Euclidean distance between the three-dimensional vector p -1 and p 0
  • represents the three-dimensional vector p 0 is the Euclidean distance from p 1 .
  • the first rotation direction can be obtained by substituting the first current end point, the first start end point and the first end end point of the first adjacent line segment into the above formula; similarly, the second current end point, The second rotation direction can be obtained by substituting the second starting endpoint and the second ending endpoint into the above formula.
  • first rotation center and the second rotation center are obtained by the following formula:
  • C represents the first rotation center and the second rotation center
  • V 0 represents the first rotation direction and the second rotation direction
  • p 0 represents the first current end point and the second current end point
  • p -1 represents the first starting end point and the second Two initial endpoints
  • n represents a preset constant and n ⁇ 1
  • i represents the maximum constant satisfying 1 ⁇ i ⁇ n
  • j represents the maximum constant satisfying 2 ⁇ j ⁇ n.
  • the first rotation center can be obtained by substituting the first current end point, the first starting end point and the first rotation direction of the first adjacent line segment into the above formula; similarly, the second current end point of the second adjacent line segment, The second starting point and the second rotation direction are substituted into the above formula to obtain the second rotation center.
  • first rotation center and the second rotation center are obtained by substituting and calculating through the above steps respectively.
  • the method further includes but not limited to the following step S240.
  • Step S240 According to the preset error value, the first rotation direction, the first current endpoint, the first start endpoint and the first end endpoint, determine whether the first adjacent line segment can be fitted, and according to the preset error value, the second rotation direction, second current endpoint, second start endpoint, and second end endpoint to determine whether the second adjacent line segment can be fitted.
  • first adjacent line segment Before fitting the first adjacent line segment into the first helix, it is judged whether the first adjacent line segment can be fitted, so as to ensure the fit between the fitted first helix and the first adjacent line segment ; Similarly, before fitting the second adjacent line segment into the second helix, judge whether the second adjacent line segment can be fitted, so as to ensure the fit between the second helix and the second adjacent line segment sex.
  • step S240 may specifically include but not limited to the following steps S241 and S242.
  • Step S241 Determine whether the preset error value, the first rotation direction, the first current endpoint, the first starting endpoint, and the first ending endpoint satisfy the preset fitting judgment formula, and if so, the first adjacent line segment can be fitted ;
  • Step S242 Determine whether the preset error value, the second rotation direction, the second current endpoint, the second starting endpoint, and the second ending endpoint satisfy the preset fitting judgment formula, and if so, the second adjacent line segment can be fitted combine;
  • ⁇ max indicates the preset error value
  • V 0 indicates the first rotation direction and the second rotation direction
  • p 0 indicates the first current end point and the second current end point
  • p -1 indicates the first start end point and the second start end point
  • p 1 represents the first end point and the second end point
  • represents the Euclidean distance between the three-dimensional vector p -1 and p 1
  • represents the three-dimensional vector p
  • represents the Euclidean distance between the three-dimensional vector p 0 and p 1 .
  • step S300 may specifically include but not limited to the following step S310 , step S320 and step S330 .
  • Step S310 when the first helix and the second helix are at the same preset rotation angle, obtain the first three-dimensional position of the first helix and the second three-dimensional position of the second helix;
  • Step S320 Generating a smooth curve corresponding to a partially overlapping curve according to the first three-dimensional position and the second three-dimensional position;
  • Step S330 Use smooth curves to replace partially overlapping curves.
  • f(u) represents a smooth curve, Indicates the three-dimensional position of the first helix when the preset rotation angle is ⁇ , Indicates the three-dimensional position of the second helix when the preset rotation angle is ⁇ , 0 ⁇ u ⁇ 1.
  • the relevant speed values for processing the first helix and the second helix can be obtained in the following manner, so that the use of the numerical control system is more convenient.
  • the electronic device includes a memory 100, a processor 200, and a computer program stored on the memory 100 and operable on the processor 200; when the computer program is executed by the processor 200, any one of the above-mentioned first aspects can be implemented.
  • the curve fitting method based on the CNC machining system described in the example.
  • the electronic device may be a router, switch, server or other data processing and transmission devices.
  • processor 200 and the memory 100 may be connected through a bus or in other ways.
  • non-transitory software programs and instructions required to realize the curve fitting method based on the numerical control machining system of the above-mentioned embodiment are stored in the memory 100, and when executed by the processor 200, the above-mentioned embodiment is executed.
  • the curve fitting method of the numerical control machining system for example, perform method steps S100 to S300 in Fig. 1, method steps S210 to S230 in Fig. 2, method steps S240 in Fig. 3, method steps S241 to S241 in Fig. 4 S242 and method steps S310 to S330 in FIG. 5 .
  • the Internet of Things data monitoring device in the second aspect of the present invention implements the curve fitting method based on the numerical control machining system in any embodiment of the first aspect above, the second aspect of the present invention in the embodiment
  • the specific implementation and technical effects of the electronic device reference may be made to the specific implementation and technical effects of the curve fitting method based on the numerical control machining system in any embodiment of the first aspect above, and details are not repeated here.
  • a computer-readable storage medium in various embodiments of the third aspect of the present invention stores computer-executable instructions, and the computer can
  • the execution instruction is executed by a processor 200 or a controller, for example, by a processor 200 in the above-mentioned electronic device embodiment, which can make the above-mentioned processor 200 execute the curve fitting method based on the numerical control machining system in the above-mentioned embodiment, For example, as in method steps S100 to S300 in FIG. 1 , method steps S210 to S230 in FIG. 2 , method steps S240 in FIG. 3 , method steps S241 to S242 in FIG. 4 and method steps S310 to S310 in FIG. 5 S330.
  • a processor 200 such as a central processing unit 200, a digital signal processor 200, or a microprocessor 200, or as hardware, or as an integrated circuit, Such as application specific integrated circuits.
  • Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data.
  • Computer storage media including, but not limited to, RAM, ROM, EEPROM, flash memory or other memory 100 technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or Any other medium that can be used to store desired information and that can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Abstract

本发明公开了一种基于数控加工系统的曲线拟合方法、电子设备和存储介质,其中,所述基于数控加工系统的曲线拟合方法,包括:获取待拟合线段,所述待拟合线段包括多条依次连接的直线线段;对于每一对相邻的所述直线线段,基于最小二乘法生成第一螺旋线和第二螺旋线,所述第一螺旋线和所述第二螺旋线存在部分重叠曲线;对所述部分重叠曲线进行平滑过渡处理,得到拟合后的曲线线段。根据本发明实施例提供的技术方案,能够在速度和加速度均过渡平滑的情况下,实现曲线的快速拟合。

Description

基于数控加工系统的曲线拟合方法、电子设备和存储介质 技术领域
本发明涉及数控加工技术领域,特别涉及一种基于数控加工系统的曲线拟合方法、电子设备和计算机可读存储介质。
背景技术
数控系统是根据计算机存储器中存储的控制程序,执行部分或全部数值控制功能,并配有接口电路和伺服驱动装置的专用计算机系统。通常地,数控系统及相关的自动化产品主要是为数控机床配套。现有的数控机床按控制轴数可分为三轴、四轴和五轴的加工中心,其中,三轴数控系统的输入数据多为直线和圆弧,四轴和五轴数控系统的输入数据为直线。但是,当输入数据中存在大量连续小直线时,直接应用现有的直线加工方式就会出现频繁加减速的情况,既影响加工效率,又影响加工效果。
相关技术中,针对这种大量连续小直线,一般采用曲线拟合的方式来改善加工效率和加工效果。现有的曲线拟合技术主要采用A样条、B样条、C样条以及NURBS样条,但是A样条无法实现加速度光滑,B、C、NURBS样条要么拟合曲线过渡不平滑,要么实时计算耗时大、硬件要求高,给用户带来不便。
发明内容
本发明旨在至少解决现有技术中存在的技术问题之一。为此,本发明提出一种基于数控加工系统的曲线拟合方法、电子设备和计算机可读存储介质,能够在速度和加速度均过渡平滑的情况下,实现曲线的快速拟合。
第一方面,本发明实施例提供了一种基于数控加工系统的曲线拟合方法,包括:
获取待拟合线段,所述待拟合线段包括多条依次连接的直线线段;
对于每一对相邻的所述直线线段,基于最小二乘法生成第一螺旋线和第二螺旋线,所述 第一螺旋线和所述第二螺旋线存在部分重叠曲线;
对所述部分重叠曲线进行平滑过渡处理,得到拟合后的曲线线段。
根据本发明第一方面的一些实施例,所述相邻的所述直线线段包括第一相邻线段和第二相邻线段,所述第一相邻线段与所述第二相邻线段部分重叠,所述基于最小二乘法生成第一螺旋线和第二螺旋线,包括:
获取所述第一相邻线段的第一当前端点、第一起始端点和第一末尾端点,并获取所述第二相邻线段的第二当前端点、第二起始端点和第二末尾端点;
根据所述第一当前端点、所述第一起始端点和所述第一末尾端点得到第一旋转方向和第一旋转中心,并根据所述第二当前端点、所述第二起始端点和所述第二末尾端点得到第二旋转方向和第二旋转中心;
根据所述第一起始端点、所述第一当前端点、所述第一旋转方向和所述第一旋转中心得到所述第一螺旋线,并根据所述第二起始端点、所述第二当前端点、所述第二旋转方向和所述第二旋转中心得到所述第二螺旋线。
根据本发明第一方面的一些实施例,所述第一旋转方向和所述第二旋转方向通过如下公式获得:
Figure PCTCN2021128422-appb-000001
其中,所述V 0表示所述第一旋转方向和所述第二旋转方向,所述p 0表示所述第一当前端点和所述第二当前端点,所述p -1表示所述第一起始端点和所述第二起始端点,所述p 1表示所述第一末尾端点和所述第二末尾端点,所述×表示三维向量叉乘,所述||p 0-p -1||表示三维向量p -1与p 0的欧氏距离,所述||p 1-p 0||表示三维向量p 0与p 1的欧氏距离。
根据本发明第一方面的一些实施例,所述第一旋转中心和所述第二旋转中心通过如下公式获得:
Figure PCTCN2021128422-appb-000002
其中,所述C表示所述第一旋转中心和所述第二旋转中心,所述V 0表示所述第一旋转方向和所述第二旋转方向,所述p 0表示所述第一当前端点和所述第二当前端点,所述p -1表示 所述第一起始端点和所述第二起始端点,所述n表示预设常数且n≥1,所述i表示满足1≤i≤n的最大常数,所述j表示满足2≤j≤n的最大常数。
根据本发明第一方面的一些实施例,在所述根据所述第一当前端点、所述第一起始端点和所述第一末尾端点得到第一旋转方向和第一旋转中心,并根据所述第二当前端点、所述第二起始端点和所述第二末尾端点得到第二旋转方向和第二旋转中心之后,还包括:
根据预设误差值、所述第一旋转方向、所述第一当前端点、所述第一起始端点和所述第一末尾端点,确定所述第一相邻线段是否可以拟合,并根据所述预设误差值、所述第二旋转方向、所述第二当前端点、所述第二起始端点和所述第二末尾端点,确定所述第二相邻线段是否可以拟合。
根据本发明第一方面的一些实施例,所述根据预设误差值、所述第一旋转方向、所述第一当前端点、所述第一起始端点和所述第一末尾端点,确定所述第一相邻线段是否可以拟合,并根据所述预设误差值、所述第二旋转方向、所述第二当前端点、所述第二起始端点和所述第二末尾端点,确定所述第二相邻线段是否可以拟合,包括:
判断所述预设误差值、所述第一旋转方向、所述第一当前端点、所述第一起始端点和所述第一末尾端点,是否满足预设拟合判定公式,若满足,则所述第一相邻线段可以拟合;
判断所述预设误差值、所述第二旋转方向、所述第二当前端点、所述第二起始端点和所述第二末尾端点,是否满足所述预设拟合判定公式,若满足,则所述第二相邻线段可以拟合;
其中,所述预设拟合判定公式如下:
Figure PCTCN2021128422-appb-000003
所述ε max表示所述预设误差值,所述V 0表示所述第一旋转方向和所述第二旋转方向,所述p 0表示所述第一当前端点和所述第二当前端点,所述p -1表示所述第一起始端点和所述第二起始端点,所述p 1表示所述第一末尾端点和所述第二末尾端点,所述||p 1-p -1||表示三维向量p -1与p 1的欧氏距离,所述||p 0-p -1||表示三维向量p -1与p 0的欧氏距离,所述||p 1-p 0||表示三维向量p 0与p 1的欧氏距离。
根据本发明第一方面的一些实施例,所述对所述部分重叠曲线进行平滑过渡处理,得到拟合后的曲线线段,包括:
在所述第一螺旋线和所述第二螺旋线处于相同的预设旋转角度的情况下,取所述第一螺旋线的第一三维位置和所述第二螺旋线的第二三维位置;
根据所述第一三维位置和所述第二三维位置生成与所述部分重叠曲线对应的平滑曲线;
使用所述平滑曲线取代所述部分重叠曲线。
根据本发明第一方面的一些实施例,所述平滑曲线通过如下公式获得:
Figure PCTCN2021128422-appb-000004
其中,所述f(u)表示所述平滑曲线,所述
Figure PCTCN2021128422-appb-000005
表示所述第一螺旋线在所述预设旋转角度为θ时的三维位置,所述
Figure PCTCN2021128422-appb-000006
表示所述第二螺旋线在所述预设旋转角度为θ时的三维位置,0≤u≤1。
第二方面,本发明实施例提供了一种电子设备,所述电子设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现第一方面任意一项实施例所述的基于数控加工系统的曲线拟合方法。
第三方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行如上第一方面任意一项实施例所述的基于数控加工系统的曲线拟合方法。
本申请实施例中提供的一个或多个技术方案,至少具有如下有益效果:通过获取包括多条依次连接的直线线段的待拟合线段,然后对于每一对相邻的直线线段,基于最小二乘法生成存在部分重叠曲线的第一螺旋线和的第二螺旋线,再对部分重叠曲线进行平滑过渡处理,即可根据第一螺旋线、平滑过渡处理后的部分重叠曲线、第二螺旋线得到拟合后的曲线线段。根据本发明实施例的技术方案,能够将待拟合线段拟合成第一螺旋线和第二螺旋线,并使第一螺旋线经过平滑过渡处理后的部分重叠曲线平滑过渡至第二螺旋线,从而实现在速度和加速度均过渡平滑的情况下,完成曲线的快速拟合。
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。
附图说明
本发明的附加方面和优点结合下面附图对实施例的描述中将变得明显和容易理解,其中:
图1为本发明一个实施例的基于数控加工系统的曲线拟合方法的步骤流程图;
图2为本发明另一个实施例的基于数控加工系统的曲线拟合方法的步骤流程图;
图3为本发明另一个实施例的基于数控加工系统的曲线拟合方法的步骤流程图;
图4为本发明另一个实施例的基于数控加工系统的曲线拟合方法的步骤流程图;
图5为本发明另一个实施例的基于数控加工系统的曲线拟合方法的步骤流程图;
图6为本发明一个实施例的电子设备的模块示意图。
具体实施方式
下面详细描述本发明的实施例,实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。
在本发明的描述中,若干的含义是一个或者多个,多个的含义是两个以上,大于、小于、超过等理解为不包括本数,以上、以下、以内等理解为包括本数。如果有描述到第一、第二只是用于区分技术特征为目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量或者隐含指明所指示的技术特征的先后关系。
在本发明的描述中,需要理解的是,涉及到方位描述,例如上、下、前、后、左、右等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。
在本发明的描述中,如果有描述到第一、第二只是用于区分技术特征为目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量或者隐含指明所指示的技术特征的先后关系。
在本发明的描述中,除非另有明确的限定,设置、安装、连接等词语应做广义理解,所属技术领域技术人员可以结合技术方案的具体内容合理确定上述词语在本发明中的具体含义。
在本发明实施例的描述中,参考术语“一个实施例/实施方式”、“另一实施例/实施方式”或“一些实施例/实施方式”等的描述意指结合实施方式或示例描述的具体特征、结构、材料或者特点包含于本公开的至少两个实施例或实施方式中,对上述术语的示意性表述不一定指的是相同的示实施例或实施方式。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或实施方式中以合适的方式结合。
此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。
下面结合附图,对本发明实施例作进一步阐述。
第一方面,本发明实施例提供了一种基于数控加工系统的曲线拟合方法。
参照图1,基于数控加工系统的曲线拟合方法具体包括但不限于有以下步骤S100、步骤S200和步骤S300。
步骤S100:获取待拟合线段,待拟合线段包括多条依次连接的直线线段;
需要说明的是,一般地,待拟合线段包括大量、连续的小直线,可以理解的是,本实施例并不对其直线线段的数量和长度做限制。
步骤S200:对于每一对相邻的直线线段,基于最小二乘法生成第一螺旋线和第二螺旋线,第一螺旋线和第二螺旋线存在部分重叠曲线;
需要说明的是,部分重叠曲线处即为第一螺旋线和第二螺旋线的过渡部分,因此,部分重叠曲线既可以由第一螺旋线表示,也可以由第二螺旋线表示。
步骤S300:对部分重叠曲线进行平滑过渡处理,得到拟合后的曲线线段。
需要说明的是,由于第一螺旋线和第二螺旋线均为平滑的线段,而部分重叠曲线处为第一螺旋线和第二螺旋线的过渡部分,因此,对部分重叠曲线进行平滑处理后,即可得到拟合后平滑的曲线线段。
可以理解的是,通过上述步骤S100、步骤S200和步骤S300,先获取包括多条依次连接的直线线段的待拟合线段,然后对于每一对相邻的直线线段,基于最小二乘法生成存在部分重叠曲线的第一螺旋线和的第二螺旋线,再对部分重叠曲线进行平滑过渡处理,即可根据第一螺旋线、平滑过渡处理后的部分重叠曲线、第二螺旋线得到拟合后的曲线线段。根据本发明实施例的技术方案,能够将待拟合线段拟合成第一螺旋线和第二螺旋线,并使第一螺旋线 经过平滑过渡处理后的部分重叠曲线平滑过渡至第二螺旋线,从而实现在速度和加速度均过渡平滑的情况下,完成曲线的快速拟合。
参照图2,示例性的,相邻的直线线段包括第一相邻线段和第二相邻线段,第一相邻线段与第二相邻线段部分重叠,关于上述步骤S200,具体可以包括但不限于以下步骤S210、步骤S220和步骤S230。
步骤S210:获取第一相邻线段的第一当前端点、第一起始端点和第一末尾端点,并获取第二相邻线段的第二当前端点、第二起始端点和第二末尾端点;
步骤S220:根据第一当前端点、第一起始端点和第一末尾端点得到第一旋转方向和第一旋转中心,并根据第二当前端点、第二起始端点和第二末尾端点得到第二旋转方向和第二旋转中心;
步骤S230:根据第一起始端点、第一当前端点、第一旋转方向和第一旋转中心得到第一螺旋线,并根据第二起始端点、第二当前端点、第二旋转方向和第二旋转中心得到第二螺旋线。
具体地,由第一相邻线段的第一当前端点、第一起始端点和第一末尾端点即可计算得到第一旋转方向和第一旋转中心,再由第一起始端点、第一当前端点、第一旋转方向和第一旋转中心即可计算得到与第一相邻线段对应的第一螺旋线;由第二相邻线段的第二当前端点、第二起始端点和第二末尾端点即可计算得到第二旋转方向和第二旋转中心,再由第二起始端点、第二当前端点、第二旋转方向和第二旋转中心即可计算得到与第二相邻线段对应的第二螺旋线。
示例性的,第一旋转方向和第二旋转方向通过如下公式获得:
Figure PCTCN2021128422-appb-000007
其中,V 0表示第一旋转方向和第二旋转方向,p 0表示第一当前端点和第二当前端点,p -1表示第一起始端点和第二起始端点,p 1表示第一末尾端点和第二末尾端点,×表示三维向量叉乘,||p 0-p -1||表示三维向量p -1与p 0的欧氏距离,||p 1-p 0||表示三维向量p 0与p 1的欧氏距离。
具体地,将第一相邻线段的第一当前端点、第一起始端点和第一末尾端点代入上述公式即可得到第一旋转方向;同理,将第二相邻线段的第二当前端点、第二起始端点和第二末尾端点代入上述公式即可得到第二旋转方向。
示例性的,第一旋转中心和第二旋转中心通过如下公式获得:
Figure PCTCN2021128422-appb-000008
其中,C表示第一旋转中心和第二旋转中心,V 0表示第一旋转方向和第二旋转方向,p 0表示第一当前端点和第二当前端点,p -1表示第一起始端点和第二起始端点,n表示预设常数且n≥1,i表示满足1≤i≤n的最大常数,j表示满足2≤j≤n的最大常数。
具体地,将第一相邻线段的第一当前端点、第一起始端点和第一旋转方向代入上述公式即可得到第一旋转中心;同理,将第二相邻线段的第二当前端点、第二起始端点和第二旋转方向代入上述公式即可得到第二旋转中心。
示例性的,具体地,先查找最大的i,j,满足1≤i≤n,2≤j≤n,n≥1为给定的一个常数,且p -i、p -i+1、……,p -1为p 0的依次向前查询的端点,p 1、p 2、……,p j为依次向后查询的端点。
然后,按下式求解旋转中心C。
Figure PCTCN2021128422-appb-000009
之后,针对查找的所有端点,按下式求出每个端点与旋转中心的距离。
L t=||p t-C||,t∈(-i,j)
然后,按如下公式求出平均距离。
Figure PCTCN2021128422-appb-000010
之后,按如下公式所有端点与平均距离的误差的绝对值。
e t=|L t-L|
然后,定义端点拟合误差ε,如果所有e t<ε,则表明点p -i,p -i+1,…,p -1,p 0,p 1,p 2,…,p j全部符合拟合要求,C即为求解的旋转中心,否则求e t的最大值对应的t,如果t<0, 则表明p 0前向端点p -i,p -i+1,…,p -1拟合误差大于后向p 1,p 2,…,p j,此时如果i>1,则i=i-1,如果i=1,则j=j-1;如果t>0,则如果j>1,则j=j-1,如果j=1,则i=i-1;如果t=0,则如果i>j,则i=i-1,否则j=j-1。
最后,重复上述步骤,直到找到符合拟合要求的端点p -i,p -i+1,…,p -1,p 0,p 1,p 2,…,p j,以及旋转中心C。
可以理解的是,第一旋转中心和第二旋转中心通过上述步骤分别代入计算得到。
参照图3,示例性的,在上述步骤S220之后,该方法还包括但不限于以下步骤S240。
步骤S240:根据预设误差值、第一旋转方向、第一当前端点、第一起始端点和第一末尾端点,确定第一相邻线段是否可以拟合,并根据预设误差值、第二旋转方向、第二当前端点、第二起始端点和第二末尾端点,确定第二相邻线段是否可以拟合。
具体地,在将第一相邻线段拟合成第一螺旋线之前,判断第一相邻线段是否可以拟合,从而保证拟合后的第一螺旋线与第一相邻线段的贴合性;同理,在将第二相邻线段拟合成第二螺旋线之前,判断第二相邻线段是否可以拟合,从而保证拟合后的第二螺旋线与第二相邻线段的贴合性。
参照图4,示例性的,关于上述步骤S240,具体可以包括但不限于以下步骤S241和步骤S242。
步骤S241:判断预设误差值、第一旋转方向、第一当前端点、第一起始端点和第一末尾端点,是否满足预设拟合判定公式,若满足,则第一相邻线段可以拟合;
步骤S242:判断预设误差值、第二旋转方向、第二当前端点、第二起始端点和第二末尾端点,是否满足预设拟合判定公式,若满足,则第二相邻线段可以拟合;
需要说明的是,预设拟合判定公式如下:
Figure PCTCN2021128422-appb-000011
ε max表示预设误差值,V 0表示第一旋转方向和第二旋转方向,p 0表示第一当前端点和第二当前端点,p -1表示第一起始端点和第二起始端点,p 1表示第一末尾端点和第二末尾端点,||p 1-p -1||表示三维向量p -1与p 1的欧氏距离,||p 0-p -1||表示三维向量p -1与p 0的欧氏距离,||p 1-p 0||表示三维向量p 0与p 1的欧氏距离。
参照图5,示例性的,关于上述步骤S300,具体可以包括但不限于以下步骤S310、步骤S320和步骤S330。
步骤S310:在第一螺旋线和第二螺旋线处于相同的预设旋转角度的情况下,取第一螺旋线的第一三维位置和第二螺旋线的第二三维位置;
步骤S320:根据第一三维位置和第二三维位置生成与部分重叠曲线对应的平滑曲线;
步骤S330:使用平滑曲线取代部分重叠曲线。
具体地,假设p 0点可以构成第一螺旋线
Figure PCTCN2021128422-appb-000012
p 1点也可以构成第二螺旋线
Figure PCTCN2021128422-appb-000013
则p 0指向p 1的线段可以由这两条螺旋线的任意一条构成。由于
Figure PCTCN2021128422-appb-000014
Figure PCTCN2021128422-appb-000015
具有不同的C,V 0,它们之间的过渡无法实现平滑,为此,定义
Figure PCTCN2021128422-appb-000016
分别表示第一螺旋线
Figure PCTCN2021128422-appb-000017
与第二螺旋线
Figure PCTCN2021128422-appb-000018
在旋转角度为θ时的三维位置,则p 0指向p 1的双螺旋线当前三维位置可按公式计算得到,从而生成平滑曲线。
示例性的,平滑曲线通过如下公式获得:
Figure PCTCN2021128422-appb-000019
其中,f(u)表示平滑曲线,
Figure PCTCN2021128422-appb-000020
表示第一螺旋线在预设旋转角度为θ时的三维位置,
Figure PCTCN2021128422-appb-000021
表示第二螺旋线在预设旋转角度为θ时的三维位置,0≤u≤1。
需要说明的是,当u从0变化到1时,第一螺旋线平滑从
Figure PCTCN2021128422-appb-000022
过渡到第二螺旋线
Figure PCTCN2021128422-appb-000023
示例性的,对于加工第一螺旋线和第二螺旋线的相关速度值可由如下方式得到,从而更加便于数控系统的使用。
设平滑曲线的向心最大加速度为a max,最大速度为F,则p 0指向p 1的拟合后的平滑曲线的起点、末点以及最大速度分别通过如下公式获得。
Figure PCTCN2021128422-appb-000024
Figure PCTCN2021128422-appb-000025
Figure PCTCN2021128422-appb-000026
基于上述第一方面实施例的基于数控加工系统的曲线拟合方法,提出本发明第二方面各个实施例的电子设备。
参照图6,该电子设备包括存储器100、处理器200及存储在存储器100上并可在处理器200上运行的计算机程序;计算机程序被处理器200执行时实现如上述第一方面任意一项实施例所描述的基于数控加工系统的曲线拟合方法。
需要说明的是,电子设备可以为路由器、交换机、服务器或者其他数据处理传输设备。
可以理解的是,处理器200和存储器100可以通过总线或者其他方式连接。
需要说明的是,实现上述实施例的基于数控加工系统的曲线拟合方法所需的非暂态软件程序以及指令存储在该存储器100中,当被处理器200执行时,执行上述实施例中的基于数控加工系统的曲线拟合方法,例如,执行如图1中的方法步骤S100至S300、图2中的方法步骤S210至S230、图3中的方法步骤S240、图4中的方法步骤S241至S242和图5中的方法步骤S310至S330。
可以理解的是,由于本发明第二方面实施例的物联网数据监控装置执行包括有上述第一方面任一实施例的基于数控加工系统的曲线拟合方法,因此,本发明第二方面实施例的电子设备的具体实施方式和技术效果,可参照上述第一方面任一实施例的基于数控加工系统的曲线拟合方法的具体实施方式和技术效果,在此不做赘述。
以上所描述的电子设备的实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
基于上述第一方面实施例的基于数控加工系统的曲线拟合方法,提出本发明第三方面各个实施例的计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个处理器200或控制器执行,例如,被上述电子设备实施例中的一个处理器200执行,可使得上述处理器200执行上述实施例中的基于数控加工系统的曲线拟合方法,例如,执行如图1中的方法步骤S100至S300、图2中的方法步骤S210至S230、图3中的方法步骤S240、图4中的方法步骤S241至S242和图5中的方法步骤S310至S330。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器200,如中央处理器200、数字信号处理器200或微处理器200执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上, 计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器100技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
上面结合附图对本发明实施例作了详细说明,但是本发明不限于上述实施例,在所属技术领域普通技术人员所具备的知识范围内,还可以在不脱离本发明宗旨的前提下,作出各种变化。

Claims (10)

  1. 一种基于数控加工系统的曲线拟合方法,其特征在于,包括:
    获取待拟合线段,所述待拟合线段包括多条依次连接的直线线段;
    对于每一对相邻的所述直线线段,基于最小二乘法生成第一螺旋线和第二螺旋线,所述第一螺旋线和所述第二螺旋线存在部分重叠曲线;
    对所述部分重叠曲线进行平滑过渡处理,得到拟合后的曲线线段。
  2. 根据权利要求1所述的方法,其特征在于,所述相邻的所述直线线段包括第一相邻线段和第二相邻线段,所述第一相邻线段与所述第二相邻线段部分重叠,所述基于最小二乘法生成第一螺旋线和第二螺旋线,包括:
    获取所述第一相邻线段的第一当前端点、第一起始端点和第一末尾端点,并获取所述第二相邻线段的第二当前端点、第二起始端点和第二末尾端点;
    根据所述第一当前端点、所述第一起始端点和所述第一末尾端点得到第一旋转方向和第一旋转中心,并根据所述第二当前端点、所述第二起始端点和所述第二末尾端点得到第二旋转方向和第二旋转中心;
    根据所述第一起始端点、所述第一当前端点、所述第一旋转方向和所述第一旋转中心得到所述第一螺旋线,并根据所述第二起始端点、所述第二当前端点、所述第二旋转方向和所述第二旋转中心得到所述第二螺旋线。
  3. 根据权利要求2所述的方法,其特征在于,所述第一旋转方向和所述第二旋转方向通过如下公式获得:
    Figure PCTCN2021128422-appb-100001
    其中,所述V 0表示所述第一旋转方向和所述第二旋转方向,所述p 0表示所述第一当前端点和所述第二当前端点,所述p -1表示所述第一起始端点和所述第二起始端点,所述p 1表示所述第一末尾端点和所述第二末尾端点,所述×表示三维向量叉乘,所述||p 0-p -1||表示三维向量p -1与p 0的欧氏距离,所述||p 1-p 0||表示三维向量p 0与p 1的欧氏距离。
  4. 根据权利要求3所述的方法,其特征在于,所述第一旋转中心和所述第二旋转中心通过如下公式获得:
    Figure PCTCN2021128422-appb-100002
    其中,所述C表示所述第一旋转中心和所述第二旋转中心,所述V 0表示所述第一旋转方向和所述第二旋转方向,所述p 0表示所述第一当前端点和所述第二当前端点,所述p -1表示所述第一起始端点和所述第二起始端点,所述n表示预设常数且n≥1,所述i表示满足1≤i≤n的最大常数,所述j表示满足2≤j≤n的最大常数。
  5. 根据权利要求3所述的方法,其特征在于,在所述根据所述第一当前端点、所述第一起始端点和所述第一末尾端点得到第一旋转方向和第一旋转中心,并根据所述第二当前端点、所述第二起始端点和所述第二末尾端点得到第二旋转方向和第二旋转中心之后,还包括:
    根据预设误差值、所述第一旋转方向、所述第一当前端点、所述第一起始端点和所述第一末尾端点,确定所述第一相邻线段是否可以拟合,并根据所述预设误差值、所述第二旋转方向、所述第二当前端点、所述第二起始端点和所述第二末尾端点,确定所述第二相邻线段是否可以拟合。
  6. 根据权利要求5所述的方法,其特征在于,所述根据预设误差值、所述第一旋转方向、所述第一当前端点、所述第一起始端点和所述第一末尾端点,确定所述第一相邻线段是否可以拟合,并根据所述预设误差值、所述第二旋转方向、所述第二当前端点、所述第二起始端点和所述第二末尾端点,确定所述第二相邻线段是否可以拟合,包括:
    判断所述预设误差值、所述第一旋转方向、所述第一当前端点、所述第一起始端点和所述第一末尾端点,是否满足预设拟合判定公式,若满足,则所述第一相邻线段可以拟合;
    判断所述预设误差值、所述第二旋转方向、所述第二当前端点、所述第二起始端点和所述第二末尾端点,是否满足所述预设拟合判定公式,若满足,则所述第二相邻线段可以拟合;
    其中,所述预设拟合判定公式如下:
    Figure PCTCN2021128422-appb-100003
    所述ε max表示所述预设误差值,所述V 0表示所述第一旋转方向和所述第二旋转方向,所述p 0表示所述第一当前端点和所述第二当前端点,所述p -1表示所述第一起始端点和所述第二起始端点,所述p 1表示所述第一末尾端点和所述第二末尾端点,所述||p 1-p -1||表示三维向量p -1与p 1的欧氏距离,所述||p 0-p -1||表示三维向量p -1与p 0的欧氏距离,所述||p 1-p 0||表示三维向量p 0与p 1的欧氏距离。
  7. 根据权利要求2所述的方法,其特征在于,所述对所述部分重叠曲线进行平滑过渡处理,得到拟合后的曲线线段,包括:
    在所述第一螺旋线和所述第二螺旋线处于相同的预设旋转角度的情况下,取所述第一螺旋线的第一三维位置和所述第二螺旋线的第二三维位置;
    根据所述第一三维位置和所述第二三维位置生成与所述部分重叠曲线对应的平滑曲线;
    使用所述平滑曲线取代所述部分重叠曲线。
  8. 根据权利要求7所述的方法,其特征在于,所述平滑曲线通过如下公式获得:
    Figure PCTCN2021128422-appb-100004
    其中,所述f(u)表示所述平滑曲线,所述
    Figure PCTCN2021128422-appb-100005
    表示所述第一螺旋线在所述预设旋转角度为θ时的三维位置,所述
    Figure PCTCN2021128422-appb-100006
    表示所述第二螺旋线在所述预设旋转角度为θ时的三维位置,0≤u≤1。
  9. 一种电子设备,其特征在于,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至8任意一项所述的基于数控加工系统的曲线拟合方法。
  10. 一种计算机可读存储介质,其特征在于:存储有计算机可执行指令,所述计算机可执行指令用于执行如权利要求1至8任意一项所述的基于数控加工系统的曲线拟合方法。
PCT/CN2021/128422 2021-08-19 2021-11-03 基于数控加工系统的曲线拟合方法、电子设备和存储介质 Ceased WO2023019751A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110954971.X 2021-08-19
CN202110954971.XA CN113791577B (zh) 2021-08-19 2021-08-19 基于数控加工系统的曲线拟合方法、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2023019751A1 true WO2023019751A1 (zh) 2023-02-23

Family

ID=79181851

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/128422 Ceased WO2023019751A1 (zh) 2021-08-19 2021-11-03 基于数控加工系统的曲线拟合方法、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN113791577B (zh)
WO (1) WO2023019751A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119130965A (zh) * 2024-08-30 2024-12-13 东莞市星火齿轮有限公司 一种小模数塑料圆柱齿轮螺旋线偏差的修正方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4926102A (en) * 1987-06-24 1990-05-15 Fanuc Ltd. Involute interpolation method
CN104678894A (zh) * 2015-02-11 2015-06-03 北京配天技术有限公司 数控加工路径的规划方法、数控加工系统和方法
CN109270892A (zh) * 2018-08-31 2019-01-25 天津大学 一种数控加工中非圆曲线的最小二乘螺旋线逼近算法
CN110823238A (zh) * 2019-11-05 2020-02-21 湖南大学 一种改进型三次样条插值曲线拟合路径点方法
CN111571316A (zh) * 2020-04-30 2020-08-25 科德数控股份有限公司 一种丝锥螺纹加工的磨削轨迹优化方法及系统
CN112015142A (zh) * 2020-08-26 2020-12-01 无锡信捷电气股份有限公司 一种基于nurbs的小线段加工方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6434849B1 (en) * 2000-01-24 2002-08-20 Pruftechnik Dieter Busch Ag Method for determining a lateral and/or angular offset between two rotatable parts
CN111176209B (zh) * 2019-10-09 2022-09-23 上海交通大学 型腔螺旋铣削加工进给率与转速离线规划方法
CN112729086B (zh) * 2020-12-28 2022-03-08 西安交通大学 基于四轴数控铣床的涡旋盘体误差在机测量方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4926102A (en) * 1987-06-24 1990-05-15 Fanuc Ltd. Involute interpolation method
CN104678894A (zh) * 2015-02-11 2015-06-03 北京配天技术有限公司 数控加工路径的规划方法、数控加工系统和方法
CN109270892A (zh) * 2018-08-31 2019-01-25 天津大学 一种数控加工中非圆曲线的最小二乘螺旋线逼近算法
CN110823238A (zh) * 2019-11-05 2020-02-21 湖南大学 一种改进型三次样条插值曲线拟合路径点方法
CN111571316A (zh) * 2020-04-30 2020-08-25 科德数控股份有限公司 一种丝锥螺纹加工的磨削轨迹优化方法及系统
CN112015142A (zh) * 2020-08-26 2020-12-01 无锡信捷电气股份有限公司 一种基于nurbs的小线段加工方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119130965A (zh) * 2024-08-30 2024-12-13 东莞市星火齿轮有限公司 一种小模数塑料圆柱齿轮螺旋线偏差的修正方法及装置
CN119130965B (zh) * 2024-08-30 2025-07-04 东莞市星火齿轮有限公司 一种小模数塑料圆柱齿轮螺旋线偏差的修正方法及装置

Also Published As

Publication number Publication date
CN113791577B (zh) 2023-07-21
CN113791577A (zh) 2021-12-14

Similar Documents

Publication Publication Date Title
CN115384547B (zh) 车辆轨迹预测方法、装置、电子装置和存储介质
CN114003613B (zh) 高精地图车道线更新方法、装置、电子设备以及存储介质
WO2020107326A1 (zh) 车道线检测方法、设备、计算机可读存储介质
CN112150550B (zh) 一种融合定位方法及装置
WO2022198993A1 (zh) 一种机械臂运动规划方法、装置、可读存储介质及机械臂
CN112947299B (zh) 一种运动设备的运动控制方法、系统及装置
CN114839927A (zh) S型曲线加减速规划方法、系统及存储介质
CN111319041A (zh) 一种机器人位姿确定方法、装置、可读存储介质及机器人
CN115900742A (zh) 车辆的参考轨迹规划方法、装置、电子设备及存储介质
CN111552235A (zh) 一种基于CANopen协议的多轴同步误差补偿方法和系统
CN115167277A (zh) 小线段轨迹拟合方法、数控加工设备及可读存储介质
CN114690767B (zh) 一种机器人轨迹规划方法、系统以及机器人
CN114647816B (zh) 车道线的确定方法、装置、设备及存储介质
WO2023019751A1 (zh) 基于数控加工系统的曲线拟合方法、电子设备和存储介质
CN116269040A (zh) 机器人、规划清扫路径的方法、装置、设备和存储介质
CN109684944B (zh) 障碍物检测方法、装置、计算机设备和存储介质
CN115230741B (zh) 一种自动驾驶轨迹控制方法及相关设备
CN114114930B (zh) 汽车局部参考路径生成方法、装置、设备及介质
CN116662915A (zh) 故障分析方法、装置、电子设备及计算机存储介质
WO2022095507A1 (zh) 基于平均滤波的直线段平滑方法、装置、设备及存储介质
CN115953751A (zh) 车道线检测方法、装置及电子设备
CN111192216B (zh) 一种车道线平滑处理方法及系统
CN115871718B (zh) 换道轨迹获取方法、装置、计算机设备、介质和程序产品
WO2023019750A1 (zh) 一种轨迹间的局部光顺过渡方法、装置、设备及存储介质
CN118617407A (zh) 一种机械臂轨迹交融控制方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21953987

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21953987

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21953987

Country of ref document: EP

Kind code of ref document: A1