CN115113585B - Method, device and storage medium for fine interpolation based on N-order B spline - Google Patents

Method, device and storage medium for fine interpolation based on N-order B spline Download PDF

Info

Publication number
CN115113585B
CN115113585B CN202211039530.8A CN202211039530A CN115113585B CN 115113585 B CN115113585 B CN 115113585B CN 202211039530 A CN202211039530 A CN 202211039530A CN 115113585 B CN115113585 B CN 115113585B
Authority
CN
China
Prior art keywords
interpolation
fine
coarse
order
period
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.)
Active
Application number
CN202211039530.8A
Other languages
Chinese (zh)
Other versions
CN115113585A (en
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.)
Jinan Bodor Laser Co Ltd
Original Assignee
Jinan Bodor Laser 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 Jinan Bodor Laser Co Ltd filed Critical Jinan Bodor Laser Co Ltd
Priority to CN202211039530.8A priority Critical patent/CN115113585B/en
Publication of CN115113585A publication Critical patent/CN115113585A/en
Application granted granted Critical
Publication of CN115113585B publication Critical patent/CN115113585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/00Programme-control systems
    • G05B19/02Programme-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 programme data in numerical form
    • G05B19/41Numerical 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 programme data in numerical form characterised by interpolation, e.g. the computation of intermediate points between programmed end points to define the path to be followed and the rate of travel along that 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/34Director, elements to supervisory
    • G05B2219/34083Interpolation general

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Theoretical 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

The application belongs to the technical field of program control, and particularly relates to a method, equipment and a storage medium for performing fine interpolation based on an N-order B spline, wherein the method comprises the following steps: acquiring a coarse interpolation period, and performing planning interpolation on a target motion segment based on the coarse interpolation period to obtain a coarse interpolation point; taking a coarse interpolation point sequence associated with the current coarse interpolation period as a control point sequence of a fine interpolator, and fitting the control point sequence by the fine interpolator to obtain an N-order B-spline curve, wherein N is more than or equal to 3; acquiring the fine interpolation accumulated time in the current fine interpolation period, and acquiring the fine interpolation effective time based on the fine interpolation accumulated time and the coarse interpolation period; and determining a fine interpolation point positioned on the N-order B spline curve in the current fine interpolation period based on the fine interpolation effective time and the coarse interpolation period. The method simplifies the fine interpolation calculation process, effectively improves the interpolation real-time performance of the system, realizes the data densification of the interpolation point, and simultaneously makes the corner transition smooth, thereby ensuring the cutting stability.

Description

