Pid Controllers Design Applied To Positioning of Ball
Pid Controllers Design Applied To Positioning of Ball
2478/ama-2014-0039
PID Controllers Design Applied to Positioning of Ball on the Stewart Platform
*Faculty of Mechanical Engineering, Bialystok University of Technology, ul. Wiejska 45C, 15-351 Białystok, Poland
Abstract: The paper presents the design and practical implementation of PID controllers for a Stewart platform. The platform uses a re-
sistance touch panel as a sensor and servo motors as actuators. The complete control system stabilizing the ball on the platform is real-
ized with the Arduino microcontroller and the Matlab/Simulink software. Two processes required to acquire measurement signals
from the touch panel in two perpendicular directions 𝑿 and 𝒀, are discussed. The first process includes the calibration of the touch panel,
and the second process - the filtering of measurement signals with the low pass Butterworth filter. The obtained signals are used to design
the algorithm of the ball stabilization by decoupling the global system into two local subsystems. The algorithm is implemented in a soft real
time system. The parameters of both PID controllers (PID𝒙 and PID𝒚) are tuned by the trial-error method and implemented in the micro-
controller. Finally, the complete control system is tested at the laboratory stand.
Key words: PID Controller, Low Pass Butterworth Filter, Stewart-Gough Platform, Arduino Microcontroller, USB Port, Touch Panel Sensor
1. INTRODUCTION The most popular type of actuators used in parallel link ma-
nipulators are pneumatic or hydraulic actuators. Both types
of actuators have many advantages and their application in the
Parallel link manipulators known as the “Stewart-Gough” plat- system depends on the payload to weight ratio and on the dimen-
forms (see Fig.1) were investigated thoroughly in the last years. sions of the system. Since pneumatic devices are less sensitive to
Since their potential advantages as: high rigidity, high accuracy, temperature changes and contamination, a lot of researchers
and high load-carrying capacity they seem to be better in compar-
have tried controlling air cylinders using various methods.
ison to the conventional serial link manipulators. That is why many One of the most popular control methods is the PID technique.
researches often choose such structures as control plants. The Wang and Van Varseveld and Bone (Wang et al., 1999; Varseveld
first parallel mechanism was introduced by Gough and Whitehall
and Bone, 1997) used PID controllers with nonlinear compensa-
in 1956 year (Gough and Whitehall, 2012) as a tyre-testing ma- tion for servo-pneumatic actuators to control the position of the
chine. Next, the design of the platform was improved by Stewart Stewart platform. Weng and Xu (2013) also used the PID control-
in 1965. Then, the modernized structure was used as an aircraft ler with the LQG filter to control the position and to damp the
or vehicle simulation device. Parallel manipulators were used also vibration of the platform. Other researchers used non-traditional
as platforms for communication satellite dishes and telescopes
control methods. Urenizezius et al. applied the LQR technique.
positioning. Paul et al implemented the sliding mode control (Urniezius
and Geguzis, 2014; Paul et al., 1994; Shunmugham and Hayaka-
wa, 1997). Wang et al. (2009) used the optimal control method
based on the generalized natural frequencies of the system
to stabilize the platform.
The Stewart platform discussed in the current article is a small
size structure (the dimension of the fixed platform is 30 cm,
and of the moving platform – 11 cm) with the low payload
to weight ratio. The control system for a ball on the platform
is realized by six electrical servo motors, the resistance touch
panel and the PID controller. The choice of the PID control algo-
rithm has been dictated mainly by practice problems of controlling
the platform rather than by theoretical considerations of designing
the control law. Other control methods would be difficult to imple-
ment because the mathematical model of the platform does not
exist yet. Moreover, the PID control technique is a first control law
investigated at this laboratory stand and it is realized together with
a student. The design and experimental verification of other con-
Fig. 1. Electrically actuated Stewart-Gough platform trol methods will be the subject of future investigations.
214
acta mechanica et automatica, vol.8 no.4 (2014)
The paper presents consecutive steps of the design process The 6-DOF Stewart platform shown in Fig. 2 consists of:
and practical implementation of the chosen control algorithm for a base frame, a moving platform, six legs, and components of the
the platform and the Butterworth filters for the measurement sig- control system. As actuators the NewPower XL-9HM servo-
nals. motors have been chosen and located on the frame base.
As a sensor the RES121-4W touchpad has been chosen
(http://www.buddyrc.com/new-power-xl-9hm.html). The process
2. THE STEWART PLATFORM
of stabilization of the ball on the upper platform is realized
AS A PLANT OF THE CONTROL SYSTEM by the 8-bit Arduino Mega 2560 microcontroller operating
at 16 MHz frequency.
According to Fig. 4, the error signals in two perpendicular di- The complete control system is based on the Matlab/Simulink
rections 𝑋 and 𝑌 are obtained based on two measured signals software and the Arduino microcontroller hardware. As a result
(posx and posy) and two setpoint values (𝑟𝑒𝑓𝑥 and 𝑟𝑒𝑓𝑦 ). Both the block diagram consists four main subystems are prepared
desired values: 𝑟𝑒𝑓𝑥 = 113 and 𝑟𝑒𝑓𝑦 = 3 correspond to a real and shown in Fig.4:
middle point of the touch panel in two directions 𝑋 and 𝑌, respec- read from touchpanel – the signals from touchpanel is read by
tively. If the ball’s position on the platform is greater than 2 mm Arduino and filtered,
in each direction then the control signals 𝑢𝑥 and 𝑦 are calculated simultaneous start – synchronous switch on both control
in Matlab/Simulink and configuration of servo motors is changed feedback loop,
(the signals are sent to Arduino). Otherwise the configuration write to servos – the values control signals from Matlab
of the servo motors remains the same. are recalculated and pass to servos,
PID control – the control signals 𝑢𝑥 and 𝑢𝑦 are calculated
with using Matlab software.
215
Andrzej Koszewnik, Kamil Troc, Maciej Słowik DOI 10.2478/ama-2014-0039
PID Controllers Design Applied to Positioning of Ball on the Stewart Platform
Resistance [ ]
read position x read position y
500
don't control,
servos in current 400
position
200
posx posy
100
setpoint refx setpoint refy 0 10 20 30 40 50 60 70 80 90 100
ex=|refx-posx| ey=|refy-posy|
for axis X for axis Y Samples [n]
Fig. 5. The calibration of the touch panel in 𝑋 axis
NO YES 800
ex<=2 & ey<=2
on the left side
700
TRUE in the midlle
on the right side
calculate calculate 600
don't change
Resistance [ ]
the control signal the control signal
servos position
in axis X in axis Y
500
Write to servos in
the proper
400
configuration
300
4. CALIBRATION PROCESS OF THE TOUCH PANEL Fig. 6. The calibration of the touch panel in 𝑌 axis
Filtering signal x
The calibration process of the touch panel for different location 300
of the ball on the platform is carried out in the paper. In this order un-filtering ZOOM
position [mm]
200
the ball is located into two extreme position and one position into filtering
ZOOM
100
The comparison of both figures (Fig. 5 and Fig. 6) shown cor- Filtering signal x
200
rectly response action of the touch panel in both directions, but un-filtering
position [mm]
Time delay
obtained values of resistance in Y direction have firmly distribu- 150 filtering
100
filtering
Taking into account Fig. 7 and Fig. 8 we can see that the sig- 80
216
acta mechanica et automatica, vol.8 no.4 (2014)
5. CONTROL STRATEGY ing to Fig. 3 consists three inputs: 𝑟𝑒𝑓𝑥 = 113 (desired value),
measurement value of position of the ball and signal without error.
The last signal is responsible for simultaneously switching
The stage of design of stabilization the ball on the platform re-
the control system between two directions for two cases. Once
quire to consider location of all six servo motors on the base
the ball is in the center point of the touch panel with extreme
platform. As first, the opposite site servo motors are coupled
values less from +/- 2mm, but in the second case button START
versus their location on the fixed base. Next, taking into account
is switch off. If the ball is in the center point of the touch panel
one couple of servo motors, the control signals 𝑈 + and 𝑈 − are
then values of the error signals are checked. If -2< 𝑒𝑥 <2 for 𝑋
generated by controllers for each of them. The control signals
direction then the output signal from logic gate NAN𝐷𝑥 equal 0
expressed by Eq. 2 consists value of 90 that represents the initial
and output value with logic gate OR also is 0 (in case that
value of the control signal. Based on this assumption the control
NAN𝐷𝑦 also equal 0). In results the error signal is 0 and all servo
signals can be written as follows:
motors have still actual values. In second case the error signal
𝑈1+ (𝑡) = 90 + 𝑢𝑃𝐼𝐷𝑥 (𝑡) is omitted if mentioned button has been switched off. In such case
(2) variable posx equals -20 and in the result one of inputs of multiply
𝑈1− (𝑡) = 90 − 𝑢𝑃𝐼𝐷𝑥 (𝑡)
block is equal 0. Finally, the control signals 𝑋1 and 𝑋2 for 𝑋 axis
𝑑𝑒(𝑡) are generated by PID𝑥. Obtained signals in range of 30-150
where: 𝑢𝑃𝐼𝐷𝑥 (𝑡) = 𝑘𝑝 𝑒(𝑡) + 𝑘𝑖 ∫ 𝑒(𝑡)𝑑𝑡 + 𝑘𝑑 .
𝑑𝑡
corresponds to minimal and maximal pitch angle of rudder bar
Practical realization of control subsystem to stabilize position
of the servo motors.
of the ball in the 𝑋 axis is shown in Fig. 9. The subsystem accord-
tion versus the fixed base of the platform. In result the initial condi- 80
217
Andrzej Koszewnik, Kamil Troc, Maciej Słowik DOI 10.2478/ama-2014-0039
PID Controllers Design Applied to Positioning of Ball on the Stewart Platform
100
218