Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

CHINESE JOURNAL OF MECHANICAL ENGINEERING

·940· Vol. 26, No. 5, 2013

DOI: 10.3901/CJME.2013.05.940, available online at www.springerlink.com; www.cjmenet.com; www.cjmenet.com.cn

Development of FPGA Based NURBS Interpolator and Motion Controller


with Multiprocessor Technique

ZHAO Huan, ZHU Limin*, XIONG Zhenhua, and DING Han


State Key Laboratory of Mechanical System and Vibration, Shanghai Jiao Tong University, Shanghai 200240, China

Received December 22, 2012; revised June 12, 2013; accepted June 24, 2013

Abstract: The high-speed computational performance is gained at the cost of huge hardware resource, which restricts the application of
high-accuracy algorithms because of the limited hardware cost in practical use. To solve the problem, a novel method for designing the
field programmable gate array(FPGA)-based non-uniform rational B-spline(NURBS) interpolator and motion controller, which adopts
the embedded multiprocessor technique, is proposed in this study. The hardware and software design for the multiprocessor, one of
which is for NURBS interpolation and the other for position servo control, is presented. Performance analysis and experiments on an
X-Y table are carried out, hardware cost as well as consuming time for interpolation and motion control is compared with the existing
methods. The experimental and comparing results indicate that, compared with the existing methods, the proposed method can reduce
the hardware cost by 97.5% using higher-accuracy interpolation algorithm within the period of 0.5 ms. A method which ensures the
real-time performance and interpolation accuracy, and reduces the hardware cost significantly is proposed, and it’s practical in the use of
industrial application.

Key words: NURBS interpolator, FPGA-based interpolation, multiprocessor, system on a programmable chip (SOPC),
motion controller

and may lead to fluctuation of interpolation period when


1 Introduction ∗ the sampling interval is too short. Furthermore, the clock
drift between the PC and motion controller may lead to
In modern commercial CAD/CAM systems, non-uniform
commands-gap or -overlap within one sampling interval.
rational B-spline(NURBS) has gained wide popularity and
To overcome these drawbacks, two tasks including
gradually become the standard format for representing the
interpolation and motion control can be performed
analytical or free-form profiles. Meanwhile, NURBS
simultaneously by the same microprocessor, such as digital
interpolators are also studied[1–7] and applied in the
signal processor(DSP) or FPGA. Then, the following
practical CNC systems. Some advanced CNC systems,
merits can be obtained: (1) the interpolator and motion
such as Siemens 840D and FANUC 32i, are already
controller share the same clock; (2) tinier interpolation
capable of performing NURBS interpolation. Due to the
period can be gained accurately; and (3) real-time
non-analytical relationship between the spline parameter
performance will be unnecessary for the PC, so that RTX
and arc-length, it is time-consuming to perform the
won’t be needed. Recently, DSP was introduced to
NURBS interpolation algorithm. In order to meet the
implement the aforementioned two tasks. However, the
high-speed and high-accuracy requirements of the
calculation speed of DSP cannot be enhanced too much due
machining process, it is essential to design an accurate and
to the serial calculation mode and limited computation
fast NURBS interpolator.
power. So, the interpolation period in most of the published
Nowadays, PC is usually adopted to perform NURBS
researches[2, 10–11] is not less than 1 ms. In contrast to PC
interpolation and motion control card to implement
and DSP with pipelined architecture, FPGA has advantages
closed-loop control in the open-architecture CNC
in terms of parallel computation and hardware
system[8–9]. In such case, the software real-time
reconfiguration capability. Thus, FPGA was employed by
extension(RTX) has to be installed to build a real-time
some researchers to overcome the drawbacks of the above
environment for the interpolation, which increases the cost
two methods. YAU, et al[12], realized the real-time NURBS
interpolator and motion controller using a Xilinx XCV600E
* Corresponding author. E-mail: zhulm@sjtu.edu.cn FPGA chip, which has 985 882 system gate counts. In their
This project is supported by National Key Basic Research Program of
China(973 Program, Grant No. 2011CB706804), Shanghai Municipal
work, all the modules are built using logic gates specified
Science and Technology Commission of China(Grant No. 11QH1401400), by hardware description language(HDL). When increasing
and Research Project of State Key Laboratory of Mechanical System & the degree of the NURBS curve or the data bits for more
Vibration of China(Grant No. MSVMS201102)
© Chinese Mechanical Engineering Society and Springer-Verlag Berlin Heidelberg 2013
accurate description or computation, the FPGA cannot
CHINESE JOURNAL OF MECHANICAL ENGINEERING ·941·