Method, device and storage medium for fine interpolation based on N-order B spline
Technical Field
The application belongs to the technical field of program control, and particularly relates to a method for performing fine interpolation based on an N-order B spline.
Background
The digital control system is a core part in the automatic manufacturing technology, and the smoothness and the control precision directly determine the quality of the machine tool performance. In a numerical control system, in order to optimize a speed curve, a coarse interpolation is generally performed on a system, and then a fine interpolation process is performed on the system. The fine interpolation can optimize the speed curve and can realize the densification of data points.
The general numerical control system solves the fine interpolation coefficient through a cubic polynomial spline interpolation method, the concept of the method is clear, but the fine interpolation coefficient needs to be calculated once in each coarse interpolation period, the calculation frequency causes large system operation load, and the real-time performance of interpolation data output is further influenced.
Disclosure of Invention
Technical problem to be solved
In view of the foregoing drawbacks and deficiencies of the prior art, the present application provides a method, a device and a readable storage medium for fine interpolation based on N-order B-spline.
(II) technical scheme
In order to achieve the purpose, the following technical scheme is adopted in the application:
in a first aspect, an embodiment of the present application provides a method for performing fine interpolation based on an nth-order B-spline, where the method includes:
acquiring a coarse interpolation period, and performing planning interpolation on a target motion segment based on the coarse interpolation period to obtain a coarse interpolation point;
taking a coarse interpolation point sequence associated with the current coarse interpolation period as a control point sequence of a fine interpolator, and fitting by the fine interpolator to obtain an N-order B spline curve, wherein N is more than or equal to 3;
acquiring the fine interpolation accumulated time in the current fine interpolation period, and obtaining the fine interpolation effective time based on the fine interpolation accumulated time and the coarse interpolation period;
and determining a fine interpolation point located on the N-order B-spline curve in the current fine interpolation period based on the fine interpolation effective time and the coarse interpolation period.
Optionally, the step of obtaining an N-order B-spline curve through fitting of the fine interpolator by using a coarse interpolation point sequence associated with the current coarse interpolation period as a control point sequence of the fine interpolator includes:
step S21, judging whether the fine interpolator is in an idle state,
if yes, repeatedly adding N +1 coarse interpolation points of the current interpolation period to the control point sequence to form a coarse interpolation point sequence with the length of N +1, taking the coarse interpolation point sequence as the control point sequence, calculating the coefficient of an N-order B-spline curve by the fine interpolator through an N-order B-spline curve fitting algorithm, and setting the fine interpolator to be in an operating state;
if not, go to step S22;
s22, judging whether the fine interpolator is in a refreshing state;
if yes, pausing the coarse interpolation, and turning to the step S23;
if not, adding a new coarse interpolation point into the control point sequence, forming a new coarse interpolation sequence with the length of N +1 with the coarse interpolation points of the first N interpolation periods input by the fine interpolator, taking the new coarse interpolation sequence as the control point sequence, and calculating the coefficient of an N-order B spline curve by the fine interpolator through an N-order B spline curve fitting algorithm;
s23, judging whether the number of times of the last coarse interpolation point before the addition of the fine interpolation control point sequence is suspended to the current fine interpolation period is N:
if yes, go to step S24;
if not, adding a coarse interpolation point of the last cycle before the pause of the coarse interpolation into the coarse interpolation sequence, forming a coarse interpolation sequence with the length of N +1 with the control points of the first N interpolation cycles input by the fine interpolator, taking the coarse interpolation sequence as a control point sequence, and calculating the coefficient of an N-order B-spline by the fine interpolator through an N-order B-spline fitting algorithm;
s24, judging whether the coarse interpolation is not finished;
if so, setting the fine interpolator to be in an operating state, adding a new coarse interpolation point into a control point sequence of the fine interpolator, forming a new coarse interpolation sequence with the length of N +1 with control points obtained in the first three periods of the fine interpolator, taking the new coarse interpolation sequence as the control point sequence, and calculating the coefficient of an N-order B-spline curve by the fine interpolator through an N-order B-spline curve fitting algorithm;
if not, setting the fine interpolation device to be in an idle state, and finishing interpolation.
Optionally, determining a fine interpolation point located on an nth-order B-spline curve in the current fine interpolation period based on the fine interpolation valid time and the coarse interpolation period includes:
based on the fine interpolation effective time and a preset coarse interpolation period, calculating the current polynomial parameters according to the following formulaτ
Figure 559109DEST_PATH_IMAGE001
Wherein,
Figure 102348DEST_PATH_IMAGE002
in order to fine-interpolate the effective time,
Figure 678823DEST_PATH_IMAGE003
in order to have a coarse interpolation period, the interpolation period is,eto adjust the coefficients;
and calculating to obtain the position coordinates of the fine interpolation points through an N-order B-spline curve function based on the current polynomial parameters.
Optionally, the adjustment coefficient is determined based on a radius of curvature of a last fine interpolation point and the interpolation error.
Optionally, obtaining a fine interpolation valid time based on the fine interpolation cumulative time and the coarse interpolation period includes:
judging whether the fine interpolation accumulated time is larger than or equal to the coarse interpolation period or not;
if yes, calculating the effective time of the fine interpolation according to the following formula:
Figure 401928DEST_PATH_IMAGE004
wherein,
Figure 419563DEST_PATH_IMAGE005
in order to fine-interpolate the effective time,
Figure 336965DEST_PATH_IMAGE006
in order to precisely interpolate the accumulated time,
Figure 931895DEST_PATH_IMAGE007
is a coarse interpolation period;
and if not, taking the fine interpolation accumulated time as fine interpolation effective time.
Optionally, the obtaining of the fine interpolation accumulated time in the current fine interpolation period includes:
obtaining the accumulated time of the fine interpolation in the previous fine interpolation period,
updating the fine interpolation accumulated time in the previous fine interpolation period according to the following formula to obtain the fine interpolation accumulated time in the current fine interpolation period:
Figure 927533DEST_PATH_IMAGE008
wherein,
Figure 658728DEST_PATH_IMAGE009
for the accumulated fine interpolation time in the previous fine interpolation period,
Figure 120934DEST_PATH_IMAGE010
is the fine interpolation period.
Optionally, based on the coarse interpolation period, a S-type acceleration and deceleration algorithm is used to perform planning interpolation on the target motion segment.
In a second aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method for fine interpolation based on N-th order B-spline according to any of the first aspect above.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the method for performing fine interpolation based on N-th-order B-spline according to any one of the first aspect.
(III) advantageous effects
The beneficial effect of this application is: the application provides a method, equipment and a readable storage medium for performing fine interpolation based on an N-order B spline, wherein the method comprises the following steps: acquiring a coarse interpolation period, and performing planning interpolation on a target motion segment based on the coarse interpolation period to obtain a coarse interpolation point; taking a coarse interpolation point sequence associated with the current coarse interpolation period as a control point sequence of a fine interpolator, and fitting the control point sequence by the fine interpolator to obtain an N-order B-spline curve, wherein N is more than or equal to 3; acquiring fine interpolation accumulated time in a current fine interpolation period, and acquiring fine interpolation effective time based on the fine interpolation accumulated time and the coarse interpolation period; and determining a fine interpolation point positioned on the N-order B spline curve in the current fine interpolation period based on the fine interpolation effective time and the coarse interpolation period. The method simplifies the fine interpolation calculation process, effectively improves the interpolation real-time performance of the system, realizes the data densification of the interpolation point, and simultaneously makes the corner transition smooth, thereby ensuring the cutting stability.
Drawings
The application is described with the aid of the following figures:
fig. 1 is a schematic flow chart of a method for performing fine interpolation based on an nth-order B-spline in an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a method for performing fine interpolation based on third-order B-spline in another embodiment of the present application;
FIG. 3 is a flowchart of a third-order B-spline-based fine interpolation process according to another embodiment of the present invention;
FIG. 4 is a comparison example diagram of interpolation traces based on third-order B-splines for fine interpolation and without fine interpolation according to another embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to still another embodiment of the present application.
Detailed Description
For the purpose of better explaining the present invention and to facilitate understanding, the present invention will be described in detail by way of specific embodiments with reference to the accompanying drawings. It is to be understood that the following specific examples are illustrative of the invention only and are not to be construed as limiting the invention. In addition, it should be noted that, in the case of no conflict, the embodiments and features in the embodiments in the present application may be combined with each other; for convenience of description, only portions related to the present invention are shown in the drawings.
The method is applied to a Computer Numerical Control (CNC) system, and particularly can be executed in a main Control device of the CNC system.
Example one
Fig. 1 is a schematic flow chart of a method for performing fine interpolation based on an nth-order B-spline in an embodiment of the present application, and as shown in fig. 1, the method for performing fine interpolation based on an nth-order B-spline in the embodiment includes:
s10, obtaining a coarse interpolation period, and performing planning interpolation on a target motion segment based on the coarse interpolation period to obtain a coarse interpolation point;
s20, taking a coarse interpolation point sequence associated with the current coarse interpolation period as a control point sequence of a fine interpolator, and fitting the control point sequence through the fine interpolator to obtain an N-order B spline curve, wherein N is more than or equal to 3;
s30, acquiring the fine interpolation accumulated time in the current fine interpolation period, and obtaining the fine interpolation effective time based on the fine interpolation accumulated time and the coarse interpolation period;
and S40, determining a fine interpolation point located on an N-order B-spline curve in the current fine interpolation period based on the fine interpolation effective time and the coarse interpolation period.
According to the method for performing the fine interpolation based on the N-order B-spline, the fine interpolation can be realized only by taking the coarse interpolation position point as the N-order B-spline control point, so that the fine interpolation calculation process is simplified, the interpolation real-time performance of the system is effectively improved, the corner transition is smooth while the data densification of the interpolation point is realized, and the cutting stability is ensured.
In order to better understand the present invention, the steps in the present embodiment are explained below.
In this embodiment S10, based on the coarse interpolation period, an S-type acceleration/deceleration algorithm may be used to perform planning interpolation on the target motion segment.
In this embodiment S20, the fine interpolator is a device or program name for completing fine interpolation operation in the numerical control system, and may be a hardware interpolator or a software interpolator. The hardware interpolator is composed of logic circuit, the software interpolator is mainly composed of microprocessor, and various interpolation functions are completed by computer program.
In this embodiment, a software and hardware combined interpolator may be used, and the software completes the coarse interpolation and the hardware completes the fine interpolation. The rough interpolation adopts a software method to segment the processing track into line segments, and the fine interpolation adopts a hardware interpolator to further densify the data points of the line segments segmented by the rough interpolation.
In this embodiment S30, a specific method for obtaining the fine interpolation accumulated time in the current fine interpolation period is as follows:
obtaining the accumulated time of the fine interpolation in the previous fine interpolation period,
updating the fine interpolation accumulated time in the previous fine interpolation period according to the formula (1) to obtain the fine interpolation accumulated time in the current fine interpolation period:
Figure 704624DEST_PATH_IMAGE011
(1)
wherein,
Figure 769532DEST_PATH_IMAGE009
for the accumulated time of the fine interpolation in the previous fine interpolation period,
Figure 761759DEST_PATH_IMAGE010
in order to interpolate the period precisely for the purpose,
Figure 253920DEST_PATH_IMAGE012
the accumulated time is interpolated for the current fine interpolation.
In this embodiment S30, the method for obtaining the fine interpolation effective time based on the fine interpolation cumulative time and the coarse interpolation period is:
judging whether the fine interpolation accumulated time is greater than or equal to a coarse interpolation period;
if yes, calculating the effective time of the fine interpolation according to the formula (2):
Figure 89021DEST_PATH_IMAGE013
(2)
wherein,
Figure 193505DEST_PATH_IMAGE014
in order to fine-interpolate the effective time,
Figure 305818DEST_PATH_IMAGE016
in order to interpolate the accumulated time for the current fine interpolation,
Figure 968880DEST_PATH_IMAGE007
a coarse interpolation period;
if not, the fine interpolation accumulated time is used as the fine interpolation effective time.
In this embodiment S40, the method for determining the fine interpolation point includes:
based on the effective time of fine interpolation and the preset coarse interpolation period, calculating the current polynomial parameter according to the formula (3)τ
Figure 25698DEST_PATH_IMAGE017
(3)
Wherein,
Figure 573354DEST_PATH_IMAGE018
in order to interpolate the effective time precisely,
Figure 133648DEST_PATH_IMAGE003
in order to have a coarse interpolation period, the interpolation period is set to be,eto adjust the coefficients;
based on the current polynomial parameters, calculating the fine interpolation points according to formula (4):
Figure 235DEST_PATH_IMAGE019
(4)
wherein,τin order to be the current polynomial parameter,
Figure 419715DEST_PATH_IMAGE020
the adjustment coefficient here may be determined based on the radius of curvature of the last fine interpolation point and the interpolation error. The corner transition can be smoother by adjusting the coefficient, and the cutting stability is further ensured.
Example two
The execution main body of this embodiment may be a control module of the numerical control system, the control module may include a memory and a processor, and in some other embodiments, the execution main body may also be other electronic devices that can implement the same or similar functions, which is not limited in this embodiment.
In this embodiment, a detailed description is given of an implementation process of fine interpolation based on a third-order B-spline when N =3, based on the first embodiment. Fig. 2 is a schematic flow chart of a method for performing fine interpolation based on a third-order B-spline in another embodiment of the present application, and as shown in fig. 2, the fine interpolation process includes the following steps:
step S100, initializing a coarse interpolation period and a fine interpolation period, and planning and interpolating a motion segment.
In the present embodiment, the S-type acceleration and deceleration algorithm is used for the planning interpolation, and in general, the coarse interpolation period may be set to be twice or more than the fine interpolation period.
And step S200, obtaining an interpolation point of any one coarse interpolation period as a control point of a fine interpolator, and then calculating a fine interpolation coefficient by a third-order B spline method.
The fine interpolation coefficient, that is, the coefficient of the third-order B-spline curve, can be calculated by the following formula (5):
Figure 630117DEST_PATH_IMAGE021
(5)
wherein,B 0B 1B 2B 3 for the sequence of coarse interpolation points associated with the current coarse interpolation period, a、b、c、dthe fine interpolation coefficients are obtained.
Here, the fine interpolation coefficients are third-order, second-order, first-order, and zeroth-order coefficients of the third-order B-spline curve. After the coarse interpolation, a third-order B spline method is utilized, the coarse interpolation point is used as a control point of the fine interpolation, a fine interpolation curve is obtained, and the fine interpolation curve in each coarse interpolation period is a Bezier curve with continuous curvature.
Step S300, updating the precise interpolation accumulated time;
and step S400, calculating a fine interpolation point through the fine interpolation accumulated time, and outputting the calculation result as a new position point.
The following describes the implementation processes of step S200-step S400, which are to update the fine interpolation coefficient through the coarse interpolation point, update the fine interpolation cumulative time, calculate the fine interpolation point through the fine interpolation cumulative time, and perform corresponding processing.
In order to meet different processing requirements, in particular, to adapt to numerical control cutting, the present embodiment defines three states of the fine interpolation device, namely an idle state, an operating state and a refreshing state, and the idle state is set when no coarse interpolation point is input as a control point of the fine interpolation. During numerical control cutting, a state that the speed reduction is required to be zero at the end of a current motion command often exists, for example, at a switching position of a lost motion command and a feed command, or when machining enters pause, the state of a fine interpolator needs to be set to be a refreshing state without error at the moment, interpolation is paused, and an interpolation point of the last period before the pause interpolation is added to a fine interpolation control point sequence. And the running state is the most common state when the fine interpolation device runs, and a new coarse interpolation point is added to the fine interpolation control point sequence at the moment.
Fig. 3 is a flowchart of a third-order B-spline-based fine interpolation process in another embodiment of the present application, as shown in fig. 3,
step S1, judging whether the fine interpolation device is in an idle state,
if yes, repeatedly adding 4 rough interpolation points of the current rough interpolation period to the control point sequence to form a rough interpolation point sequence with the length of 4, taking the rough interpolation point sequence as the control point sequence, calculating the coefficient of a third-order B spline by a fine interpolator through a third-order B spline fitting algorithm, setting the fine interpolator to be in an operating state, and turning to the step S5;
if not, turning to the step S2;
s2, judging whether the fine interpolator is in a refreshing state;
if yes, pausing the coarse interpolation, and turning to the step S3;
if not, adding a new coarse interpolation point into the control point sequence, forming a new coarse interpolation sequence with the length of 4 with the coarse interpolation points of the first 3 interpolation periods input by the fine interpolator, taking the new coarse interpolation sequence as the control point sequence, calculating the coefficient of a three-order B-spline curve by the fine interpolator through a three-order B-spline curve fitting algorithm, and turning to the step S5;
s3, judging whether the number of times of adding the last coarse interpolation point before the fine interpolation controller control point sequence is suspended to the current fine interpolation period is 3:
if yes, turning to step S4;
if not, adding the coarse interpolation point of the last cycle before the pause of the coarse interpolation into the coarse interpolation sequence, forming a coarse interpolation sequence with the length of 4 with the control points of the first 3 interpolation cycles input by the fine interpolator, taking the coarse interpolation sequence as the control point sequence, calculating the coefficient of a three-order B spline curve by the fine interpolator through a three-order B spline curve fitting algorithm, and turning to the step S5;
s4, judging whether the coarse interpolation is not finished;
if yes, setting the fine interpolator to be in an operating state, adding a new coarse interpolation point into a control point sequence of the fine interpolator, forming a new coarse interpolation sequence with the length of 4 with control points obtained in the first three periods of the fine interpolator, taking the new coarse interpolation sequence as the control point sequence, calculating coefficients of a three-order B-spline by the fine interpolator through a three-order B-spline curve fitting algorithm, and turning to the step S5;
if not, the fine interpolation device is set to be in an idle state, and the interpolation is finished.
S5, judging whether the fine interpolation accumulated time is larger than a coarse interpolation period or not, if so, updating the fine interpolation accumulated time through a formula (2), and turning to the step S6; if not, the updating is not carried out, and the step S6 is switched to;
s6, calculating to obtain a fine interpolation point by adopting formulas (3) and (4) based on the updated fine interpolation accumulated time, and turning to the step S7;
s7, accumulating and updating the accumulated time of the fine interpolation through a formula (1), namely accumulating a fine interpolation period, and then turning to the step S8;
and S8, judging whether the current fine interpolation accumulated time is larger than a coarse interpolation period, if so, turning to the step S1, and if not, turning to the step S6.
In the embodiment, a rough interpolation point is obtained by planning and interpolating a motion segment, the rough interpolation point is used as a control point of fine interpolation, a polynomial coefficient of an interpolation curve is directly calculated by a three-order B spline principle, and the interpolation point is obtained by sampling on the curve by using a fine interpolation period, so that the densification of a data point is realized, the operation flow is simplified, and the operation performance of a system is effectively improved; three states of idle, running and refreshing are designed for fine interpolation aiming at different processing scenes, so that different processing requirements in the field of numerical control cutting are effectively met; meanwhile, the track can be optimized to a certain extent, so that the processing track can achieve better motion performance.
To further illustrate the present invention, two-dimensional planar numerical control laser cutting is taken as an example, and specific examples are as follows.
The following G code is used:
G00 X0 Y10
G01 X0 Y0
G01 X10 Y0
other part of the parameter settings are as follows:
coarse interpolation period: the time of the reaction solution is 0.005s,
fine interpolation period: the time of the reaction solution is 0.001s,
maximum acceleration: 10000mm/s 2
Maximum speed: 200mm/s.
The results of laser cutting before and after the fitting of the clothoid line are illustrated in the following by comparing with fig. 4.
Fig. 4 is a comparison example diagram of interpolation trajectories when fine interpolation is performed based on a third-order B-spline and fine interpolation is not added in another embodiment of the present application, where a horizontal axis is an X-axis of a machining plane and a vertical axis is a Y-axis of the machining plane. As shown in fig. 3, when there is no fine interpolation, the interpolation points are sparse, and there is a sudden change in the processing direction in the direct transition at the corner, after the fine interpolation is performed, the data points are densified, and there is a certain smoothing effect on the transition at the corner.
EXAMPLE III
A third aspect of the present application provides, by way of a third embodiment, an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the computer program when executed by the processor implements the steps of the method for fine interpolation based on N-th order B-spline as described in any of the above embodiments.
Fig. 5 is a schematic architecture diagram of an electronic device according to still another embodiment of the present application.
The electronic device shown in fig. 5 may include: at least one processor 101, at least one memory 102, at least one network interface 104, and other user interfaces 103. The various components in the electronic device are coupled together by a bus system 105. It is understood that the bus system 105 is used to enable communications among the components. The bus system 105 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 105 in fig. 5.
The user interface 103 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball (trackball), or touch pad, among others.
It will be appreciated that the memory 102 in this embodiment may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), enhanced Synchronous SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 102 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 102 stores elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 1021 and application programs 1022.
The operating system 1021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 1022 includes various applications for implementing various application services. Programs that implement methods in accordance with embodiments of the invention can be included in application 1022.
In the embodiment of the present invention, the processor 101 is configured to execute the method steps provided in the first aspect by calling a program or an instruction stored in the memory 102, which may be specifically a program or an instruction stored in the application 1022.
The method disclosed by the above embodiment of the present invention can be applied to the processor 101, or implemented by the processor 101. The processor 101 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 101. The processor 101 described above may be a general purpose processor, a digital signal processor, an application specific integrated circuit, an off-the-shelf programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 102, and the processor 101 reads the information in the memory 102 and completes the steps of the method in combination with the hardware.
In addition, with reference to the method for performing fine interpolation based on an N-th order B-spline in the foregoing embodiments, an embodiment of the present invention may provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for performing fine interpolation based on an N-th order B-spline in any one of the above embodiments may be implemented.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. The use of the terms first, second, third, etc. are used for convenience only and do not denote any order. These words are to be understood as part of the name of the component.
Furthermore, it should be noted that in the description of the present specification, the description of the term "one embodiment", "some embodiments", "examples", "specific examples" or "some examples", etc., means that a specific feature, structure, material or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, the claims should be construed to include preferred embodiments and all changes and modifications that fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include such modifications and variations.

