Top Banner
National Conference on Electrical & Electronics Engg. (NCE 3 -14), 5 Jun 2014, HKBK College of Engg., B’lore Design and Implementation of Fuzzy logic Controller for FPGA based Robotic Fish Laxmanrao Kulkarni 1 , Prakash R Tonse 2 , Salma M. Khan 3 1 UG Student, Department of Electronic and Communication Engineering, SCET, Belgaum, India 2 PG Student, Department of Electronic and Communication Engineering, SDMCET, Dharwad, India 3 Lecturer, Department of Electronic and Communication Engineering, SCET, Belgaum, India Email: [email protected] 1 [email protected] 2 [email protected] 3 ABSTRACT: In this paper, a novel design of Fuzzy logic controller design FPGA Based fish robot is presented. Design follows the propulsion and maneuvering mechanisms of real fishes. The re-programming ability of FPGA can be used for the up-gradation of the source code to the next higher versions. Working of FPGA based Fish Robot is more hardware weighted rather than software weighted as the design is implemented using much optimized circuit components. FPGA circuitry is truly a “hard” implementation of program execution. FPGAs, which do not use operating systems, minimize reliability concerns with true parallel execution and deterministic hardware dedicated to every task. Fuzzy Logic the basis of Soft computing can be considered to be the superset of the Crisp Logic which takes into account the whole spectrum of possibilities. It also has an upper hand as it gives the system a human like thinking advantage of these features of fuzzy ,this robot is made autonomous by adding obstacle avoidance property using 2 sharp IR sensors, the speed and angle of servo motor are varied in accordance with the defuzzified value obtained from FLC implemented on VHDL. Key words: FPGA, Fuzzy logic controller (FLC), crisp logic, true parallel execution, hardware parallelism, faster response times. 1. INTRODUCTION In today‟s world people are more interested in underwater environment (Marine) as it is still mystery. So researchers started exploring it, by means of scuba diving and underwater robots. Robots like submarine robots and ROV‟s, but as ocean investigation operation should be carried out more efficiently, it is necessary to have a high propulsion device, thus researchers started R&D (Research & Development) on fish like ROV‟s such as fish robot. Most studies on robot fish focused on exploring the hydrodynamic mechanism of fishlike swimming, and constructing autonomous underwater vehicles with the efficiency and maneuverability of real fish. One famous prototype is MIT‟s RoboTuna developed in 1994, which initiated the research and development of robot fish. RoboTuna and subsequent RoboPike were used to study drag reduction in fishlike locomotion. Later, an improved version of RoboTuna: Vorticity Control Unmanned Undersea Vehicle (VCUUV), was constructed by Draper Laboratory of MIT . The VCUUV was equipped with many different sensors, and could realize up-down motion and avoid obstacles, which allow it to be able to navigate autonomously in a 3-D workspace. In addition, California Institute of Technology, Northeastern University and University of California Berkeley carried out a series of fishlike propulsion projects in theoretic exploration and physical realization. In Japan, Tokai University examined the use of specific kinds of pectoral fin motions to maneuver a robotic Blackbass, Kagawa University developed a novel type of underwater micro biped robot with ionic conducting polymer film (ICPF) actuator, and the National Maritime Research Institute (NMRI) of Japan built a variety of robot fish prototypes designed to realize efficient propulsion and autonomous control. This paper mainly concentrates on utilization of fish robot for “Underwater Exploration & Protection”. It takes care to develop a user friendly, cost-effective, more feasible & application oriented robot. So, our new approach is to develop such a device, which satisfies all the above stated features of fish robot and also should be made easy for future extension. Hence this paper proposes development of Fuzzy logic controller for smooth motion and accurate obstacle avoidance property of robotic fish
6

Design & Implementation of Fuzzy Controller for Fpga Based Robotic Fish.

Nov 22, 2015

Download

Documents