afford the hardware cost. As a result, only 2-degree feedrate setting and adjustment subject to the kinematic
NURBS curve and 16-bits data can be processed. To cope constraints, as well as jerk-limited feedrate scheduling. In
with this issue, YAU, et al[13], later employed a Xilinx the last step, 5-phase S-shape feedrate profile is employed
XC2V4000 FPGA with 4M system gate counts, which can so as to realize smooth motion for less tracking error.
process 3-degree NURBS curve described by 32-bits data.
The total computational time for NURBS interpolation and
motion control with the above two methods is only about
1.84 μs. However, limited by the hardware cost, only the
interpolator based on the first-order Taylor’s expansion is
employed in above studies, which will inevitably cause
considerable feedrate fluctuation. Therefore, though the
interpolation speed is enhanced greatly, the computation
accuracy has to be sacrificed. In addition, with
consideration of the economic factor in practical
applications, it is not an optimal solution to choose a FPGA
with large resource.
This study presents a novel approach to design
FPGA-based NURBS interpolator and motion controller
using the embedded multiprocessor technique. With this
method, two free NIOS II soft cores are embedded into the
FPGA, one for NURBS interpolation while the other for
position servo control. Compared with the existing methods,
it needs less hardware resource but can implement more
complicated interpolation algorithms within the period of
0.5 ms.
The structure of this paper is organized as follows.
Section 2 gives an overview of the NURBS interpolation
and motion control scheme. Section 3 illustrates the
hardware configuration and software realization scheme of
the FPGA system. Performance analysis and experiments
are conducted in section 4. Finally, conclusions are
presented in section 5. Fig. 1. Flowchart of NURBS interpolation and motion control

2 NURBS Interpolation and Motion Control 2.2 NURBS interpolation algorithm


Scheme The interpolator based on second-order Taylor’s
expansion is adopted in this work, which is given as[2]
In the interpolation process, two main steps are usually
involved: feedrate scheduling and interpolation. Generally, vk Ts  (Ts2  2) Ak (v T ) 2 C (uk )C (uk )
uk 1  uk   k s , (1)
feedrate scheduling can be implemented in on-line[9] or | C (uk ) | 2 | C (uk ) |4
off-line[14] mode. Because the arc-length of the NURBS
curve and the acceleration/deceleration (ACC/DEC) time where uk, vk, Ts, Ak, C(uk) and C(uk) denote the spline
are determined using iterative approaches, the off-line parameter, scheduled speed, interpolation period, scheduled
feedrate scheduling method is applied in this work. After acceleration, first and second derivatives of the curve,
that, the information about the feedrate profile is respectively.
transferred to the interpolator via data file. The complete Generally, the NURBS curve is represented by[15]
NURBS interpolation and motion control scheme is
illustrated in Fig. 1. The feedrate scheduling is n i

implemented in the PC while the interpolation and motion  N j , p (u)w j Pj  N j , p (u ) w j Pj


A(u )
j 0 j i  p
control are implemented in a FPGA chip located on a C (u )  n
 i
 , (2)
B(u )
custom motion control card.  N j , p (u)w j  N j , p (u ) w j
j 0 j i  p

2.1 Feedrate scheduling


The feedrate scheduling algorithm adopted in this work where Nj,p(u), p, wj, Pj and i represent the basis function,
is a combination of those methods proposed in Refs. [9, 14]. degree of the curve, weight, control point and the index that
It comprises the following major steps: curve scanning for u lies in the knot vector, respectively. The first and second
sharp corners and positions with discontinuous curvature, order derivatives of the parametric curve have the
ZHAO Huan, et al: Development of FPGA Based NURBS Interpolator and Motion Controller
·942· with Multiprocessor Technique

following forms: Similarly, the derivatives of Q(u) can be calculated by


