Implementation of A High Performance Stand-Alone Motion Controller

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

2009 IEEE/ASME International Conference on Advanced Intelligent Mechatronics

Suntec Convention and Exhibition Center


Singapore, July 14-17, 2009

Implementation of a High Performance Stand-Alone


Motion Controller
Xuecai Zhou, Liu Sundong, and Weiping Li

Abstract—Implementation of a self-developed stand-alone controllers have the following disadvantages as listed bellow.
motion controller with high performances is presented. This 1) Motion controller cards can not be separated from host
controller contains a motion planning processor of high speed computers, thus they are easily disturbed by electromagnetic
and accuracy and a 1000Mbps Ethernet MAC interface. To radiation. 2) Since motion controller cards share the same
guarantee high performance of high speed and accuracy, a
power supplies with host computers, and the power supplies
powerful Digital Signal Controller (DSC) TMS320F28335
produced by Texas Instruments is used for interpreting and may coupled with each other to make the accuracies of
executing the motion instructions on-line and for high speed Digital to Analog Converter (DAC) be worse. 3) Poor
path planning and PID control algorithm. Making use of System mechanical contacts of golden fingers to parallel bus of the
on Chip (SOC) technology, a new generation Field host computer may cause the controller to be unstable. 4)
Programmable Gate Array (FPGA) chip of Cyclone III series is Long cables are needed to connect motion controllers and
used with which high speed interfaces including Reduced
servo motor amplifiers, and the exposed long cables may be
Instruction Set Computing (RSIC) processor, a
10/100/1000Mbps Ethernet MAC, control pulses generator, and affected by electromagnetic interference from environments.
optic quadrate encoder interface are programmed into it. This To get rid off the mentioned disadvantages and improve the
paper is focused on system structure and implementation of our performance of current parallel-bus-based motion controllers,
developed stand-alone motion controller. Simulation results and more and more attention are paid by motion controller
applications are also presented to demonstrate the effectiveness manufacturers to produce higher performance motion
of the proposed high performance stand-alone motion
controllers with Ethernet interfaces like DMC-4040 made by
controller.
Galil and ACR EPL series by Parker.
I. INTRODUCTION This paper proposes an implementation approach of a
self-developed stand-alone motion controller with high
M otion controllers have been widely used for
coordinate position control in industrial robots and
automation systems. A motion controller is a specific control
performances. We starts our discussions with the system
hardware architecture with emphasis on descriptions of the
functions of the system hardware based on motion control and
device through which motor-driven target equipments can be Ethernet communication interfaces. The working principle of
controlled in coordinates to follow the expected task paths. system software is then explained from both the instruction
Motion controllers are kernel control devices in electronic systems at client-terminal and controller-terminal. After that
and mechanical manufacturing. Based on communication discussions are focused on kernel modules of the motion
interfaces between host computers and controller processors, controller which include programmable 10/100/1000Mbps
motion controllers fall into two categories, the Ethernet MAC, high resolution control pulses generator and
parallel-bus-based ones like PCI and ISA buses interfaces as quadrature encoder interface. Simulation results of the kernel
in [1-8] and serial-bus-based ones like USB, RS-232, and modules and applications of the developed stand-alone
Ethernet bus interfaces as in [9-11]. The former ones are motion controller are finally presented to demonstrate the
generally built up into control cards and connected to effectiveness of the proposed approach and systems.
expansion slots of host computers through golden fingers. In
this case, controllers share the same power supply with host II. SYSTEM ARCHITECTURE OF THE MOTION CONTROLLER
computers, whereas the later ones are made up into
stand-alone controllers which could be connected to host A. Hardware Structure of the Motion Controller
computers via standard serial cables. In this case, the Fig. 1 shows the architecture of system hardware of our
controllers are also known as of stand-alone since they are developed stand-alone motion controller. The system
self-contained and independent of host computers. hardware contains a high performance Digital Signal
Application practice shows that parallel-bus-based motion Controller, a Reduced Instruction Set Computing processor, a
programmable 10/100/1000Mbps Ethernet MAC, analog
This work is supported by both Science and Technology Planning Project input and output interfaces, optic quadrature interface, pulse
of Guangdong Province and Shenzhen City as well, China under grant
2007B010400033, SY200806300295A. generator, and communication interface.
F.S. Xuecai Zhou and Sundong Liu are with Shenzhen Institute of As shown in Fig. 1, within a single chip FPGA of Cyclone III,
Information Technology, Sehnzhen 518029, China (phone: the RSIC processor, 10/100/1000Mbps MAC interface,
86-755-25859196; fax: 86-755-25859196; e-mail: zhouxc@ sziit.com.cn).
T. Weiping Li is with Shenzhen Leadshine Technology Co. Ltd.,
Shenzhen 518053, China (e-mail: [email protected]).

