Académique Documents
Professionnel Documents
Culture Documents
Proposed Structure Hardware of the CNC for Machine Tools Based on System on
Chip
Interface
I
Ethernet HPS llterpolator. Analog
discrete devices into integrated on a card one; from Position Or Digital
complicated medium-speed circuits into high-speed ]JO controller
Digital
integrated ones. A product suitable for applied research for
the CNC is SoC FPGA. The SoC FPGA device is a single-die (FPGA)
system on a chip, that consists of two distinct parts - a Hard EPROM
JTAG
RAM
On Chip
Processor System (HPS) portion and an FPGA portion. The I Input
Ene-oder
NCK's software functions will perform on components HPS
and NCK's hardware functions are implemented on FPGA. I
RTOS - 32bit
I
In this paper, the authors propose NCK hardware and Figure I. Proposed structure hardware ofthe CNC
perform interpolation functions of NCK on hardware SoC
FPGA, to confirm the advantages of SoC FPGA. This result A. The structure and Function ofthe CNC
of the study showed that the CNC-on-Chip will replace the
From a functional point of view, the CNC system
present CNC.
consists of the Man Machine Interface (MMI) unit, the
Keywords-HPS-FPGA; SoC FPGAs; CNC-on-Chip; NCK; Numerical Control Kernel (NCK) unit, and the
Hardware CNC Programmable Logic Control (PLC) unit. Fig. [ 1/0
ethernet unit offers the interface between NCK and the user,
executes the machine operation command, displays
I. [NTRODUCTION
machine status, and offers functions for editing the part
Currently, the world has many studies on the CNC. program and communication. The NCK unit, being the
Specifically, since 2009 the CNC study guide has been core of the CNC system, interprets the part pro gram and
integrated on a chip based on FPGA technology [1]. executes interpolation, position control, and error
However, at the moment it does not have any FPGA can compensation based on the interpreted part program.
support the full functionality of CNC. So, they need to use Finally, this controls the servo system and causes the
additional cores externally [2], [3]. Through faster worl<.piece to be machined. The PLC sequentially controls
processing advantages of FPGAs, many researchers have tool change, spindie speed, workpiece change, and in/out
exploited this to construct the interpolation algorithm ofthe signal processing and plays the role of controlling
CNC [4], [5]. The study is presented in two projects [6] themachine's behavior with the exception of servo control
and [7] shows that the ability to integrate components NCK, [9].
on SoC FPGA were studied form of simulation, and can B. The Proposed Structure Hardware of the CNC Base
not integrate the entire component (ex components PLC) of onSoC FPGA
the CNC on a single chip [2]. Many studies, build
interpolation algorithm has been irnplemented on FPGA. Structure MM[ components: The controller is
The easy interpolation built in hardware [8], and the connected to a computer running the Windows operating
complex interpolation or curve is done by software system [9], in order to optimize the exploitation of
algorithms on the processor core [5]. computer power. An EMAC File Transfer Protocol used to
From these characteristics, the authors proposed transmit and receive data at 10/1 00/1 OOOMbps over
structure hardware ofthe CNC for Machine Tools base on Ethernet connections with the IEEE 802.3 compliant
"System on Chip" (Fig. 1 Proposed Structure Hardware of printed specification. [t was built on HPS. [ngredients used
the CNC for Machine Tools base on System on Chip. MM[ HSSB cable (High Speed Serial Bus) bandwidth,
high-speed data bus to 32 bits. MMI functions proposed
building software pro gram on ARM cores
Structure NCK components:
~: System C ontents &3 l Address Map &3 1 Interconnect Requirements &3 1 Device Family &3 1 Srnematic - Beta &3 1
.. .
<:? Use C... Name Description Export Clock Base End IRQ Tags
X
~
."'.
~
! 1I 1iI1~1
II hps_O Arria V/Cydone V Ha rd Processor System
,
multiple
,
'" mul t i p I s multi p l e
.
~ II sysilCqsys System ID Peripheral clk_O Ox OOOO_ 000 8 OxoOOO_ OOO f
:E ~ II milster_hps JTAG to Avalon M aster Bridge clk_O
~ II milster_fpgil JTAG to Avalon Master Bridge clk_O
.... ~ II nios2 Nios II Processor clk_O
'" Ox OOOO 1000 Ox OOOO 1 7ff
Z
~
~
~
II
II
II
onchip_memory
jtil9_uilrt
On-Chip Memory (RAM or ROM)
JTAG UART
position_controller...:O position_controller
clk_O
clk_O
'"
Ox OO0 2_0000
Ox OOOO 0000
Ox OOO <_ffff
Ox OOOO 0007 ~
'7 ~ II interpolator_O nterpolator
i
~ II Out_put PIO (parallel 110) clk_O Ox OOOO_ OOOO Ox OOOO OO Of
~ II pio_O PIO (parallel 110) clk_O
'" Ox OOOO 0000 Ox OOOO OOO f
11. BUILDING INTERPOLATION ALGORITHMS BASE ON length per IPO cycle time (Ti po) L1L, calculate axial
incremental value per IPO cycle time L1x, L1y, L1z.
HARDWARE OF THE Soc FPGA FOR CNC-ON-CHIP
The fundamental idea of this algorithm is a segment of
A. Linear Interpolation Algorithm Based on SoC FPGA the path by the interpolation time, Tipo. At each sampling
time the interpolated point can be defined as in (2) wherein
As we know, interpolated on hardware costs a lot of
the displacement of each axis is given by (3).
resources on the chip, and software interpolation on the
slow speed due to the sequential structure of the program
[9]. (1)
Fig. 4 is analyzed reference word algorithm linear
interpolation. In particular, the starting point A (xl, yl, zl)
and end point B (x2, y2, z2), calculate entire path length L
(1), the interpolation of point Pi to Pi+l, calculate path
(2)
244
As shown in Eg. (3), the line segment ~L depends on accuracy [10]. From the study of interpolation was
velocity V. Velocity V is defmed by Eg. (4) When the implemented on FPGA gives pretty good results working
command velocity V o defined in apart program is speed due to parallel structure of FPGA [11]. These studies
compensated for by feed override. are mostly based on the theory or empirical FPGA circuit
board with extemal auxiliary complements the CNC.
L= V.Tipo Limitations of FPGA resources are few and limited
(3) libraries when building complex functions. SoC FPGA
have advantages in addition to integrated support HPS
complex handling, minimizing the waste of resources.
(4) That's why authors choose SoC FPGA to build a linear
where,
interpolation algorithm on hardware. Simulation
F: The feed override;
parameters set as follows: Use the counter a = 3 cycles
Va: The velocity is defined in the "offset".
(BLU = 3 pulses); starting point (xl, yl, zl) = (I, I, I) to
Synchronous pulse generator in the axis due to
end point (x2, y2, z2) = (10,6,8); the number ofpulses to
hardware configuration on SoC FPGA. Most CNC
move the axes X = 9, Y = 5, Z = 7. This paper format
machines are currently using software algorithms on the
values xl, yl, zl, x2, y2, z2, X, Y, Z format 32-bit and dX,
core processor or host PC is suitable for machining
dY, dZ format pulse.
complex contour curves, but limited in terms of speed and
dX~ l I I Ih h I
11 12 13 4 IS 16 17 18 9 110
dY L - Il I I
11 12 13 4 IS 16
dZ L - Il I I Ih
11 12 13 4 Is 16 17 18
111 1111111 1 11111111 11 1111 111 111111111 11111 1111 111111111 111 111111 111111111 11 111111 1 1 11111111 111 111111 1 11111111 11 1111111 1111111 11 1 11111111 I I
Ops 10 ps 10 ps 30 ps 40 ps sops 60 ps 70 ps so ps 90 ps 100 ps 1l0 ps 120 ps 130 ps 140 ps 150 ps
Figure 4. The simulation results while building algorithm 3-axis simultaneously linear interpolation on SoC FPGA
245
--- - -
(number of pulses has not changed), to bring trajectory motion between the axis close to true trajectory.
As the results in Fig. 6 shows the number of pulses on the iterations are required and N, the number of iteration steps,
axis is not changed (9 X-axis, 5 Y-axis and 7 Z-axis). can be calculated using (6).
However, at this time of pulse generator axis with less
number of pulses (Y -axis) is stretched out nearly the time of N =Ixo -xfl+lyo -Yfl (6)
the pulse multiple axes (X-axis). That means that the There,
movement of the axis with alm ost the same time, avoid (X o, Y a) is the start point
running long axis, the axis have stopped making the (X f, Yf) is the end point
trajectory becomes "ziczac" error with true trajectory. However, an improved algorithm is proposed because the
C. Stairs Approximation Algorithm for Circle above mentioned algorithmhas some problems. In the
interpolation Based on SoC FPGA improved Stairs Approximation Algorithm, (5) is changed to
Fig. 7 shows how the Stairs Approximation Algorithm (7) by adding one more index.
for circle interpolator behaves in the case that the
commanded circular movement is in the clockwise direction
(7)
in the first quadrant with respect to the center ofthe circle. In
this algorithm, the variable Dk is calculated by (5).
In (7), i and j respectively denote the number of steps
along the X-axis and the Y-axis. When one step is added
along the X-axis, (8) is changed to (9)
;:2
Figure 7. The behavior ofthe stairs approximation algorithm.
246
Also, increase the number of interpolation points,
interpolated time prolonged.
111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 1111111111111111111
ops 60 ps so ps 100 ps 110 ps l4D ps 160 ps 180 ps 200 ps
D. The Circle Interpolation Base on SoC FPGA The third case is different from the Stairs Approximation
Considering the Smallest Deviations Trajectory Algorithm. The Di,j for each case is evaluated and the case
with the smallest absolute value is selected for movement.
One of the weaknesses of the stairs approximation Fig. 9 shows the flowchart of the Direct Search Algorithm
algorithm above is very much iteration. Because the motion for c10ckwise circular movement in the first quadrant.
concurrently of the axis and is not considered in the
algorithm, which it is very meaningful in SoC FPGA. Th e t raje ctory cons ide ri ng the sma ll est devi ations t rajector
0 1= IO + L'.XI Figure 10. The trajectory considering the smallest deviations trajectory.
0 2= 10 +L'.YI
OJ = 10 +L'.X + L'. YI The maximum deviation ofthis algorithm is 1/2 BLU and
accuracy of this algorithm is better than the stairs
_ O--<...Ol >
r -_ _ _N 0 2>_Y_e_s _ _-----,
approximation algorithm on, the number of iterations N is
less than 30% compared with the stack Stairs Approximately
Ye_s_.+~
0 1> DJ >-___ Aigorithm (Fig. 10).
From algorithm flowchart. Fig. 9 considering the
o , N~ optimum trajectory bias, the authors builds on SoC FPGA
hardware and simulation results Fig. 1l. At positions 4, 6, 7,
the smallest deviations trajectory 8, 9, 11 is the pulse generator between axes concurrently,
thanks to the characteristics tested according to the direction
of the errors smallest trajectory. Completion time
Figure 9. Direct search (the smallest deviations trajectory) flowchart.
interpolation after 15 cycles. The time is shortened, the
When clockwise circular movement in the first quadrant difference is reduced as the advantages of the method
is commanded, three cases should be considered: considered of errors smallest trajectory, thanks to a
Increasing 1BLU for the X-direction, concurrently pulse generator, and built algorithm on
Decreasing lBLUfor the Y-direction, and hardware of SoC FPGA.
Increasing 1 BLU for the X-direction and
simultaneously decreasing 1 BLU for the Y-direction.
247
dk ~~
50
l--------J l--------J l--------J~ ~ ~ ~ ~ l--------J ~ ~ ~ ~
xl 0
yl 10
x2 10
y2 0
1 2 3
5 6 7 B 9 10 11 12 13
" 15
~ Cii= =Pe =R
dX ~~ ~~~ n
dy ~~~~~
0 1 2 3
5 6 7 B 9 10
y 10 9 B 7 6 5 3 2 1 0
Figure 11. Simulation results using circle algorithm considering the smallest deviations trajectory improvements on SoC FPGA.
248