using the following equation:
A(u )  B (u )C (u )
C (u )  , i
B(u )
(3)
Q(u )( r )   N (j r, p) Pj 
j i  p
i i
A(u )  2 B (u )C (u )  B (u )C (u )
C (u ) 
B (u )
.  N (j r, 1)
p1 S j   N (j r,  2)
p  2T j ,
(6)
j i p 1 j i  p  2

To handle Eq. (1), de Boor-Cox algorithm[16–17] is where


employed to evaluate C(ui) and C(ui). Let Q(u) be a
B-spline, its value can be obtained by p ( Pj  Pj1 ) ( p 1)( S j  S j1 )
Sj  , Tj  . (7)
u j p  u j u j  p 1  u j
i i
Q(u )   N j , p (u ) Pj   N j , p1 (u ) Pj1 
Consequently, one can get
j i  p j i p 1
i
  N j ,0 (u ) Pjp  Pi p , (4) 
 Q(u )(1) 

i
N j , p1 S j  Sip1 ,
j i 
 j i p 1
(8)

 i
where Q(u )(2) 
  N j , p2T j  Ti p 2
,
 Pj ,
 h  0,  j i  p  2
Pjh    h h1 h h1

(1 α j ) Pj1  α j Pj , h  1, 2, , p.
 where Si p–1 and Ti p–2 can be derived by using Eq. (5).
u u j According to Eqs. (2)–(8), C(u), C(u) and C(u) can be
α hj  , u  [ui , ui 1 ], j  i  p  h, , i. (5)
u j  p 1h  u j computed in sequence.
As for the feedrate and acceleration required by Eq. (1),
their values can be obtained directly from the feedrate
Clearly, Eq. (4) can be calculated recursively with reference
profile, which has already been determined in the
to Eq. (5).
procedure of feedrate scheduling. Here, to reduce the
In this work, a computational structure is proposed to
computational load of the hardware interpolator, an
enhance the calculation speed. Without loss of
incremental method is adopted. For instance, in the first
generalization, the degree of the B-spline is set as three. As
phase of the feedrate profile, the speeds at the current and
illustrated in Fig. 2, two matrixes {Pjh} and {αjh} are
the next periods can be expressed as
involved, and the calculation process can be divided into
four steps. 
 1
Step (1): Bridge coefficients αjh are figured out with 
 v(t )  vstr  J max t 2 ,

 2
reference to the parameter uj, and stored into the buffer,  (9)

v(t  T )  v  1 J (t  T ) 2 ,
where j  i  p  h, , i , and h  1, 2, , p .  s str max s

 2
Step (2): The iterative computation of Pjh begins from the
fourth column shown in Fig. 2. At this column, the value of where vstr, Jmax and t are the starting speed, maximum jerk
each element is set to be the corresponding control point Pj. and relative time that starts from the beginning of the
current period. Assuming Jmax2 to be constant, two
multiplications and two additions are needed with this
equation. Alternatively, the ending speed can be calculated
using the following expression:


 1 2

∆v(t )  v(t  Ts )  v(t )  J max Ts t  J max Ts ,
 2 (10)


v(t  Ts )  v(t )  ∆v(t ),

Fig. 2. Computational structure for the de Boor-Cox algorithm


which needs only one multiplication and two additions. So
Step (3): The value of each element located at the upper Eq. (10) is employed instead of Eq. (9). To use this method,
triangular region of {Pjh} is calculated using Eq. (5). Then the expressions of Δ(v )t and acceleration A(t) in the five
the values are saved into the buffer for the next iteration. different phases of the S-shape feedrate profile are listed in
Step (4): Finally, the first element of matrix {Pjh} is Table 1. Where Tstr, Tcv and Tend are the acceleration time,
picked out as the desired result Q(u). constant-feedrate time and deceleration time of the
CHINESE JOURNAL OF MECHANICAL ENGINEERING ·943·

