CN112925268B - High-performance cutting bed motion control system based on FPGA - Google Patents

High-performance cutting bed motion control system based on FPGA Download PDF

Info

Publication number
CN112925268B
CN112925268B CN202110111542.6A CN202110111542A CN112925268B CN 112925268 B CN112925268 B CN 112925268B CN 202110111542 A CN202110111542 A CN 202110111542A CN 112925268 B CN112925268 B CN 112925268B
Authority
CN
China
Prior art keywords
axis
motion
module
speed
acceleration
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
CN202110111542.6A
Other languages
Chinese (zh)
Other versions
CN112925268A (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN202110111542.6A priority Critical patent/CN112925268B/en
Publication of CN112925268A publication Critical patent/CN112925268A/en
Application granted granted Critical
Publication of CN112925268B publication Critical patent/CN112925268B/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
    • 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]

Abstract

The invention discloses a high-performance cutting bed motion control system based on FPGA, wherein the cutting bed comprises a cutter, an X-axis stepping motor, a Y-axis stepping motor and a Z-axis stepping motor which are used for respectively driving the cutter to do linear motion along the three-dimensional direction, and a U-axis stepping motor which is used for driving the cutter to rotate so as to adjust the direction of a cutting edge. The high-performance cutting bed motion control system based on the FPGA effectively improves the speed, the precision and the stability of the cutting bed, can realize more flexible acceleration and deceleration control, and has smaller motor error.

Description