Claims (8)

1. A method for performing fine interpolation based on N-order B-spline is characterized by comprising the following steps:
acquiring a coarse interpolation period, and performing planning interpolation on a target motion segment based on the coarse interpolation period to obtain a coarse interpolation point;
taking a coarse interpolation point sequence associated with the current coarse interpolation period as a control point sequence of a fine interpolator, and fitting by the fine interpolator to obtain an N-order B spline curve, wherein N is more than or equal to 3;
acquiring the fine interpolation accumulated time in the current fine interpolation period, and obtaining the fine interpolation effective time based on the fine interpolation accumulated time and the coarse interpolation period;
determining a fine interpolation point located on the Nth-order B-spline curve in the current fine interpolation period based on the fine interpolation effective time and the coarse interpolation period, wherein the fine interpolation point comprises:
based on the fine interpolation effective time and a preset coarse interpolation period, calculating the current polynomial parameters according to the following formulaτ
Figure DEST_PATH_IMAGE001
Wherein,
Figure 58758DEST_PATH_IMAGE002
in order to fine-interpolate the effective time,
Figure DEST_PATH_IMAGE003
in order to have a coarse interpolation period, the interpolation period is set to be,eto adjust the coefficient;
and calculating to obtain the position coordinates of the fine interpolation points through an N-order B-spline curve function based on the current polynomial parameters.
2. The method of claim 1, wherein the fitting of the fine interpolator to obtain the N-th order B-spline curve by using the coarse interpolation point sequence associated with the current coarse interpolation period as the control point sequence of the fine interpolator comprises:
step S21, judging whether the fine interpolator is in an idle state,
if yes, repeatedly adding N +1 coarse interpolation points of the current interpolation period to the control point sequence to form a coarse interpolation point sequence with the length of N +1, taking the coarse interpolation point sequence as the control point sequence, calculating the coefficient of an N-order B-spline curve by the fine interpolator through an N-order B-spline curve fitting algorithm, and setting the fine interpolator to be in an operating state;
if not, go to step S22;
s22, judging whether the fine interpolation device is in a refreshing state;
if yes, pausing the coarse interpolation, and turning to the step S23;
if not, adding a new coarse interpolation point into the control point sequence, forming a new coarse interpolation sequence with the length of N +1 with the coarse interpolation points of the previous N interpolation periods input by the fine interpolator, taking the new coarse interpolation sequence as the control point sequence, and calculating the coefficient of an N-order B-spline curve by the fine interpolator through an N-order B-spline curve fitting algorithm;
s23, judging whether the number of times of the last coarse interpolation point before the addition of the fine interpolation control point sequence is suspended to the current fine interpolation period is N:
if yes, go to step S24;
if not, adding a coarse interpolation point of the last cycle before the pause of the coarse interpolation into the coarse interpolation sequence, forming a coarse interpolation sequence with the length of N +1 with the control points of the first N interpolation cycles input by the fine interpolator, taking the coarse interpolation sequence as a control point sequence, and calculating the coefficient of an N-order B-spline by the fine interpolator through an N-order B-spline fitting algorithm;
s24, judging whether the coarse interpolation is not finished;
if yes, setting the fine interpolator to be in an operating state, adding a new coarse interpolation point into a fine interpolator control point sequence, forming a new coarse interpolation sequence with the length of N +1 with the control points obtained in the previous three periods of the fine interpolator, taking the new coarse interpolation sequence as the control point sequence, and calculating the coefficient of an N-order B spline curve by the fine interpolator through an N-order B spline curve fitting algorithm;
if not, setting the fine interpolation device to be in an idle state, and ending the interpolation.
3. The method as claimed in claim 1, wherein the adjustment coefficient is determined based on the radius of curvature of the last fine interpolation point and the interpolation error.
4. The method of claim 1, wherein obtaining a fine interpolation effective time based on the fine interpolation cumulative time and the coarse interpolation period comprises:
judging whether the fine interpolation accumulated time is greater than or equal to the coarse interpolation period;
if yes, calculating the fine interpolation effective time by the following formula:
Figure 54527DEST_PATH_IMAGE004
wherein,
Figure DEST_PATH_IMAGE005
in order to interpolate the effective time precisely,
Figure 476674DEST_PATH_IMAGE006
in order to precisely interpolate the accumulated time,
Figure DEST_PATH_IMAGE007
a coarse interpolation period;
and if not, taking the fine interpolation accumulated time as fine interpolation effective time.
5. The method of claim 1, wherein obtaining the cumulative time of the fine interpolation in the current fine interpolation period comprises:
obtaining the accumulated time of the fine interpolation in the previous fine interpolation period,
updating the fine interpolation accumulated time in the previous fine interpolation period according to the following formula to obtain the fine interpolation accumulated time in the current fine interpolation period:
Figure 934201DEST_PATH_IMAGE008
wherein,
Figure DEST_PATH_IMAGE009
for the accumulated time of the fine interpolation in the previous fine interpolation period,
Figure 561622DEST_PATH_IMAGE010
is the fine interpolation period.
6. The method for performing fine interpolation based on Nth-order B-spline of claim 1, wherein based on the coarse interpolation period, a S-type acceleration and deceleration algorithm is used to perform planning interpolation on the target motion segment.
7. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method for fine interpolation based on N-th order B-spline according to any of the preceding claims 1 to 6.
8. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the method for fine interpolation based on N-th order B-spline according to any one of claims 1 to 6.
CN202211039530.8A 2022-08-29 2022-08-29 Method, device and storage medium for fine interpolation based on N-order B spline Active CN115113585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211039530.8A CN115113585B (en) 2022-08-29 2022-08-29 Method, device and storage medium for fine interpolation based on N-order B spline

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211039530.8A CN115113585B (en) 2022-08-29 2022-08-29 Method, device and storage medium for fine interpolation based on N-order B spline

