A Novel Command Generation Method With V
A Novel Command Generation Method With V
Abstact-This paper focuses on a novel command generator for Industrial motion controller units utilize vector data tables
servo-motor drives to be used as an integral part of their motion to represent the trajectory in terms of liner patches. These
controllers. The method, which incorporates a new data cards can then perform a liner interpolation between the two
compression algorithm, is capable of generating trajectory data consecutive entries in real-time to produce the relevant
at variable rates. In this paradigm, higher-order diferences of a reference signals for the position servo-conrol loop. For
given trajectory (i.e. position) are irst computed and thus the complex trajectories the size of the vector table may exceed
resulting data are compressed via the proposed technique. The
the available resources on the system. The conventional
generation of the commands is carried out according to the feed
machining approach does not meet the requirements of high
rate (i.e. the speed along the trajectory) set by the external logic
speed and high accurate machining. To overcome these
dynamically. The paper discusses the implementation of the
dificulties, the proposed method is implemented into the
method on a Field Programmable Gate Array (FPGA). During
conventional manufacturing process as illustrated in Fig.
implementation Very High Speed Integrated Circuit Hardware
Description Language (VHDL) is used rather than using
1.0ne of the major advantages of the method is that it can
embedded processors on the FPGA chip. The performance of the send position, velocity, and acceleration commands
method is assessed according to the resources used in the FPGA simultaneously to the controller. The purpose of compressing
chip on the development board and these results are also the servo comands is to decrease the data transfer load and
compared with the same approach without an interpolator. feedrate is given as an input to the proposed method to reduce
the error along the curves where the radius of curvature is
Keywords-command generation; data compression; FPGA; small.
adjusable feedrate; inear intepoaon
In today's technology, memory devices with large capacity
as well as multi-core processors running at high clock
I. INTRODUCTION requencies are widely available in the mrket at relatively low
Modern servo drive systems employ digital motion cost. Consequently, there is a potential for devising simple yet
controllers (DSPs, micro-controllers) to regulate precisely not very effective comand generators for computer numerically
only motor currents (electromagnetic torque) but also motor's controlled machinery that beneit fully from the properties of
angulr velocity along with the position. If the drive system is these advanced devices [1].
conigured for (digital) motion control, the relevant reference
signals (velocity or position) must be generated by a central
controller unit (host) depending on the trajectory to be
followed. These signals are eventually transferred to each
motor driver via a serial communication protocol (SERCOS,
CAN, Proibus, TCPlP, RS-232, RS-485, etc.). This approach
requently pushes the comunication interface to its liits for
high-end applications. Consequently, the objective of this
study is to develop a direct comand generator system with
vriable feedrate for servo motor drives where the commands
could be produced directly in the drive system without the
need for intermittent data transfer rom a host controller. This
Is it a Robotics Yes
FPGA based system, which could be directly embedded into a Application?
motor drive system, is expected to generate the relevant
commands by utilizing not only the (dynamically adjusted) No
desired accuracy.
This work was supported by the Scientiic and Technological Research Figure I. CNC / Robotics Applications
Council of Turkey under the project contract I08E048.
Among conventional data compression techniques, There re vrious algorithms proposed on feedrate conrol
hardware implementations of different algorithms for in order to increase the surface quality of the product. For
compressing speciic data structures re also present in the instance Cheng, Tsai, and Maciejowski [14] employed a
literature. For instance, Yongming, Jungang, and Jianmin [9] predictor-corrector algorithm in order to estimate the servo
have realized the Liner Approximation Distance Threshold command at the next sampling time. In another study of Cheng,
algorithm on FPGA to compress the Elecrocrdiograph Tsai, and Cheng [15] developed a new interpolator to produce
signals. Similrly, Valencia and Plaza [10] developed an servo commands for real-time control of CNC machining. The
FPGA-based data compression technique based on the concept main advantage of the proposed intepolator is being capable of
of spectral unmixing to compress hyperspectral data. The novel generating motion commands for servo conrollers at variable
feedrates. In a similar study of Xu, Tam, Zhou, and Tse [16],
they presented variable intepolation schemes for planar given as input to the system and fmax is the maximum feedrate
implicit curves. They were also able to intepolate in real-time at which comands can be generated. Another variable in the
to improve machining eiciency. In the proposed method, the equations is the diference multiplier, a. It accumulates after
feedrate is set by the operator according to geometrical state of each generation according to (2). During the implementation
the surface. In other words, it is decreased when the tool is of this equation, the next original comand should be fed to
machining curved prts and increased on planr surfaces. the interpolator when the interpolated comand is out of the
difference region. In Fig. 3, a sample interpolation is carried
III. PROPOSED MEHOD
out with a feedrate of (0.375)fmaJ. As can be seen rom the
igure that before the 4h interpolated comand is generated,
In this section of the paper, the method suggested for the diference value is updated and the next three comands
comand generation is elaborated. Ater the encoding and are generated according to the new difference value. The
decoding algorithms of the suggested compression method are shaded area underneath the 2nd original command can be
briely explained, the interpolator is elaborated. regarded as the misinterpretation. In future works, it is aimed
to develop new algorithms to decrease the error at original
A. Encoding Algorithm comand points. For instance, it may exrapolate rather than
According to the previous study of authors [1], taking third interpolating at these points.
order differences of the command rajectory before
compressing does increase the compression ratio. In the IV. IMPLEMENTATION
proposed method after the difference of the comand
The implementation of the proposed method is realized on
(position) sequence is calculated according to the speciied
an Altera FPGA DEI Development Board, which contains a
order, data is compressed utilizing the suggested algorithm in
number of memory devices (SRAM, SDRAM, SD Card,
[1]. In Fig. 2, a sample encoding process for the third-order
Flash) ready to be used in conjunction with the FPGA chip
difference is illusrated. In order to use the memory eficiently,
(Cyclone II). Among these chips ISSI IS61LV25616 SRAM is
a compressed code structure is also developed [17].
selected due to its ease of conrol. It is organized as 256K
words by 16 bits. To decrease the complexity of the coding in
B. Decoding Algorithm
VHDL, the schematic design property of Quartus II 9.0 Web
Decoding starts with the comparison of the consecutive Edition is employed. The schematic of comand generator
two bits of the length ield. Ater the binary length of the data shown in Fig. 4 basically consists of 6 diferent modules:
is determined, it is passed to a let shit register. Considering SRAM Controller, Memory Management Unit, Decoding
the length of the data, register forwards the amplitude of the Unit, Accumulators, Interpolator and RS-232 Controller. The
data rom the corresponding ield to the differenced data following sections elaborate the design of these units.
module. After the sign value is obtained from the sign ield,
the data is sent to the accumulator module. Then the initial A. SAM Controller
values re transferred to the integration module in the proper
The main task of the SRAM controller is to maintain the
order and original data is generated rom the buffer.
communication between the Memory Management Unit and
the SRAM located on the FPGA Development Board. It sends
. Interpolator
out the compressed data to the Memory Management Unit
The interpolator used in the method is a linear type. It (one by one) according to the address information emanating
interpolates between the two original command values, from the Memory Management Unit.
decoded rom the compressed code, according to the current
status of the feedrate. It employs the below equations for a B. Memoy Management Unit
proper interpolation.
The Memory Management Unit (MMU) can be regarded
(1) as the core of the design since it comunicates with all
modules except the RS-232 Controller and the interpolator.
Input signals to this module are limited when the number of
(2)
misinterpreted
In the above equations u represents the comands according
to their indices. k and m re the indices of the generated and 1 0
decoded sequences, respectively. fk is the current feedrate i--�"·.-
-. · . '
'
"
0
,
,.
, ,"
{555,983,1354, 1710,2058,2400,2736,
...--
Original Command Sequence �
3068,3394,3715,4031,4341,4646, ... J "00
1
3n 0rder Difference� {42, 7, 2, 0, 2, -2, 1,0, -I, I, .. . J ",0 0 Original
0" 0 Interpolated
Time
m-2 m-J m
j
� r_a�47. 0) - .....
--"
"' . Decoding Unit
SRAM Controller
Memory
Management
Unit
"'
Interpolator J
output signals is considered. Input signals are only the data words rom each ield re sent to the DU. This state is only
sent rom the SRAM Controller and acknowledgment signals initiated when the incoing signals 'signdata_need' and
coming from the Decoding Unit (DU) indicating that the unit 'ampdata_need' are set. Note that there is no signal indicating
is out of data. Output signals are the necessity for a data point from the length ield. When a
word rom the amplitude ield is needed, the corresponding
• the initial values sent to the accumulators, word from the length ield is sent automatically to the DU.
• header data for the compressed ile, This state lasts until all the commands are generated.
previous value of the accumulator and outputs the resulting quadrature decoding mode. Decompressor algorithm of the
value to the next accumulator. The number of accumulators in proposed method is realized utilizing Altera Cyclone II FPGA
the design depends on the order of difference. Note that the DEI Development Board. Table I shows the obtained results
given design in Fig. 4 is hard-wired and can decompress data in terms of allocated resources for three different cases. In the
differentiated up to the third order. However, the general irst two approaches decoding algorithm is realized as a inite
design should have 15 accumulator instances (in compliance state machine utilizing VHDL. In the last case, a sot-core
with the format speciied in Section 3.1). A demultiplexer unit processor embedded into the FPGA chip is used. When
must be incorporated to the design to deselect the unused compared to the irst two cases, the one with the soft-core
accumulator instances. Notice that in the proposed design, the processor uses much more resources than the others. As can be
three accumulators yield the acceleration, velocity, and understood rom the table that the main difference between the
position proiles of the commanded trajectory. This attribute two cases is that the one with the interpolator uses 2 embedded
is one of the advantages of the proposed method. Since when a multipliers in order to perform interpolation. This
state-space controller is embedded into the system, the computational effort also results in an increase in the number
velocity and acceleration proiles must be ready for use. of total logic elements.