978-1-4244-2853-3/09/$25.00 ©2009 IEEE 269


B. Software Structure of the Motion Controller
The system software is composed of client-terminal
instruction system, Ethernet communication instruction
system on controller board, and DSC real-time motion control
instruction system of controller board. Fig. 3 shows the
system software structure of the controller. In the following
we will give a detail explanation of the system software
instruction system.
1) Client-Terminal Instruction System
Client-terminal motion control instruction system contains
motion control program instructions, program instruction
compiler, program downloader, data communication, and
Fig. 1 Architecture of System Hardware graphic user interface.
To facilitate the designed motion controllers into market
and industrial applications, the GALIL motion control
instruction system is used for general purpose applications,
and the G-code instruction system is used for numerical
control machines. The motion control instructions can be
executed in two ways. The first is to write a motion control
related program with Galil or G-code instruction system,
followed by invoking the program compiler to translate the
mentioned motion control program into the data structure that
Fig. 2 Shot of Stand-Alone Motion Controller could be indentified by DSC of the motion controller, and
optical quadrature encoder interface with high speed position then calling the program loader to send the translated data
latch, pulse generator with direction control, and digital structure to program memory of DSC to be invoked and
inputs and outputs are programmed into it. The Ethernet executed by controller interpreter program. The second is to
MAC and its corresponding PHY chip are controlled by RSIC send the motion control instructions to controller by just
processor to communicate with DSC through dual typing command strings plus return with keyboard within
First-In-First-Out (FIFO) memory and with host computer graphic user interface. In this case, the client-terminal motion
through a RJ-45 socket. The digital signal controller is a high control instruction system will automatically call the
performance float point DSP of 32-bit and at frequency of command-line complier to translate the mentioned
150MHz. The DSC is used for processing the real-time instructions into the data format that could be further
motion control related instructions and programs, and for downloaded into DSC memory for executing by the
implementing closed-loop position control in robotic and instruction interpreter of the controller.
numerical control systems based on the sampling data from Within the graphic user interface, users can do the
optic encoders and digital inputs and outputs. All the following tasks that include configuring target application
components of hardware are built into three separate printed system according to specific tasks, making a diagnosis to the
circuit board and fixed in an electromagnetic shielded house configured motion control system, tuning the PID parameters
as shown in Fig. 2. The controller may be connected to host using different tuning methods in order to get optimum
computer through a RJ-45 socket of Ethernet interface, or system parameters, checking the system status on-line, and
RS-232 serial terminal, and to target numerical control making a test to the application system, etc.
machines with specific terminals of the controller. This 2) Ethernet Communication Instruction System
scheme is isolated from electromagnetic disturbance and is of The Ethernet communication instruction system is handled
high stability and reliability compared to that of by the RSIC processor built in the FPGA chip. As shown in
parallel-based-bus motion controllers. Fig. 4, the Ethernet communication instruction system is
based on TCP/IP protocol, and is responsible for handle data
both from-to client terminal through Ethernet interface and
DSC controller through a dual FIFO at high speed and
accuracy.

Fig. 3 System Software of the Controller