ACC/DEC process, respectively. complicated algorithms are modularized with this method,
the hardware cost may be larger than the benefit it brings.
Table 1. ∆v(t) and A(t) in different stages In order to solve this issue, a method integrating CPU IP
of the feedrate profile core, HDL and logic blocks is proposed. The CPU
ACC/DEC processors are utilized to perform interpolation and position
Expressions of ∆v(t) and A(t)
stage servo control, while the HDL or block diagram to
∆v(t )  J maxTst  J maxTs 2  2, modularize the logical circuits.
Phase 1
A(t )  J max t In this work, NIOS II for the FPGA from Altera is
∆v(t )  J maxTst  J maxTs 2  2  2 J maxTstrTs , employed as the soft-core. NIOS II processor provides
Phase 2
A(t )  J maxTstr  J max t various attractive features such as 32-bits data path,
Phase 3 ∆v(t )  0, A(t )  0 embedded DSP element, floating-point instructions(FPIs)
∆v(t )  J maxTst  J maxTs 2  2  2 J maxTstrTs  J maxTcvTs , for single-precision operations[20]. In addition, the
Phase 4
A(t )  J max (2Tstr  Tcv  t ) computational performance of NIOS II can be up to
∆v(t )  J maxTst  2 J maxTstrTs  2 J maxTendTs  J maxTcvTs , 250DMIPS, and multiprocessor is also supported. Since all
Phase 5
A(t )  J max (t  2Tstr  Tcv  2Tend ) the procedures are written in standard C language and
debugged the same as that in the PC, it is more convenient
than the HDL based method.
2.3 Motion control algorithm
In this work, the traditional PID controller expressed in 3.1.2 Hardware structure
Eq. (11) is chosen for closed-loop position control: The motion control system is implemented using a
k
Cyclone II series FPGA EP2C20F484C8N from Altera,
u (kTs )  K p E (kTs )  K i  E ( jTs )  which contains 18 752 logic elements (LEs), 239 616 bits
j 0
random access memory (RAM), 26 embedded multipliers,
K d  E (kTs )  E ((k 1)Ts ) , (11)
4 phase-locked loops (PLLs) and 315 user I/O pins. The
hardware structure is depicted in Fig. 3.
where u(kTs), E(kTs), Kp, Ki and Kd represent the velocity
control signal, the position error and three gains,
respectively.

3 Design of FPGA based Interpolator


and Motion Controller
In this section, multiprocessor technique is applied to
design the FPGA-based NURBS interpolator and motion
controller. The FPGA development flow consists of two
stages: hardware design with a set of functional modules,
and software development in three steps.

3.1 Hardware design Fig. 3. Structure of the FPGA that configured for NURBS
interpolator and motion controller
3.1.1 Realization scheme
In the traditional motion control system, the combination As shown in Fig. 3, the FPGA consists of five main
of DSP and FPGA is the most popular hardware modules: 1) NURBS interpolator; 2) dual-port RAM
architecture[18–19]. Sharing the same clock cycle, DSP is (DPRAM); 3) mutual exclusion (MUTEX) and shared
adopted to perform various algorithms for motion control memory[21]; 4) position servo controller; 5) encoder sampler.
while FPGA to generate logical modules with parallel The other relative peripherals comprise digital-to-analog
structures which cannot be realized by DSP. However, with converter (DAC) and amplifier, SDRAM and FLASH chip.
the developments of the large scale integration technology 1) NURBS interpolator: The interpolator is designed
and embedded DSP elements, it is more cost-effective to using NIOS IIs processor, which is the standard version
design motion control system just employing FPGA due to with balanced performance and size among three kinds of
its reconfiguration capability, simple development process, NIOS II processors[20]. The dominant frequency provided
high density and economic characteristic. for the processor is 133 MHz, which is generated by the
The methodologies for development of FPGA include PLL. An interval timer core is also embedded to generate
HDL, dedicated logic blocks, intellectual property (IP) the timer interrupt for both the interpolator and motion
cores, etc. Nowadays, the interpolator and motion controller.
controller are usually designed using HDL. In such case, 2) DPRAM: A DPRAM with 2 00016-bits is designed
the FPGA system can execute concurrent operations using the on-chip RAM[22], which is utilized to store the
because of its parallel architecture. However, when feedrate scheduling results transferred from the PC and
ZHAO Huan, et al: Development of FPGA Based NURBS Interpolator and Motion Controller
·944· with Multiprocessor Technique