Publications (2)

Publication Number Publication Date
CN115113585A CN115113585A (en) 2022-09-27
CN115113585B true CN115113585B (en) 2022-11-11

Family

ID=83335702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211039530.8A Active CN115113585B (en) 2022-08-29 2022-08-29 Method, device and storage medium for fine interpolation based on N-order B spline

Country Status (1)

Country Link
CN (1) CN115113585B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115480519B (en) * 2022-11-04 2023-02-21 济南邦德激光股份有限公司 B-spline curve fitting method, device and medium based on orthogonal trigonometric decomposition

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000082152A (en) * 1998-09-07 2000-03-21 Usc Corp Method for controlling trace and storage medium for recording the same method
CN112068487A (en) * 2019-08-28 2020-12-11 合肥宏晶微电子科技股份有限公司 Interpolation control method, interpolation control device and readable storage medium
CN113433894A (en) * 2021-07-17 2021-09-24 中山迈雷特数控技术有限公司 Multi-channel multi-axis linkage numerical control system and method based on industrial PC

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10065422A1 (en) * 2000-12-27 2002-07-18 Siemens Ag Process and control for creating and optimizing flexible, high-quality cam functions directly via the control program / user program
CN103048954A (en) * 2013-01-11 2013-04-17 福建工程学院 Segmented interpolation method of NURBS (Non-Uniform Rational B-Spline) curve based on ARM9 (Advanced RISC Machines) embedded system and FPGA (Field Programmable Gate Array)
CN103744352A (en) * 2013-12-23 2014-04-23 华中科技大学 FPGA-based cubic B-spline curve hardware interpolator
CN104020718A (en) * 2014-05-28 2014-09-03 张万军 Self-adaption real-time interpolation method for NURBS curve reference model
CN107450472B (en) * 2017-08-31 2019-06-07 华中科技大学 The method for realizing cutter path parameter arc length based on three bezier curve interpolation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000082152A (en) * 1998-09-07 2000-03-21 Usc Corp Method for controlling trace and storage medium for recording the same method
CN112068487A (en) * 2019-08-28 2020-12-11 合肥宏晶微电子科技股份有限公司 Interpolation control method, interpolation control device and readable storage medium
CN113433894A (en) * 2021-07-17 2021-09-24 中山迈雷特数控技术有限公司 Multi-channel multi-axis linkage numerical control system and method based on industrial PC

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
一种基于de Casteljau算法的Bezier曲线插补方法;宋健等;《山东工业技术》;20170615(第12期);全文 *
一种实时前瞻的微线段直接插补算法;章永年等;《东南大学学报(自然科学版)》;20100720(第04期);全文 *
三次Bezier曲线的插补算法及误差分析;叶丽等;《重庆工学院学报(自然科学版)》;20080715(第07期);全文 *
基于FPGA的三次B样条曲线插补算法优化和实现;冯健等;《机械与电子》;20120624(第06期);第0-3节 *
基于SoC的NURBS曲线插补器研究与实现;龚芳等;《控制工程》;20180120(第01期);全文 *
基于两级插补机制的NURBS曲线插补器研究;聂明星等;《福建工程学院学报》;20141225(第06期);全文 *

