Synthesis of an interpolation algorithm straight-line segment at planning the trajectory of a degenerate two-tier mechanism

In the work [1] the kinematic diagram of the two-tier mechanism-based device is described, its advantages under the mechanic technological processing of the different materials range and the scope of use are shown.


Introduction
The mechanism consists of the circle and the circular segment of the same radius which are the first and the second parts of the device (fig.1).The circle rotates about axis placed at the origin of the basic coordinate system (point O in fig.1).The circular segment is mounted to rotate at the origin of the additional coordinate system (point O' in fig.1), placed at the edge of the circle. -the angle of the tool's current position within the polar coordinate system.

Formulation of the problem
Thus the general formulation of the rectilinear segment interpolation problem can be stated as follows: in accordance with the increments of the linear coordinates Δx and Δy (x `= 0,±1;y = x = 0,±1) known at every step, the increments of the mechanism parts' angular coordinates   and   .
The values of the unit angular increments   and   are the constructible constant of the mechanism.The The current position of the angular and linear coordinates is known and also known the coordinates of the second part onset x1, y1 in the coordinate system which is related to the first part axis of rotation.
The operating system for the one computation cycle of the interpolation step can be described as following: -the position measurement of the linear coordinates for the next segment point through the linear interpolation; -the direction measurement and measurement of the distance movement in angular coordinate ( ) t  ; -the measurement of the increment value and direction in coordinate ( ) t  ; -the implementation of the movements in real-time mode; -the next interpolation step.

Realization of linear interpolation based on the Brezenham algorithm
The linear interpolation procedure can be easily actualized as a matter of the Bresenham's line algorithm, used when constructing the lines by means of the bitmap graphics (for the PC monitors) [7].
To measure the increment in angular coordinate ( ) t  let's move to the polar coordinate system, the center of which is coincident.
To measure the increment in the angular coordinate ( ) t  let's pass on to the polar coordinate system, which center is coincident with the center of the basic Cartesian coordinate system xy and the polar axis is in the Xdirection in Cartesian system; define the coordinates of the recurrent point position in this system, terms of the relations: Therefore, the total increment in the angular coordinate   t  will equals: Here it should be pointed out that all calculations related to the definition of the angular coordinates ( ) t  and ( ) t  are being performed using floating-point arithmetic when the control system functions with the fixed-point arithmetic, thus, the angular movement at every step of the interpolation can be defined from the relation [8][9][10][11][12]: Where n  -the number of steps of the unit movement in the angular coordinate ( ) t  at the current interpolation step, which defines as the quotient from: Suggested calculation technique allows avoiding roundoff errors at every step of the interpolation, since i  and 1 i   are presented as the floating-point numbers so they aren't put through adjustment during the interpolation process [13][14][15][16][17][18][19][20][21].

Geometrical interpretation
In fig. 2 the geometrical interpretation of the increment calculation of angular coordinate ( ) t  is shown.Here is the position of the mechanism's parts at i-th and i+1th steps of the interpolation.The positions of the second part's onset at i-th and i+1th steps of the interpolation are denoted in figure as points A and A'.The initial point positions of the tool's second part for such cases are denoted as B and B' respectively.Hence, based upon the geometric parameters of the triangle OA'B', which three sides and angle are known in accordance with the previous parameter calculations stage for the next interpolation step, the absolute value of the angular coordinate ( ) t  in X'OY' coordinate system (fig.1) at i+1 interpolation step can be defined [3].
Having the known sine theorem applied for the triangle OA'B' this can be written in the following form: Where: Value of the angular coordinate respectively: The number of the elementary angular movements in coordinate ( ) t  can be evaluated as the integer part of the formula similar to the definition of the elementary angular increments number in coordinate ( ) t  : The main advantage of the method suggested here is the constant static accuracy of the interpolation [5][6].
The finishing error of the suggested method doesn't depend on the number of multiline segments, which make the processing part's outline (profile) and doesn't exceed the value of the   and   interpolation step in both coordinates in the entire working surface of the mechanism.
The suggested interpolation algorithm was actualized in C++ in Borland development environment.
The program testing showed full algorithm's service capability.
Interpolation method, suggested here, was tested on the prototype of the device.
Microprocessor control unit STM32F107 with Cortex M3 core, which provides the floating-point arithmetic, was used as the computing machine.
Experience has shown that the computation time of the one interpolation step equals 20ms, which is significantly less than the interpolation step time, calculated on the basis of the required movement's technologic speed of the tool -2m per minute and the linear interpolation step Δx = Δy = 0,05 mm.
As a result, the suggested here interpolation method exceeds in computation expenses the suggested in the work [2] and can be recommended for applying in the technological devices control system based on the degenerate two-tier mechanism.

Fig. 1 .
Fig. 1.The Kinematic diagram of the device.In figure1the following notations are taken:) (t -the angle of circle's rotation about the basic coordinate system; ) (t  -the angle of the rod's rotation about the additional coordinate system; a,b -the endpoints of the segment ab; R -the parts' radius; linear unit increments x  and y  (linear interpolation step) are chosen based on the desired precision of the linear interpolation and values of the   and   according to regulations stated in [2].In fig. 1 the mechanism's condition is shown, when the initial point of the rectilinear segment and the current position of the tool (radius vector end b   ) coincide.