provide them to the interpolator. configuration: two NIOS II/s cores used as interpolator and
3) MUTEX and shared memory: The shared memory is a motion controller, Avalon-MM tri-state bridge, interval
1632-bits DPRAM, which is used to transfer the timer which interrupts at every 0.5 ms, MUTEX, interface
interpolated results from the interpolator to the motion for the FLASH memory, SDRAM memory, DPRAM and
controller at every sampling interval. In order to protect the shared memory. In order to hardware-accelerate the
resources in the shared memory from data corruption when arithmetic operations, the FPIs for single-precision
multiple processors modify the resource simultaneously, a operations are adopted in the interpolator[23].
MUTEX is added as a component.
4) Motion controller: The configuration of the motion
control processor is the same as the interpolator. It receives
reference commands from the shared memory, and sends
the velocity control signal to the DAC chip utilizing serial
peripheral interface (SPI) protocol.
5) Encoder sampler: This circuit is designed using HDL.
So it is capable of capturing and accumulating the
quadrature encoder pulses(QEP) with high speed. The
actual positions are latched and updated at every clock
cycle.
The DAC module contains two components: converter
and amplifier. Two AD1866 devices, which have 16-bits
serial input and four voltage outputs, are adopted to convert
the digital velocity commands to analog signals. A TL084
chip is utilized to amplify the analog signals from 1~1 V
to 10~10 V. A SDRAM chip K4S641632H-UC60 and a
FLASH chip JS28F640 are used to save the program and
data of the NIOS II cores.

3.2 Software design Fig. 4. Software design flow for the FPGA based
The software is designed in three steps: realization of the interpolator and motion controller
off-line feedrate scheduling, configuration for the Secondly, the block of the NIOS II processor is
interpolator and motion controller, and programming for integrated into the Quartus II. The other functional circuits
two NIOS II processors. or logical modules are added as well, including encoder
sampler, DPRAM and shared memory. With pins connected
3.2.1 Realization of the off-line feedrate scheduling and assigned, the project is analyzed and synthesized. Then
The feedrate scheduling algorithm presented in section a SRAM object file (*.sof) is generated and downloaded to
2.1 is coded in Visual Studio C++, and executed in a the FPGA. Up to now, the hardware environment is ready
non-deterministic Win32 environment. and then the software in the NIOS II IDE can be developed.
After implementation of the algorithm, a data file
containing the following information is generated: the 3.2.3 Programming for multiprocessor
geometrical description of the NURBS curve, which NIOS II IDE is an integrated development tool for
contains the number of the control points, degree of the editing and debugging procedures running in the NIOS II
spline, control points multiplying the weights, weight processors.
vector, knot vector; number of the sub-segments; total Two projects are created for NURBS interpolator and
interpolation time; Jmax, vstr, ACC/DEC time/modes. motion controller, respectively. The project of the NURBS
Then, a normal Win32 thread reads the data file interpolator consists of two threads: timer interrupt thread
sequentially, and sends the information of a new NURBS and loop thread. During the implementation of the loop
curve to the motion controller at the time that the FPGA thread, the interpolator accesses the DPRAM repeatedly to
finishes half of the current block’s interpolation task. check whether updated feedrate scheduling results are
transferred from the PC via the PCI bus. If so the
3.2.2 Configuration for soft-cores interpolator will read the data into the buffer to prepare for
The follow chart of software design for the FPGA system the interpolation of the next curve. When the timer interrupt
is depicted in Fig. 4. occurs, the interpolation interrupt service routine (IISR)
Firstly, the SOPC Builder tool, which is integrated in the executes the interpolation task introduced in section 2.2 and
Altera Quartus II software, is applied to customize the sends the coordinate points to the shared memory.
configuration of the two processors, so as to build the The project of the motion controller has the similar
hardware environment for the program running in the NIOS software structure to that of the interpolator. At every
II cores. The following modules are then added into the sampling interval, the motion controller reads the position
CHINESE JOURNAL OF MECHANICAL ENGINEERING ·945·

