Seminar
Seminar
Seminar
Software
Interpolators
V Mohan Raje Urs (CIM - 22MEM3R18)
Venkata Praneet. S(MFG -22MEM2R18)
What exactly is the role of interpolator ?
The hardware interpolator uses a DDA (digital differential analyzer) based on the
principle of a numerical integration. A DDA is a digital circuit operated as a digital
integrator that is like integration by an OP amplifier in an analog circuit.
Understanding of the concept of integration should be preceded by knowledge of the
principle of interpolation. Given the velocity function V(t), the displacement S(t) can be
approximated by summing the areas of the thin rectangles beneath the velocity curve as
shown in Fig.
DDA Integrator contd.
Find the slope and choose the case which its following. (here case1)
We choose the start and the end point. [(x1,y1), (x2,y2)].
Assign - Variable X = x1 and variable Y_true = y1.
Loop till the end point (while(x<=x2)).
Assign y = integer(y_true) or in some algorithms ceiling(y_true).
Generate the new (x,y).
Increment x by 1.
Increment y_true = y_true + 1.
End the loop.
(5,8)
Example
(2,2)
Iteration X Y_true Y Output Pulse X Y
1. 2 2 2 (2,2) 1 ✓ ✓
2. 3 2.5 2 (3,2) 2 ✓ --
3.
4.
4
5
3
3.5
3
3
(4,3)
(5,3)
3
4
✓
✓
✓
--
Iteration
5. 6 4 4 (6,4) 5 ✓ ✓ Table
6. 7 4.5 4 (7,4) 6 ✓ --
7. 8 5 5 (8,5) 7 ✓ ✓
DDA Circle
Drawing
Algorithm
DDA Circle Drawing Algorithm contd.
The behavior of the circuit for clockwise circular interpolation is shown in Fig.
Assume that the radius (R) of the circle is 15, the initial value of the vector (i, j) from the start position of the circle
to the center is (R,0), and the length (n) of the register is 4.
In this case, the value and the output of the registers can be summarized for the iteration period. Because the length
of the registers is set to be n=4, the registers of the DDA for the X- and Y-axes can store 15, maximum.
Furthermore, because the start position of a circle is (R, 0), the initial value of the V registers of the DDA for the X-
and Y-axes are 15 and 0, respectively.
In the first iteration, the initial value of the V register of the DDA for the X-axis is added to the Q register. Because
overflow does not occur in the Q register, the DDA for the Y-axis is not changed.
In the second iteration, the value of the V register of the DDA for the X-axis is added to the Q register. Now,
overflow occurs in the Q register and the value of the Q register becomes 14 (30−16 = 14).
Iteration step DDA for x axis DDA for y
axis
In the second iteration, the value of the V register of the V Q Δs V Q Δs
DDA for the X-axis is added to the Q register. Now, overflow
occurs in the Q register and the value of the Q register 0. 15 0 -- 0 0 --
becomes 14 (30−16 = 14). 1. 15 15 -- 0 0 --
Because of the overflow from the X-axis DDA, the V register 2. 15 14 1 1 1 --
of the Y-axis DDA comes to have value 1. By adding the 3. 15 13 1 2 3 --
value of the V register and the value of the Q register, the Q
register comes to have the value 1. 4. 15 12 1 3 6 --
5. 15 11 1 4 10 --
As this process is repeated, due to the overflow from the
DDA for the X-axis, the V register for the Y-axis is 6. 15 10 1 5 15 --
incremented. On the other hand, due to the overflows from 7. 15 9 1 6 5 1
the DDA for the Y-axis, the V-register of the DDA for the X-
axis is decremented, resulting in circular interpolation. 8. 14 7 1 7 12 --
9. 14 5 1 8 4 1
10. 13 2 1 9 13 --
11. 13 15 -- 9 6 1
Iteration step DDA for x axis DDA for y
axis
Iteration step DDA for x axis DDA for y
axis V Q Δs V Q Δs
V Q Δs V Q Δs
12. 12 11 1 10 0 1
0. 15 0 -- 0 0 -- 13. 11 6 1 11 11 --
1. 15 15 -- 0 0 -- 14. 11 1 1 12 7 1
2. 15 14 1 1 1 -- 15. 10 11 -- 12 3 1
3. 15 13 1 2 3 -- 16. 9 4 1 13 0 1
4. 15 12 1 3 6 -- 17. 8 12 -- 13 13 --
5. 15 11 1 4 10 -- 18. 8 4 1 14 11 1
6. 15 10 1 5 15 -- 19. 7 11 -- 14 9 1
7. 15 9 1 6 5 1 20. 6 1 1 15 18 1
8. 14 7 1 7 12 -- 21. 5 6 -- 15 7 1
9. 14 5 1 8 4 1 22. 4 10 -- 15 6 1
10. 13 2 1 9 13 -- 23. 3 13 -- 15 5 1
11. 13 15 -- 9 6 1 24. 2 15 -- 15 4 1
25. 1 0 -- 15 3 1
Interpolated circle
with the original
circle
SOFTWARE INTERPOLATORS
- Reference pulse
1. Dk < 0: This case means that the position (Xk,Yk) is located on the
inside of a circle and, in this case, the step moves in the positive
direction of X-axis
1. Dk < 0: This case means that the position (Xk,Yk) is located on the
inside of a circle and, in this case, the step moves in the positive
direction of X-axis
Dk = 0: One of the above rules can be arbitrarily selected and applied
Stairs Approximation Interpolator
Reference word / sampled data systems.
In reference word interpolation systems, the maximum velocity is not limited by the execution speed of the
processor.
The interpolator routine is more complex.
1st Stage:-
Input contour is segmented into straight line segment within an allowable tolerance. (rough interpolation)
2nd Stage:-
Approximating line segments
The data which is interpolated, and interpolation result send to axis.(fine interpolation)
Sampled data systems- Flowchart
Sampled data
systems for
linear
interpolation
Sampled data
systems for
linear
interpolation
Comparison between the both types