High-performance cutting bed motion control system based on FPGA
Technical Field
The application belongs to the technical field of motion control, and particularly relates to a high-performance cutting bed motion control system based on an FPGA.
Background
The cutting bed is used as automatic processing equipment in industries such as clothing, leather, advertisement and the like, and the market demand of cutting bed equipment is increasing along with the increasingly strong competition of the industries. The motion control system of the cutting bed is a key factor for determining the performance and the production efficiency of equipment, and the development of the multi-axis linkage cutting bed motion control system with high cutting speed has important practical significance for reducing the cost of enterprises and enhancing the market competitiveness of the enterprises. The existing cutting bed motion control system is mainly controlled by a microprocessor or a motion control chip, and the system has the defects of low processing precision, low speed and poor real-time property.
Disclosure of Invention
An object of this application is to provide a high performance cutting bed motion control system based on FPGA, promotes cutting bed's speed, precision and stability, can realize more flexible acceleration and deceleration control, and the motor error is less.
In order to achieve the purpose, the technical scheme adopted by the application is as follows:
the utility model provides a high performance cutting bed motion control system based on FPGA, the cutting bed includes the cutter, drives respectively the cutter carries out linear motion's X axle step motor, Y axle step motor, Z axle step motor and drive along three-dimensional direction the cutter is rotatory in order to adjust the U axle step motor of cutting edge direction, high performance cutting bed motion control system based on FPGA includes host processor ARM and FPGA module, the FPGA module includes FMC interface module, instruction data processing module, motor speed control module, interpolation module, wherein:
the FMC interface module is used for communication between the ARM and the FPGA module;
the instruction data processing module is used for decoding instruction data information received from a main processor ARM to obtain an initial coordinate value, a terminal coordinate value, a displacement, a preset angle and a given feed profile shape of the cutter in the three-dimensional direction, obtain an initial speed, a given feed speed, an initial acceleration and a feed distance of the cutter in linear motion in the three-dimensional direction, and obtain an initial direction of a cutting edge, a rotating angle of the cutting edge and a rotating speed of the cutting edge of the cutter;
the motor rotating speed control module is used for calculating the speed, displacement and acceleration of the cutter in each axial direction in the acceleration process, the deceleration acceleration process, the uniform speed process, the acceleration and deceleration process and the deceleration and deceleration process according to the initial speed, the given feeding speed, the initial acceleration and the feeding distance;
the interpolation module is used for determining a plurality of intermediate points of the cutter walking path between known points of a given feed contour line according to the given feed speed and the given feed contour line of the cutter; the interpolation module comprises a linear interpolation module and a circular interpolation module, wherein the linear interpolation module applies a minimum deviation method and is used for interpolating a track by continuously judging a deviation function of each axis according to the initial coordinate value and the terminal coordinate value; the circular interpolation module applies a Bresenham circle drawing method in computer graphics to circular interpolation operation, and is used for calculating the distance between a point in a circular arc and the midpoint of two points outside the circular arc from the circular arc according to the initial coordinate value and the radius value and giving feeding pulses in two directions to complete the interpolation of the track;
the linear interpolation module applies a minimum deviation method and is used for carrying out interpolation of the track by continuously judging a deviation function of each axis according to the initial coordinate value and the terminal coordinate value, and the method comprises the following steps:
in a three-dimensional plane formed by an X axis, a Y axis and a Z axis, the projection is XY, YZ and XZ planes, if a target motion track is assumed to be one F ═ kx (k < 1) on the XY plane, the long axis offset deviation function of the linear interpolation is as follows: f (Δ x), with a deviation function in both the major and minor axes of F (Δ x, Δ y);
further judgment of FiThe symbol of (a);
Fi=|F(Δx,Δy)-F(Δx)|;
Figure GDA0003517688810000021
if P is the current point coordinate value (x)i,yi) If the coordinate value of the next interpolation point A is (x)i+1,yi+1), or the next interpolation point B point coordinate value is (x)i+1,yi) The coordinate value of the point C on the target track is (x)i,k(xi+1));
F(x)=Y(B)-Y(C)=yi-k(xi+1)
F(x,y)=Y(A)-Y(C)=yi+1-k(xi+1)
If the coordinate value of the destination point reached by the target motion track is (x)end,yend) Then there is
Figure GDA0003517688810000022
Figure GDA0003517688810000023
Figure GDA0003517688810000024
If F (Δ x) < 0, F (Δ x, Δ y) > 0, then there are
Fi=|F(Δx,Δy)-F(Δx)|=F(x,y)+F(x)=2*xend*yi-2*yend*xi-2*yend+xend
Further judging the motion termination condition, if continuously giving X-axis motion equivalent, when X isstep=xendIf the motion is not finished, the motion is continued;
the circular interpolation module applies a Bresenham circle drawing method in computer graphics to circular interpolation operation, is used for calculating the distance between a point in a circular arc and the midpoint of two points outside the circular arc from the circular arc according to the initial coordinate value and the radius value, and gives feeding pulses in two directions, and comprises the following steps:
in a two-dimensional plane formed by the X axis and the Y axis, if the target motion track is a circular arc, the coordinate value of the P point is (X)i,yi) If the coordinate value of the point A is (x)i,yi+1) and B point coordinate value is (x)i-1,yi+1), using A, B midpoint C to judge the feeding track, i.e. the coordinate value of C is: (
Figure GDA0003517688810000031
yi+2), the deviation function is:
Figure GDA0003517688810000032
since, in the motion control system, the amount of each axis motion is an integral multiple of the pulse equivalent, therefore,
Figure GDA0003517688810000033
r > 1, and in the case where only the sign of the bias value is considered, the above-described bias function can be simplified as:
Figure GDA0003517688810000034
further judgment of FiThe symbol of (a);
if FiIf the target moves to the point B, the point in the next target is (0)
Figure GDA0003517688810000035
yi+2);
Figure GDA0003517688810000036
Fi+1And FiTwo equations are subtracted: fi+1=2*yi+5+Fi-2*xi
If FiIf < 0, the target moves to point C, and the next target midpoint is (
Figure GDA0003517688810000037
yi+2);
Figure GDA0003517688810000038
Fi+1And FiThe two equations are subtracted: fi+1=2*yi+3+Fi
Further judging the motion termination condition, if continuously giving Y-axis motion equivalent, when Ystep=yendIf not, the movement is continued.
Several alternatives are provided below, but not as an additional limitation to the above general solution, but merely as a further addition or preference, each alternative being combinable individually for the above general solution or among several alternatives without technical or logical contradictions.
Preferably, the motor speed control module calculates the axial speed, displacement and acceleration of the cutter in the acceleration process, the deceleration process, the uniform speed process, the acceleration process and the deceleration process, and includes:
calculating by applying the motion characteristics of the triangular model according to the peak values of the motion characteristics, wherein the peak values of the motion characteristics are as follows: j is a function of0peak、j1peak、…jnpeakN +1 is the number of peak values, a smooth polynomial s-curve track with a limited template is designed, and the kinematic characteristics of the s-curve track can be summarized as follows according to the definition of the s-curve track:
Figure GDA0003517688810000041
similarly:
Figure GDA0003517688810000042
.........
Figure GDA0003517688810000043
.........
Figure GDA0003517688810000044
in the formula, TkIs the connection time period of the kth track segment and the (k +1) th track segment, k takes the value of 0 to (n-1), and TkIs JkpeakTime period of constant input, JkpeakIs TkA constant input of a time period;
the main task is therefore to calculate TkI.e. constant input JkpeakWhile the main processor ARM transmits the parameter j0、jq-max、jnSaid J iskpeakThe calculation formula is as follows:
step 1: let Tk=0;
Step 2: calculating Tk
Figure GDA0003517688810000045
And step 3: calculation of Jkpeak
Figure GDA0003517688810000046
Step 4 comparison JkpeakAnd jq-maxThe size of (d);
and 5: if in step 4Jkpeak>jq-maxReturning to the step 2 for re-execution; otherwise, carrying out the next calculation; wherein q is jq-maxThe parameter q in (1);
the pulse in the initial acceleration of the rectangular third-order s-curve model is replaced by a trigonometric function, and j is obtained by calculating the polynomial motion characteristickpeakThe function is of the form:
Figure GDA0003517688810000051
wherein jkpeakFor the peak of the kinematical characteristic jerk, tjThe value of the abscissa t which is the maximum peak value;
further, the acceleration, the speed and the displacement of the S curve track can be calculated by the following formula:
Figure GDA0003517688810000052
at t ═ t1The time a takes the maximum value and,
Figure GDA0003517688810000053
at t ═ t2Starts decreasing at time a, and at t-t5The time instant a is increased in the opposite direction,
Figure GDA0003517688810000054
t=t6the acceleration at the moment is reduced;
Figure GDA0003517688810000061
in the formula, V1Is t ═ t1Velocity of time, V2Is t ═ t2Velocity of time, VmaxIs t ═ t3Velocity of time, V5Is t ═ t5Velocity of time, V6Is t ═ t6The speed of the moment;
in 7 stages of S curve calculation, each stage corresponds to the change of speed, so the distance also corresponds to the displacement of each stage, and the displacement of each stage can be obtained;
Figure GDA0003517688810000062
in the formula, t0、t1、t2、t3、t4、t5、t6、t7The acceleration process, the deceleration process, the uniform speed process, the acceleration process and the deceleration process of the S curve are divided into 8 time parts.
Preferably, the high-performance cutting bed motion control system based on the FPGA further comprises a mobile positioning control module, wherein the mobile positioning control module is used for calculating the number of angles rotated by the X-axis stepping motor, the Y-axis stepping motor, the Z-axis stepping motor and the U-axis stepping motor by taking the stepping angles of the X-axis stepping motor, the Y-axis stepping motor, the Z-axis stepping motor and the U-axis stepping motor as a unit, comparing the calculated number of angles with the preset angle transmitted by the main processor ARM in real time, controlling the stepping motor of the corresponding axis to stop working if the number of angles reaches the preset angle, and controlling the stepping motor of the corresponding axis to move to the preset angle if the number of angles of the current motion is not more than the preset angle.
The application provides a high performance cutting bed motion control system based on FPGA, motor speed control module calculates each axial speed, displacement and acceleration of cutter in each stage, and through the frequency of the pulse digital signal that each step motor received of control, control its rotational speed, so that the cutter moves to the target location, and simultaneously, removal positioning control module carries out accurate location to each step motor, cutting bed motion control system's processing progress has effectively been improved, and response speed is fast, the real-time is high. The linear interpolation module is used for judging which axis of pulse equivalent is generated by the symbol of the deviation function according to the linear track of the cutter. The circular interpolation module is used for enabling the cutter to walk out of a circular track and judging which axis of pulse equivalent is generated by the symbol of the deviation function. The invention solves the technical problems of low control precision, poor stability, no FIFO cache, low speed and unsmooth acceleration of the existing cutting bed motion controller, improves the speed, precision and stability of the cutting bed, can realize more flexible acceleration and deceleration control, and has smaller motor error.
Drawings
FIG. 1 is a schematic structural diagram of a high-performance cutting bed motion control system based on FPGA of the present application;
FIG. 2 is a schematic diagram of an interpolation module according to the present application;
FIG. 3 is a schematic diagram of an embodiment of a linear interpolation according to the present application;
FIG. 4 is a schematic diagram of an embodiment of circular interpolation according to the present application;
FIG. 5 is a schematic diagram of S-curve acceleration and deceleration of the present application;
fig. 6 is a schematic structural diagram of another embodiment of the high-performance cutting bed motion control system based on the FPGA of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
In one embodiment, a high-performance cutting machine motion control system based on an FPGA is provided, wherein the cutting machine comprises a cutter, an X-axis stepping motor, a Y-axis stepping motor, a Z-axis stepping motor and a U-axis stepping motor, wherein the X-axis stepping motor, the Y-axis stepping motor and the Z-axis stepping motor respectively drive the cutter to perform linear motion along a three-dimensional direction, and the U-axis stepping motor drives the cutter to rotate so as to adjust the direction of a cutting edge.
As shown in fig. 1, the high-performance cutting bed motion control system based on the FPGA of the present embodiment includes a main processor ARM and an FPGA module, where the FPGA module includes an FMC interface module, an instruction data processing module, a motor rotation speed control module, and an interpolation module.
And the FMC interface module is used for communicating between the ARM and the FPGA module of the main processor, finishing the interaction of instructions and data, and writing data or commands into the FPGA or returning the data to the ARM.
And the instruction data processing module is used for decoding the instruction data information received from the main processor ARM to obtain an initial coordinate value, a terminal coordinate value, a displacement, a preset angle and a given feed profile line shape of the cutter in the three-dimensional direction, obtain an initial speed, a given feed speed, an initial acceleration and a feed distance of the cutter in linear motion in the three-dimensional direction, and obtain an initial direction of a cutting edge, a rotating angle of the cutting edge and a rotating speed of the cutting edge of the cutter. After the analysis is completed, the idle signal is transmitted from low to high to the upstream module FIFO module, which indicates that the decoding is completed and the next data can be read.
And the motor rotating speed control module is used for controlling the driving speeds of the X-axis stepping motor, the Y-axis stepping motor and the Z-axis stepping motor to enable the speed to be changed in an S-shaped acceleration and deceleration manner when the cutter performs interpolation motion in the three-dimensional direction. Specifically, the axial speed, displacement and acceleration of the cutter in the acceleration process, the deceleration process, the uniform speed process, the acceleration and deceleration process and the deceleration and deceleration process are calculated according to the initial speed, the given feed speed, the initial acceleration, the initial jerk and the feed distance.
And the interpolation module is used for determining a plurality of intermediate points of the tool walking path between the known points of the given feed contour line according to the given feed speed and the given feed contour line of the tool.
As shown in fig. 2, the interpolation module in this embodiment includes a linear interpolation module and a circular interpolation module, where the linear interpolation module applies a minimum deviation method, and is configured to perform interpolation of a trajectory by continuously determining a deviation function of each axis according to an initial coordinate value and an end coordinate value, and in a linear interpolation process, one axis is constantly moving at a constant speed, and only needs to determine whether another axis is moving, so that it is better to control the motion stability of a motor, and a specific interpolation process is as follows:
as shown in fig. 3, in a three-dimensional plane formed by the X axis, the Y axis and the Z axis, the projections are XY, YZ and XZ planes, a first quadrant in the XY plane is taken as an example for description, and other quadrants in other planes can refer to the first quadrant in the XY plane, assuming that the target motion trajectory is one F ═ kx (k < 1), the long axis offset deviation function of the linear interpolation is: f (Δ x), with a deviation function in both the major and minor axes of F (Δ x, Δ y);
further judgment of FiThe symbol of (a);
Fi=|F(Δx,Δy)-F(Δx)|;
Figure GDA0003517688810000091
if the coordinate value of the current point P is (x)i,yi) If the coordinate value of the next interpolation point A is (x)i+1,yi+1), or the next interpolation point B point coordinate value is (x)i+1,yi) The coordinate value of the point C on the target track is (x)i+1,k(xi+ 1)); the point P represents the coordinate of the current point, the point A represents the point above the target track, and the point B represents the point below the target track, and is an interpolation point, and whether the point A moves or the point B moves is judged. Point C represents a point on the target trajectory.
Order to
Figure GDA0003517688810000092
If the coordinate value of the destination reached by the target motion track is (x)end,yend) Then there is
Figure GDA0003517688810000093
Figure GDA0003517688810000094
Figure GDA0003517688810000095
If F (Δ x) < 0, F (Δ x, Δ y) > 0, then there are
Fi=|F(Δx,Δy)-F(Δx)|=F(x,y)+F(x)=2*xend*yi-2*yend*xi-2*yend+xend
Further judging the motion termination condition, if continuously giving X-axis motion equivalent, when X isstep=xendIt indicates that the end point is reached and the movement is terminated, and if not, the movement is continued.
Two multipliers are called in an FPGA module to respectively calculate xend*y、yend*xiThe multiplication operation only needs to be shifted to the left by one bit, so that the multiplication is not needed, and the resources in the FPGA are saved. And a counter and a comparator are also needed for realizing, wherein the counter is the distance from the starting point to the target point in the interpolation process, and when the x-axis or the x-axis and the y-axis are fed simultaneously, the counter is decreased by one. Until the counter is judged to be 0, the movement is represented to the target point, wherein the comparator compares the deviation function value with the value of 0, if the deviation function value is larger than 0, the movement is like the positive direction of the x axis, and if the deviation function value is smaller than or equal to 0, the feeding is carried out to the positive directions of the x axis and the y axis simultaneously.
And the circular interpolation module applies a Bresenham circle drawing method in computer graphics to circular interpolation operation, and is used for calculating the distance between a point inside the circular arc and a point outside the circular arc from the circular arc according to the initial coordinate value and the radius value (if the initial coordinate value is (10,0), the radius value is 10), and giving feeding pulses in two directions. The method is characterized in that the method only needs to judge whether the pulse equivalent in one direction is equal to a target quantity or not, the operation process is greatly simplified while the interpolation precision is ensured, the operation speed of circular interpolation is obviously improved, the track control is carried out through the circular interpolation module, two motors are controlled by carrying out two-axis plane circular interpolation according to deviation function values, the relative position between the cutter and the set track is continuously corrected, and according to the deviation condition obtained by comparison, which axis moves forward in the next step is determined to ensure that the actual motion track of the cutter is attached to the target motion track, so that the error between the motion track and the set track is minimum.
As shown in fig. 4, the specific interpolation process of the circular interpolation module is as follows:
in a two-dimensional plane formed by the X axis and the Y axis, if the target motion track is an arc, if P, the current point coordinate value is (X)i,yi) If the coordinate value of the next interpolation point A is (x)i,yi+1), or the next interpolation point B point coordinate value is (x)i-1,yi+1), using A, B midpoint C to judge the feeding track, i.e. the coordinate value of C is: (
Figure GDA0003517688810000101
yi+2), the deviation function is:
Figure GDA0003517688810000102
since, in the motion control system, the amount of each axis motion is an integral multiple of the pulse equivalent, therefore,
Figure GDA0003517688810000103
r is more than 1. In the case where only the sign of the deviation value is considered, the above-described deviation function can be simplified to:
Figure GDA0003517688810000104
further judgment of FiThe symbol of (a);
if FiIf the target is more than or equal to 0, the target movesTo point B, the next target midpoint is: (
Figure GDA0003517688810000105
yi+2);
Figure GDA0003517688810000106
Fi+1And FiTwo equations are subtracted: fi+1=2*yi+5+Fi-2*xi
If FiIf < 0, the target moves to point C, and the next target midpoint is (
Figure GDA0003517688810000107
yi+2);
Figure GDA0003517688810000108
Fi+1And FiThe two equations are subtracted: fi+1=2*yi+3+Fi
Further judging the motion termination condition, if continuously giving Y-axis motion equivalent, when Ystep=yendIf not, the movement is continued. The process of realizing the process in the FPGA is that F transmitted by the main processor ARM is received firstly0According to F0Is given as a sign of (D), calculating F1And so on, all F are calculatediThe value of the sequence, from the formula, is calculated as FiOnly a few shift operations and addition and subtraction operations are needed, in order to save resources in the FPGA, 2 x yi、2*xiBy shifting operations and then from the calculated FiThe sign of (2) determines the direction of feed of each axis, here too requiring a comparator and counter, which is implemented similarly to the linear interpolation.
In the circular interpolation, each interpolation is moved in the positive y direction in the first quadrant. The different quadrants are provided, and the circular interpolation in the present embodiment only takes the example of the first quadrant, and the other quadrants can be obtained by analogy. The linear interpolation divides the coordinate system into 8 quadrants, and the major axis and the minor axis of each quadrant are different, so that the situation is different, the embodiment only exemplifies one quadrant, and the rest quadrants can be obtained by analogy.
In order to provide a high-quality hardware basis, the main processor ARM in the embodiment can adopt a Harvard architecture, the data processing capability is strong, the cost is low, the performance is high, the power consumption is low, the peripheral interfaces are rich, in addition, the FPU unit is added, the working frequency can be more than 100MHZ, the super-strong computing capability and the rich peripheral interfaces of the existing ARM processor are the best choices of the system, the ARM comprises an application management CPU and has the capability of processing transactions, the FPGA is used as an independent embedded platform to be embedded into a motion control algorithm, the operation is completely performed aiming at a bottom layer, and the parallel and real-time capability is realized.
It should be noted that, in order to ensure that the FPGA module of the system normally works, basic modules required for the work, such as a clock phase-locked loop module, a FIFO memory module, etc., are also included. The clock phase-locked loop module is used for generating working clocks among various modules, and comprises a 150M clock used by the FMC interface module and a 50M clock used by a downstream module.
The FIFO storage module is used for caching commands and data sent by the ARM and performing clock domain crossing processing, and the data cached in the FIFO storage module can be read as long as the FIFO storage module is full of a certain amount of data and a non-empty downstream module in the FIFO storage module is ready, so that the time for the FPGA to access the FIFO storage module is greatly reduced, and the speed of a subsequent operation module is also improved.
In one embodiment, to achieve more flexible acceleration and deceleration control, the velocity calculation is provided as follows: calculating by applying the motion characteristics of the triangular model according to the peak values of the motion characteristics, wherein the peak values of the motion characteristics are as follows: j is a unit of a group0peak、j1peak、…jnpeakN +1 is the number of peak values, a smooth polynomial s-curve track with a limited template is designed, and the kinematic characteristics of the s-curve track can be defined according to the s-curve trackThe summary is as follows:
Figure GDA0003517688810000111
similarly:
Figure GDA0003517688810000112
.........
Figure GDA0003517688810000121
.........
Figure GDA0003517688810000122
in the formula, JnpeakIs the value of the last track segment, TkIs the connection time period of the kth track segment and the (k +1) th track segment, k takes the value of 0 to (n-1), and TkIs JkpeakThe time interval of constant input is T, J in the corresponding formulakpeakIs TkConstant input of time periods.
The main task is therefore to calculate TkI.e. constant input JkpeakWhile the main processor ARM transmits the parameter j0、jq-max、jnSaid J iskpeakThe calculation formula is as follows:
step 1: let Tk=0;
Step 2: calculating Tk
Figure GDA0003517688810000123
And step 3: calculation of Jkpeak
Figure GDA0003517688810000124
Step 4 comparison JkpeakAnd jq-maxThe size of (d);
and 5: if in step 4Jkpeak>jq-maxReturning to the step 2 for re-execution; otherwise, the next calculation is carried out. Wherein q is jq-maxParameter q in (1).
In the above calculation process, all the time periods TkSet to 0 by step 1; first go through step 2 position j0Peak value of (1) calculating TkCalculating T from step 2 by step 3kIs used to calculate the kinematic feature JkpeakThen comparing the value calculated in step 3 with the input peak value, and if the maximum value is greater than the peak value, then TkLarger, recalculated T by step 2kAnd is calculated until the maximum value is less than the input peak value. At this time, a flag signal is generated in the FPGA to be pulled high, the data is proved to be valid, and then the subsequent calculation operation is carried out.
The pulse in the initial acceleration of the rectangular third-order s-curve model is replaced by a trigonometric function, and the motion characteristic of an excessive polynomial is calculated to obtain jkpeakThe function is of the form:
Figure GDA0003517688810000131
wherein jkpeakAdding the peak value of acceleration for the kinematic characteristics, tjThe value of the abscissa t which is the maximum peak value;
further, the acceleration, the speed and the displacement of the S curve track can be calculated by the following formula:
Figure GDA0003517688810000132
at t ═ t1The time a takes the maximum value and,
Figure GDA0003517688810000133
at t ═ t2Starts decreasing at time a, and at t-t5The time instant a is increased in the opposite direction,
Figure GDA0003517688810000134
t=t6the acceleration at the moment is reduced;
Figure GDA0003517688810000141
in the formula, V1Is t ═ t1Velocity of time, V2Is t ═ t2Velocity of time, VmaxIs t ═ t3Velocity of time, V5Is t ═ t5Velocity of time, V6Is t ═ t6Velocity of the moment, Amax(t-t1) Is represented by AmaxMultiplied by the corresponding length of time.
In 7 stages of S curve calculation, each stage corresponds to the change of speed, so the distance also corresponds to the displacement of each stage, and the displacement of each stage can be obtained;
Figure GDA0003517688810000142
in the formula, t0、t1、t2、t3、t4、t5、t6、t7In order to divide the acceleration process, the deceleration process, the uniform velocity process, the acceleration and deceleration process, and the deceleration and acceleration process of the S-curve into 8 time segments, the final calculation result is shown in fig. 5.
In order to improve and solve the problems of low control precision and large motor error of the existing cutting bed motion controller, in another embodiment, the high-performance cutting bed motion control system based on the FPGA further comprises a mobile positioning control module.
The mobile positioning control module is used for calculating the number of the rotating angle of the X-axis stepping motor, the Y-axis stepping motor, the Z-axis stepping motor and the U-axis stepping motor by taking the stepping angles of the X-axis stepping motor, the Y-axis stepping motor, the Z-axis stepping motor and the U-axis stepping motor as a unit, comparing the calculated number of the rotating angles with the preset angle transmitted by the main processor ARM in real time, controlling the stepping motor of the corresponding axis to stop working if the number of the rotating angles reaches the preset angle, and controlling the stepping motor of the corresponding axis to move to the preset angle if the number of the rotating angles is not more than the preset angle, so that the positioning of the X-axis stepping motor, the Y-axis stepping motor, the Z-axis stepping motor and the U-axis stepping motor is realized.
As shown in fig. 6, in order to better extend the motion control system of the present application, in other embodiments, the cutting bed motion control system may further include a communication module, an upper computer, and an external storage, where the communication module is used to implement data interaction between the upper computer, the external storage, and the main processor. The upper computer module is a computer which can directly send control commands, and various signal changes and interpolation track parameters required by a user are displayed on a screen and sent to the lower computer ARM through the communication module. The external memory module is used for storing data which a user wants to send, and the data can still be stored after the power is off.
The cutting bed motion control system also comprises a human-computer interaction module, wherein the human-computer interaction module comprises a keyboard scanning circuit, a display circuit and a plurality of key switches, the keyboard scanning circuit is used for determining the on-off state of each key switch and transmitting corresponding information to the main processor and the display circuit; the display circuit is used for displaying the on-off state. The human-computer interaction module is used for manually intervening the motion of the motor.
In the cutting bed motion control system based on the FPGA in this embodiment, the motor speed control module of the motion controller can set the initial acceleration and the feed distance according to the initial speed, and calculate the acceleration process, the deceleration process, the uniform speed process, the acceleration and deceleration process, and the time and the feed distance of each stage of the tool according to the displacement calculation formula of the S curve, so as to transmit the corresponding feed distance and the time of each stage to each stepping motor, so that the stepping motor can drive the tool to move to the target position according to the corresponding feed distance.
And the speed of the cutter is controlled by using S-curve acceleration and deceleration, the current speed can be changed according to the change of the acceleration no matter the speed is accelerated or decelerated, meanwhile, the operation process can be reduced, the response speed is high, and the control precision is high. The S-type acceleration and deceleration algorithm combines a trigonometric function and a third-order S curve, and the time is optimized by calculating the limited peak value of the acceleration in a common S curve template, so that the optimal solution of the time is obtained. The jerk is calculated in a trigonometric function model, and the acceleration, the speed and the displacement of the jerk are changed through the change of the jerk.
In this method, a trigonometric function template is used to calculate the jerk value on the path of the control, which is then smoothly linked by a third order polynomial. The method designs the shape of j acceleration into a smooth trapezoidal curve, so that the whole acceleration and deceleration process is continuous. The impact on a mechanical system is reduced to the maximum extent by controlling the j value, more flexible acceleration and deceleration control can be realized, the motion profile of the algorithm is very similar to the shape of a polynomial model, the system response is the same, and the motion trail is smooth, so that the method has the same simplicity as the traditional third-order S curve but the performance is stable as the polynomial S curve.
Meanwhile, the mobile positioning control module stops outputting the driving signal after the rotating angle number of the calculator reaches a preset angle by taking the stepping angle of each stepping motor as a unit, so that each stepping motor is accurately positioned, the processing progress of the cutting bed motion control system is effectively improved, and the response speed is high and the real-time performance is high.
According to the cutting bed motion control system based on the FPGA, a motion controller caches transmitted data, stores the data in a certain amount, achieves the purpose of synchronous transmission, is read by a command data processing module and is distributed to each downstream module through command analysis, and the motion controller selects a linear interpolation module or an arc interpolation module according to the command analysis. And then respectively outputting the direction and displacement pulse of each shaft to respective motors for driving after interpolation, thereby controlling the motors to rotate for linear or circular interpolation. The linear interpolation module has one axis which always moves at a constant speed, and only needs to continuously judge that the other axis needs to move in the interpolation motion process. The motion process is less than one-half pulse equivalent, so the motor error is small and the motion control is stable. The arc interpolation module has simple and efficient operation, so that the running speed of the motor is improved, and the defects that the traditional arc interpolation needs twice evolution operation, the interpolation calculated amount is large and the running efficiency is low are overcome.
According to the cutting bed motion control system based on the FPGA, an ARM chip adopts STM32F429ZGT6, an FPGA chip adopts EP4CE10FC8, and the ARM chip of a main processor is connected with the FPGA through an FMC interface module. The scheme of ARM + FPGA can meet the task requirements of low cost, high precision and capability of safely and reliably completing the cutting bed. The ARM adopts a Harvard framework, the data processing capacity is strong, the cost is low, the performance is high, the power consumption is low, the peripheral interfaces are rich, in addition, the FPU unit is adopted, the working frequency can be more than 100MHZ, the existing ARM processor has the super-strong computing capacity and the rich peripheral interfaces which are the best choices of the system, the ARM comprises an application management CPU and has the capacity of processing transactions, the FPGA is used as an independent embedded platform to be embedded into a motion control algorithm and is completely operated aiming at the bottom layer, the motion of 4 motor shafts can be simultaneously controlled, and the parallel and real-time capacity is realized.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (3)