commands from the shared memory and actual positions compared to that of method (1)(2). However, the results
from the encoder sampler, and then executes the PID indicate that the computing efficiency of our method is
algorithm. After that, the digital velocity commands are worse than that of method (1)(2). But given the specified
transferred to the DAC chip for conversion. interpolation period of 0.5 ms, there is still enough
The aforementioned two NIOS II processors have computational power for more complex algorithms with the
pipelined architectures, so the processing time is inevitably proposed method. Thus, the analysis demonstrates that our
longer than the scheme based on HDL or logic block. method can not only meet the requirement of high-speed
However, all of the modules in the FPGA execute in interpolation, but also realize significant reduction of
parallel, so interpolation and motion control tasks can be hardware cost, at the same time provide enough resource
implemented at the same time, which means that higher for further promotion of computational accuracy.
real-time performance can be obtained than DSP-based
scheme with the same dominant frequency. 4.2 Experimental results
In this subsection, experiments are performed on a
4 Analysis and Experiments Validation platform containing three components: a PC with Pentium
IV 2.4 GHz CPU and 2 GB SDRAM, a custom motion
In the following, performance analysis and experimental control card which has a FPGA chip as designed in section
verification are implemented to demonstrate the advantages 3, an X-Y table driven by YASKAWA SGDV series servo
and applicability of the proposed design. Concisely, the drivers and SGMJV motors with free load. The
design schemes introduced in Refs. [12–13] are marked as interpolation and motion control tasks are performed in
methods (1) and (2), respectively, while that presented in sequence in the following, and the parameters of the
our work as method (3). interpolator and motion controller are listed in Table 3.

4.1 Performance analysis Table 3. Parameters of the experiments


Suppose that the axes number and curve degree are three,
Parameter Value
the comparison results about hardware cost and consuming
Chord error tolerance εcmm 0.001
time among the three different approaches are summarized Arc-length error tolerance εaµm 1
in Table 2. Generally, the hardware cost of Cyclone series Interpolation/motion control period Tsms 0.5
FPGAs from Altera is evaluated by the number of LEs. Maximum feedrate Fmax(mm • s–1) 100
However, for the purpose of comparison, the amount of Curvature constant κcbcmm–1 1
Maximum acceleration Amax(m • s–2) 3
LEs should be converted to that of logic gate counts by
Maximum jerk Jmax(m • s–3) 60
multiplying 8–21 depending on different applications[24]. 6 553.6
Encoder resolution Er(pulse • mm–1)
Typically, one LE is equivalent to 12 logic gates. In our Proportional gains for two axes Kps–1 2.93
work, 2 264 LEs are modularized for the NURBS Integral gains for two axes Kis–2 0.015 3
interpolator and 2 129 LEs for the motion controller, which
means 27 168 and 25 548 logic gates are consumed, The butterfly curve similar to Ref.[13] is chosen as the
respectively. Furthermore, the computational time for experimental case, which has 51 control points and 3
interpolation and motion control are 297 μs and 30 μs, degree. The trajectory of the curve is shown in Fig. 5.
respectively. Because of parallel implementation, the total
time spent is indeed the interpolation time.

Table 2. Comparison results of three different methods

Schemes of NURBS interpolator Method Method Method


and motion controller (1) (2) (3)
Number of motion axes Na 3 3 3
Order of Taylor’s expansion Nt 1 1 2
Number of data bits Nb 32 32 32
Degree of NURBS curve p 3 3 3
Gate counts for interpolator Ngi103 1 098 1 098 27.168
Gate counts for motion controller Ngc10 3
504 504 25.548
Total time spent for interpolation
NA 1.84 297
and servo control ttotalμs

Note: NA stands for “Not Available”, which means the FPGA doesn’t Fig. 5. Trajectory of the butterfly curve
have enough hardware resource to realize the interpolation.
From Table 2, it can be found that higher-accuracy Firstly, the feedrate scheduling algorithm mentioned in
algorithm can be adopted by our method. Meanwhile, the section 2 is performed, and the scheduled feedrate profile
proposed method can reduce the hardware cost by 97.5% as can be obtained as shown in Fig. 6.
ZHAO Huan, et al: Development of FPGA Based NURBS Interpolator and Motion Controller
·946· with Multiprocessor Technique

where xk , yk and zk are the actual feedrates of three axes.

Fig. 6. Feedrate profile after off-line feedrate scheduling

Subsequently, the interpolation task is performed, and


