Conference PaperPDF Available

Orientation (Yaw) Fuzzy Controller Applied to a Differential Drive Mobile Robot Prototype for Indoor and Outdoor Applications

Authors:
23rd ABCM International Congress of Mechanical Engineering
December 6-11, 2015, Rio de Janeiro, RJ, Brazil
ORIENTATION (YAW) FUZZY CONTROLLER APPLIED TO A
DIFFERENTIAL DRIVE MOBILE ROBOT PROTOTYPE FOR INDOOR
AND OUTDOOR APPLICATIONS
Renan Moreira Pinto
Andrés Eduardo Baquero Velasquez
U
niversity of São Paulo, Av. Trabalhador São-carlense, 400, São Carlos, São Paulo, Brazil.
renanmoreira@usp.br, andresbaquero@sc.usp.br
Henry Borrero Guerrero
Vitor Akihiro Hisano Higuti
Daniel Varela Magalhães
Arthur Porto
Marcelo Becker
University of São Paulo, Av. Trabalhador São-carlense, 400, São Carlos, São Paulo, Brazil.
h_borrelo@ieee.org, vitor.higuti@usp.br, daniel@sc.usp.br, ajvporto@sc.usp.br, becker@sc.usp.br
Rafael Vidal Aroca
Universidade Federal de São Carlos, Rodovia Washington Luís (SP-310), Km 235, São Carlos, SP – Brasil
aroca@ufscar.br res e instituições, se
houver. (espaço duplo entre linhas, tamanho 10)
Abstract: This paper describes the development and implementation of an embedded Fuzzy Controller for a differential
drive mobile robot prototype which is able to keep a desired orientation angle along the robot forward displacement.
This prototype was designed for indoor and outdoor applications. In our approach we used a high and a low level of
control. The high level corresponds to a closed loop control system that receives information about the desired
orientation and the current measured orientation such that the fuzzy controller calculates and generates the required
control action. On the other hand, the low level controller is responsible for receiving the required control action from
the high level controller in order to compute that information and suitably route the PWM (Pulse Width Modulation)
signals to the two DC motors which carry on the mobility of the protytype. Current vehicle orientation is measured
with an IMU (Inertial Measurement Unit). Additionally, an App-Inventor application was developed in order to
remotely update the mobile robot desired orientation and also start or stop the protoype movement.
Keywords: Differential drive mobile robot prototype, Fuzzy logic controller, Orientation control, Android, App
Inventor 2, Inertial measurement unit, Bluetooth.
1. INTRODUCTION
A considerable set of experiments with mobile robotics can be tackled by using low-budget prototypes. This
approach allows assuming topics that require improvement before its implementation in real platforms like vehicles and
trucks. Moreover, those simple platforms have the advantage of being easily available in terms such as smaller
experimental sites, less burocracy and less power consumption. Thus, the conduction of experiments is facilitated.
This paper exposes the results from experiments realized on a differential drive mobile robot prototype (Siegwart
and Nourbaksh, 2004). A set of electronic devices was installed over the prototype to allow the driving of two DC
motors and its communication with remote devices. An Arduino Mega board (Galadima, 2014) has been installed on the
mobile robot structure and on that board a fuzzy logic controller which is exposed with details in (Velasquez et al.,
2014) was embedded. This board receives the vehicle orientation measured by an Inertial Measurement Unit (IMU) and
it is also responsible to provide the control signals to the locomotion system.
The input of the desired orientation and of the command to start or stop the prototype movement is remotely made
by using a mobile application developed with App-Inventor 2 (Turbak et al., 2014) to be embedded on a mobile phone
whose operational system is Android (Pereira and da Silva, 2009). Communication between the mobile phone and the
mobile robot was realized using a Bluetooth device (Filipeflop, 2015). Mobile robot also has an Xbee transceiver
(Faludi, 2011) which is used when it is desired to read the current information of robot performance using a remote
computer.
Renan M. Pinto, Andres E. B. Velasquez , Henry B. Guerrero.
Orientation (Yaw) Fuzzy Controler Applied to a Differrential Drive Mobile Robot Prototype For Indoor and Outdoor
Section 2 provides a general description about the mobile robot prototype and its components. Section 3 exposes
concepts regarding fuzzy logic control and its usage to realize experiments. Also the developed application with MIT
App Inventor is exposed. Section 4 exposes the reached results. Finally, conclusions, agreements and references are
presented.
2. GENERAL DESCRIPTION OF THE PROTOTYPE
Employed mobile robot corresponds to a differential drive wheeled prototype. According to Fig. 1, the mobile robot
has three circular platforms with diameter of 0.122 m. Like shown in Fig. 1(a), a caster wheel (Siegwart and Nourbaksh,
2004) supports the front platform and its center is separated 0.102 m to the rear wheels axis of the prototype. Each one
of the wheels are assembled to a DC motor (Pololu, 2015). The wheels are 0.049 m in diameter and 0.019 m wide.
Figure 1(b) depicts that the platform attached to the wheels is located 0.035 m high from the ground. The highest
platform is located 0.09 m high from the ground.
(a) (b)
(c)
Figure 1. Differential drive mobile robot prototype. (a) Representation of some dimensions. (b) Representation for
lateral view. (c) Prototype picture depicting its components and devices
Diverse devices were installed over the platform structure. Fig. 1(c) is a picture of the build prototype and exposes
the devices mounted on it: (1) Arduino board model Mega 2560 (Galadima A.A 2014); (2) the caster wheel (Siegwart
and Nourbaksh, 2004); (3) an Inertial Measurement Unit (IMU) model with 9- Degrees of freedom (Sparkfun, 2015).
(4) a Bluetooth module RS232 HC-05 for Arduino (Filipeflop, 2015); (5) a driver for two DC motors; (6) a 4.7Vdc and
1500 mA battery; and (7) the wheels.
2.1. Fuzzy Logic
The Fuzzy Logic tool was introduced in 1965 by Zadeh and it is a mathematical tool for dealing with uncertainty.
The fuzzy theory provides a mechanism for representing linguistic constructs such as many, low, medium, often and
few. In general, the fuzzy logic provides an inference structure that enables appropriate human reasoning capabilities.
Real world situations are too complex, and this complexity involves the degree of uncertainty – as uncertainty increases,
so does the problem complexity. Traditional system modeling and analysis techniques are too precise for such problems
(systems), and in order to make complexity less daunting are introduced appropriate simplifications, assumptions, etc.
Renan M. Pinto, Andres E. B. Velasquez , Henry B. Guerrero.
Orientation (Yaw) Fuzzy Controler Applied to a Differrential Drive Mobile Robot Prototype For Indoor and Outdoor
(i.e., degree of uncertainty or Fuzziness) to achieve a satisfactory compromise between the information we have and the
amount of uncertainty we are willing to accept. In this aspect, fuzzy systems theory is similar to other engineering
theories, because almost all of them characterize the real world in an approximate manner. For more details about the
concepts related to fuzzy logic and its applications, the reader should follow the references (Velasquez et al., 2014,
Sivanandam et al., 2007; Hakima and Ameli., 2010).
3. EXPERIMENTAL DETAILS
Initial results related to the working of the mobile robot exposed in this paper correspond to the executed
experiments inspired on the methodology and results presented in (Velasquez et al., 2014). Basically, the experimental
goal consisted in maintaining the mobile robot with a desired orientation during its forward movement.
3.1. Fuzzy Controller
Vehicle orientation control was deployed using a fuzzy closed loop control system which is represented by Fig. 3. It
is worth mentioning that besides the robot structure exposed in (Velasquez et al., 2014), the entire fuzzy controller was
embedded into the Arduino board.
Figure 2. Block Diagram of Control System
The input (ψ
d
) corresponds to the desired orientation (Yaw angle). ψ
r
is a signal related to the current orientation
measured by the IMU. The ψ
d
and ψ
r
are compared in order to determine an error (e) signal like shown in Eq. (1). The
error signal is the input of the fuzzy controller block which calculates an appropriate control action (u) signal which will
be applied on the actuators of the mobile robot represented by the (G) block.
rd
e
ψ
ψ
=
(1)
The projected control system incorporates a fuzzy controller of one input and one output (Sivanandam et al., 2007;
Hakima and Ameli, 2010). As it has been mentioned, the controller input is the error signal (e) and the controller output
is the control signal (u) which is transferred to the robot actuators in order to induce a vehicle steering. The
development of the fuzzy controller requires the definition of the fuzzy input and output sets, as well as the rules to
relate these sets. Triangular set definitions was adopted in a similar way like was explained in (Yu and Zhang, 2008).
Input Fuzzy Sets vN (very negative), N (negative), Z (zero), P (positive) and vP (very positive) are represented in Fig. 3
(a). The output fuzzy sets: R (right), C (Center) and L (left) are represented in Fig 3 (b).
(a) (b)
Figure 3. Input Fuzzy Logic sets
Renan M. Pinto, Andres E. B. Velasquez , Henry B. Guerrero.
Orientation (Yaw) Fuzzy Controler Applied to a Differrential Drive Mobile Robot Prototype For Indoor and Outdoor
According to the fuzzy logic controller theory, it is necessary to relate the input fuzzy sets with the output fuzzy
sets by rules. They were defined with respect to Eq. (1). Corresponding relation implies the development of a suitable
proceeding which is explained in detail in (Velasquez et al., 2014). The referenced proceeding also was used to
determine a defuzzified output.
LythenvPeif
LythenPeif
Cythenzeif
RythenNeif
RythenvNeif
== == == ==
=
=
,
,
,
,
,
(1)
The defuzzified output (Z*) is employed to decide the necessary commands to be applied. Equation (2) shows how
the mobile robot steering commands are defined according to the Z* value. Steering commands shown in Eq. (2) are
sent to the Arduino board which translates them to a differential drive acting over the servo-motors
;,2*
;,2*2
;,2*
rightTurnuthenZif
aheadgouthenZif
leftTurnuthenZif
==<<
=
(2)
3.2. MIT App Inventor 2 App
MIT App Inventor is a blocks-based environment for creating Android mobile apps. An App Inventor project
consists of a set of components and a program specifying their behavior. Components include visible user interface
items (e.g., buttons, images, and text boxes) and non-visible items used in the app (e.g. camera, speech recognizer, GPS
sensor). The App Inventor program is written in a blocks language. In App Inventor 1, released in 2009, the blocks
editor runs as a Java Web Start application. In App Inventor 2, released in Dec., 2013, the blocks editor runs in a web
browser as a JavaScript program based on the Blockly blocks framework (Turbak et al., 2014).
3.1. Software Application
An Android Application was developed in MIT App Inventor 2 in order to create a user interface to communicate
the mobile robot with a mobile phone which uses the Android operational system. This application allows sending the
desired orientation and turning on the fuzzy controller from the mobile phone. Moreover it shows the current orientation
of the robotic platform.
Figure 4. Visual Android Interface
Renan M. Pinto, Andres E. B. Velasquez , Henry B. Guerrero.
Orientation (Yaw) Fuzzy Controler Applied to a Differrential Drive Mobile Robot Prototype For Indoor and Outdoor
Figure 4 shows the user interface which is easy to handle by anyone unfamiliar with robotics systems or fuzzy
controller. This application has five buttons. The button to connect the “Bluetooth” communication is used to enable the
communication between the mobile phone and the robot. The second button Fuzzy control startis used to run the
fuzzy controller. The third button is Desired Yaw Orientation”, which is used to inform the desired orientation to the
robotic platform. The fourth button IMU data callis used to show the current orientation error on the screen of the
mobile phone. Finally, the “Stop” bottom stops all activate processes in the robot as well as its movement.
Figure 5 shows block program used in the application which was developed with App Inventor 2. The blocks
corresponding to “Bluetooth” depict the required processes to enable the Bluetooth communication between the android
device and the robot. The blocks corresponding to “Back” allows returning to the main menu of the application.
When the button to send the desired yaw orientation in Fig.5 is touched, the block called “Desire_Yawis enabled.
In this block, the application sends two values to the Arduino board; the first value is the number 8which indicates
that the second value is the desired orientation which has to be used by the fuzzy control system depicted in Fig. 2.
When the “Fuzzy_logic” button is enabled, the application sends the number “9” to the Arduino board, and this number
enables the fuzzy logic controller. Finally, when the button called “Stop” is enabled, the application send the number
“6” to Arduino in order to stop the robot movement. When the “IMU_data call” button activate the block “IMU_data”,
it first check if there are any bytes available to avoid noise data to be send to the cellular and if the Arduino is sending
data, the data is plotted on the screen. The last block is “back” that send the program to a previous menu with others
controllers systems to be added in future works.
Figure 5. Routine made in app inventor 2
4. Experiments and results
The developed fuzzy controller was evaluated throughout the execution of experiments in which the prototype had to
keep a desired orientation all along its forward movement. Figure 6 show reached results of the execution of four tests
in which the prototype was induced to move forward over an unpaved road whereas Fig. 7 depict reached results of four
similar realized tests on a paved road. According to depicted the orientation error was minimized such that the vehicle
was able to keep a desired orientation even although the terrain irregularities and also a disturbance which was
introduced at approximately in 10 seconds. The value of the Yaw angle was read every 100 milliseconds.
Renan M. Pinto, Andres E. B. Velasquez , Henry B. Guerrero.
Orientation (Yaw) Fuzzy Controler Applied to a Differrential Drive Mobile Robot Prototype For Indoor and Outdoor
Figure 6. Results of the 4 tests made on unpaved path
Figure 7. Results of the tests made on cement terrain
5. CONCLUSIONS
Our aim was to validate and evaluate several sensors, their respective errors and possible corrections at a low cost
platform, which will be further used for coaching new students. The same knowledge obtained on controllers and tools
will be applied to heavy machinery, principally in outdoor environments.
According to reached results. The assembled prototype has mechanical and electronic features that allow affirming
that it constitutes itself in a suitable platform which permits the tackling of future works related to the control of
differential drive mobile robots for indoor and outdoor environments.
Based on the experiments and reached results, it is possible to conclude that the fuzzy orientation controller was
able to maintain the vehicle orientation during it forward locomotion even although the presence of disturbances within
an acceptable performance according to the research goals.
Renan M. Pinto, Andres E. B. Velasquez , Henry B. Guerrero.
Orientation (Yaw) Fuzzy Controler Applied to a Differrential Drive Mobile Robot Prototype For Indoor and Outdoor
MIT app inventor allows the intuitive development of apps using tactile devices like tablets and cell phones in order
to deploy graphical user interfaces to control remotely diverse gadgets like the mobile robot which was exposed in this
paper.
6. ACKNOWLEDGEMENTS
The authors would like to thank to FINEP, CNPq, CAPES, EMBRAPA Instrumentation, COLCIENCIAS and EESC-
USP, for their support in this work.
7. REFERENCES
FALUDI, R., 2011, Building Wireless Sensor Networks. O’ Reilly Media, Sebastopol, USA.
FILIPEFLOP. “Módulo Bluetooth RS232 HC-05”. 18 May 2015 <http://www.filipeflop.com/pd-b4742-modulo-
bluetooth-rs232-hc-05.html >.
GALADIMA, A.A., 2014. “Arduino as a learning tool”. In Proceedings of the 11th International Conference on
Electronics, Computer and Computation – ICECCO2014. Abuja, Nigeria.
HAKIMA, A., Ameli, S., 2010. “Designing a fuzzy logic controller to adjust the angle of tires in four wheel steering
vehicles”. In Proceedings of the 11th International Conference on Control Automation Robotics & Vision -
ICARC2010. Singapore.
PEREIRA, L.C.O., DA SILVA, M.L., 2009. Android para desenvolvedores. Brasport livros e multimídia, Rio de
Janeiro, Brazil.
POLOLU. “100:1 Micro Metal Gearmotor HP”. 17 May 2015 < https://www.pololu.com/product/1101/specs >
SIEGWART, R., NOURBAKHSH, I.R., 2004. Introduction to Autonomous Mobile Robots. MIT press, London,
England.
SIVANANDAM, S., SUMATHI, S., DEEPA, S., 2007. Introduction to Fuzzy Logic using MATLAB. Springer-Verlag,
Berlin, Germany.
SPARKFUN, 2013. “MPU-9150 Product Specification Revision 4.3”. 18 May 2015 <
https://cdn.sparkfun.com/datasheets/Sensors/IMU/MPU-9150-Datasheet.pdf>.
TURBAK, F., WOLBER, D., MEDLOCK-WALTON, P., 2014. “The design of naming features in App Inventor 2”. In
Proceedings of the IEEE Symposium on Visual Languages and Human-Centric Computing - VL/HCC2014.
Melbourne, Australia.
VELASQUEZ, A. E. B., GUERRERO, H. B., BARRERO, J. F., TIBERTI, A. J., IBARRA, J. C. P., BECKER, M.,
MAGALHÃES, D. V., RISARDI, J. C., 2014. “Mobile robot prototype used to the study of the trajectory control
strategies and auto-localization”. In Proceedings of the VIII National Congress of Mechanical Engineering –
CONEM2014. Uberlândia, Brazil.
YU, F., ZHANG, M., 2008. “Generalized Triangular Norms Based Product and Similarity of Fuzzy Sets”. In
Proceedings of the Fifth International Conference on Fuzzy Systems and Knowledge Discovery – FSKD2008.
Shandong, China.
8. RESPONSIBILITY NOTICE
The authors are the only responsible for the printed material included in this paper.
ResearchGate has not been able to resolve any citations for this publication.
Conference Paper
Blocks languages, in which programs are constructed by connecting blocks resembling puzzle pieces, are increasingly used to introduce novices to programming. MIT App Inventor 2 has a blocks language for specifying the behavior of mobile apps. Its naming features (involving event and procedure parameters, global and local variables, and names for procedures, components, and component properties) were designed to address problems with names in other blocks languages, including its predecessor, MIT App Inventor Classic. We discuss the design of these features, and evaluate them with respect to cognitive dimensions and fundamental computer science naming concepts.
Conference Paper
In this paper, a 4 wheel steering vehicle (4WS) was used as a template and a vehicle was modeled (experimental) by using 2 degree of freedom system. The dynamics governing the Yaw behavior of a vehicle has been simulated with MATLAB/SIMULINK software. A controller, working by fuzzy logic was then designed. A relationship between front and rear angle of tires in different speeds and different front steering angle was found after running simulation for over 600 times. This controller increases the directional stability property of experimental vehicle when this vehicle is turning or maneuvering. The relationship was then used to make rules for the fuzzy logic controller. Subsequently, the experimental vehicle was compared with an uncontrolled vehicle and a vehicle with a very high lateral stiffness which there is infinitesimal slipped on turning or maneuvering (reference). This allows us to correctly identify the amount of slipping in our experimental vehicle. Our results show significant improvement of directional stability property of experimental vehicle in comparison with uncontrolled vehicle in different speed and different steering angles. Also the gotten results show that the side slip angle and the yaw rate of experimental vehicle were enhanced significantly.
Conference Paper
This paper first generalizes the definitions of inner product and outer product of fuzzy sets by replacing the lattice operators with triangular norms in the existing definitions, and then discusses their new properties. Based on the new definitions and the obtained results, lattice similarity, which is the original model of the axiomatic definition relevant to the similarity of fuzzy sets, is re-examined and some new perspectives are presented.
Building Wireless Sensor Networks
  • References Faludi
  • R Reilly Media
  • Usa Sebastopol
  • Filipeflop