Fig. 4 Ethernet Communication Instruction System

270
transmit data between client-terminal and DSC motion
3) DSC Real-time Motion Control Instruction System controller, high speed and reliability play very important roles
The DSC motion control instruction system contains a in performance of designed motion controllers. Motivated by
motion control instruction interpreter, path planner, data a desire to get high performance, we adopted a soft IP of
collection and analysis, control algorithm and output, data 10/100/1000Mbps Ethernet MAC provided by Altera as
communication, and system status monitor, etc. The shown in Fig. 6 which can be seamlessly connected to any
instruction system is run under a real-time industry standard Gigabit Ethernet PHY device via a Gigabit
foreground-background embedded operating system as Medium Independent Interface (GMII) or Medium
shown in Fig. 5. After the controller is powered up, the boot Independent Interface (MII) and to a user application via a
loader will guide DSC processor into a system reset sequence SOC (System On a Chip) interface. To guarantee high speed
and then start running the main program immediately. performance, soft IP of NIOS II RSIC processor is also used
in this Ethernet interface to handle data transmitted between
host computer and motion controller. Both soft IP of Ethernet
MAC and NOIS II RSIC processor are programmed into a
single chip of cyclone III FPGA as mentioned in Fig. 1.

Fig. 5 DSC Motion Control Instruction System


When controller system run into the background main
program, the initialization subroutines are first called and
executed, and Interrupt Service Routine is then started. The
program is then branched into endless cycles of
foreground-background operating system procedure. The Fig. 6 10/100/1000Mbps Ethernet MAC
background control program handles data corresponding to
client-terminal instructions and responses to real-time control B. High Speed and Resolution Pulse Generator
commands and status monitoring. In digital closed-loop control, a high resolution pulse
The foreground ISR program is the key program for generator is required to produce continuous programmable
real-time motion control of the controller. The foreground frequencies at range of 0 to 6MHz and of 50% duty cycles. To
ISR program contains an instruction interpreter, motion path meet this requirements, Direct Digital Frequency Synthesis
planner, data collection and analyzer, control algorithm, and (referred here as DDS) approach is adopted. Compared to
control output, etc. The instruction interpreter reads programs other approaches like the analog device approaches, this
or real-time operation instructions from program memory and approach is of higher resolution, fast switch to specified
interprets them into specific data structure that is further read frequencies and is always stable even with finite-length
by path planner as input data and figuring out motion-related control words [12-15].
parameters. The data collection and analyzer catch Fig. 7 shows the pulse generator built based on DDS
period-refreshed data of positions, velocities, accelerations of approach. The size of the phase accumulator of this pulse
motors and working platform, and status of limit switches. All generator is 36-bits. When the frequency of the system clock
the data from both the path planner and data collection and is at 120MHz, the output frequency of the pulse generator is
analyzer are taken as inputs of the control algorithm ranged form 0.0017Hz to 6MHz, with an excellent frequency
(generally PID laws) to calculate equivalent amounts (such as resolution down to 0.0017Hz. Fig. 8 shows the simulation
voltage for analog control scheme and pulses for numerical results under the conditions of 120MHz of system clock
control scheme) used for real-time closed-loop control. frequency and 6MHz of output frequency.

III. IMPLEMENTATION OF KERNEL MODULES OF CONTROLLER

A. 10/100/1000Mbps Ethernet Interface


Ethernet is a widely used standard in business and industry.
Almost all the personal computers are equipped with Ethernet
interfaces. So Ethernet communication interface is a high Fig. 7 Pulse Generator Based on DDS
performance versus price option for stand-alone motion
controllers. Since the communication interface receive and