Fig. 8. Contour error for the butterfly curve
the reference commands are sent to the motion controller with method (3)
for PID calculation. As shown in Fig. 7, by applying the
first- and second-order Taylor’s expansions in our hardware
system, the maximum feed fluctuation ratios are 2.08% and
0.135 7%, respectively. Therefore, with our method higher-
accuracy performance can be obtained.

Fig. 9. Actual feedrate of the platform


with method (3)
As can be seen, the maximum contour error can be
confined under 25.52 μm, and the root mean square value is
9.692 4 μm. Moreover, the platform can realize the motion
with the scheduled feedrate profile as shown in Fig. 9.
Hence, the experimental results demonstrate the practical
applicability of the proposed method with higher-accuracy.
Fig. 7. Feedrate fluctuation comparison
between methods (1)(2) and (3)
5 Conclusions

Finally, the X-Y table is driven by the motion control (1) A novel approach to design the hardware interpolator
card to track the desired trajectory. The experimental results and motion controller based on FPGA is proposed. A
about contour error and actual feedrate profile using FPGA chip from Altera is selected as the microprocessor
method (3) are illustrated in Fig. 8 and Fig. 9. The contour on the board. Two NIOS II soft-cores are embedded into
error is evaluated using the algorithm presented in Ref. [25], the FPGA, one of which works as NURBS interpolator and
while the actual feedrate vk* is evaluated using the the other as motion controller.
numerical derivatives estimated from actual x-, y- and z- (2) The feedrate scheduling algorithm is implemented
positions: off-line and a data file is generated. Then, a normal Win32
thread sends the feedrate scheduling results to the custom
motion control card to perform real-time interpolation and
xk 1  xk y  yk position servo control.
xk  , yk  k 1 , (3) Performance analysis and experiments are conducted
Ts Ts
(12) to verify the superiority and applicability of the proposed
zk 1  zk *
zk  , vk  xk 2  yk 2  zk 2 , method. The results have shown that, despite some
Ts reduction of computational efficiency compared with the
CHINESE JOURNAL OF MECHANICAL ENGINEERING ·947·