Salma Khan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • National Conference on Electrical & Electronics Engg. (NCE3-14), 5 Jun 2014, HKBK College of Engg., Blore

    Design and Implementation of Fuzzy logic

    Controller for FPGA based Robotic Fish

    Laxmanrao Kulkarni1, Prakash R Tonse

    2, Salma M. Khan

    3

    1UG Student, Department of Electronic and Communication Engineering, SCET, Belgaum, India 2PG Student, Department of Electronic and Communication Engineering, SDMCET, Dharwad, India

    3Lecturer, Department of Electronic and Communication Engineering, SCET, Belgaum, India

    Email: [email protected] [email protected]

    2 [email protected]

    ABSTRACT:

    In this paper, a novel design of Fuzzy logic controller

    design FPGA Based fish robot is presented. Design

    follows the propulsion and maneuvering mechanisms

    of real fishes. The re-programming ability of FPGA

    can be used for the up-gradation of the source code to

    the next higher versions. Working of FPGA based

    Fish Robot is more hardware weighted rather than

    software weighted as the design is implemented using

    much optimized circuit components. FPGA circuitry

    is truly a hard implementation of program

    execution. FPGAs, which do not use operating

    systems, minimize reliability concerns with true

    parallel execution and deterministic hardware

    dedicated to every task. Fuzzy Logic the basis of Soft

    computing can be considered to be the superset of the

    Crisp Logic which takes into account the whole

    spectrum of possibilities. It also has an upper hand as

    it gives the system a human like thinking advantage of

    these features of fuzzy ,this robot is made autonomous

    by adding obstacle avoidance property using 2 sharp

    IR sensors, the speed and angle of servo motor are

    varied in accordance with the defuzzified value

    obtained from FLC implemented on VHDL.

    Key words: FPGA, Fuzzy logic controller (FLC), crisp

    logic, true parallel execution, hardware parallelism,

    faster response times.

    1. INTRODUCTION

    In todays world people are more interested in

    underwater environment (Marine) as it is still mystery.

    So researchers started exploring it, by means of scuba

    diving and underwater robots. Robots like submarine

    robots and ROVs, but as ocean investigation operation

    should be carried out more efficiently, it is necessary to

    have a high propulsion device, thus researchers started

    R&D (Research & Development) on fish like ROVs

    such as fish robot.

    Most studies on robot fish focused on exploring the

    hydrodynamic mechanism of fishlike swimming, and

    constructing autonomous underwater vehicles with the

    efficiency and maneuverability of real fish. One famous

    prototype is MITs RoboTuna developed in 1994, which

    initiated the research and development of robot fish.

    RoboTuna and subsequent RoboPike were used to study

    drag reduction in fishlike locomotion. Later, an improved

    version of RoboTuna: Vorticity Control Unmanned

    Undersea Vehicle (VCUUV), was constructed by Draper

    Laboratory of MIT . The VCUUV was equipped with

    many different sensors, and could realize up-down

    motion and avoid obstacles, which allow it to be able to

    navigate autonomously in a 3-D workspace. In addition,

    California Institute of Technology, Northeastern

    University and University of California Berkeley carried

    out a series of fishlike propulsion projects in theoretic

    exploration and physical realization. In Japan, Tokai

    University examined the use of specific kinds of pectoral

    fin motions to maneuver a robotic Blackbass, Kagawa

    University developed a novel type of underwater micro

    biped robot with ionic conducting polymer film (ICPF)

    actuator, and the National Maritime Research Institute

    (NMRI) of Japan built a variety of robot fish prototypes

    designed to realize efficient propulsion and autonomous

    control.

    This paper mainly concentrates on utilization of fish

    robot for Underwater Exploration & Protection. It

    takes care to develop a user friendly, cost-effective, more

    feasible & application oriented robot.

    So, our new approach is to develop such a device,

    which satisfies all the above stated features of fish robot

    and also should be made easy for future extension. Hence

    this paper proposes development of Fuzzy logic

    controller for smooth motion and accurate obstacle

    avoidance property of robotic fish

  • National Conference on Electrical & Electronics Engg. (NCE3-14), 5 Jun 2014, HKBK College of Engg., Blore

    2. DESIGN ANALYSIS

    The design analysis of proposed fish robot can be

    described in two ways, Locomotive specific analysis &

    Application specific analysis.

    A) Locomotive specification analysis:

    As the design requirement of our robot meets the design

    proposed in the paper A Framework for Biomimetic

    Robot Fishs design and realization by Junzhi Yu,

    Long Wang, and Min Tan, so we shall consider the

    same principle for locomotive analysis.

    A schematic diagram describing the design of a robot

    fish is shown in Fig.1. Construction/structure determines

    its functions. As surveys conducted by zoologists show,

    it is common for high-speed aquatic animal to be in the

    shape that the maximum width of the body is about one

    fourth of its body length, which can furthest reduce the

    form drag. A central issue in the systematic design is the

    comprehensive consideration of the following two

    questions: (a) Does the current design meet the

    constraints of the mechatronic system? (b) Is the adopted

    control method feasible? In addition, geometric

    configuration and mass distribution should be taken into

    account as well.

    {

    Fig.1 An overall framework of robot fish design.

    Based on the prior preparations, through some rounds of

    systematic emulations and physical tests, a final robot

    fish design scheme that balances the stability and

    propulsive efficiency can be achieved. The detailed steps

    in robot fishs design are then illustrated as follows:

    1) Abstracting morphological parameters and kinematic

    parameters from the geometric characteristics and

    swimming properties of biological fish respectively. In

    this step, a theoretical model of robot fish can be derived

    from the biological model.

    2) Following the steps of selecting hydrodynamic shape

    and its drag coefficients determining thrust in light of the

    requirements of drag, acceleration and maneuverability

    determining the shape of caudal fin and its area

    according to the calculated thrust to select the

    appropriate kinematic parameters.

    3) Modifying and resetting each parameter conditioned

    by both constraints of the mechatronic system and

    feasibility of the used control method, and return to step

    2) to design again until good hydrodynamic shape and

    stability are achieved.

    4) Conducting the geometric space configuration and

    mass distribution of robot fish, in terms of the

    requirements of hydrodynamic shape, stability and

    control algorithm, and developing the prototype of robot

    fish.

    5) Optimizing the kinematic parameters based on

    hydrodynamic experiments on the prototype. In this case,

    intelligent control method can be applied to the robots

    motion control so as to improve its maneuverability

    under complex environments. Therefore, the

    comprehensive performance in locomotion and agility of

    the fish reaches a relatively optimal level.

    3. LITERATURE SURVEY On the exhaustive survey of literature it was found that varied number of approaches has been carried out to design fish like robot[1][2] papers shows the early work done in developing fish like robot. [6] Concerns a study, in which authors have investigate the sinusoidal wave production method by means of fins which imitate MPF fish. In the robotic fish investigated in this paper, sinusoidal wave will be produced by six servomotors located in fishlike robots fin. A mechanical system, including two servomotors, serves to control direction and depth of the robotic fish movement. Paper has done discussion in detail wireless control system, designed for fish robot control, Changes in speed, direction of crank rotation and phase differences of adjacent servomotors in the fin will be controlled by the control system & says that by this method swimming direction and speed of fish robot can be changed from out of pool. [5] This paper shows an application of fuzzy logic in designing and fabricating an intelligent robotic fish with multiple actuators which can swim freely and autonomously avoid obstacles in water. The multiple actuators on the robotic fish consist of two pectoral fins, one on each side of the fish, two tail sections, a center of gravity adjuster for the head of the fish, and a pump used to draw in or expel water. Based on the multiple actuators having adequate controls, the fish can swim forward, turn to the right, turn to the left, rise, and sink with high agility. The two main functions of the robotic

  • National Conference on Electrical & Electronics Engg. (NCE3-14), 5 Jun 2014, HKBK College of Engg., Blore

    fish are obstacle avoidance and target tracking. The distance between the fish and the obstacle is detected and measured by four infrared sensors on the fishs body. The fish can then avoid the obstacle autonomously when it approaches the obstacle. Obstacle avoidance is achieved using fuzzy control technique. As shown in the simulation and practical experiment, the path of obstacle avoidance using fuzzy control is much smoother than that using intuitive control. The other function is target tracking, in which the robotic tracker fish can track the robotic target fish autonomously and due to the obstacle avoidance function the two will not collide. All of the above motion controls are implemented by FPGA with the aids of several sensors.

    4. FUZZIFIERS AND DEFUZZIFIERS

    Various types of Fuzzifiers and Defuzzifiers are

    described in the literature [3] out of which the ones

    chosen for implementation on FPGA are described

    below. Fuzzifiers form the basis for converting the crisp

    values into fuzzy quantities and form the initial entity in

    any soft computing applications. Here the crisp values

    are suitably mapped onto the fuzzy spectrum. A) Types of Fuzzifiers used Fuzzifiers can be of varied types. Usually a look up table

    approach based on intuitiveness is applied where in the

    membership values are assigned based on experience. Even

    then there are fuzzifiers like Triangular, Gaussian,

    Rectangular, Trapazoidal fuzzifiers which can be applied it

    the fuzzy quantities are varying in a defined manner [1].

    Some of the fuzzifiers used for implementation are

    explained below. a) Triangular Fuzzifier: This type of fuzzifier has a

    triangular variation as can be seen the Fig. 2.

    Fig 2: Triangular Fuzzifier b) Trapezoidal Fuzzifier: This type of fuzzifier is

    having a characteristic variation of trapezoid as shown in Fig. 3

    Fig 3: Trapezoidal Fuzzifier

    B) Defuzzifutzzification: If Fuzzification gives us the fuzzy value to handle the

    uncertainities then the Defuzzifier gives us the crisp

    value which can be understood by any processor or

    device in real world and hence forms one of the very

    important blocks of any Fuzzy logic based inference

    systems used in Soft Computing [2]. There are varieties

    of Defuzzifiers available like min-max method, center of

    sums methods etc., and the one chosen for

    implementation is described below.

    Centroid method: This procedure (also called center of

    area, center of gravity) is the most prevalent and

    physically appealing of all the defuzzification methods

    [1]; it is given by the algebraic expression. y

    * = ( y B(y) dy) (B(y) dy)...(4)

    Fig 4: Centroid Defuzzification Method

    C) Mamdani inference engine The fuzzy inference engine is the heart of the controller. It consists of the rule-base. The rules are constructed using fuzzy IF-THEN-ELSE constructs. In the literature, conditional, unconditional and simple assignment types of rules have been reported. Mamdanis fuzzy inference method is the most commonly seen fuzzy methodology. In Mamdani

    inference engine, after the aggregation process, there is a fuzzy set for each output variable that needs defuzzification. Its possible, and in many cases much more efficient, to use a single spike as the output membership functions rather than a distributed fuzzy set. This is sometimes known as a singleton output membership function, and it can be thought of as a pre-defuzzified fuzzy set. It enhances the efficiency of the defuzzification process because it greatly simplifies the

    computation required by the more general Mamdani method, which finds the centroid of a two-dimensional function as shown in fig 5. Rather than integrating across the two-dimensional function to find the centroid, we use the weighted average of a few data points. Sugeno-type systems support this type of model. In general, Sugeno-type systems can be used to model any inference system in which the output membership functions are either

    linear or constant.

    Fig 5:Graphical representation of Mamdani inference

    engine.

  • National Conference on Electrical & Electronics Engg. (NCE3-14), 5 Jun 2014, HKBK College of Engg., Blore

    5. MATLAB IMPLEMENTATION

    A) Mamdani Implementation A simple block diagram of the Mamdani inference engine for Mamdani based Fuzzy Logic Controller.

    Fig 6 : Block Diagram of Mamdani FLC

    The figure 6 indicates three inputs viz. Left position,

    Center and Right position. These inputs are responsible

    for signifying the distance of the obstacle from the robot.

    The range for all the input variables is (0 to 32) which are

    nothing but the distance of the objects. The

    corresponding membership functions are shown in figure

    7, 8 and 9 respectively. The linguistic variable left

    position, center and right position are trapezoidal type of

    membership functions along with dense of type

    triangular is defined. These member functions are

    decided on intuition. Sufficient degree of overlapping is

    ensured to obtain smoother output. These member

    functions are decided on intuition. Sufficient degree of

    overlapping is ensured to obtain smoother output.

    Figure 7: Membership functions for obstacle distance

    at right position.

    Figure 8: Membership functions for obstacle

    distance at left position.

    Figure 9: Membership functions for obstacle

    distance at center position.

    There are five outputs for the simulated FIS i.e., Left-big, Left-small, center, Right-small and right-big which gives the duration of green signals at respective lanes. The

    membership functions are shown in figure 10. The obstacle density varies from 0 to 40cms.

    Figure 10: Membership functions for angle change

    of servo motor.

    6. VHDL IMPLEMENTATION A) .Entity Declaration

    In this section, the implementation of Fuzzy Logic

    Controller for FPGA based fish robot using VHDL is

    described. In this prototype implementation, the FLC

    receives inputs in the form of digital converted values in

    8bits from ADC which is fed by sharp sensors at

    respective positions. The outputs will be in the form of

    duty cycle of pulse width modulation which drives the

    body steering servomotor. A reset pin (rst) is provided to

    reset the controller at any point in time.

    Fig.11: Entity for Fuzzy based TLC.

  • National Conference on Electrical & Electronics Engg. (NCE3-14), 5 Jun 2014, HKBK College of Engg., Blore

    B) Preprogramming the Fuzzy based FLC

    The programming environment for FLC is based on

    VHDL. The behavioral description is analyzed simulated

    and synthesized onto Xilinx FPGAs. An application for

    the prototype implementation is developed by writing

    behavioral description in VHDL and the description is

    iteratively refined and debugged with the simulator

    available i.e., ModelSim version 5.2. After the

    description code is verified to be functionally correct by

    simulation, it is translated onto a Xilinx net list form. The

    net list is then mapped onto FPGA architecture by

    automatic partition, placement and routing tool to form a

    loadable FPGA object module [7]. A static timing

    analysis tool is then applied to the object module to

    determine maximum operating speed for all the

    implementations.

    7. RESULTS AND DISCUSSION

    The Mamdani and controllers are implemented using the

    Fuzzy logic toolbox in MATALB R2012a software. The

    Mamdani type FLC has a total of 27 rules in the fuzzy

    rule-base. This includes all the permutations and

    combinations of input and output variables and

    membership functions. Fig 11 indicates the partial

    Ruleviewer for Mamdani FLC. Fig 12 gives the Surface

    Viewer for the said systems.

    Fig 11 the partial Ruleviewer for Mamdani FLC

    Fig 12. Surface Viewer for the FLC.

    Fig 11 indicates the Ruleviewer for FLC. The controller

    is built using a total of again 27 fuzzy IF-THEN-ELSE

    Rules in Mamdani based implementation the Center of

    Gravity (CG) method is used for defuzzification. More

    the number of rules smoother will be the output curve

    and hence the precision in the output.

    A) VHDL/FPGA Implementation

    As the entire code is synthesizable, the synthesis is

    carried out on the FPGA (Spartan 3E Xc3S500Evq100-

    4). The entire design is optimized for speed and area

    using Xilinx device family Spartan. The RTL schematic

    and simulation result is show bellow.

    Fig 13. RTL schematic of FLC.

    Fig 14. Simulation results of FLC for Fuzzy

    logic based robotic fish.

  • National Conference on Electrical & Electronics Engg. (NCE3-14), 5 Jun 2014, HKBK College of Engg., Blore

    8. CONCLUSION

    In this project work, an attempt has been made to design and implement Fuzzy Logic Controller (FLC) For FPGA based Fish Robot application on various platforms. In Phase 1 of the project the Fuzzy Logic Controller was designed using MATLABs Fuzzy Logic Tool box and satisfactory results were obtained. Then in Phase 2 of this

    project mapping of Fuzzy Logic Controller for the said application using Mamdani Inference Engine on VHDL was carried out and was tested rigorously for every possible input and output combinations. Once the code was tested for veracity the Fuzzy Logic controller for FPGA based was successfully implemented on FPGA platform with some alteration in the code to get an embedded system which can be a part of the system which will improve swimming mechanism of the Robotic

    fish. The Synthesis report obtained after the implementation of FLC has shown satisfactory resource utilization. Through this project it can be concluded that Fuzzy Logic can be implemented for efficient swimming and turning performance of robotic fish.

    ACKNOWLEDGEMENT The authors thank the Principal and the Management of Shaikh College of Engineering and Technology, Belgaum, for providing the necessary resources to carry out the research work. The first author specially thanks Noorulain Khadri H.O.D E&C dept. SCET, for initiating

    this project at the Dept. of Electronics and Communication Engineering. The authors also thank the efforts made by project team constituting of Mr. Akshay Upadhey, Mr. Pratik desai and Mr.Anand Chougule, UG students, Dept Electronics and Communication Engineering for providing the software and hardware support during the phase of this project work.

    REFERENCES

    [1] Study on turning performance of a fish robot by

    koichi HIRATA, tadanori TAKIMOTO and kenkichi TAMURA.

    [2] The Design and Implementation of a Biomimetic Robot by FishChao Zhou1, Min Tan1, Nong Gu2, Zhiqiang Cao1, Shuo Wang1 and Long Wang1

    [3] Timothy Ross, Fuzzy Logic with Engineering Applications, McGraw Hill Publications,

    [4] Shubhalakshmi Shetty, Shruti S R., Prakash R. Tonse, Siddalingesh. S. Navalgund,A Comparative analysis of Mamdani and Sugeno Fuzzy Rule Based Washing Machine Controller. Proceedings of ICETE-11, pp:440-445.

    [5] Mohsen Siahmansouri, Ahmad Ghanbari and Mir

    Masoud Seyyed Fakhrabadi, Design,

    Implementation and Control of a Fish Robot with

    Undulating Fins.

    [6] Pei-Jun Lee, Meng-Shiue Lee, and Ruei-Chan Wang, A Fuzzy Control Based Robotic Fish with Multiple Actuators. international Journal of Fuzzy Systems, Vol. 14, No. 1, March 2012

    [7] Daijin Kim, Member, IEEE , An Implementation of Fuzzy Logic Controller on the Reconfigurable FPGA System , IEEE TRANSACTIONS ON

    INDUSTRIAL ELECTRONICS, VOL. 47, NO. 3, JUNE 2000 pp:703-715.

    [8] Mahmoud A. Manzoul and Dinesh Jayabharathi , FUZZY CONTROLLER ON FPGA CHIP, 62901 0-7803-0236-2 192 33.00 0 1992 IEEE pp:1309-1316.

    [9] Sameep Singh and Kuldip S. Rattan , Implementation of a Fuzzy Logic Controller on an FPGA using VHDL 0-7803-7918-7/03/$17.00 @ 2003 IEEE pp:110-115..

    [10] Mohamed Slim Masmoudi, Insop Song, Fakhreddine Karray, Mohamed Masmoudi, Nabil Derbel, HARDWARE/ SOFTWARE APPROACHE FOR THE FPGA IMPLEMENTATION OF A FUZZY LOGIC CONTROLLER 0-7803-9727-4/06 2006 IEEE.

    [11] Scott Dick, Vincent Gaudet, Huiqing Bai, Bit-Serial Arithmetic: A Novel Approach to Fuzzy Hardware Implementation, 978-1-4244-2352-1/08/$25.00 2008 IEEE

    [12] Douglas Perry, VHDL Programming by Example, Tata McGrawHill Publishers, VI edition

    [13] http://www.open-electronics.org/robofish-create- your-robot-fish-with-arduino/

    AUTHORS PROFILE

    Prakash Tonse is pursuing his 2nd

    year of

    Postgraduate studies in Digital Electronics

    at the Dept. of E&CE at SDMCET,

    Dharwad. His research interests include

    VLSI, Digital Circuits and Fuzzy Logic

    Applications. Mr. Prakash is currently the

    life member of Institution of Electronics and

    Telecommunication Engineers (IETE),

    Institution of Engineers India (IE-I) and

    International Association of Computer

    Science and Information

    Technology(IACSIT).

    Laxmanrao Kulkarni is pursuing his final

    year of undergraduate studies in Electronics

    and Communication at Shaikh College of

    Engineering & Technology, Belgaum,

    Belgaum. His research interests include

    frontend VLSI, Digital Circuits and

    embedded systems.

    Ms. Salma M. Khan is a lecturer at the

    Department of Electronics & Communication

    Engineering at Shaikh College of Engineering

    & Technology, Belgaum. She completed

    Bachelor of Engineering in Electronics and

    communication at Gogte Institute of

    Technology, Belgaum. She pursued her

    Masters in VLSI DES at K.L.E Societys Dr.

    M. S. Sheshgiri College of Engineering &

    Technology, Belgaum. Her area of interests

    includes VLSI, embedded systems, control

    systems and Fuzzy logic based applications. At

    present she is a life member of Indian Society

    for Technical Education (MISTE).