1. The utility model provides a high performance cutting bed motion control system based on FPGA, its characterized in that, the cutting bed includes the cutter, drives respectively the cutter carries out linear motion's X axle step motor, Y axle step motor, Z axle step motor and drive along three-dimensional direction the cutter is rotatory in order to adjust the U axle step motor of cutting edge direction, high performance cutting bed motion control system based on FPGA includes host processor ARM and FPGA module, the FPGA module includes FMC interface module, instruction data processing module, motor speed control module, interpolation module, wherein:
the FMC interface module is used for communication between the ARM and the FPGA module of the main processor;
the instruction data processing module is used for decoding instruction data information received from a main processor ARM to obtain an initial coordinate value, a terminal coordinate value, a displacement, a preset angle and a given feed profile shape of the cutter in the three-dimensional direction, obtain an initial speed, a given feed speed, an initial acceleration and a feed distance of the cutter in linear motion in the three-dimensional direction, and obtain an initial direction of a cutting edge, a rotating angle of the cutting edge and a rotating speed of the cutting edge of the cutter;
the motor rotating speed control module is used for calculating the speed, displacement and acceleration of the cutter in each axial direction in the acceleration process, the deceleration acceleration process, the uniform speed process, the acceleration and deceleration process and the deceleration and deceleration process according to the initial speed, the given feeding speed, the initial acceleration and the feeding distance;
the interpolation module is used for determining a plurality of intermediate points of the cutter walking path between known points of a given feed contour line according to the given feed speed and the given feed contour line of the cutter; the interpolation module comprises a linear interpolation module and a circular interpolation module, wherein the linear interpolation module applies a minimum deviation method and is used for interpolating a track by continuously judging a deviation function of each axis according to the initial coordinate value and the terminal coordinate value; the circular interpolation module applies a Bresenham circle drawing method in computer graphics to circular interpolation operation, and is used for calculating the distance between a point in a circular arc and the midpoint of two points outside the circular arc from the circular arc according to the initial coordinate value and the radius value and giving feeding pulses in two directions to complete the interpolation of the track;
the linear interpolation module applies a minimum deviation method and is used for carrying out interpolation of the track by continuously judging a deviation function of each axis according to the initial coordinate value and the terminal coordinate value, and the method comprises the following steps:
in a three-dimensional plane formed by an X axis, a Y axis and a Z axis, the projection is XY, YZ and XZ planes, if a target motion track is assumed to be one F ═ kx (k < 1) on the XY plane, the long axis offset deviation function of the linear interpolation is as follows: f (Δ x), with a deviation function in both the major and minor axes of F (Δ x, Δ y);
further judgment of FiThe symbol of (a);
Fi=|F(Δx,Δy)-F(Δx)|
Figure FDA0003517688800000021
if P is the current point coordinate value of (x)i,yi) If the coordinate value of the next interpolation point A is (x)i+1,yi+1), or the next interpolation point B point coordinate value is (x)i+1,yi) The coordinate value of the point C on the target track is (x)i,k(xi+1));
F(x)=Y(B)-Y(C)=yi-k(xi+1)
F(x,y)=Y(A)-Y(C)=yi+1-k(xi+1)
If the coordinate value of the destination point reached by the target motion track is (x)end,yend) Then there is
Figure FDA0003517688800000022
Figure FDA0003517688800000023
Figure FDA0003517688800000024
If F (Δ x) < 0, F (Δ x, Δ y) > 0, then there are
Fi=|F(Δx,Δy)-F(Δx)|=F(x,y)+F(x)=2*xend*yi-2*yend*xi-2*yend+xend
Further judging the motion termination condition, if continuously giving X-axis motion equivalent, when X isstep=xendIf the motion is not finished, the motion is continued;
the circular interpolation module applies a Bresenham circle drawing method in computer graphics to circular interpolation operation, is used for calculating the distance between a point in a circular arc and the midpoint of two points outside the circular arc from the circular arc according to the initial coordinate value and the radius value, and gives feeding pulses in two directions, and comprises the following steps:
in a two-dimensional plane formed by the X axis and the Y axis, if the target motion track is a circular arc, the coordinate value of the P point is (X)i,yi) If the coordinate value of the point A is (x)i,yi+1) and the coordinate value of point B is (x)i-1,yi+1), using A, B midpoint C to judge the feeding track, i.e. the coordinate value of C is
Figure FDA0003517688800000025
The deviation function is then:
Figure FDA0003517688800000026
since, in the motion control system, the amount of each axis motion is an integral multiple of the pulse equivalent, therefore,
Figure FDA0003517688800000027
r > 1, and in the case where only the sign of the bias value is considered, the above-described bias function can be simplified as:
Figure FDA0003517688800000028
further judgment of FiThe symbol of (a);
if FiIf the target moves to the point B, the point in the next target is equal to or more than 0
Figure FDA0003517688800000031
Figure FDA0003517688800000032
Fi+1And FiThe two equations are subtracted: fi+1=2*yi+5+Fi-2*xi
If FiIf the target moves to the point C if the target is less than 0, the midpoint of the next target is
Figure FDA0003517688800000033
Figure FDA0003517688800000034
Fi+1And FiThe two equations are subtracted: fi+1=2*yi+3+Fi
Further judging the motion termination condition, if continuously giving Y-axis motion equivalent, when Ystep=yendIf not, the movement is continued.
2. The FPGA-based high-performance cutting bed motion control system of claim 1, wherein the motor speed control module calculates the axial speed, displacement and acceleration of the tool in the acceleration process, the deceleration process, the uniform speed process, the acceleration process and the deceleration process, and comprises:
according to the peak value of the motion characteristic, the motion characteristic of the triangular model is appliedLine calculation, the peak values of the motion features are as follows: j is a function of0peak、j1peak、…jnpeakN +1 is the number of peak values, a smooth polynomial s-curve track with a limited template is designed, and the kinematic characteristics of the s-curve track can be summarized as follows according to the definition of the s-curve track:
Figure FDA0003517688800000035
similarly:
Figure FDA0003517688800000036
.........
Figure FDA0003517688800000037
.........
Figure FDA0003517688800000038
in the formula, TkIs the connection time period of the kth track segment and the kth +1 track segment, k takes the value of 0 to (n-1), and TkIs JkpeakTime period of constant input, JkpeakIs TkA constant input of a time period;
the main task is therefore to calculate TkI.e. constant input JkpeakWhile the main processor ARM transmits the parameter j0、jq-max、jnSaid J iskpeakThe calculation formula is as follows:
step 1: let Tk=0;
Step 2: calculating Tk
Figure FDA0003517688800000041
And step 3: calculation of Jkpeak
Figure FDA0003517688800000042
Step 4 comparison JkpeakAnd jq-maxThe size of (d);
and 5: if in step 4Jkpeak>jq-maxReturning to the step 2 for re-execution; otherwise, carrying out the next calculation; wherein q is jq-maxThe parameter q in (1);
the pulse in the initial acceleration of the rectangular third-order s-curve model is replaced by a trigonometric function, and j is obtained by calculating the polynomial motion characteristickpeakThe function is of the form:
Figure FDA0003517688800000043
wherein jkpeakAdding the peak value of acceleration for the kinematic characteristics, tjThe value of the abscissa t which is the maximum peak value;
further, the acceleration, the speed and the displacement of the S curve track can be calculated by the following formula:
Figure FDA0003517688800000051
at t ═ t1The time a takes the maximum value and,
Figure FDA0003517688800000052
at t ═ t2Starts decreasing at time a, and at t-t5The time a is increased in the reverse direction,
Figure FDA0003517688800000053
t=t6the acceleration at the moment is reduced;
Figure FDA0003517688800000054
in the formula, V1Is t ═ t1Velocity of time, V2Is t ═ t2Velocity of time, VmaxIs t ═ t3Velocity of time, V5Is t ═ t5Velocity of time, V6Is t ═ t6The speed of the moment;
in 7 stages of S curve calculation, each stage corresponds to the change of speed, so the distance also corresponds to the displacement of each stage, and the displacement of each stage can be obtained;
Figure FDA0003517688800000061
in the formula, t0、t1、t2、t3、t4、t5、t6、t7The acceleration process, the deceleration process, the uniform speed process, the acceleration process and the deceleration process of the S curve are divided into 8 time parts.
3. The FPGA-based high-performance cutting bed motion control system according to claim 1, further comprising a mobile positioning control module, wherein the mobile positioning control module is configured to calculate the number of angular degrees of rotation of the X-axis stepping motor, the Y-axis stepping motor, the Z-axis stepping motor, and the U-axis stepping motor by taking the stepping angles of the X-axis stepping motor, the Y-axis stepping motor, the Z-axis stepping motor, and the U-axis stepping motor as units, compare the calculated number of angular degrees with the predetermined angle transmitted from the main processor ARM in real time, control the stepping motor of the corresponding axis to stop working if the number of angular degrees reaches the predetermined angle, and control the stepping motor of the corresponding axis to move to the predetermined angle if the number of angular degrees of this motion is not enough than the predetermined angle.
CN202110111542.6A 2021-01-27 2021-01-27 High-performance cutting bed motion control system based on FPGA Active CN112925268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110111542.6A CN112925268B (en) 2021-01-27 2021-01-27 High-performance cutting bed motion control system based on FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110111542.6A CN112925268B (en) 2021-01-27 2021-01-27 High-performance cutting bed motion control system based on FPGA