existing FPGA-based interpolators, higher-accuracy [16] DE B C. On calculation with B-splines[J]. Journal of Application
interpolation algorithm can be adopted using less hardware Theory, 1972, 6(1): 50–62.
[17] COX M. The numerical evaluation of B-splines[J]. IMA Journal of
resource with specified sampling interval of 0.5 ms.
Applied mathematics, 1972, 10(2): 134.
[18] OH S N, KIM K I, LIM S. Motion control of biped robots using a
References single-chip drive[C]//IEEE International Conference on Robotics
and Automation, Taipei, China, September 14–19, 2003: 2 461–
[1] XU Z M, CHEN J C, FENG Z J. Performance evaluation of a
2 465.
real-time interpolation algorithm for NURBS curves[J]. The
[19] HE S, GAO X, PENG C, et al. Development of DSP and FPGA
International Journal of Advanced Manufacturing Technology, 2002,
based 4-axis motion controller[C]//6th International Symposium on
20(4): 270–276. Precision Engineering Measurements and Instrumentation,
[2] CHENG C W, TSAI M C. Real-time variable feed rate NURBS Hangzhou, China, August 8–11, 2010: 75441K.
curve interpolator for CNC machining[J]. The International Journal [20] ALTERA INC. Nios II processor reference handbook[R].
of Advanced Manufacturing Technology, 2004, 23(11): 865–873. California: Altera Corporation, 2009.
[3] LIU X, AHMAD F, YAMAZAKI K, et al. Adaptive interpolation [21] ALTERA INC. Creating multiprocessor Nios II systems tutorial[R].
scheme for NURBS curves with the integration of machining California: Altera Corporation, 2010.
dynamic[J]. International Journal of Machine Tools and [22] ALTERA INC. Cyclone II device handbook[R]. California: Altera
Manufacture, 2005, 45(4–5): 433–444. Corporation, 2010.
[23] ALTERA INC. Using Nios II floating-point custom instructions
[4] DU D S, LIU Y D, YAN C L, et al. An accurate adaptive parametric
tutorial[R]. California: Altera Corporation, 2010.
curve interpolator for NURBS curve interpolation[J]. The
[24] ALTERA INC. Altera data book[R]. California: Altera Corporation,
International Journal of Advanced Manufacturing Technology, 2007, 1998.
32(9): 999–1 008. [25] LO C C. Cross-coupling control of multi-axis manufacturing
[5] LEI W T, SUNG M P, LIN L Y, et al. Fast real-time NURBS path systems[D]. Michigan: University of Michigan, 1992.
interpolation for CNC machine tools[J]. International Journal of [26] PENG F Y, CHEN X B, ZHOU Y, et al. NURBS curve
Machine Tools and Manufacture, 2007, 47(10): 1 530–1 541. interpolation algorithm adaptive to the machine’s kinetic
[6] TSAI M S, NIEN H W, YAU H T. Development of an integrated characteristics[J]. International Journal of Materials and Product
look-ahead dynamics-based NURBS interpolator for high precision Technology, 2008, 33(1–2): 79–94.
machinery[J]. Computer-Aided Design, 2008, 40(5): 554–566. [27] PENG F Y, HE Y, LI B. Look-ahead control in high feed rate
[7] HENG M, ERKORKMAZ K. Design of a NURBS interpolator with NURBS curve interpolation[J]. Journal of Computer Aided Design
& Computer Graphics, 2006, 18(5): 625–629.
minimal feed fluctuation and continuous feed modulation
capability[J]. International Journal of Machine Tools and
Manufacture, 2010, 50(3): 281–293.
[8] PARK J H, NAM S H, YANG M Y. Development of a real-time Biographical notes
trajectory generator for NURBS interpolation based on the ZHAO Huan, born in 1983, is currently a PhD candidate at State
Key Laboratory of Mechanical System and Vibration, Shanghai
two-stage interpolation method[J]. The International Journal of
Jiao Tong University, China. He received his bachelor degree
Advanced Manufacturing Technology, 2005, 26(4): 359–365.
from Jilin University, China, in 2006. His research interests
[9] LIN M T, TSAI M S, YAU H T. Development of a dynamics-based include parametric interpolation and contour following control for
NURBS interpolator with real-time look-ahead algorithm[J]. CNC machine tools.
International Journal of Machine Tools and Manufacture, 2007, Tel: +86-21-34206412; E-mail: huanzhao@sjtu.edu.cn
47(15): 2 246–2 262.
[10] TAI M C, CHENG C W, CHENG M Y. A real-time NURBS ZHU Limin, born in 1973, is currently a professor at Shanghai
surface interpolator for precision three-axis CNC machining[J]. Jiao Tong University, China. He received his PhD degree from
International Journal of Machine Tools and Manufacture, 2003, Southeast University, China, in 1999. His research interests
43(12): 1 217–1 227. include surface modeling, CNC machining and inspection.
[11] CHENG M Y, TSAI M C, KUO J C. Real-time NURBS command E-mail: zhulm@sjtu.edu.cn
generators for CNC servo controllers[J]. International Journal of
Machine Tools and Manufacture, 2002, 42(7): 801–813. XIONG Zhenhua, born in 1974, is currently a professor at
[12] YAU H T, LIN M T, CHAN Y T, et al. Design and implementation Shanghai Jiao Tong University, China. He received his PhD
of real-time NURBS interpolator using a FPGA-based motion degree from The Hong Kong University of Science & Technology,
controller[C]//IEEE International Conference on Mechatronics, China, in 2002. His research interests include servo motion
Taiwan, China, July 10–12, 2005: 56–61. control and electronic manufacturing.
[13] YAU H T, LIN M T, TSAI M S. Real-time NURBS interpolation E-mail: mexiong@sjtu.edu.cn
using FPGA for high speed motion control[J]. Computer-Aided
Design, 2006, 38(10): 1 123–1 133. DING Han, born in 1963, is currently a professor at Shanghai
[14] LEE A C, LIN M T, PAN Y R, et al. The feedrate scheduling of Jiao Tong University, China. He received his PhD degree from
NURBS interpolator for CNC machine tools[J]. Computer-Aided Huazhong University of Science and Technology, China, in 1989.
Design, 2011, 43(6): 612–628. His research interests include digital and electronic
[15] PIEGL L, TILLER W. The NURBS book[M]. Berlin: Springer manufacturing.
Verlag, 1997. E-mail: hding@sjtu.edu.cn

You might also like