Abstract— PID (Proportional – Integral - Derivative) particularly PID [1]. And some works about how to
controllers are the most widely used closed loop controllers implement PID controller using FPGA has begun to be
due to their simplicity, robustness, effectiveness and published. In [2], the basic discrete PID equation and
applicability for much kind of systems. With the rapid algorithm is given, and in addition to PID algorithm in [3],
development of technology, implementation of PID controller some peripheral interfaces (analog to digital converter and
has gone several steps from using analog components in digital to Analog converter) are introduced, in [4], to verify
hardware to using some software-based program to execute the design performance a sine micro stepping driver system
PID instructions digitally in some processor-based systems. model of stepper motor is introduced. Different types of
And also, these developments have brought an alternative
digital PID algorithm based on parallel, serial and mixed
solution to implement PID instructions in Programmable
Logic Devices (PLD). Field Programmable Logic Array
architecture is implemented and simulated in [5]. The
(FPGA) is the most advanced members of PLDs. This paper structure proposed in [6] is based on a distributed arithmetic
presents the digital PID algorithm on FPGA. The controller algorithm where, a Look-Up-Table mechanism inside the
algorithm is developed using VHDL and implemented using FPGA is utilized and in [7] System on a Programmable
Altera DE0 Nano Board. As the controlled system, five axis Chip (SOPC)-based PID controller Intellectual Property
robot arm is selected, which have five dc motor and four (IP) core is implemented on FPGA using hardware
potentiometer to determine the positions of motors. The description language.
results show that digital PID controller and also multi-
For a low voltage synchronous buck converter, FPGA
feedback control systems can be implemented successively
using FPGA devices.
based PID controller is designed and implemented in [8].
And also, FPGA has been used in motion control systems
Keywords—fpga, digital pid, pwm, vhdl, robot arm which are employed all sort of robotic applications, such as
in [9] and [10], a technique has been adopted for the
I. INTRODUCTION generation of the control input for controlling the DC motor
driver circuit and decoding the optical encoder data for
The new and effective theories and design using it for speed feedback in the PID control loop. In [11],
methodologies are being continually developed in the an FPGA controller is designed and programmed to control
automatic control field, however, Proportional – Integral – the speed of the permanent magnet DC motor of a portable
Derivative (PID) controllers are still the most widely dough mixing machine, using digital PID algorithm with
adopted controllers in industry. Owing to the advantage of PWM signals. In [12], a simple approach for designing a
simple structure, good stability, reliable operation, fractional order FPGA based PI controller for controlling
robustness and effectiveness, the PID controllers are the speed of a DC motor is presented and in [13], for multi-
properly used in different areas such as aerospace, process axis systems a high performance PID IP core controller is
control, manufacturing, robotic, automation, transportation described. In [14] the design and implementation of a fuzzy-
systems and real time multi tasking applications. control based speed control IC for permanent magnet
The implementation of PID control has same synchronous motor is presented, with Simulink/Modelsim
evolutionary stages from the early mechanical and co-simulation and FPGA realization. And also robotic
pneumatic designs to software based microcontroller control applications are one of the most recent targeted
systems. But these systems encounter some difficulties such fields covered by FPGA. For a three degree-of-freedom
as overloading or computing speed limits to implement the (DOF) wafer-handling robot, three current vector
requirements of modern control systems. Recently, Field controllers, three position/speed controllers and one
Programmable Gate Arrays (FPGA) has become alternative trajectory planning are implemented in a single FPGA chip
solution for the realization of digital control systems, [15]. For a modular reconfigurable robot controller is
proposed which based on the Advanced RISC Machine
This project is supported by Yildiz Technical University Scientific (ARM) processor and FPGA [16]. A hexapod robot which
Research Projects Coordination Unit under rule 2012-04-04-YL02. has eighteen continuous servomotors, PWM controllers is
designed and implemented in [17] and for a humanoid robot algorithm given (3) is known as the absolute form or position
the FPGA implementation of nonlinear PID controllers is form of PID algorithm [19].
presented in [18].
In this paper, the design and implementation of a FPGA- B. The Controlled System
based digital PID controller for a five axis robot arm is To show the applicability of the algorithm in multi-
presented. The organization of this paper is as follows: In feedback control systems, a basic five axis robot arm
section II, digital PID controller algorithm, five axis robot selected as a controlled system is shown in Fig. 2.
arm and FPGA development board are described, in section
III, the implementation of analog input interface, digital
PWM block and digital PID block implemented in FPGA
and the results are discussed. In section IV, the conclusion
of the work is given.
Where Kp is a proportional gain, Ti is integral time The robotic arm is designed for training purpose, but
constant and Td is derivative time constant. For a small there is not enough information about the parameters of the
sample time Ts, (1) can be turned into a difference equation dc motor and the material, to obtain the mathematical model
with approximating the derivative mode by backward of the robotic arm, each of the joint is considered as a
difference approximation and the integral mode by backward separated system and the linear model of each axis (motor
integration rule. and mechanical load) are created by using model based
system identification technique. The basic idea of this
technique depends on applying a sinusoidal signal to a linear
Ts k T
u[k ] K p (e[k ]
Ti n 0
e[n] d (e[k ] e[k 1]))
Ts
system as an input; and measuring the sinusoidal output with
the same frequency but different amplitude and phase. The
model of the each joint is thought as motor and mechanical
Equation (2) can be written as below; load and the schematic diagram is shown in Fig. 3 and the
estimated transfer function is shown in (4) and (5) for each
joint of the robotic arm [20].
u[k ] K p e[k ] ui [k 1] Ki e[k ] K d (e[k ] e[k 1])
Fig. 3. The diagram of the motor and the mechanical load [20]
Axis 3 Axis 4
Fig. 6. The graphics for axis 3 and axis 4 (Channel 1: 5.00 V/Div, 50.0
m ( s) 1 /( Ra J m ) ms/Div - Channel 2: 50.0 mV/Div Time/Div - 50.0 ms/Div)
Ea ( s) ss (1 J m )( Dm ( K t K b Ra ))
To compare these signal values the mathematical model of
each joint is obtained for base, shoulder, elbow, and wrist
m ( s) A
respectively and the results are shown in Fig. 7.
Ea ( s ) ss B
4 (s) 0.492
wrist E4 (s) s (s 30.9)
Where θm is the position of motor, Ea is the armature axis 4
Signal
M
Generator
IN7
1.8
controller in FPGA is shown in Fig 12.
12
12
y[k] Sign Sign Sign
1 Reg Reg Reg
1 0 10 20 30 40 50 60 70
12 1 12
Kp
12
1 1 Kd
1
Ki 1 1 time (seconds)
Kd 24 Sign
24
Sign
24
Sign
Fig. 13. Reference and real time motor position for axis1
Reg Reg Reg
1 1
25
1.7
position(Volt)
Sign Limit
Sign 1 Reg Check
1.6
Reg 1 25
26
1.3
12 u[k]
Round
0 10 20 30 40 50 60 70
time (second)
1.5
based on FPGA and the system co-simulation," Proceeding of
1.4 the First International Conference on Instrumentation, Measurement,
Computer, Communication and Control, 2011.
1.3
[5] V. Subasri, K. Lavanya, and B. Umamaheswari, "Implementation of
1.2 digital PID controller in Field Programmable Gate Array
(FPGA)," Proceeding of the International Conference on Power
1.1
0 10 20 30 40 50 60 70 Electronics (IICPE), 2006..
time(seconds)
[6] Y. F. Chan, M. Moallem, and W. Wang, "Efficient implementation
of PID control algorithm using FPGA technolog,." Proceeding of the
Fig. 15. Reference and real time motor position for axis 3 43rd IEEE Conference on Decision and Control (CDC), 2004.
[7] S. Yang, M. Gao, J. Lin and Z. Li, "The IP core design of PID
2.05 controller based on SOPC," Proceeding of the International
reference position
real time motor position for axis 4
Conference on Intelligent Control and Information Processing
2
(ICICIP), 2010.
[8] S. Chander, P. Agarwal, and I. Gupta, "FPGA-based PID controller
position (Volt)
Viel mehr als nur Dokumente.
Entdecken, was Scribd alles zu bieten hat, inklusive Bücher und Hörbücher von großen Verlagen.
Jederzeit kündbar.