Publications (2)

Publication Number Publication Date
CN112925268A CN112925268A (en) 2021-06-08
CN112925268B true CN112925268B (en) 2022-05-31

Family

ID=76167060

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110111542.6A Active CN112925268B (en) 2021-01-27 2021-01-27 High-performance cutting bed motion control system based on FPGA

Country Status (1)

Country Link
CN (1) CN112925268B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114035507B (en) * 2021-11-12 2023-08-11 武汉威士登自动化控制技术有限公司 Spherical track fitting processing position track compensation algorithm
CN113941783B (en) * 2021-11-23 2023-11-21 深圳软动智能控制有限公司 Laser axis frog-leaping realization method, device, laser equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3690424B2 (en) * 1992-11-30 2005-08-31 Thk株式会社 Numerical control method and apparatus
CN102081380B (en) * 2010-12-25 2012-08-22 浙江工业大学 Speed control method for numerical control multilayer leather cutting machine tool
CN103529755B (en) * 2013-10-12 2016-01-13 杭州电子科技大学 A kind of High-precision linear interpolation method
DE102015209916A1 (en) * 2015-05-29 2016-12-01 Zf Friedrichshafen Ag Control of a machining process by means of P-controller and load-dependent control factor
CN105929795A (en) * 2016-04-22 2016-09-07 浙江工业大学义乌科学技术研究院有限公司 Carton cutting method based on time division method cutting knife tangent following control
CN106227152A (en) * 2016-10-17 2016-12-14 合肥工业大学 A kind of CNC processing smooth transient method and seamlessly transit device
CN107786138B (en) * 2017-10-30 2020-06-12 山东理工大学 Linear interpolation control method for non-orthogonal axis linkage stepping motor
CN110286652B (en) * 2019-06-19 2021-08-27 四川轻化工大学 Control system method based on H-BOT structure
CN110465422B (en) * 2019-08-29 2020-06-19 内蒙古大学 FPGA-based spraying machine motion control system and motion control method thereof

