Professional Documents
Culture Documents
com
ScienceDirect
IFAC-PapersOnLine 49-25 (2016) 229–234
Abstract: The goal of this article is to present and discuss the main parts in designing a CNC
embedded motion controller. Firstly, usable motor and drivers are discussed. Then usable
control components are presented. About the software, the velocity motion profiles are
presented and discussed. Regarding the multi-axis control, some interpolation methods are
presented and compared. The practical architecture of the motion controller is discussed and
some approaches are compared. In the last part, some fault-tolerant techniques suitable for
the controller are discussed. A new approach of fault tolerant method is presented and
discussed.
© 2016, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved.
3. MOTION PROFILES
3.2 Parabolic
4.1 Bressenham
on a platform power. Moreover, when reliability is Based on FPGA This architecture involves only stan-
desired (see Chapter 6), the underlying platform and the dalone FPGA. In the FPGA, there is soft core proces-sor
software has to be adapted. There are some categories which takes care about communication with superior
how the un-derlying platform could be made : system and do all necessary computes. This is almost
the same approach as architecture MCU+FPGA but all
• PLC with appropriate modules
is in one component and well synchronized. There are
• custom embedded motion controller which can be some approaches which implements all computation
controlled by PC
directly in FPGA without built-in soft core, e.g. [Shao and
• PC with appropriate PCI card or other interface
Sun (2006)] or [Gao et al. (2014)].
• specialized CNC embedded system with standard
HMI Distributed CNC system In this multi-axis system, each axis
PLC can control servo-drivers via industrial bus or spe- is controlled by its MCU or FPGA. All control com-ponents
cialized modules generating step and direction signals. are connected to the master. Each sub-component reduces
PLC is not suitable to control multi-axis systems like computational requirements to master. But there is a big
milling machine. It can control each axis separately problem with motion coordination therefore with
using PLCopen standard or some other non-standard synchronization when more axis has to cooperate together.
interface. On the other hand, the superior PLC systems The buffers has to be made and motion com-mands has to
can do linear interpolation with two or more axis. be triggered according to common precise time [Saputra et
al. (2014)].
Standalone PC with PCI card can be also used. PCI card
generates directly step and direction pulses, or implements 6. RELIABILITY
some industrial interface like EtherCAT. The computer has
to have more resources to handle GUI, motion control
equations, real-time signal generation and other processes. A CNC motion controller generates hardware signals for
On the PC, a real-time OS has to be installed and real-time stepper motor drivers, i.e. amplifiers which powers di-
application has to be developed. Such system has high
rectly motor coils. There is a requirement for fast and
computational power but has usually more problems about
pre-cise motor motion. All motion parameters are set by
a de-veloper. Because motors move usually with
meeting deadlines. This architecture uses e.g. MESA
dangerous tools like a rotating mill, high reliabilty of the
company [Electronics (2016)].
controller is important.
Specialized CNC embedded system is compact system
developed for multi-axis 3D milling systems. The system
Errors, which can occur in the system, can be divided
has usually special CNC based HMI and standard control into system errors and transient errors. The system
interface. This architecture is used on many industrial errors represent errors coming from a bad hardware
machines e.g. from companies Siemens or Fanuc. design, bad software design or software bugs. These
faults has to be detected and eliminated at the
development phase. The transient errors are usually
5.1 Embedded motion controller caused by SEU (Single Event Upset) which causes
single-bit errors for products up to 65 nm and possibly
multi-bit errors for 40 nm. Some errors can be caused by
Custom embedded motion controller is often used component malfunction which is declared as a
because of its good performance and lower price than probability of failure of the component. Only the category
other options with the same characteristics. Controller is of the transient faults can not be eliminated at the
communicating with superior PC which takes care about development phase so they has to be detected as soon
HMI or it is connected as a part of machine control as possible to raise a system reaction. The reaction can
system. Motion controller generates usually step and be system reset, fault masking or system recombination.
direction signals and its architecture can be :
There are several methods how to detect faults. The
Based on MCU All signals are generated and motion is most used is lock-step which compares output of two
controlled by MCU. This solution has higher demands on simi-lar cores but this does not detect which core is
MCU resources but is good for hobby CNC machines. The faulty. In contrast, TMR (Triple Modular Redundancy)
good performance versus price has MCU from STM32 masks the faulty core using a voter of the correct output
family. Projects using this architecture are e.g. Smooth- from three cores. There are some approaches which are
ieBoard or TinyG. When lower demand for motion speed trying to get the faulty core like in [Pham et al. (2012)]
and precision is required, even MCU from AVR family can but the faulty core recognition takes long time or so
be used. The main problem is to generate the precise step called hot-standby system is created. When using FPGA
signal by MCU when it is busy by another operations. as a platform, the configuration memory can be tested
against its CRC image which discovers faulty bits like in
[Altera Corporation (2008)]. Single-bit memory faults are
Based on MCU+FPGA This solution uses advan-
automatically repaired when ECC (Error Checking and
tages of MCU, which is high computational power, and Correcting) is used.
of FPGA, which is real-time signal control. Creating real-
time signal operations on FPGA relieves resources on There are also some software fault detectors. The most used
MCU and thus motion algorithm and path planning can is the watchdog that detects system hangs like infinity loop or
be more sophisticated. Projects using this architecture deadlock. On the other hand, its reaction is slow according to
are e.g. [Fei et al. (2011)] or [Bhatt and More (2014)].
its setting. There is some approach in [Zhu
J. Arm et al. / IFAC-PapersOnLine 49-25 (2016) 229–234 233
et al. (2012)] that tries to lower the hang detector reaction in the middle of a complex CNC motion, keeping the last
time. The architecture of a such system is on Fig. 7. For the change value is the best reaction because it minimizes the
CNC motion controller, there is also suitable detector based error between estimated path and real path called the
on detecting of value range exceeding. chord error. As soon as the error is signaled, a recovery
algorithm has to set the last good context or rather re-
The motion controller operates with signal frequencies up compute the variable again. The input variables in this re-
to 200 kHz beside an internal clock. To lower influence of computation are considered to be alright. This idea (see
EMI, it is suitable to keep shielding rules like monolithic Fig. 9) is more suitable for CNC motion control system
ground surface on PCB, separation of the signal and digital because all output signals to axis have to be smooth.
ground, overall shielding connected to the ground, or keep-
ing a distance between devices in a case. This monitor is implemented in software but it is more
suitable to be implemented to a hardware device which
Besides, one of the main fault tolerant technique used in has lesser probability of failure. The same device can
safety-critical systems is time. All components and de- also implement soft-limit monitor with slow-down
vices are tested for a long time to detect all unpre- reaction be-fore the limit according to the current speed
dictable errors coming from non-complete knowledge of and the max-imal deceleration.
de-vice behaviour in many situations. During this testing,
the reliability of each electrical part can be quantified It is obvious without testing that detected errors are er-
and some software bugs can be revealed. Currently, the rors of bad value calculation generated from SEU, ALU
in-dustrial area is more consume so higher emphasis is (Arithmetic-Logic Unit) fault, software bug or variable
placed on safety. Safety is quantified by a probability of memory malfunction. The change of a variable has to be
fail-ures per hour and per demand. These values significant to overcome a monitor threshold. On the
determines the SIL (Safety Integrity Level) of a device other hand, it monitors directly the software output so
and of a ma-chine [Zezulka and Brad´aˇc (2003)]. when an error of inappropriate motion outside
boundaries hap-pens, a finding fault can be searched in
hardware if monitor runs alright.