Also Published As

Publication number Publication date
CN115113585A (en) 2022-09-27

Similar Documents

Publication Publication Date Title
Tikhon et al. NURBS interpolator for constant material removal rate in open NC machine tools
CN114755975B (en) Method, apparatus and storage medium for controlling trajectory error generated by velocity filtering
Wang et al. NURBS interpolator with adaptive smooth feedrate scheduling and minimal feedrate fluctuation
Yau et al. Real-time NURBS interpolation using FPGA for high speed motion control
CN114779721B (en) Method, apparatus, and storage medium for performing velocity filtering based on location points
CN115113585B (en) Method, device and storage medium for fine interpolation based on N-order B spline
JP2006309645A (en) Curve interpolation method
CN106814694A (en) A kind of parameter curve prediction interpolation algorithm of high-speed, high precision
CN114296398B (en) High-speed high-precision interpolation method for laser cutting
CN113433889B (en) Tool path planning method for five-axis machine tool machining based on three-section type claw curve
CN114237161B (en) Industrial robot NURBS curve interpolation method based on digital filtering
Liu et al. A C3 continuous toolpath corner smoothing method for a hybrid machining robot
Hayasaka et al. A lightweight interpolation algorithm for short-segmented machining tool paths to realize vibration avoidance, high accuracy, and short machining time
CN115097786B (en) Processing track optimization method and equipment based on convolution line and storage medium
CN117008532A (en) Three-order geometrically continuous numerical control tool path corner smoothing method
Wu et al. NURBS interpolator with scheduling scheme combining cubic and quartic s-shaped feedrate profiles under drive and chord error constraints
Hua et al. Global toolpath smoothing for CNC machining based on B-spline approximation with tool tip position adjustment
Li et al. Accurate interpolation and contouring control algorithm based on FIR filters for the corner transition
Nie et al. Jerk-continuous feedrate optimization method for NURBS interpolation
Mohan et al. Parametric NURBS Curve Interpolators: A Review: A Review
CN115237058B (en) Newton iteration method-based B spline real-time interpolation method, equipment and storage medium
Wei et al. An efficient and accurate interpolation method for parametric curve machining
Lei et al. Local tool path smoothing based on symmetrical NURBS transition curve with look ahead optimal method: experimental and analytical study
Nie et al. Real‐Time NURBS Interpolation under Multiple Constraints
CN115480519A (en) B spline curve fitting method, device and medium based on orthogonal trigonometric decomposition

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
GR01 Patent grant
GR01 Patent grant