REFERENCES FALUDI, R., 2011, Building Wireless Sensor Networks. O' Reilly Media, Sebastopol, USA. FILIPEFLOP. "Módulo Bluetooth RS232 HC-05". 18 May 2015 <http://www.filipeflop.com/pd-b4742-modulobluetooth-rs232-hc-05.html >.
Mobile robot prototype used to the study of the trajectory control strategies and auto-localization
  • A E B Velasquez
  • H B Guerrero
  • J F Barrero
  • A J Tiberti
  • J C P Ibarra
  • M Becker
  • D V Magalhães
  • J C Risardi
VELASQUEZ, A. E. B., GUERRERO, H. B., BARRERO, J. F., TIBERTI, A. J., IBARRA, J. C. P., BECKER, M., MAGALHÃES, D. V., RISARDI, J. C., 2014. "Mobile robot prototype used to the study of the trajectory control strategies and auto-localization". In Proceedings of the VIII National Congress of Mechanical Engineering -CONEM2014. Uberlândia, Brazil.
MPU-9150 Product Specification Revision 4.3
  • S Sivanandam
  • S Sumathi
  • S Deepa
SIVANANDAM, S., SUMATHI, S., DEEPA, S., 2007. Introduction to Fuzzy Logic using MATLAB. Springer-Verlag, Berlin, Germany. SPARKFUN, 2013. "MPU-9150 Product Specification Revision 4.3". 18 May 2015 < https://cdn.sparkfun.com/datasheets/Sensors/IMU/MPU-9150-Datasheet.pdf>.
Android para desenvolvedores. Brasport livros e multimídia
  • L C O Pereira
  • Da
  • M L Silva
PEREIRA, L.C.O., DA SILVA, M.L., 2009. Android para desenvolvedores. Brasport livros e multimídia, Rio de Janeiro, Brazil.
Arduino as a learning tool
  • A A Galadima
GALADIMA, A.A., 2014. "Arduino as a learning tool". In Proceedings of the 11th International Conference on Electronics, Computer and Computation -ICECCO2014. Abuja, Nigeria.