Professional Documents
Culture Documents
Interpolators
In continuous control system, tool has to move in linear, circular or over the contour 3D surfaces. For that
interpolators are must
Interpolators can be made by software or hardware
Hardware interpolators may be made by a number of digital differential analysers (DDA) and have a
software counter part as a reference pulse interpolator
Interpolations may not be restricted to linear and circular interpolation, but may involve parametric curve
interpolation
Curve interpolators may be offline or online (real time)
Among all, the cutter path moves in a straight line requires the simplest interpolation. The reason why we
need interpolator in such cases is that, in addition to feed velocity, we only provide initial and the final
coordinates of the path in the part program
The intermediate coordinates are to be interpolated as well as the ratio of the axes velocities are also to
be determined by the linear interpolator
In the case of linear interpolation, the velocity ratio is constant throughout the cutter path
2
Linear Interpolator
Example
N20 G01 X20 Y40 F100
N30 X50 Y80
Fig. The X axis control loop
Find out the BLU, interpolator frequency f, and the number of interpolator pulses sent through the AND
gate to the X axis control loop for the command in line N30 for a CNC closed loop, contouring control
machine with encoder number of holes = 200, lead screw pitch = 4 mm, number of starts = 1. PDC =
position down counter, UDC = up down counter, DAC = digital to analog converter, M = permanent magnet
DC motor, A = amplifier, T = Tachogenerator, E = encoder
3
Linear Interpolator(contd.)
Solution
4 mm
BLU = = 20 μm
200
𝑉𝑥 ∆𝑋 3
Hence,
𝑉𝑦
=
∆𝑌
=
4
and 𝑉𝑥 2 + 𝑉𝑦 2 = 1002
𝑉𝑥 = 60 mm/min 4
Linear Interpolator(contd.)
When the table moves at 60 mm/min, the corresponding pulses send by the encoder per minute
60 mm
= = 3000 ppm As, 1 BLU = 1 Pulse
0.02 mm
BLU
For linear velocity
At steady state, encoder pulse rate = interpolator pulse rate at UDC = 3000 ppm
30 mm
Number of pulses to be sent by the interpolator in X direction motor drive = = 1500 pulses
0.02 mm
BLU
5
DDA based linear interpolator
𝑓×𝑆
The output pulse rate from feed DDA having ‘m’ bits and an initial number loaded ‘S’ =
2𝑚
The output pulse rate of the feed DDA becomes input pulse rate to the ‘X’ and ‘Y’ DDA which are sending
pulses at definite rate to the X and Y axis motor drive, respectively
𝑓 × 𝑆 ∆𝑥
The output pulse rate of the ‘X’ DDA having ‘n’ bits and an initial number loaded ‘Δx’ = 𝑚 × 𝑛
2 2
𝑓 × 𝑆 × ∆𝑥
=
2𝑚+𝑛 6
DDA based linear interpolator(contd.)
𝑓 × 𝑆 ∆𝑦
The output pulse rate of the ‘Y’ DDA having ‘n’ bits and an initial number loaded ‘Δy’ = 𝑚 × 𝑛
2 2
𝑓 × 𝑆 × ∆𝑦
=
2𝑚+𝑛
The initial number ‘S’ of the feed DDA is a function of the feed velocity mentioned in the part program and
the length of cut which is as follows
10 × 𝑉 Feed velocity (m/min)
𝑆=
𝐿 Length of cut (mm)
The input pulse rate, f of the feed DDA is a function of ‘m’ and ‘n’ the bits for feed DDA and ‘X’ and ‘Y’ DDA,
respectively which is as follows 2𝑚+𝑛
𝑓= Pulse per minute (ppm)
10
7
DDA based linear interpolator(contd.)
The initial number ‘Δx’, and ‘Δy’ of the ‘X’ and ‘Y’ DDA are the incremental length in the x and y direction.
This can be easily found out when the initial and the final coordinates of the linear cut is given in the
program
As the DDAs are working on the pulse rate, therefore, the initial numbers such as ‘S’, ‘Δx’, and ‘Δy’ must be in
terms of BLU or pulses only. In order to do that the feed velocity (V) and the length of cut (L) are also to be
converted into BLU or pulses
The size of ‘S’ (in terms of BLU or pulses) of the feed DDA ≤ 2𝑚 − 1
The size of ‘Δx’, and ‘Δy’ (in terms of BLU or pulses) of the ‘X’ and ‘Y’ DDA ≤ 2𝑛 − 1
The ratio of the rate of pulse output from the ‘X’ and ‘Y’ DDA is equal to the ratio of ‘Δx’, and ‘Δy’
(incremental displacement ratio) which is also equal to the ratio of Vx and Vy (velocity ratio) through out the
length of straight cut 8
DDA based linear interpolator(contd.)
Example
During DDA based linear interpolation, the cutting tool centre has to move from point P (20,10) to Q (120,
60) at a speed of 3 m/min. The coordinates of the points are in mm. The table size is 600 × 600 mm. The
maximum table speed is 12 m/min for a minimum distance of 50 mm. BLU is 10 micron. Determine (a) bit
size of all three DDAs, (b) the ‘S’ word in the feed DDA, (c) values of Δx and Δy, (d) clock frequency, (f)
output frequency of feed DDA, and (g) output frequency of ‘X’ and ‘Y’ DDA?
9
DDA based linear interpolator(contd.)
‘n’ bit of ‘X’ and ‘Y’ DDA can be found out from the maximum table travel which is 600 × 600 mm
The maximum number that a ‘n’ bit ‘X’ and ‘Y’ DDA can hold corresponding 600 mm maximum table travel
in terms of BLU or number of pulses will be
600 mm
= = 60000 BLU or pulses in binary
0.01 mm
BLU
So, we can write down
2𝑛 − 1 = 60000
So, the minimum ‘n’ bit that can hold 60000 is 16 which is corresponding to maximum size 65535>60000
On the other hand the maximum Δx and Δy for this maximum table travel will be 60000 in BLU or pulses
10
DDA based linear interpolator(contd.)
The initial number ‘S’ of the feed DDA can be found out by the following formula
12 × 1000 mm/mm
= = 1200000 BLU or pulses/min
0.01 mm
BLU
50 mm
= = 5000 BLU or pulses
0.01 mm
BLU
11
DDA based linear interpolator(contd.)
Feed velocity (BLU/min)
Therefore,
10×1200000
𝑆= =2400
5000
So, the minimum ‘m’ bit of the feed DDA that can hold the maximum ‘S’ word 2400 is 12 which is
corresponding to maximum size 4095>2400
The input pulse rate, f of the feed DDA is given by the following expression
2𝑚+𝑛
𝑓= Pulse per minute (ppm)
10
216+12
= =4,47,392 pps
10
12
DDA based linear interpolator(contd.)
100 mm
Δx = (120-100) = 100 mm = = 10000 BLU or pulses
0.01 mm
50 mm
Δy = (60-10) = 50 mm = = 5000 BLU or pulses
0.01 mm
3×1000 mm/min
The feed velocity (V) = 3m/min = = 300000 BLU or pulses/min
0.01 mm
10×𝑉 10×300000
The ‘S’ word for this movement (P-Q) in the feed DDA = = = 268
𝐿 11180
13
DDA based linear interpolator(contd.)
𝑓×𝑆
The output frequency (f1) from the feed DDA for this movement (P-Q) = 𝑚
2
𝑓 × 10 × 𝑉 4,47,392 × 10 × 3,00,000
= = = 29,309.43 pps
2𝑚 × 𝐿 212 × 11,180
𝑓1 ×∆𝑥
The output frequency from the ‘X’ DDA for this movement (P-Q) =
2𝑛
29,309.43 × 10,000 44.72mm
= = 4472 pps or BLU/s = 𝑉𝑥 = 4472 × 0.01 = = 2683mm/min
216 sec
BLU
𝑓1 ×∆𝑦
The output frequency from the ‘Y’ DDA for this movement (P-Q) = 𝑛
2
29,309.43 × 5,000 mm
= 16 = 2236 pps or BLU/s = 𝑉𝑦 = 2236 × 0.01 = 22.36 = 1341.5mm/min
2 sec
14
DDA based linear interpolator(contd.)
15
DDA based circular interpolator
The basic configuration of the DDA remains same as that of the linear interpolator
However, the initial loaded number in the feed DDA and ‘X’ and ‘Y’ DDA differs compared to the linear DDA
10𝑉
The ‘S’ ward (in terms of BLU) is replaced by where, R is the radius of the circle
𝑅
The ‘Δx’ and ‘Δy’ ward is replaced by RSinωt and RCosωt, respectively
The initial ward in ‘X’ and ‘Y’ DDA (in terms of BLU) is also getting updated continuously with time
16
DDA based circular interpolator(contd.)
As the initial ward of ‘x’ and ‘y’ DDA continuously changes with time, therefore, the output pulse rate from
theses DDAs also changes continuously
The velocity of any of the axis drives varies sinusoidal, it takes maximum value then zero and again
maximum for circular interpolation
When Vx decreases, Vy increases and vice-a-versa. There could be other combinations too. However, the
resultant of these velocities will be equal to the programmed feed velocity at any point of time
For this reason, in circular interpolation, the ratio of the pulse rate output from the ‘X’ and ‘Y’ DDA or the
velocity ratio of ‘x ‘ and ‘y’ axis motor drive doesn’t remain constant through out the circular cut unlike
linear interpolator
The ‘X’ DDA initial ward (Rsinωt) is continuously updated by the output pulse rate from the ‘Y’ DDA
Whereas the ‘Y’ DDA initial ward (RCosωt) is continuously updated by the output pulse rate from the ‘X’
DDA
17
DDA based circular interpolator(contd.)
ω When the cutter is in point ‘P’, the ‘X’ DDA and ‘Y’ DDA is loaded
with the word in terms of BLU in binary are Rsinωt (AP) and
Q Rcosωt (OA) respectively
Rsinωt1 (BQ)
P While reaching to point ‘Q’, Rcosωt continuously decreases
R
Rsinωt (AP) ωt1 and Rsinωt increases, finally at ‘Q’ the ‘X’ DDA is loaded with
ωt Rsinωt1 (BQ) and ‘Y’ DDA with Rcosωt1 (OB)
A B O
Rcosωt1 (OB)
That is why the initial ward in ‘X’ and ‘Y’ DDA needs to be
Rcosωt (OA)
updated with time continuously
18
Curvilinear interpolator
The interpolators we have been discussing are hardware based interpolators. There are software
interpolators also
Some of these are simply ‘software translations’ of the hardware interpolators while others work on
different principles
The most common interpolator of this kind is simply a soft version of the hardware interpolator that we
have studied
However, the limitations of hardware interpolators are eliminated in its soft version
For example, the hardware interpolator has its DDA sizes fixed and this comes from the consideration of the
worst case. Therefore, very high values of system clock frequencies are required
Instead of simply achieving linear and circular interpolation, software interpolators can be employed for
finding out points on parametric curves
Such software interpolators can be ‘offline’ or ‘online’ as per system requirements
19
Curvilinear interpolator(contd.)
In the case of the offline software interpolator, the points on the curve of movement are selected through
the application of some criterion: for example
The deviation of the actual path of the cutter (generally straight) from the curve should be same for all
segments of motion
This gives rise to a number of segments of motion which are not necessarily same in length
If the same velocity is employed (which is expected, in order to obtain the same feed value along the path
for obtaining the same surface roughness), we can not simply cut these unequal segments in integral
machine cycle durations
Hence, in order to cut these unequal segments in integral values of machine cycle times, we employ
different values of feed in different segments. This is called federate fluctuation
20
Curvilinear interpolator(contd.)
21