Background technology:
Realize at present interpolating method that multiaxis controls and be motion control interpolator according to the difference of target location and current location, calculate the distance that each axle need to move, be converted into pulsed quantity or magnitude of voltage is connected to servo-driver.The realization of this method has significant limitation:
1. consider current location and target location, at the one section of movement locus being formed by short line segment sequence, cannot reach the level and smooth effect of actual motion process medium velocity;
2. travelling speed and precision cannot improve;
3. can not Real-time Feedback to the operational factor of servomechanism, the correlated variables of actual motion can not be participated in to interpolation and calculate.
4. the interlock and the closed-loop control that realize more than 5 axles are very difficult.
Summary of the invention:
This multi-axis interpolation algorithm is, by high-speed field bus, the operational factor of servo-driver is fed back to the poor device of mending, and the poor device of mending carries out rough interpolation to the target location sequence consisting of short line segment, speed planning, more smart interpolation.In essence Interpolation Process, according to the actual operation parameters feeding back to, carrying out target adjusts again.Technical scheme of the present invention is: for the track that will move, first carries out rough interpolation, once reads in many little line segments, and with p (position), v (speed), a (acceleration), t (time) is parameter; The current residing motion state of coupling system, as acceleration and deceleration or state at the uniform velocity, provides suitable p of this little line segment, v.And then carry out speed planning and use the little a serial of line sections of i mark, j mark line segment chain-ordering, v
ibe i-1 and i the tarnsition velocity between little line segment, v
jfor the tarnsition velocity between rear j-1 and j line segment chain is processed in link.If j line segment chain length is s
j, starting velocity and end speed are respectively v
jand v
j+1, the peak acceleration of line segment chain is a
max, a minute situation is calculated.Finally carry out smart interpolation and from bus, obtain the operational factors such as physical location and speed, in conjunction with uncompleted Place object sequence, with natural curve shape, with the equation of higher degree, again describe, carry out spline interpolation.
Accompanying drawing explanation: Fig. 1 is the interpolation algorithm process flow diagram based on high-speed bus;
Fig. 2 is that the interpolation algorithm based on high-speed bus calculates design sketch;
Embodiment:
1. for the track that will move, first carry out rough interpolation, once read in many little line segments, with p (position), v (speed), a (acceleration), t (time) is parameter; The current residing motion state of coupling system, as acceleration and deceleration or state at the uniform velocity, provides suitable p of this little line segment, and (this process has three kinds of situations to v, and the first: P is final position.The second situation: this little line segment is oversize, certain position that p just mediates so.The third situation: need several little line segment splicings just can obtain this p); Obtaining this distal point position p is exactly the point that rough interpolation obtains, and then this location point is just done the distal point of smart interpolation by taking away.
2. the data of pair rough interpolation are carried out speed planning, use the little a serial of line sections of i mark, j mark line segment chain-ordering, v
ibe i-1 and i the tarnsition velocity between little line segment, v
jfor the tarnsition velocity between rear j-1 and j line segment chain is processed in link.If j line segment chain length is s
j, starting velocity and end speed are respectively v
jand v
j+1, the peak acceleration of line segment chain is a
maxif had
process in two kinds of situation below.
Situation one: if v
j> v
j+1, want reverse scan line segment chain, adjust v
jsize, order
V
jafter change, to rejudge v
j-1if,
To adjust v
j-1size, order
If v
j-1> v
jand
or v
j-1≤ v
j, need not adjust v
j-1, reverse scan stops.V
j-2the rest may be inferred.
Situation two: if v
j< v
j+1, this section of actual speed, add less than v
j+1, adjust the speed v of this point
j+1make
If do not adjusted v
j+1affect the velocity analysis of subsequent segment.This algorithm is simple, effective, and machining precision is high, and resource consumption is little, and efficiency is high.
3. by high-speed bus, obtain in real time the parameters such as speed in operational process and position;
4. according to the physical location obtaining, the operational factors such as speed, in conjunction with uncompleted Place object sequence, describe with the equation of higher degree with natural curve shape, carry out spline interpolation.Drafting natural curve equation is:
y=ax^3+bx^2+cx+d
A, with tangential linear interpolation, realize curve interpolating.
B, at every turn to x axle feeding one step, revise the direction of tangent line (recalculating four parameters), to approach straight line.