Also Published As

Publication number Publication date
CN112925268A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN112925268B (en) High-performance cutting bed motion control system based on FPGA
CN111791236B (en) Industrial robot Cartesian space trajectory transition method
CN108568817B (en) Delta robot track connection control method based on Bezier curve
CN102799145B (en) S-curve acceleration linear interpolation method adopting multi-period constant-acceleration transition for corner
CN110465422B (en) FPGA-based spraying machine motion control system and motion control method thereof
CN109623810B (en) Method for planning smooth time optimal trajectory of robot
CN102566511A (en) Five-shaft numerical control system cutter center point interpolation path interpolation method
CN111580453B (en) PLC-based implementation method for improving precision of two-dimensional circular interpolation track
CN108512472B (en) Electronic gear-based following control method and system
CN112486101B (en) NURBS curve self-adaptive look-ahead interpolation method
CN106444645A (en) Multi-axis linkage motion control method based on embedded cutting bed controller
CN110209123B (en) Five-axis numerical control machining cutter shaft vector local optimization method under machine tool drive constraint
CN113189938A (en) Speed curve planning method for continuous machining path
CN112965443B (en) High-precision interpolation control method for corner trajectory tracking of cutting bed
CN111015671B (en) Planning method for planar spiral line polishing track of robot
CN111913441A (en) Corner smooth transition method based on track mode
CN111390902A (en) Trajectory planning method, trajectory planning device, equipment and storage medium
CN104827481B (en) A kind of SCARA method for controlling robot based on motion controller
CN116774648A (en) Speed planning method, device, machine tool control system and storage medium
CN104023922A (en) Device and method for controlling weaving motion in real time
CN110879568B (en) Motion control method of multi-axis linkage economic numerical control system
CN101349907B (en) Numerical control system and method for optimizing data stream
CN109093624B (en) Continuous interpolation motion control method for complex curve of mechanical arm
CN109129470B (en) Planning method and system for linear path of robot
CN115453968A (en) Speed planning control method and system for numerical control cam grinding

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