Professional Documents
Culture Documents
Balance Control by Diffuse Logic For A Phoenix Hexapod Robot
Balance Control by Diffuse Logic For A Phoenix Hexapod Robot
Abstract— Using diffuse control algorithms, a position control for diffuse logic is made, where is detailed its control structure and
the six extremities of the Hexapod Robot was built. As input to the the way how the extremities are going to be controlled to balance
controller, a LIS3DSH accelerometer was used, which gives the the hexapod robot at 0° tilt.
Roll values for the angle in which the accelerometer tilts, typical of
the Discovery STM32F4 card. It was necessary to build a PI
controller in order to reduce the error in stationary state and
stabilize the robot in a zero degree tilt position, allowing the
Hexapod robot to stand and balance automatically over different
surfaces.
I. INTRODUCTION
Hexapod Robots present a big inconvenient while executing Figure 1. Phoenix Hexapod Robot
their movements, due to the dynamics and stability of the robot.
In order to give a solution to the balance, this work proposes A. STM32F4 Discovery card
diffuse logic, because it allows position controlling without the The STM32F4 DISCOVERY card has the following
necessity of an established mathematical model. characteristics:
The Phoenix hexapod robot (see Fig. 1) has a great similarity x STM32F407VGT6 microcontroller with 1 MB flash
to arachnids with three pairs of legs in matter of their body and memory, 192 KB RAM, LQFP100 encapsulating.
the articulations of their extremities. The 3 DOF (Degrees of x ST-LINK/V2 incorporated with selector mode for using
Freedom) characteristic of the Phoenix model, allow the robot to the kit as an independent ST-LINK/V2 (with SWD
walk in any direction. The Phoenix model presents three connector for programming and debugging).
servomotors for each extremity which gives a total of 18 x Board power supply: through USB bus or from a 5V
servomotors for the robot’s movement. The robot is built with external power supply.
ultra-resistant, high quality aluminum parts, making the robot x External application source: 5v y 3v.
very light and easy to control. The commercial controller for the x ST MEMS LIS3DSH motion sensor, accelerometer
Phoenix robot is the BotBoarduino SSC-32. This with three axis digital output.
microcontroller has a program created by Jeroen Janssen for the x Eight LEDs.
PWM impulses generation for the servomotors Hitec HS-645 x Two pushbuttons (user and reset).
(owned by the commercial house), controlling the walking x USB OTG with micro-AB connector. [6]
speed, direction, own axis rotation and height control by using
the servomotors in each extremity. Additionally presents another
controller named RC-01, which allows wireless manipulation of
the robot through PS2 controller, making it easier for the user to
control the robot. [4]
II. THEORETICAL FRAMEWORK
As a first point, a brief description of the STM32F4
Discovery card is presented. The STM32F4 card has a LIS3DSH
accelerometer, which is used for the balancing of the hexapod
robot on the Roll axis; and the Waijung Blocket library, which
allows the programming of the STM32F4 card through the
Matlab Simulink Platform. Later, a description of the theory of Figure 2. STM32F4 Discovery card
• Number of inputs.
• Size of universes in discussion.
• Number and forms of the diffuse sets. [1]
The rule base contains the knowledge associated to the
application domain and the objectives of control. In this phase,
Figure 3. Waijung library programming blocks
there must be defined the linguistic rules of control that will
make the decisions that decide the way in which the system has
to work. An example of a rule would be: IF the temperature is
B. Motion sensor ST MEMS LIS3DSH
high THEN the fan must be turned on. [7]
The LIS3DSH sensor is found on the MB997C board
The inference relates the input and output diffuse sets, to
version of the STM32F4 Discovery card. The LIS3DSH is a low
represent the rules that will define the system. The inference
power, 3-axis, lineal accelerometer (see on Fig. 4). In this case,
uses the information to generate responses through the use of
roll axis is the only one used, which gives lineal values that
conditions.
describe the tilt angle in which the STM34F4 Discovery card is
found. Because the card is embedded into the main board of the
The defuzzification does the process of adequating the
hexapod robot, this will allow to indicate the tilt angle of the
diffuse values generated in the inference to real values, which
robot.
later will be used in the control process. The defuzzification
uses simple mathematical methods. [3]
1272
of the diffuse controller is seen on Fig. 6, where is showed the VL Very Left, which membership function is in the range
set point value always as 0° tilt, the inputs are the tilt values of [-15000, -8000, -4000], being -15000 to -8000 a degree of
the accelerometer and the outputs go directly to the servomotors membership 1.
called the robot’s thighs. L Left, which membership function is triangular in the
range [-8000, -4000, 0].
C Center, which membership function is trapezoid in the
range [-2000, -1000, 1000, 2000].
R Right which membership function is triangular in the
range [0, 4000, and 8000].
VR Very Right, which membership function is in the
range [4000, 8000, 15000], being 8000 to 15000 a degree
of membership of 1.
M* ErrorRoll
EI EC ED
VL MIM* MIM* IM*
L MIM* IM* CM*
Roll C IM* CM* DM*
D CM* DM* MDM*
VR DM* MDM* MDM*
* Represents the number of a servomotor. (1-6)
1273
values, which are angles between -20° and 20° respect to the
longitudinal axis. The values of each servomotor in the Matlab
program can be observed in Table II.
1274
On the next figure the controller response is oscillatory; this
is due the Kp affects the control’s action, making it faster and
oscillatory.
Kp Ki Result
0.4 0.3 Stable system without error
Oscillatory system
1 0.3
(establishes after a time) Figure 15. Controller response with Kp=0.4 y Ki=1
0.4 1 Unstable system
0.5 0.5 Stable system with error Finally, on Fig. 16 the controller shows a good response
with a light error considerable for the balance of the hexapod
On Fig. 13 is observed the diffuse controller response with a robot, in difference to the control of the Fig. 13 that is ideal
zero error. These values for Kp and Ki were the most efficient without the presence of error.
for the robot´s balance. The Fig. 16 shows the test of the robot´s
balance. The time of testing is 0.01seconds with a total number
of 2000 samples gathered by the diffuse controller, which
represents the 100 samples per second.
1275
Figure 17. Balance execution of the hexapod robot.
VI. CONCLUSIONS
The STM32F4 card is a great utility as controller for the
hexapod robot, and allows embedding any code and Matlab
tool, such as: Fuzzy Controller and filtering blocks for signals.
This facilitates the creation of algorithms that control the
hexapod movement.
[4] Robot Shop Inc, «Lynxmotion,» Agosto 2012. [En línea]. Available:
http://www.lynxmotion.com/c-117-phoenix.aspx.
[5] Roberto Supo, Lógica Difusa, Tacna, Perú: Universidad Nacional Jorge
Basadre, 2003.
1276