271
Fig. 8 Simulation Results from DDS Pulse Generator Fig. 11 Quadrature Frequency Outputs Versus Inputs
0f 90 Degrees B-leads-A
C. Implementation of Quadrature Encoder Interface
D. Motion path Planner
Optic encoders are sensing devices used to measure the
positions for closed-loop control systems. The accuracies of Motion path planning is a kernel technique of controller
closed-loop systems are determined by the sensing device and in applications of numerical control systems. The main task
their interface circuits. To get high resolution and accuracies of motion path planner is that to calculate out middle points
of the control system, quadrature and phase detecting circuit among start-points and end-points based on the specified
should be used to attain the positions and rotational directions motion path parameters such start-point and end-point of a
of motors according to the pulses data out from the optic line, or start-point and end-point and center and direction of
encoders[16-17]. For this we adopted a digital feed back an arc, or start-point and end-point and radius and pitch of a
circuit as shown in Fig. 9 to meet the quadrature and phase screw. A complete description of a point should include
detection requirements. Experimental results show that this position, velocity, and acceleration, etc to thoroughly
circuit is of stable and reliable under the conditions of that the denote the specified target path. The developed motion path
clock frequency is 10 times of that of the signal frequency. planner supports both point-to-point and continuous path
The right part of Fig. 10 shows the interface of our control. The velocity profiles could be trapezoidal,
proposed quadrature encoder interface in which a 32-bits up sinusoidal, and parabolic. The target path profiles could be
and down counter is used. When the clock frequency is at lines, planar or spatial arcs, screws, and ellipses. For getting
240MHz, the frequency of the input signal could be as high as guaranteed planning accuracies, time-slicing interpolation
22MHz. Fig. 10-11 show the simulation results when the methods are adopted and implemented though software in
clock frequency is at 240MHz and the frequency of input digital signal processor [18-20].
signal is 22MHz. These results give a well demonstration to
the high performance of the proposed quadrature encoder IV. EXPERIMENT
interface. In order to demonstrate the effectiveness of our proposed
stand-alone motion controller, a carving and milling machine
system has been built up using the proposed motion controller
as shown in Fig. 12.
The experimental system is composed of an industrial PC,
the bare carving and milling machine with AC motors and
drives and optical encoders used for position sensing, and the
proposed stand-alone motion controller. The experimental
system has been configured into position closed-loop scheme
with three axes for coordinate positioning and one axis for
Fig. 9 Quad Phase Detection Circuit for Optic Encoders high speed spindle motor. The experimental system could
accept machining files in standard G-code format like
Fanuc0m and the file can be generated form any available
CAD/CAM software such as Master CAM, UG, and Pro/E.
Fig.13 shows the experimental results for two samples with
one for milling and another for carving. Both samples are
good examples to support the proposed stand-alone motion
controller. The experiment is started by firstly generating
G-code machining file with extension *.nc using Master
CAM software, and then open it in the graphic user interface
of the client-terminal instruction system. At this point, to
Fig. 10 Quadrature Frequency Outputs Versus Inputs execute the G-code program, just compile it first with
0f 90 Degrees A-leads-B program compiler, and then download it into DSC program
memory with program loader. The program starts running as
soon as you

272
[5] D. H. Wang, X. H. Huang, “Design of motion control module based on
ARM and MCX314,” Microcomputer Information, vol. 23, no. 2, pp.
144-146, 2007.
[6] X. Q. Hou, Z. D. Xue, and Y. Q. Zhang, “Design of Multi-Axes Motion
Control Card Based on TMS320F2812,” Microcontrollers &
Embedded Systems, no. 6, 2008.
[7] J. Q. Liu, L. S. Liu, “Design of the 4-axes embedded motion
controller,” Manufacturing Automation, vol. 30, no. 2, 2008.
[8] H. Liu, X. Yuan, “Design of Motion Control Board for Parallel
Machine Tool Based on PCI Bus,” Mechanical Engineering and
Automation, no. 2, 2008.
Fig. 12 Application in Carving and Milling Machine [9] L. Din, B. You, Z. Z. Yu, “Research and development of open-type
motion controller based on USB and DSP,” Electric Machines and
Control, vol. 10, no. 3, 2006.
[10] W. P. Zhang, J. Huan, “Study of Multi-axis Motion Controller Based on
USB,” Modular Machine Tool & Automatic Manufacturing Technique,
no. 1, 2006.
[11] X. J. Wang, “Multi-Axis Motion Control System Base on Industry
Ethernet,” Equipment for Electronic Products Manufacturing, vol. 37,
no. 2, 2008.
[12] F. Curticapean and J. Niittylahti, “Exact analysis of spurious signals in
direct digital frequency synthesizers due to phase truncation,” Electron.
Lett., vol. 39, no. 6, pp. 499–501, Mar. 2003.
[13] D. Al-Khalili and J. M. P. Langlois, “Phase to sine amplitude
conversion system and method,” European Patent 1286258, Feb. 2003.
[14] C.Y. Kang and E. E. Swartzlander, Jr., “An analysis of the CORDIC
algorithm for direct digital frequency synthesis,” in Proc. IEEE Int.
Conf. Application-Specific Systems, Architectures and Processors,
July 2002, pp. 111–119.
Fig. 13 Experimental Samples [15] A. McEwan and S. Collins, “Analogue interpolation based direct digital
frequency synthesis,” in Proc. 2003 Int. Symp. Circuits and Systems
ISCAS ’03, May 2003, vol. 1, pp. 621–624.
press the button in the operation panel of the GUI of the [16] E. Sisinni, A. Flammini, D..Marioli, and A. Taroni, “A PLD based
client-terminal instruction system as shown in Fig. 12. encoder interface with accurate position and velocity estimation,”
Proceedings of the 2002 IEEE International Symposium on Industrial
Electronics( ISIE 2002),vol.2, pp. 606- 611.
[17] Z.D. Buckner, M.L. Reed, and J.H.Aylor, “Antialiasing Encoder
V. CONCLUSION Interface With Sub-Nyquist Sampling,” IEEE Transactions on
Instrumentation and Measurement, Dec. 2006, Issue 6,pp. 2029-2033.
A high performance stand-alone motion controller is [18] X. C. Zhou, G. C. Liu, “Implementation of Path Plan for Cubic Spline,”
presented with detail implementation approach based on Journal of Shenzhen Institute of Information Technology, no. 1, 2003.
FPGA, SOC, and DSC technology. This controller can be [19] J. L. Cheng, X. C. Zhou, “A Path-Planning System for Homemade
Motion Controller Series MCT8000,” Manufacturing Automation, vol.
widely used for those applications which need high speed and 23, no. 5, 2001.
accuracies such as precision NC machine tools, industrial [20] G. C. Liu, X. C. Zhou, “An Implementation Method of Spatial Elliptic
robots, coordinate measuring systems, high speed automatic Arc Path Planning,” Robot Technique and Application, no. 3, 2002.
SMT pick-place machines, laser surface engraver, and plasma
cutting machines, etc.

ACKNOWLEDGMENT
We would also like to give our deep appreciations to
Professor Xin Chen at Xiamen University, engineer Yi Xiao
and his team at Shenzhen Leadtech Control Technology Co.,
Ltd. for their assistances in design of the PCB and controller
box of the 4-axes stand-alone motion controller.

REFERENCES
[1] Q. Shi, X. C. Wang, “Research and Design of Multi-axis Motion
Controller Based on PCI Bus,” Machine Tools and Hydraulics, no. 4,
2004.
[2] Y. F. Gao, H. Jiang, “Design of PCI Bus General 6-axis Motion
Controller Based on DSP,” Modular Machine Tool & Automatic
Manufacturing Technique, no. 10, 2005.
[3] Q. Liu, X. M. Wu, and W. H. Chen, “The research on PCI bus and the
design of multi-axis controller,” Control and Automation, vol. 22, no.
22, 2006.
[4] Y. J. Zhang, Y. J. Zhou, “Design of 4-axis Motion Controller Used for
Electric Discharge Machining,” Modular Machine Tool & Automatic
Manufacturing Technique, no. 7, 2006.

273

You might also like