Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based...

18
ARTÍCULO DE INVESTIGACIÓN Vol. 35, No. 2, Agosto 2014, pp. 125-142 Novel Fuzzy Logic Controller based on Time Delay Inputs for a Conventional Electric Wheelchair M. Rojas P. Ponce A. Molina Instituto Tecnológico y de Estudios Superiores de Monterrey, Campus Ciudad de México. ABSTRACT This work proposes a Dynamic fuzzy logic Controller for the navigation problem of an electric wheelchair. The controller uses present data from three ultrasonic sensors as the main source of information from the environment. However other inputs, named as “dynamic time delay”, are obtained from past samples of those static data and are used to design the rule base. Although fuzzy logic controllers with static inputs could solve basic navigation problems, the proposed structure with dynamic inputs gets an excellent performance for more complex navigation problems. There were designed static and dynamic navigation strategies, which were first deployed in software just to evaluate their behavior. They were tested in a maze and their trajectories were compared to select the best. For improving its response, the dynamic fuzzy logic strategy was deployed in hardware. The paper presents a comparison between the software and hardware applications to illustrate the possibility of implementing the proposed methodology in different platforms. The dynamic fuzzy logic controller led the electric wheelchair without colliding against walls, and is a high performance navigation system. Moreover, this controller could solve the sensor limitations. Keywords: fuzzy logic, dynamic, controller, wheelchair, ultrasonic sensors.

Transcript of Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based...

Page 1: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

ARTÍCULO DE INVESTIGACIÓN

Vol. 35, No. 2, Agosto 2014, pp. 125-142

Novel Fuzzy Logic Controller based on Time DelayInputs for a Conventional Electric Wheelchair

M. RojasP. Ponce

A. Molina

Instituto Tecnológico y deEstudios Superiores de

Monterrey, Campus Ciudadde México.

ABSTRACTThis work proposes a Dynamic fuzzy logic Controller for the navigationproblem of an electric wheelchair. The controller uses present datafrom three ultrasonic sensors as the main source of information fromthe environment. However other inputs, named as “dynamic timedelay”, are obtained from past samples of those static data and areused to design the rule base. Although fuzzy logic controllers withstatic inputs could solve basic navigation problems, the proposedstructure with dynamic inputs gets an excellent performance for morecomplex navigation problems. There were designed static and dynamicnavigation strategies, which were first deployed in software just toevaluate their behavior. They were tested in a maze and theirtrajectories were compared to select the best. For improving itsresponse, the dynamic fuzzy logic strategy was deployed in hardware.The paper presents a comparison between the software and hardwareapplications to illustrate the possibility of implementing the proposedmethodology in different platforms. The dynamic fuzzy logic controllerled the electric wheelchair without colliding against walls, and is a highperformance navigation system. Moreover, this controller could solvethe sensor limitations.

Keywords: fuzzy logic, dynamic, controller, wheelchair, ultrasonicsensors.

Page 2: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

126 Revista Mexicana de Ingeniería Biomédica · volumen 35 · número 2 · Agosto, 2014

Correspondencia:Mario Rojas

EGIA, Calle del Puente #222Col. Ejidos de Huipulco,

Tlalpan C.P. 14380, MéxicoD.F

Correo electrónico:[email protected]

Fecha de recepción:12 de Octubre de 2013.

Fecha de aceptación:19 de Junio de 2014

RESUMENEn este trabajo se presenta un controlador dinámico con lógica difusapara el problema de navegación de una silla de ruedas. El controladorusa datos presentes de tres sensores ultrasónicos como la principal fuentede información del entorno. Sin embargo, a partir de valores pasadosse obtienen otras entradas designadas como “retrasos dinámicos´´para la base de reglas. A pesar de que los controladores de lógicadifusa con entradas estáticas pueden resolver problemas básicos denavegación, la estructura propuesta con entradas dinámicas tiene unexcelente desempeño para problemas de navegación más complejos.Se diseñaron estrategias de navegación estáticas y dinámicas, lascuales fueron implementadas primero en software para evaluar sudesempeño. Se usó un laberinto y sus trayectorias fueron comparadaspara seleccionar el mejor. Para mejorar su respuesta, la estrategiadinámica fue implementada en hardware. Este artículo presenta unacomparación entre las aplicaciones de hardware y software para ilustrarla posibilidad de implementar la metodología en diferentes plataformas.El controlador dinámico de lógica difusa dirigió la silla eléctrica sincolisionar contra los muros, y es un sistema de navegación de altodesempeño. Así mismo, este controlador podría resolver las limitacionesdel sensor.

Palabras clave: lógica difusa, controlador, dinámico, silla de ruedas,sensores ultrasónicos.

INTRODUCTION

Word report on disability recommends the use ofelectric wheelchairs (EW) as assistive technologyfor handicapped persons [1]. Furthermore, smartelectric wheelchairs could solve the mobilityproblem when the patients suffer strong mobilitylimits and cannot control the joystick. Theycould be assisted by a smart wheelchair whichincludes sensors, controllers, user interfaces andnavigation modules as presented in [2] and [3].

The smart wheelchairs are classified asautonomous, semi-autonomous and hybridsystems [4]. In an autonomous wheelchair,the operator indicates it where to go, thenthe system plans the route and moves therewithout assistance. In those prototypes, the useronly waits for the system to reach the specifiedobjective without being able to choose the speedor the trajectory. Besides, those systems arelimited to local and well-known environments,

and they are planned to be used by patientswho cannot control any device because of theirdisability. In the semi-autonomous prototypes,the operator and the system work together bymeans of some user interface, sensors and smartnavigation techniques. With this approach, thepatient partially needs help in certain navigationtasks but he is able to control the mobility. Taskslike obstacle avoidance, wall following, parkingand door passage are typically used in this kindof smart EW as mentioned in [5], [6] and [7].

Conventional controllers are classified in two:linear and nonlinear. The linear controllers areconstructed from analyzing a set of equations,which model the dynamic of the system withprecision, or at least approximately. Onthe other hand, for nonlinear controllers themathematical model contains uncertainties or istotally unknown because of its complex behavior(all control systems are actually nonlinear) [8].

Page 3: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

Rojas et al. Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127

FuzzificationRule base

Defuzzification

Inference engine

Linguistic Logic Strategy

Input data

Output data

Fuzzy controller

 

Figure  1.  The  fuzzy  controller  

There are several works of FLC applied to autonomous mobile robots, for instance [10], [11] and [12]. More precisely, a review of {\it fuzzy logic} applications in electric wheelchairs is presented in Table   1. This technique can be used to implement obstacle avoidance or wall following algorithms for navigation of the EW in some unknown environments. For instance, in references [13], [14], [15], [16] and [17] are presented prototypes which use distance sensors as inputs for the {\it fuzzy logic} controller. Another cases of application are those with {\it fuzzy logic} as part of the user interface to get instructions from the user (i.e. the flex sensor in [18], the voice commands in [15] or the joystick operation mode described in [16]). Finally, other works use {\it fuzzy logic} for complementary tasks of the complete system as pairing location patterns in a map or controlling the speed of the wheelchair motors ( [19] and [20], respectively).

According to the review presented in Table 1, the wheelchair performance is related with three main aspects: the sensors employed, the processing core and the implemented methodology. For the case of sensors, they are used to get distance measurements from obstacles. Ultrasonic sensors have been widely used in prototypes because of their low cost and fast responses, however they have some noise problems, which can be improved with software. Another alternative is the infrared sensors (IR), but they are limited in distance and visible light affects their performance as presented in [15]. Other systems use laser range finders, but they are not as cheap as ultrasonic sensors [5]. It is certainly true that a big number of sensors comprises more environment information for the controller, but this outcomes in a more complex control [16]. In those cases, if the processor is limited in resources the response will be slow.

The other aspect to consider is the processing core. In Table 1, all projects were implemented using microcontrollers or computers, and just one of them used real-time hardware to control the motors rotation

speed [21]. In contrast, there are parallel architectures which allow data to access the resources at the same moment, and they guarantee the execution in a time period. The real-time hardware, like Field Gate Programmable Array (FPGA) has proved to be very efficient and reliable, and there are a lot of advantages about configuring a controller in the FPGA instead of using a computer or any microcontroller [22].

Table  1.  Main  works  developed  using  {\it  fuzzy  logic}  for  an  Electric  Wheelchair  (EW)  

Ref. Description

[13] Two fuzzy controllers are used: one for joining a target specified by specifying an (x, y) coordinate and the other for avoiding obstacles.

[14]

The fuzzy controller considers distance, presence and direction from the objects to decide if it necessary to change the trajectory.

[18] It uses two fuzzy controllers, one to determine actions from the flex sensors and the other for obstacle avoidance based in ultrasonic sensors. Preference is given to the fingertip control if obstacles are far and to the obstacle avoidance system if objects are close.

[15]

It includes an obstacle avoidance control which uses IR sensors, as well as a contour following control. Both are {\it fuzzy logic} controllers.

[20]

Utilizes FPGA technology in a wheelchair combined with a {\it fuzzy logic} control designed to manipulate the rotation speed of the driving motors. It is not a navigation control.

[16] The fuzzy controller is based in the information given by eight sonar sensors and the joystick. Inference system is based in that information to control direction and speed of the wheelchair.

[19]

The fuzzy control is focused on matching the position of a wheelchair in a sidewalk network map of an urban area, by using a GPS.

[17]

The {\it fuzzy logic} controller is designed to alternate between manual and automatic navigation depending of near obstacles. This assures the switching to be gradual. The automatic controller is also based in {\it fuzzy logic} to avoid obstacles.

[23]

The controller is used to determine the operator orders by using a seat pressure sensor and body movements as the interface. The inputs for the inference system are the x and y velocity and acceleration of human gravity center. The prototype includes omnidirectional wheels for moving in every direction.

Finally, in relation with the implemented algorithm to avoid obstacles, the Mamdami methodology is used in [14], [18], [15], [16], [17] and [23]. Mamdani is a

Figure 1. The fuzzy controller.

The fuzzy logic, introduced by Zadeh in [9],is used as a control technique for systems inwhich no mathematical model is known. Itis complicated to find a mathematical modelwhen the user takes navigation decisions basedon vague and imprecise information, but itis possible to approximate their actions witha controller based in fuzzy logic. The basictopology of a Fuzzy Logic Controller (FCL) isshown in Figure 1. The inputs are crisp values,which are changed into degrees of membershipbetween 0 and 1. The membership functionsare described with linguistic labels (like Closeor Far), which are very useful for constructingthe rule base built with if-then structures. Theinput fuzzy sets are used as antecedents andthe output fuzzy sets as consequents, both areconnected with a fuzzy operator to determinethe rule membership value. This value is usedin the defuzzification process to determine thecrisp output.

There are several works of FLC applied toautonomous mobile robots, for instance [10],[11] and [12]. More precisely, a review offuzzy logic applications in electric wheelchairs ispresented in Table 1. This technique can beused to implement obstacle avoidance or wallfollowing algorithms for navigation of the EWin some unknown environments. For instance,in references [13], [14], [15], [16] and [17] arepresented prototypes which use distance sensorsas inputs for the fuzzy logic controller. Anothercases of application are those with fuzzy logic aspart of the user interface to get instructions fromthe user (i.e. the flex sensor in [18], the voicecommands in [15] or the joystick operation modedescribed in [16]). Finally, other works use fuzzylogic for complementary tasks of the completesystem as pairing location patterns in a map or

controlling the speed of the wheelchair motors([19] and [20], respectively).

According to the review presented in Table1, the wheelchair performance is related withthree main aspects: the sensors employed,the processing core and the implementedmethodology. For the case of sensors, theyare used to get distance measurements fromobstacles. Ultrasonic sensors have been widelyused in prototypes because of their low cost andfast responses, however they have some noiseproblems, which can be improved with software.Another alternative is the infrared sensors (IR),but they are limited in distance and visible lightaffects their performance as presented in [15].Other systems use laser range finders, but theyare not as cheap as ultrasonic sensors [5]. Itis certainly true that a big number of sensorscomprises more environment information for thecontroller, but this outcomes in a more complexcontrol [16]. In those cases, if the processor islimited in resources the response will be slow.

The other aspect to consider is the processingcore. In Table 1, all projects were implementedusing microcontrollers or computers, and justone of them used real-time hardware to controlthe motors rotation speed [21]. In contrast,there are parallel architectures which allow datato access the resources at the same moment,and they guarantee the execution in a timeperiod. The real-time hardware, like Field GateProgrammable Array (FPGA) has proved to bevery efficient and reliable, and there are a lotof advantages about configuring a controller inthe FPGA instead of using a computer or anymicrocontroller [22].

Finally, in relation with the implementedalgorithm to avoid obstacles, the Mamdamimethodology is used in [14], [18], [15], [16], [17]and [23]. Mamdani is a predominant inferencetechnique for fuzzy logic controllers based onhuman experience. In all those prototypes, staticinputs are used to compute the output of thecontroller (static inputs mean current time data),however more information can be obtained fromthe past samples. That information is knownas dynamic, and can be used as extra inputsfor the controller to improve the whole systemperformance.

Page 4: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

128 Revista Mexicana de Ingeniería Biomédica · volumen 35 · número 2 · Agosto, 2014

Table 1. Main works developed using fuzzy logic for an Electric Wheelchair (EW)Ref. Description

[13] Two fuzzy controllers are used: one for joining a target specified by specifying an (x, y)coordinate and the other for avoiding obstacles.

[14] The fuzzy controller considers distance, presence and direction from the objects to decide ifit necessary to change the trajectory.

[18] It uses two fuzzy controllers, one to determine actions from the flex sensors and the other forobstacle avoidance based in ultrasonic sensors. Preference is given to the fingertip control ifobstacles are far and to the obstacle avoidance system if objects are close.

[15] It includes an obstacle avoidance control which uses IR sensors, as well as a contour followingcontrol. Both are fuzzy logic controllers.

[20] Utilizes FPGA technology in a wheelchair combined with a fuzzy logic control designed tomanipulate the rotation speed of the driving motors. It is not a navigation control.

[16] The fuzzy controller is based in the information given by eight sonar sensors and the joystick.Inference system is based in that information to control direction and speed of the wheelchair.

[19] The fuzzy control is focused on matching the position of a wheelchair in a sidewalk networkmap of an urban area, by using a GPS.

[17] The fuzzy logic controller is designed to alternate between manual and automatic navigationdepending of near obstacles. This assures the switching to be gradual. The automaticcontroller is also based in fuzzy logic to avoid obstacles.

[23] The controller is used to determine the operator orders by using a seat pressure sensor andbody movements as the interface. The inputs for the inference system are the x and y velocityand acceleration of human gravity center. The prototype includes omnidirectional wheels formoving in every direction.

This work proposes a dynamic fuzzy logiccontroller for an EW navigation system, whichutilizes only three ultrasonic sensors. Extrainformation is computed from the distancemeasurements as additional inputs for thecontroller in order to get better results.Implementation was done first in softwarerunning in Windows 7, and then in the FPGAchip embedded in a cRIO 9014 to guarantee dataprocessing in real time.

METHODOLOGY

The electric wheelchair structural design

The system described in this section is named as“The software implementation”. A commercialelectric wheelchair by Quickie, model P222-SE,was adapted with the hardware shown in Figure2. The NI USB-6211 is a data acquisition moduleused to generate the voltages that move the EWmotors. Two analog channels are used: onefor forward-backward movement and another for

steering left-right actions.In addition, three Parallax PING)))

ultrasonic sensors were installed in thewheelchair at different positions: front left(S1), front right (S2) and back (S3). Thegeneral information regarding the ultrasonicsensors is presented below (more informationin [24]). They detect objects by emitting ashort ultrasonic burst and then “listening” theecho. The sensors normally emits a short40 kHz burst under the operation of a hostdigital system (trigger pulse), for example amicrocontroller. This burst travels through theair, hits an object and then bounces back to thesensor. The PING))) sensor provides an outputpulse to the host that will terminate when theecho is detected, hence the width of this pulsecorresponds to the distance to the target. Theprinciple of operation of these sensors is shownin Figure 3.

The microcontroller block is a Basic Stamp2 (BS2-IC), a 20 MHz speed processor madeby Parallax. This microcontroller acquires data

Page 5: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

Rojas et al. Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 129

predominant inference technique for {\it fuzzy logic} controllers based on human experience. In all those prototypes, static inputs are used to compute the output of the controller (static inputs mean current time data), however more information can be obtained from the past samples. That information is known as dynamic, and can be used as extra inputs for the controller to improve the whole system performance. This work proposes a dynamic {\it fuzzy logic} controller for an EW navigation system, which utilizes only three ultrasonic sensors. Extra information is computed from the distance measurements as additional inputs for the controller in order to get better results. Implementation was done first in software running in Windows 7, and then in the FPGA chip embedded in a cRIO 9014 to guarantee data processing in real time.

METHODOLOGY The electric wheelchair structural design The system described in this section is named as “The software implementation”. A commercial electric wheelchair by Quickie, model P222-SE, was adapted with the hardware shown in Figure   2. The NI USB-6211 is a data acquisition module used to generate the voltages that move the EW motors. Two analog channels are used: one for forward-backward movement and another for steering left-right actions.

ComputerMicrocontroller

A01AO2

Serial port

Joystick

User Interface

NI-DAQ USB 6211

WheelchairQuickie P222-SE

Motors

PING)))Sensors

Figure  2.  Components  of  the  wheelchair  system  implemented  in  

LabVIEW      

In addition, three Parallax PING))) ultrasonic sensors were installed in the wheelchair at different positions: front left (S1), front right (S2) and back (S3). The general information regarding the ultrasonic sensors is presented below (more information in [24]). They detect objects by emitting a short ultrasonic burst and then "listening" the echo. The sensors normally emits a short 40 kHz burst under the operation of a host digital system (trigger pulse), for example a microcontroller. This burst travels through the air, hits

an object and then bounces back to the sensor. The PING))) sensor provides an output pulse to the host that will terminate when the echo is detected, hence the width of this pulse corresponds to the distance to the target. The principle of operation of these sensors is shown in Figure 3.

Figure  3.  Parallax  PING)))  ultrasonic  sensors  principle  of  

operation  described  in  their  manual  [33]  

The microcontroller block is a Basic Stamp 2 (BS2-IC), a 20 MHz speed processor made by Parallax. This microcontroller acquires data from the ultrasonic sensors, converts it into distance measurements and sends that information via serial communication to the interface hosted in a laptop. The microcontroller is configured to receive distance samples every 100 ms from the sensors. Finally, the interface to operate the electric wheelchair was programed in LabVIEW 2013. It receives distance data from the BS2-IC and sends voltage operation values to the acquisition module 6211. This interface allows the user to move the wheelchair with virtual controls and to observe the measured distances to objects (in centimeters). Furthermore, the {\it fuzzy logic} controller (FLC) was integrated to execute automatic actions based in those measurements.

Navigation scenarios analysis The wheelchair must move in any environment with static objects like walls, doors, hallways; and dynamic objects, which suddenly appear like a person walking. When an object is detected in the path, the controller computes which movement or steer action is going to be performed. It is desirable that in every configuration, the system should go forward in a straight route avoiding obstacles. In Figure 4 are presented four configurations to analyze how the system behaves, which inputs are considered and what actions are needed to do in every case. With this analyses is determined the rule base for the fuzzy

Figure 2. Components of the wheelchair systemimplemented in LabVIEW

predominant inference technique for {\it fuzzy logic} controllers based on human experience. In all those prototypes, static inputs are used to compute the output of the controller (static inputs mean current time data), however more information can be obtained from the past samples. That information is known as dynamic, and can be used as extra inputs for the controller to improve the whole system performance. This work proposes a dynamic {\it fuzzy logic} controller for an EW navigation system, which utilizes only three ultrasonic sensors. Extra information is computed from the distance measurements as additional inputs for the controller in order to get better results. Implementation was done first in software running in Windows 7, and then in the FPGA chip embedded in a cRIO 9014 to guarantee data processing in real time.

METHODOLOGY The electric wheelchair structural design The system described in this section is named as “The software implementation”. A commercial electric wheelchair by Quickie, model P222-SE, was adapted with the hardware shown in Figure   2. The NI USB-6211 is a data acquisition module used to generate the voltages that move the EW motors. Two analog channels are used: one for forward-backward movement and another for steering left-right actions.

ComputerMicrocontroller

A01AO2

Serial port

Joystick

User Interface

NI-DAQ USB 6211

WheelchairQuickie P222-SE

Motors

PING)))Sensors

Figure  2.  Components  of  the  wheelchair  system  implemented  in  

LabVIEW      

In addition, three Parallax PING))) ultrasonic sensors were installed in the wheelchair at different positions: front left (S1), front right (S2) and back (S3). The general information regarding the ultrasonic sensors is presented below (more information in [24]). They detect objects by emitting a short ultrasonic burst and then "listening" the echo. The sensors normally emits a short 40 kHz burst under the operation of a host digital system (trigger pulse), for example a microcontroller. This burst travels through the air, hits

an object and then bounces back to the sensor. The PING))) sensor provides an output pulse to the host that will terminate when the echo is detected, hence the width of this pulse corresponds to the distance to the target. The principle of operation of these sensors is shown in Figure 3.

Figure  3.  Parallax  PING)))  ultrasonic  sensors  principle  of  

operation  described  in  their  manual  [33]  

The microcontroller block is a Basic Stamp 2 (BS2-IC), a 20 MHz speed processor made by Parallax. This microcontroller acquires data from the ultrasonic sensors, converts it into distance measurements and sends that information via serial communication to the interface hosted in a laptop. The microcontroller is configured to receive distance samples every 100 ms from the sensors. Finally, the interface to operate the electric wheelchair was programed in LabVIEW 2013. It receives distance data from the BS2-IC and sends voltage operation values to the acquisition module 6211. This interface allows the user to move the wheelchair with virtual controls and to observe the measured distances to objects (in centimeters). Furthermore, the {\it fuzzy logic} controller (FLC) was integrated to execute automatic actions based in those measurements.

Navigation scenarios analysis The wheelchair must move in any environment with static objects like walls, doors, hallways; and dynamic objects, which suddenly appear like a person walking. When an object is detected in the path, the controller computes which movement or steer action is going to be performed. It is desirable that in every configuration, the system should go forward in a straight route avoiding obstacles. In Figure 4 are presented four configurations to analyze how the system behaves, which inputs are considered and what actions are needed to do in every case. With this analyses is determined the rule base for the fuzzy

Figure 3. Figure 3. Parallax PING))) ultrasonicsensors principle of operation described in theirmanual [33].

from the ultrasonic sensors, converts itinto distance measurements and sends thatinformation via serial communication to theinterface hosted in a laptop. The microcontrolleris configured to receive distance samples every100 ms from the sensors. Finally, the interface tooperate the electric wheelchair was programedin LabVIEW 2013. It receives distance datafrom the BS2-IC and sends voltage operationvalues to the acquisition module 6211. Thisinterface allows the user to move the wheelchairwith virtual controls and to observe themeasured distances to objects (in centimeters).Furthermore, the fuzzy logic controller (FLC)was integrated to execute automatic actionsbased in those measurements.

Navigation scenarios analysis

The wheelchair must move in any environmentwith static objects like walls, doors, hallways;and dynamic objects, which suddenly appearlike a person walking. When an object isdetected in the path, the controller computeswhich movement or steer action is going to

controller.

S1 S2

S3

S1 S2

S3

S2S1 S2S1

S2

a) b)

c) d)  Figure   4.   Navigation   scenarios   a)   static   obstacles,   b)   dynamic  obstacles,  c)  turning  corners,  d)  Straight  navigation.

The configuration indicated in Figure 4.a. shows the sensors S1, S2 and S3 blocked by objects at a distance considered “close”. Consequently, the action is to steer left or right to avoid the blocking object. The second scenario presented in Figure 4.b. shows dynamic and static obstacles moving either around the sensors S1 or S2. When an object appears suddenly, the EW must avoid crashing with it. The third configuration presented in Figure 4.c. shows if there is a steering action that must be carried out for a long time to turn over a corner (the blocked sensor stills in that same state until the corner is over). Finally, the last navigation case is a straightforward trajectory observed in Figure 4.d. It is desirable that the wheelchair moves in the middle of a hallway, and maintain same distance between left and right walls. {\it fuzzy logic} navigation strategies Three {\it fuzzy logic} controllers were designed after the analysis of the configurations. Figure   5 shows the strategies proposed for navigation. {\it Strategy-A}. It uses as inputs the distance measurements from left, right and back sensors. The idea is simple, when a sensor is blocked the controller calculates a direction to steer. Observe that these inputs are static because they are the current data taken from sensor. {\it Strategy-B}. It uses the same logic as in Strategy-A, but additionally it considers past samples from sensors S1 and S2 as inputs to detect dynamic objects. The inputs labeled as dS1/dt and dS2/dt are defined as

delayed data, thus s1 is the current distance and dS1/dt is the last past value obtained. In addition, this strategy uses as an input the arithmetic mean of 16 samples collected from steering past actions (D output) performed by the controller.

Strategy-AFuzzy Logic Controller D

MS1

S3S2

Strategy-BFuzzy Logic Controller

D

M

S1

S3S2

dS2dt

dS1dt

Y

dS1

dS2

Strategy-CFuzzy Logic Controller

D

M

S1

S3S2

dS2dt

S2-S1

dS1dt

S

dS1

dS2

Y

 Figure  5.  Fuzzy  controller  structures  designed  for  approaches  A,  B  and  C  

{\it Strategy-C}. This controller is based in the previous strategies, but it includes another input to make straighter trajectories. This input is obtained by subtracting S2 from S1. If this input is included, the EW tries to stay at the center of the path. 12 rules were proposed for this strategy, the next cases are described next:

• Rule 1, 2, 3. Left, right and back sensors are

completely blocked. • Rules 4, 5. Chair is blocked in one side, left

or right. • Rules 6, 7, 8. Chair is blocked in both sides

simultaneously • Rules 9, 10, 11. All sensors are in the “far”

set. • Rule 12. An object appears suddenly.

Figure 4. Navigation scenarios a) staticobstacles, b) dynamic obstacles, c) turningcorners, d) Straight navigation.

be performed. It is desirable that in everyconfiguration, the system should go forward ina straight route avoiding obstacles. In Figure 4are presented four configurations to analyze howthe system behaves, which inputs are consideredand what actions are needed to do in every case.With this analyses is determined the rule basefor the fuzzy controller.

The configuration indicated in Figure 4.a.shows the sensors S1, S2 and S3 blockedby objects at a distance considered “close”.Consequently, the action is to steer left or rightto avoid the blocking object. The second scenariopresented in Figure 4.b. shows dynamic andstatic obstacles moving either around the sensorsS1 or S2. When an object appears suddenly,the EW must avoid crashing with it. The thirdconfiguration presented in Figure 4.c. shows ifthere is a steering action that must be carriedout for a long time to turn over a corner (theblocked sensor stills in that same state until thecorner is over). Finally, the last navigation caseis a straightforward trajectory observed in Figure4.d. It is desirable that the wheelchair movesin the middle of a hallway, and maintain samedistance between left and right walls.

Page 6: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

130 Revista Mexicana de Ingeniería Biomédica · volumen 35 · número 2 · Agosto, 2014

Fuzzy logic navigation strategies

Three fuzzy logic controllers were designed afterthe analysis of the configurations. Figure 5 showsthe strategies proposed for navigation.Strategy-A. It uses as inputs the distancemeasurements from left, right and back sensors.The idea is simple, when a sensor is blocked thecontroller calculates a direction to steer. Observethat these inputs are static because they are thecurrent data taken from sensor.Strategy-B. It uses the same logic as in Strategy-A, but additionally it considers past samplesfrom sensors S1 and S2 as inputs to detectdynamic objects. The inputs labeled as dS1/dtand dS2/dt are defined as delayed data, thus s1 isthe current distance and dS1/dt is the last pastvalue obtained. In addition, this strategy usesas an input the arithmetic mean of 16 samplescollected from steering past actions (D output)performed by the controller.Strategy-C. This controller is based in theprevious strategies, but it includes another inputto make straighter trajectories. This input isobtained by subtracting S2 from S1. If this inputis included, the EW tries to stay at the centerof the path. 12 rules were proposed for thisstrategy, the next cases are described next:

• Rule 1, 2, 3. Left, right and back sensorsare completely blocked.

• Rules 4, 5. Chair is blocked in one side, leftor right.

• Rules 6, 7, 8. Chair is blocked in both sidessimultaneously

• Rules 9, 10, 11. All sensors are in the “far”set.

• Rule 12. An object appears suddenly.

The complete rule set is shown in Table 2.Variables are defined in terms of fuzzy sets

termed as:

S1, S2, S3 → C (Close), F (Far)

ds1, ds2 → GF (Getting far)

S → P (Positive), Z (Zero), N (Negative)

controller.

S1 S2

S3

S1 S2

S3

S2S1 S2S1

S2

a) b)

c) d)  Figure   4.   Navigation   scenarios   a)   static   obstacles,   b)   dynamic  obstacles,  c)  turning  corners,  d)  Straight  navigation.

The configuration indicated in Figure 4.a. shows the sensors S1, S2 and S3 blocked by objects at a distance considered “close”. Consequently, the action is to steer left or right to avoid the blocking object. The second scenario presented in Figure 4.b. shows dynamic and static obstacles moving either around the sensors S1 or S2. When an object appears suddenly, the EW must avoid crashing with it. The third configuration presented in Figure 4.c. shows if there is a steering action that must be carried out for a long time to turn over a corner (the blocked sensor stills in that same state until the corner is over). Finally, the last navigation case is a straightforward trajectory observed in Figure 4.d. It is desirable that the wheelchair moves in the middle of a hallway, and maintain same distance between left and right walls. {\it fuzzy logic} navigation strategies Three {\it fuzzy logic} controllers were designed after the analysis of the configurations. Figure   5 shows the strategies proposed for navigation. {\it Strategy-A}. It uses as inputs the distance measurements from left, right and back sensors. The idea is simple, when a sensor is blocked the controller calculates a direction to steer. Observe that these inputs are static because they are the current data taken from sensor. {\it Strategy-B}. It uses the same logic as in Strategy-A, but additionally it considers past samples from sensors S1 and S2 as inputs to detect dynamic objects. The inputs labeled as dS1/dt and dS2/dt are defined as

delayed data, thus s1 is the current distance and dS1/dt is the last past value obtained. In addition, this strategy uses as an input the arithmetic mean of 16 samples collected from steering past actions (D output) performed by the controller.

Strategy-AFuzzy Logic Controller D

MS1

S3S2

Strategy-BFuzzy Logic Controller

D

M

S1

S3S2

dS2dt

dS1dt

Y

dS1

dS2

Strategy-CFuzzy Logic Controller

D

M

S1

S3S2

dS2dt

S2-S1

dS1dt

S

dS1

dS2

Y

 Figure  5.  Fuzzy  controller  structures  designed  for  approaches  A,  B  and  C  

{\it Strategy-C}. This controller is based in the previous strategies, but it includes another input to make straighter trajectories. This input is obtained by subtracting S2 from S1. If this input is included, the EW tries to stay at the center of the path. 12 rules were proposed for this strategy, the next cases are described next:

• Rule 1, 2, 3. Left, right and back sensors are

completely blocked. • Rules 4, 5. Chair is blocked in one side, left

or right. • Rules 6, 7, 8. Chair is blocked in both sides

simultaneously • Rules 9, 10, 11. All sensors are in the “far”

set. • Rule 12. An object appears suddenly.

Figure 5. Fuzzy controller structures designedfor approaches A, B and C

M → N (Negative), MF (Medium Fast), B(Backward), F (Forward), MF (MiddleForward)

D → L (Left), ML (Medium Left), N(Negative), MR (Medium Right), R(Right)

Y → TR (Turning Right), TN (Turning Null),TL (Turning Left)

Input variables description

The fuzzy sets used for every variable aredescribed next:

Page 7: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

Rojas et al. Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 131

Table 2. The software implementation rule set (Strategy-C)1 s : N ∩ s1 : C ∩ s2 : C ∩ s3 : C ⇒M : N ∩D : N2 s : Z ∩ s1 : C ∩ s2 : C ∩ s3 : C ⇒M : N ∩D : N3 s : P ∩ s1 : C ∩ s2 : C ∩ s3 : C ⇒M : N ∩D : N4 s : N ∩ s1 : F ∩ s2 : C ⇒M : MF ∩D : L5 s : P ∩ s1 : C ∩ s2 : F ⇒M : MF ∩D : R6 s : N ∩ s1 : C ∩ s2 : C ∩ Y : TR⇒M : B ∩D : R7 s : Z ∩ s1 : C ∩ s2 : C ∩ Y : TN ⇒M : B ∩D : N8 s : P ∩ s1 : C ∩ s2 : C ∩ Y : TL⇒M : B ∩D : L9 s : N ∩ s1 : F ∩ s2 : F ⇒M : F ∩D : ML10 s : Z ∩ s1 : F ∩ s2 : F ⇒M : F ∩D : N11 s : P ∩ s1 : F ∩ s2 : F ⇒M : F ∩D : MR12 ds1 : GF ∪ ds2 : GF ⇒M : MF ∩D : NWhere ∩ = Tm = min(x, y).

The complete rule set is shown in Table 2. Table  2.  The  software  implementation  rule  set  (Strategy-­‐C)  

1 𝑠:𝑁 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐶 ⇒ 𝑀:𝑁 ⊓ 𝐷:𝑁 2 𝑠:𝑍 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐶 ⇒ 𝑀:𝑁 ⊓ 𝐷:𝑁 3 𝑠:𝑃 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐶 ⇒ 𝑀:𝑁 ⊓ 𝐷:𝑁 4 𝑠:𝑁 ⊓ 𝑠!:𝐹 ⊓ 𝑠!:𝐶 ⇒ 𝑀:𝑀𝐹 ⊓ 𝐷: 𝐿 5 𝑠:𝑃 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐹 ⇒ 𝑀:𝑀𝐹 ⊓ 𝐷:𝑅 6 𝑠:𝑁 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐶 ⊓ 𝑌:𝑇𝑅 ⇒ 𝑀:𝐵 ⊓ 𝐷:𝑅 7 𝑠:𝑍 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐶 ⊓ 𝑌:𝑇𝑁 ⇒ 𝑀:𝐵 ⊓ 𝐷:𝑁 8 𝑠:𝑃 ⊓ 𝑠!:𝐶 ⊓ 𝑠!:𝐶 ⊓ 𝑌:𝑇𝐿 ⇒ 𝑀:𝐵 ⊓ 𝐷: 𝐿 9 𝑠:𝑁 ⊓ 𝑠!:𝐹 ⊓ 𝑠!:𝐹 ⇒ 𝑀:𝐹 ⊓ 𝐷:𝑀𝐿 10 𝑠:𝑍 ⊓ 𝑠!:𝐹 ⊓ 𝑠!:𝐹 ⇒ 𝑀:𝐹 ⊓ 𝐷:𝑁 11 𝑠:𝑃 ⊓ 𝑠!:𝐹 ⊓ 𝑠!:𝐹 ⇒ 𝑀:𝐹 ⊓ 𝐷:𝑀𝑅 12 𝑑𝑠!:𝐺𝐹 ⊔ 𝑑𝑠!:𝐺𝐹 ⇒ 𝑀:𝑀𝐹 ⊓ 𝐷:𝑁

Where  ⊓= T! = min x, y . Variables are defined in terms of fuzzy sets termed as: S1, S2, S3 → C (Close), F (Far) ds1, ds2 → GF (Getting far) S → P (Positive), Z (Zero), N (Negative) M → N (Negative), MF (Medium Fast), B (Backward), F (Forward), MF (Middle Forward) D → L (Left), ML (Medium Left), N (Negative), MR (Medium Right), R (Right) Y → TR (Turning Right), TN (Turning Null), TL (Turning Left) Inputs variables description

The fuzzy sets used for every variable are described next: {\it Distance}. This variable is defined with two fuzzy sets: close (“C”) and far (“F”) and is specified for S1, S2 and S3 sensors. The distance range of these inputs was considered as much as necessary to avoid collisions as shown in Figure  6.a. {\it Distance differential}. These inputs were calculated from S1 and S2. The “dS1” and “dS2” inputs are defined by two fuzzy sets: getting fast (“GF”) and getting slow (“GS”). They are useful for the system to take decisions by considering the approaching of dynamic objects to the wheelchair. Membership functions of these inputs are presented in Figure  6.b.

020 30 40 5010

0.25

0.50.751.0

0

C  –  CloseF  –  Far

F

S1/S2/S3  [cm]

µ(S1/S2/S3)

040 60 80 10020

0.25

0.50.75

1.0

0

GS GF

dS1/dS2  [cm]

µ(dS1/dS2)

TNTL TR

a) b)

GS  –  Getting  SmallGF  –  Getting  Fast

N  –  NegativeZ  –  ZeroP  –  Positive

TL  –  Turning  LeftTN  –  Turning  NullTR  –  Turning  Right

C

05.7 5.8 5.9 6.55.5

0.25

0.50.751.0

5.2 Y[V]

µ(Y)

00 400

0.25

0.50.75

1.0

-­‐400

N Z

S  [cm]

µ(S)

c) d)

P

Figure  6.  Fuzzy  Input  definitions  and  memberships  functions  a)  distance,  b)  distance  differential,  c)  past  steering  action  and  d)  

sensor  difference.  

{\it Past steering action}. It is defined from the collected information about the past steering values that indicate an action performed for a long time. This input named “Y” is obtained from the “D” output and is defined with 3 membership functions as shown in Figure   6.c: turning left, turning null and turning right (“TL”, “TN” and “TR”, respectively). {\it Sensor difference}. It is obtained by subtracting S1 from S2 and determines if the wheelchair is deviating negatively, positively or zero (“N”, “P”, and “Z”). If the difference is negative, the wheelchair steers to the left side; if positive, steers to the right side of the reference. Membership functions are shown in Figure  6.d. Output variables description Output variables indicate the movement or steering action of the wheelchair: forward, backward, left or right. The obtained values are defuzzified into analog voltages. Figure  7 shows the sets definition for these outputs. Their ranges are adjusted to the functional voltages for moving the motors and they are not symmetrical. {\it Movement}. The “M” output corresponds to analog voltage channel 1, and it is defined by five fuzzy sets named Backward, Middle Backward, Null, Middle Forward and Forward (“B”, “MB”, “N”, “MF”, “F”). These five membership functions allow the system to go backward or forward in different speeds. {\it Direction}. This output (labelled as “D”) activates analog channel 2 and is defined by five sets named Left, Middle Left, Null, Middle Right, Right (“L”,“ML”,“N”, “MR”, “R”).

Figure 6. Fuzzy Input definitions and memberships functions a) distance, b) distance differential, c)past steering action and d) sensor difference.

Distance. This variable is defined with twofuzzy sets: close (“C”) and far (“F”) andis specified for S1, S2 and S3 sensors.The distance range of these inputs wasconsidered as much as necessary to avoidcollisions as shown in Figure 6.a.

Distance differential. These inputs werecalculated from S1 and S2. The “dS1”

and “dS2” inputs are defined by two fuzzysets: getting fast (“GF”) and gettingslow (“GS”). They are useful for thesystem to take decisions by consideringthe approaching of dynamic objects to thewheelchair. Membership functions of theseinputs are presented in Figure 6.b.

Page 8: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

132 Revista Mexicana de Ingeniería Biomédica · volumen 35 · número 2 · Agosto, 2014

0

MB

5.65.2

0.250.50.751.0

4.2

B N

M  [V]

µ(M)

6.24.3

a)

MF F

6.0

B  -­‐  BackwardMB  –  Middle  BackwardN  –  NullMF  –  Middle  ForwardF  -­‐  Forward

L  -­‐  LeftML  –  Middle  LeftN  –  NullMR  –  Middle  RightR  -­‐  Right

0

ML

6.05.5

0.250.50.751.0

4

L N

D  [V]

µ(D)

6.84.5

b)

NR R

6.5

 Figure   7.   Fuzzy   outputs   definition   a)   Movement,   b)   Direction  outputs

Static and dynamic fuzzy controllers Navigation circumstances presented above could be used to define static and dynamic {\it fuzzy logic} controllers. A static FLC operates with the current sensor data to obtain the outputs (Strategy-A), but a dynamic FLC considers current and past values from sensors to obtain the outputs (Strategies B and C). A study of a static controller behavior is presented below in order to see how the information from the past is not affecting the firing rules. It was used the proposed Strategy-C in this analysis.

The study case has the following conditions: there are objects blocking the sensors S1 and S2, approaching at different speeds from a distance considered far. This is illustrated in Figure  8.

If the controller has a set of fixed linguistic rules (as those in Table   2) and it is assumed that the rules (10, 9, 7 and 4) are affected for specific inputs. The firing strength graphs obtained in this case study are shown in Figure  9. The firing strength shows how the rules change according to the movement of the EW. The Speed response is presented in Figure   10.a. which shows actions executed. In the first configuration, distance registered in sensors S1 and S2 decrease at the same rate. In the velocity graph as the distance becomes small, forward speed is needed to slow down to avoid collision up to the moment it changes direction to backward. Meanwhile, in the angular velocity response no change in direction is registered. However, for the second response presented in Figure   10.b. corresponding to the other configuration, forward speed decreases slowly until it changes to backward when both sensors are completely blocked. Because S2 arrives first at the close region, a left angular velocity is registered.

object

S1 S2

S3

96 cm74 cm

4 cm

object

7 cm

object

S1 S2

S3

95 cm84 cm

3 cm

object

6 cm

 Figure   8.   Case   Study   regarding   the   configuration   when   both  sensors   change   values   (a)   at   same   speed   and   (b)   S1   changes  faster  than  S2

a)

b)

Figure  9.  Firing  strength  graphs  for  conditions  (a)  obstacles  moving  at  the  same  speed  (b)  obstacles  moving  at  the  different  speed

 

 

 

 

 

 

0

50

100

0204060801000

0.2

0.4

0.6

0.8

1

S1 [cm]

rule 7

rule 4

rule 9

S2 [cm]

rule 10

Firin

g St

reng

th

0

50

100

0

50

1000

0.2

0.4

0.6

0.8

1

rule 11

rule 10

S1 [cm]

rule 4

rule 9

S2 [cm]

Firin

g St

reng

th

Figure 7. Fuzzy outputs definition a) Movement, b) Direction outputs

Past steering action. It is defined fromthe collected information about the paststeering values that indicate an actionperformed for a long time. This inputnamed “Y” is obtained from the “D”output and is defined with 3 membershipfunctions as shown in Figure 6.c: turningleft, turning null and turning right (“TL”,“TN” and “TR”, respectively).

Sensor difference. It is obtained bysubtracting S1 from S2 and determinesif the wheelchair is deviating negatively,positively or zero (“N”, “P”, and “Z”). Ifthe difference is negative, the wheelchairsteers to the left side; if positive, steers tothe right side of the reference. Membershipfunctions are shown in Figure 6.d.

Output variables description

Output variables indicate the movement orsteering action of the wheelchair: forward,backward, left or right. The obtained valuesare defuzzified into analog voltages. Figure 7shows the sets definition for these outputs. Theirranges are adjusted to the functional voltages formoving the motors and they are not symmetrical.

Movement. The “M” output correspondsto analog voltage channel 1, and it isdefined by five fuzzy sets named Backward,Middle Backward, Null, Middle Forwardand Forward (“B”, “MB”, “N”, “MF”,“F”). These five membership functionsallow the system to go backward or forwardin different speeds.

Direction. This output (labelled as “D”)activates analog channel 2 and is defined

by five sets named Left, Middle Left, Null,Middle Right, Right (“L”, “ML”, “N”,“MR”, “R”).

Static and dynamic fuzzy controllers

Navigation circumstances presented above couldbe used to define static and dynamic fuzzylogic controllers. A static FLC operates withthe current sensor data to obtain the outputs(Strategy-A), but a dynamic FLC considerscurrent and past values from sensors to obtainthe outputs (Strategies B and C). A study of astatic controller behavior is presented below inorder to see how the information from the pastis not affecting the firing rules. It was used theproposed Strategy-C in this analysis.

The study case has the following conditions:there are objects blocking the sensors S1 and S2,approaching at different speeds from a distanceconsidered far. This is illustrated in Figure 8.

If the controller has a set of fixed linguisticrules (as those in Table 2) and it is assumed thatthe rules (10, 9, 7 and 4) are affected for specificinputs. The firing strength graphs obtained inthis case study are shown in Figure 9.

The firing strength shows how the ruleschange according to the movement of the EW.The Speed response is presented in Figure 10.a.which shows actions executed. In the firstconfiguration, distance registered in sensors S1and S2 decrease at the same rate. In the velocitygraph as the distance becomes small, forwardspeed is needed to slow down to avoid collision upto the moment it changes direction to backward.Meanwhile, in the angular velocity response nochange in direction is registered. However,for the second response presented in Figure

Page 9: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

R o j a s et al. N o v e l F u z z y L o g i c C o n t r o l l e r B a s e d o n T i m e D e l a y I n p u t s f o r a C o n v e n t i o n a l E l e c t r i c W h e e l c h a i r . 133

!

"#

$%&$%'

!%'$!%$!%($)%!

*%'

# +

",-./

µ0"1

&%'*%2

31

"4 4

&%!

#,5,#367839:"#,;,"<::=>,#367839:+,;,+?=="4,;,"<::=>,4@9839:4,5,4@9839:

A,5,A>BC"A,;,"<::=>,A>BC+,;,+?=="D,;,"<::=>,D<EFCD,5,D<EFC

!

"A

&%!$%$

!%'$!%$!%($)%!

*

A +

G,-./

µ0G1

&%H*%$

I1

+D D

&%$

!!"#$%&' Y)' !$--.' 0$2<$29' :&,"1"2"01' 4C' 60;&F&12R' 5C' Z"%&/2"01'0$2<$29

Static and dynamic fuzzy controllers Navigation circumstances presented above could be used to define static and dynamic {\it fuzzy logic} controllers. A static FLC operates with the current sensor data to obtain the outputs (Strategy-A), but a dynamic FLC considers current and past values from sensors to obtain the outputs (Strategies B and C). A study of a static controller behavior is presented below in order to see how the information from the past is not affecting the firing rules. It was used the proposed Strategy-C in this analysis.

The study case has the following conditions: there are objects blocking the sensors S1 and S2, approaching at different speeds from a distance considered far. This is illustrated in "#$%&'!5.

If the controller has a set of fixed linguistic rules (as those in )*+,'! -) and it is assumed that the rules (10, 9, 7 and 4) are affected for specific inputs. The firing strength graphs obtained in this case study are shown in "#$%&'!6. The firing strength shows how the rules change according to the movement of the EW. The Speed response is presented in "#$%&'! (7.a. which shows actions executed. In the first configuration, distance registered in sensors S1 and S2 decrease at the same rate. In the velocity graph as the distance becomes small, forward speed is needed to slow down to avoid collision up to the moment it changes direction to backward. Meanwhile, in the angular velocity response no change in direction is registered. However, for the second response presented in "#$%&'! (7.b. corresponding to the other configuration, forward speed decreases slowly until it changes to backward when both sensors are completely blocked. Because S2 arrives first at the close region, a left angular velocity is registered.

object

S1 S2

S3

96 cm74 cm

4 cm

object

7 cm

object

S1 S2

S3

95 cm84 cm

3 cm

object

6 cm

!!"#$%&' [)' E49&' S2$:.' %&#4%:"1#' 2+&' /01,"#$%42"01' 7+&1' 502+'9&190%9' /+41#&' ;43$&9' B4C' 42' 94F&' 9<&&:' 41:' B5C' S(' /+41#&9',492&%'2+41'SD

a)

b)

!"#$%&'\)'!"%"1#'92%&1#2+'#%4<+9',0%'/01:"2"019'B4C'05924/3&9'F0;"1#'42'2+&'94F&'9<&&:'B5C'05924/3&9'F0;"1#'42'2+&':",,&%&12'9<&&:

!

!

!

!

!

!

0

50

100

0204060801000

0.2

0.4

0.6

0.8

1

S1 [cm]

rule 7

rule 4

rule 9

S2 [cm]

rule 10

Firin

g St

reng

th

0

50

100

0

50

1000

0.2

0.4

0.6

0.8

1

rule 11

rule 10

S1 [cm]

rule 4

rule 9

S2 [cm]

Firin

g St

reng

th

Figu r e 8. Cas e St u dy r egar ding t he co nfi gu r at io nw hen bo t h s ens o r s change v alu es (a) at s ames p eed and (b) S1 changes fas t er t han S2.

!

"#

$%&$%'

!%'$!%$!%($)%!

*%'

# +

",-./

µ0"1

&%'*%2

31

"4 4

&%!

#,5,#367839:"#,;,"<::=>,#367839:+,;,+?=="4,;,"<::=>,4@9839:4,5,4@9839:

A,5,A>BC"A,;,"<::=>,A>BC+,;,+?=="D,;,"<::=>,D<EFCD,5,D<EFC

!

"A

&%!$%$

!%'$!%$!%($)%!

*

A +

G,-./

µ0G1

&%H*%$

I1

+D D

&%$

!!"#$%&' Y)' !$--.' 0$2<$29' :&,"1"2"01' 4C' 60;&F&12R' 5C' Z"%&/2"01'0$2<$29

Static and dynamic fuzzy controllers Navigation circumstances presented above could be used to define static and dynamic {\it fuzzy logic} controllers. A static FLC operates with the current sensor data to obtain the outputs (Strategy-A), but a dynamic FLC considers current and past values from sensors to obtain the outputs (Strategies B and C). A study of a static controller behavior is presented below in order to see how the information from the past is not affecting the firing rules. It was used the proposed Strategy-C in this analysis.

The study case has the following conditions: there are objects blocking the sensors S1 and S2, approaching at different speeds from a distance considered far. This is illustrated in "#$%&'!5.

If the controller has a set of fixed linguistic rules (as those in )*+,'! -) and it is assumed that the rules (10, 9, 7 and 4) are affected for specific inputs. The firing strength graphs obtained in this case study are shown in "#$%&'!6. The firing strength shows how the rules change according to the movement of the EW. The Speed response is presented in "#$%&'! (7.a. which shows actions executed. In the first configuration, distance registered in sensors S1 and S2 decrease at the same rate. In the velocity graph as the distance becomes small, forward speed is needed to slow down to avoid collision up to the moment it changes direction to backward. Meanwhile, in the angular velocity response no change in direction is registered. However, for the second response presented in "#$%&'! (7.b. corresponding to the other configuration, forward speed decreases slowly until it changes to backward when both sensors are completely blocked. Because S2 arrives first at the close region, a left angular velocity is registered.

object

S1 S2

S3

96 cm74 cm

4 cm

object

7 cm

object

S1 S2

S3

95 cm84 cm

3 cm

object

6 cm

!!"#$%&' [)' E49&' S2$:.' %&#4%:"1#' 2+&' /01,"#$%42"01' 7+&1' 502+'9&190%9' /+41#&' ;43$&9' B4C' 42' 94F&' 9<&&:' 41:' B5C' S(' /+41#&9',492&%'2+41'SD

a)

b)

!"#$%&'\)'!"%"1#'92%&1#2+'#%4<+9',0%'/01:"2"019'B4C'05924/3&9'F0;"1#'42'2+&'94F&'9<&&:'B5C'05924/3&9'F0;"1#'42'2+&':",,&%&12'9<&&:

!

!

!

!

!

!

0

50

100

0204060801000

0.2

0.4

0.6

0.8

1

S1 [cm]

rule 7

rule 4

rule 9

S2 [cm]

rule 10

Firin

g St

reng

th

0

50

100

0

50

1000

0.2

0.4

0.6

0.8

1

rule 11

rule 10

S1 [cm]

rule 4

rule 9

S2 [cm]

Firin

g St

reng

th

Figu r e 9. Fir ing s t r engt h gr ap hs fo r co ndit io ns(a) o bs t acles mo v ing at t he s ame s p eed (b)o bs t acles mo v ing at t he di� er ent s p eed.

a)

b)

!"#$%&' (])' *+&' ;&30/"2.' #%4<+9' ,0%' /01,"#$%42"019' B4C' 05924/3&9'F0;"1#'42'2+&'94F&'9<&&:'B5C'05924/3&9'F0;"1#'42':",,&%&12'9<&&:)'

The FPGA controller implementation In fact, the controllers implemented in software platform cannot operate under deterministic processing time [25]; hence, the processing cycles running on LabVIEW cannot be greater than milliseconds and the real time applications which need deterministic time do not use a software platform. For the EW application is very important to ensure that the system will execute without interruptions or possible operating system failures. In addition, it is necessary to have a very fast response because a person’s integrity depends on it. Hardware designed controllers can solve the mentioned drawbacks of the software implemented ones. Frequently, FPGAs are used because they are accessible in different locations as embedded systems, and because of their processing characteristics the speed range of nanoseconds can be reached for the operating cycles. If the FPGA is used, the information is processed inside the chip and the computer is required only for setting the initial conditions of the FCL, thus no operating system interruptions appear. Based in those advantages, it was proposed an alternative version of the system named as

“The hardware implementation” which components are shown in "#$%&'!((.

I/O interface

Computer

NI cRIO-9014

FPGA

Analog Output Module

Digital I/O Module

WheelchairQuickie P222-SE

Motors

PING)))Sensors

!!"#$%&'(()'E0F<01&129'0,'2+&'7+&&3/+4"%'9.92&F'"F<3&F&12&:'

"1'2+&'!KNU

It was used a NI Compact-RIO (c-RIO) 9014 to implement a deterministic real-time system. The c-RIO combines the real-time approach and reconfigurable FPGA technologies in the same device for embedded control, data acquisition and analysis. This device supports interchangeable modules for I/O to access data to the Spartan-3 Xilinx chip with 3 million equivalent gates, besides it integrates a 40MHz clock. In this hardware implementation the ultrasonic sensors are connected directly to the device, thus the processing time is reduced because it is not necessary a serial communication port as in the software system. For all these reasons, the hardware implementation is expected to provide better results. Only 2/4 analog output channels from the NI C-Series 9263 module and 6/8 high speed digital I/O from the NI 9401 C-Series module were used. DIO0-DIO3 were configured as digital inputs and DIO4-DIO7 as outputs. The interface uses a diode and a resistance to implement a bidirectional ultrasonic line in the NI 9401 module as shown in "#$%&'! (-. As explained with the microcontroller, the FPGA implementation sends a pulse to the ultrasonic sensor and waits to receive the response. It is used the same sampling time as in the software implementation: 100 ms. The 9263 analog output module is used for sending control voltage (channels AO0 and A01) to the wheelchair´s joystick, in the same way the NI-DAQ9611 does in the software implementation.

!"#$

%&'

() *+%

'+,#

'+,"

!-./

0,#

0#$

12334526789:75;73<=--->*?<@ABCD75;

EAFG65D<H+,<!#$"

$#<IJ<

!!"#$%&'(D)'Z"#"243'I^_'41:'41430#'0$2<$2'F0:$3&9'/01,"#$%42"01

0 1 2 3 4 5 6 7-100

-50

0

50

100

Velo

city

[%]

time [s]

Forward

Backward

0 1 2 3 4 5 6 7-100

-50

0

50

100

Angu

lar V

eloc

ity [%

]

time [s]

Left

Right

0 1 2 3 4 5 6 7 8 9-100

-50

0

50

100

Velo

city

[%]

time [s]

Forward

Backward

0 1 2 3 4 5 6 7 8 9-100

-50

0

50

100

Angu

lar V

eloc

ity [%

]

time [s]

Left

Right

Figu r e 10. The v elo cit y gr ap hs fo r co nfi gu r at io ns(a) o bs t acles mo v ing at t he s ame s p eed (b)o bs t acles mo v ing at di� er ent s p eed.

10.b. co r r es p o nding t o t he o t her co nfi gu r at io n,fo r w ar d s p eed decr eas es s lo w ly u nt il it changest o backw ar d w hen bo t h s ens o r s ar e co mp let elyblo cked. Becau s e S2 ar r iv es fi r s t at t he clo s er egio n, a left angu lar v elo cit y is r egis t er ed.

The FPGA controller implementation

In fact , t he co nt r o ller s imp lement ed in s o ft w ar ep lat fo r m canno t o p er at e u nder det er minis t icp r o ces s ing t ime [25]; hence, t he p r o ces s ing cy clesr u nning o n LabVIEW canno t be gr eat er t hanmillis eco nds and t he r eal t ime ap p licat io ns w hichneed det er minis t ic t ime do no t u s e a s o ft w ar ep lat fo r m.

Page 10: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

134 R e v i s t a M e x i c a n a d e I n g e n i e r í a B i o m é d i c a · v o l u m e n 35 · n ú m e r o 2 · A g o s t o , 20 14

a)

b)

!"#$%&' (])' *+&' ;&30/"2.' #%4<+9' ,0%' /01,"#$%42"019' B4C' 05924/3&9'F0;"1#'42'2+&'94F&'9<&&:'B5C'05924/3&9'F0;"1#'42':",,&%&12'9<&&:)'

The FPGA controller implementation In fact, the controllers implemented in software platform cannot operate under deterministic processing time [25]; hence, the processing cycles running on LabVIEW cannot be greater than milliseconds and the real time applications which need deterministic time do not use a software platform. For the EW application is very important to ensure that the system will execute without interruptions or possible operating system failures. In addition, it is necessary to have a very fast response because a person’s integrity depends on it. Hardware designed controllers can solve the mentioned drawbacks of the software implemented ones. Frequently, FPGAs are used because they are accessible in different locations as embedded systems, and because of their processing characteristics the speed range of nanoseconds can be reached for the operating cycles. If the FPGA is used, the information is processed inside the chip and the computer is required only for setting the initial conditions of the FCL, thus no operating system interruptions appear. Based in those advantages, it was proposed an alternative version of the system named as

“The hardware implementation” which components are shown in "#$%&'!((.

I/O interface

Computer

NI cRIO-9014

FPGA

Analog Output Module

Digital I/O Module

WheelchairQuickie P222-SE

Motors

PING)))Sensors

!!"#$%&'(()'E0F<01&129'0,'2+&'7+&&3/+4"%'9.92&F'"F<3&F&12&:'

"1'2+&'!KNU

It was used a NI Compact-RIO (c-RIO) 9014 to implement a deterministic real-time system. The c-RIO combines the real-time approach and reconfigurable FPGA technologies in the same device for embedded control, data acquisition and analysis. This device supports interchangeable modules for I/O to access data to the Spartan-3 Xilinx chip with 3 million equivalent gates, besides it integrates a 40MHz clock. In this hardware implementation the ultrasonic sensors are connected directly to the device, thus the processing time is reduced because it is not necessary a serial communication port as in the software system. For all these reasons, the hardware implementation is expected to provide better results. Only 2/4 analog output channels from the NI C-Series 9263 module and 6/8 high speed digital I/O from the NI 9401 C-Series module were used. DIO0-DIO3 were configured as digital inputs and DIO4-DIO7 as outputs. The interface uses a diode and a resistance to implement a bidirectional ultrasonic line in the NI 9401 module as shown in "#$%&'! (-. As explained with the microcontroller, the FPGA implementation sends a pulse to the ultrasonic sensor and waits to receive the response. It is used the same sampling time as in the software implementation: 100 ms. The 9263 analog output module is used for sending control voltage (channels AO0 and A01) to the wheelchair´s joystick, in the same way the NI-DAQ9611 does in the software implementation.

!"#$

%&'

() *+%

'+,#

'+,"

!-./

0,#

0#$

12334526789:75;73<=--->*?<@ABCD75;

EAFG65D<H+,<!#$"

$#<IJ<

!!"#$%&'(D)'Z"#"243'I^_'41:'41430#'0$2<$2'F0:$3&9'/01,"#$%42"01

0 1 2 3 4 5 6 7-100

-50

0

50

100

Velo

city

[%]

time [s]

Forward

Backward

0 1 2 3 4 5 6 7-100

-50

0

50

100

Angu

lar V

eloc

ity [%

]

time [s]

Left

Right

0 1 2 3 4 5 6 7 8 9-100

-50

0

50

100

Velo

city

[%]

time [s]

Forward

Backward

0 1 2 3 4 5 6 7 8 9-100

-50

0

50

100

Angu

lar V

eloc

ity [%

]

time [s]

Left

Right

Figu r e 11. Co mp o nent s o f t he w heelchair s y s t em imp lement ed in t he FPGA.

a)

b)

!"#$%&' (])' *+&' ;&30/"2.' #%4<+9' ,0%' /01,"#$%42"019' B4C' 05924/3&9'F0;"1#'42'2+&'94F&'9<&&:'B5C'05924/3&9'F0;"1#'42':",,&%&12'9<&&:)'

The FPGA controller implementation In fact, the controllers implemented in software platform cannot operate under deterministic processing time [25]; hence, the processing cycles running on LabVIEW cannot be greater than milliseconds and the real time applications which need deterministic time do not use a software platform. For the EW application is very important to ensure that the system will execute without interruptions or possible operating system failures. In addition, it is necessary to have a very fast response because a person’s integrity depends on it. Hardware designed controllers can solve the mentioned drawbacks of the software implemented ones. Frequently, FPGAs are used because they are accessible in different locations as embedded systems, and because of their processing characteristics the speed range of nanoseconds can be reached for the operating cycles. If the FPGA is used, the information is processed inside the chip and the computer is required only for setting the initial conditions of the FCL, thus no operating system interruptions appear. Based in those advantages, it was proposed an alternative version of the system named as

“The hardware implementation” which components are shown in "#$%&'!((.

I/O interface

Computer

NI cRIO-9014

FPGA

Analog Output Module

Digital I/O Module

WheelchairQuickie P222-SE

Motors

PING)))Sensors

!!"#$%&'(()'E0F<01&129'0,'2+&'7+&&3/+4"%'9.92&F'"F<3&F&12&:'

"1'2+&'!KNU

It was used a NI Compact-RIO (c-RIO) 9014 to implement a deterministic real-time system. The c-RIO combines the real-time approach and reconfigurable FPGA technologies in the same device for embedded control, data acquisition and analysis. This device supports interchangeable modules for I/O to access data to the Spartan-3 Xilinx chip with 3 million equivalent gates, besides it integrates a 40MHz clock. In this hardware implementation the ultrasonic sensors are connected directly to the device, thus the processing time is reduced because it is not necessary a serial communication port as in the software system. For all these reasons, the hardware implementation is expected to provide better results. Only 2/4 analog output channels from the NI C-Series 9263 module and 6/8 high speed digital I/O from the NI 9401 C-Series module were used. DIO0-DIO3 were configured as digital inputs and DIO4-DIO7 as outputs. The interface uses a diode and a resistance to implement a bidirectional ultrasonic line in the NI 9401 module as shown in "#$%&'! (-. As explained with the microcontroller, the FPGA implementation sends a pulse to the ultrasonic sensor and waits to receive the response. It is used the same sampling time as in the software implementation: 100 ms. The 9263 analog output module is used for sending control voltage (channels AO0 and A01) to the wheelchair´s joystick, in the same way the NI-DAQ9611 does in the software implementation.

!"#$

%&'

() *+%

'+,#

'+,"

!-./

0,#

0#$

12334526789:75;73<=--->*?<@ABCD75;

EAFG65D<H+,<!#$"

$#<IJ<

!!"#$%&'(D)'Z"#"243'I^_'41:'41430#'0$2<$2'F0:$3&9'/01,"#$%42"01

0 1 2 3 4 5 6 7-100

-50

0

50

100

Velo

city

[%]

time [s]

Forward

Backward

0 1 2 3 4 5 6 7-100

-50

0

50

100

Angu

lar V

eloc

ity [%

]

time [s]

Left

Right

0 1 2 3 4 5 6 7 8 9-100

-50

0

50

100

Velo

city

[%]

time [s]

Forward

Backward

0 1 2 3 4 5 6 7 8 9-100

-50

0

50

100

Angu

lar V

eloc

ity [%

]

time [s]

Left

Right

Figu r e 12. Digit al I/O and analo g o u t p u t mo du les co nfi gu r at io n.

Fo r t he EW ap p licat io n is v er y imp o r t antt o ens u r e t hat t he s y s t em w ill ex ecu t e w it ho u tint er r u p t io ns o r p o s s ible o p er at ing s y s t emfailu r es . In addit io n, it is neces s ar y t o hav e av er y fas t r es p o ns e becau s e a p er s o n’ s int egr it ydep ends o n it . Har dw ar e des igned co nt r o ller s cans o lv e t he ment io ned dr aw backs o f t he s o ft w ar eimp lement ed o nes . Fr eq u ent ly , FPGAs ar e u s edbecau s e t hey ar e acces s ible in di� er ent lo cat io nsas embedded s y s t ems , and becau s e o f t heirp r o ces s ing char act er is t ics t he s p eed r ange o fnano s eco nds can be r eached fo r t he o p er at ingcy cles . If t he FPGA is u s ed, t he info r mat io nis p r o ces s ed ins ide t he chip and t he co mp u t er is

r eq u ir ed o nly fo r s et t ing t he init ial co ndit io ns o ft he FCL, t hu s no o p er at ing s y s t em int er r u p t io nsap p ear . Bas ed in t ho s e adv ant ages , it w asp r o p o s ed an alt er nat iv e v er s io n o f t he s y s t emnamed as “ The har dw ar e imp lement at io n” w hichco mp o nent s ar e s ho w n in Figu r e 11.

It w as u s ed a NI Co mp act -RIO (c-RIO)9014 t o imp lement a det er minis t ic r eal-t imes y s t em. The c-RIO co mbines t he r eal-t imeap p r o ach and r eco nfi gu r able FPGA t echno lo giesin t he s ame dev ice fo r embedded co nt r o l,dat a acq u is it io n and analy s is . This dev ices u p p o r t s int er changeable mo du les fo r I/O t oacces s dat a t o t he Sp ar t an-3 Xilinx chip w it h 3

Page 11: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

Rojas et al. Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 135

3.72  m

1.86m 2.48  m

.82  m

End

Starting  position

.62  m

.55  m1.24  m

1.24  m

 Figure  13.  Maze  test  scenario

Control strategies test and validation A maze was designed for validating the proposed controllers under different navigation conditions; all the dimensions of the maze are presented in Figure  13. The target of the electric wheelchair is to navigate from the initial point to the final one without colliding against the walls. Notice that the scenario has right angle corners, and for security matters flexible walls were used. All the experiments were performed with the same start position. The strategies A, B, C implemented in software and Strategy-C implemented in hardware were tested in this maze.

RESULTS Software implementation For the software implementation, the FCL strategies were realized with the “PID and {\it fuzzy logic} Control toolkit” in LabVIEW 2013. The control was integrated to the LabVIEW interface as presented in the flux diagram shown in Figure  14.

start

Fuzzy control sets and rules

Configure serial port

Stop

Get distance

Mode

Fuzzy

Manual

Voltaje out

 Figure  14.  Flux  diagram  for  software  controller  implementation

In Figure  15 are presented the components assembly under the EW seat for the software implementation.

 Figure  15.  Installed  components  for  the  software  version  

The hardware implementation  

Apart from the software version, the hardware implementation is described. Tasks done by the real-time controller are indicated in Figure   16 and they were programmed in the LabVIEW FPGA toolkit. The sensors distance to objects are obtained and with those data other inputs are computed: dS1, dS2, S. Numerical values are normalized to fit the fixed point format used by the fuzzy controller for the decision making. Obtained outputs are de-normalized to fit useful voltages for the EW.

start

Get  distanceS1,  S2,  S3

Normalize  data

Compute  inputs  S,  dS1,  dS2

Fuzzy

Stop

Voltage  outNormalize  data

End    Figure  16.  {\it  fuzzy  logic}  controller  block  diagram  implemented  

in  the  FPGA.  

Figure 13. Maze test scenario.

million equivalent gates, besides it integrates a40MHz clock. In this hardware implementationthe ultrasonic sensors are connected directlyto the device, thus the processing timeis reduced because it is not necessary aserial communication port as in the softwaresystem. For all these reasons, the hardwareimplementation is expected to provide betterresults.

Only 2/4 analog output channels from theNI C-Series 9263 module and 6/8 high speeddigital I/O from the NI 9401 C-Series modulewere used. DIO0-DIO3 were configured as digitalinputs and DIO4-DIO7 as outputs. The interfaceuses a diode and a resistance to implementa bidirectional ultrasonic line in the NI 9401module as shown in Figure 12. As explained withthe microcontroller, the FPGA implementationsends a pulse to the ultrasonic sensor and waitsto receive the response. It is used the samesampling time as in the software implementation:100 ms. The 9263 analog output module isused for sending control voltage (channels AO0and A01) to the wheelchair’s joystick, in thesame way the NI-DAQ9611 does in the softwareimplementation.

Control strategies test and validation

A maze was designed for validating the proposedcontrollers under different navigation conditions;all the dimensions of the maze are presented inFigure 13. The target of the electric wheelchairis to navigate from the initial point to the finalone without colliding against the walls.

3.72

 m

1.86m 2.48  m

.82  m

End

Starting  position

.62  m

.55  m1.24  m

1.24  m

 Figure  13.  Maze  test  scenario

Control strategies test and validation A maze was designed for validating the proposed controllers under different navigation conditions; all the dimensions of the maze are presented in Figure  13. The target of the electric wheelchair is to navigate from the initial point to the final one without colliding against the walls. Notice that the scenario has right angle corners, and for security matters flexible walls were used. All the experiments were performed with the same start position. The strategies A, B, C implemented in software and Strategy-C implemented in hardware were tested in this maze.

RESULTS Software implementation For the software implementation, the FCL strategies were realized with the “PID and {\it fuzzy logic} Control toolkit” in LabVIEW 2013. The control was integrated to the LabVIEW interface as presented in the flux diagram shown in Figure  14.

start

Fuzzy control sets and rules

Configure serial port

Stop

Get distance

Mode

Fuzzy

Manual

Voltaje out

 Figure  14.  Flux  diagram  for  software  controller  implementation

In Figure  15 are presented the components assembly under the EW seat for the software implementation.

 Figure  15.  Installed  components  for  the  software  version  

The hardware implementation  

Apart from the software version, the hardware implementation is described. Tasks done by the real-time controller are indicated in Figure   16 and they were programmed in the LabVIEW FPGA toolkit. The sensors distance to objects are obtained and with those data other inputs are computed: dS1, dS2, S. Numerical values are normalized to fit the fixed point format used by the fuzzy controller for the decision making. Obtained outputs are de-normalized to fit useful voltages for the EW.

start

Get  distanceS1,  S2,  S3

Normalize  data

Compute  inputs  S,  dS1,  dS2

Fuzzy

Stop

Voltage  outNormalize  data

End    Figure  16.  {\it  fuzzy  logic}  controller  block  diagram  implemented  

in  the  FPGA.  

Figure 14. Flux diagram for software controller

implementation.

3.72  m

1.86m 2.48  m

.82  m

End

Starting  position

.62  m

.55  m1.24  m

1.24  m

 Figure  13.  Maze  test  scenario

Control strategies test and validation A maze was designed for validating the proposed controllers under different navigation conditions; all the dimensions of the maze are presented in Figure  13. The target of the electric wheelchair is to navigate from the initial point to the final one without colliding against the walls. Notice that the scenario has right angle corners, and for security matters flexible walls were used. All the experiments were performed with the same start position. The strategies A, B, C implemented in software and Strategy-C implemented in hardware were tested in this maze.

RESULTS Software implementation For the software implementation, the FCL strategies were realized with the “PID and {\it fuzzy logic} Control toolkit” in LabVIEW 2013. The control was integrated to the LabVIEW interface as presented in the flux diagram shown in Figure  14.

start

Fuzzy control sets and rules

Configure serial port

Stop

Get distance

Mode

Fuzzy

Manual

Voltaje out

 Figure  14.  Flux  diagram  for  software  controller  implementation

In Figure  15 are presented the components assembly under the EW seat for the software implementation.

 Figure  15.  Installed  components  for  the  software  version  

The hardware implementation  

Apart from the software version, the hardware implementation is described. Tasks done by the real-time controller are indicated in Figure   16 and they were programmed in the LabVIEW FPGA toolkit. The sensors distance to objects are obtained and with those data other inputs are computed: dS1, dS2, S. Numerical values are normalized to fit the fixed point format used by the fuzzy controller for the decision making. Obtained outputs are de-normalized to fit useful voltages for the EW.

start

Get  distanceS1,  S2,  S3

Normalize  data

Compute  inputs  S,  dS1,  dS2

Fuzzy

Stop

Voltage  outNormalize  data

End    Figure  16.  {\it  fuzzy  logic}  controller  block  diagram  implemented  

in  the  FPGA.  

Figure 15. Installed components for the softwareversion

Notice that the scenario has right anglecorners, and for security matters flexible wallswere used. All the experiments were performedwith the same start position. The strategiesA, B, C implemented in software and Strategy-C implemented in hardware were tested in thismaze.

RESULTS

Software implementation

For the software implementation, the FCLstrategies were realized with the “PID and fuzzy

Page 12: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

136 R e v i s t a M e x i c a n a d e I n g e n i e r í a B i o m é d i c a · v o l u m e n 35 · n ú m e r o 2 · A g o s t o , 20 14

!"#$

%&

'"()& $"*(%&

"($%&

+,-

./01/2,3%4562/25,

")$%&

"77%&'"$*%&

'"$*%&

!!"#$%&'(J)'64-&'2&92'9/&14%"0

Control strategies test and validation A maze was designed for validating the proposed controllers under different navigation conditions; all the dimensions of the maze are presented in "#$%&'!(8. The target of the electric wheelchair is to navigate from the initial point to the final one without colliding against the walls. Notice that the scenario has right angle corners, and for security matters flexible walls were used. All the experiments were performed with the same start position. The strategies A, B, C implemented in software and Strategy-C implemented in hardware were tested in this maze.

RESULTS Software implementation For the software implementation, the FCL strategies were realized with the “PID and {\it fuzzy logic} Control toolkit” in LabVIEW 2013. The control was integrated to the LabVIEW interface as presented in the flux diagram shown in "#$%&'!(/.

start

Fuzzy control sets and rules

Configure serial port

Stop

Get distance

Mode

Fuzzy

Manual

Voltaje out

!!"#$%&'(Q)'!3$L':"4#%4F',0%'90,274%&'/012%033&%'"F<3&F&1242"01

In "#$%&'!(2 are presented the components assembly under the EW seat for the software implementation.

!!"#$%&'(T)'I192433&:'/0F<01&129',0%'2+&'90,274%&';&%9"01'

The hardware implementation!

Apart from the software version, the hardware implementation is described. Tasks done by the real-time controller are indicated in "#$%&'! (3 and they were programmed in the LabVIEW FPGA toolkit. The sensors distance to objects are obtained and with those data other inputs are computed: dS1, dS2, S. Numerical values are normalized to fit the fixed point format used by the fuzzy controller for the decision making. Obtained outputs are de-normalized to fit useful voltages for the EW.

!"#$"

%&"'()!"#*+&,-.',/.',0

12$3#4)5&'(#"#

62378"&')*78"!',.'(,-.'(,/

9855:

,"27

;24"#<&'28"12$3#4)5&'(#"#

=*(' !!"#$%&'(X)'=>"2',$--.'30#"/?'/012%033&%'530/8':"4#%4F'"F<3&F&12&:'

"1'2+&'!KNU)'

Figu r e 16. fuzzy logic co nt r o ller blo ck diagr am

imp lement ed in t he FPGA.

lo gic Co nt r o l t o o lkit ” in LabVIEW 2013. Theco nt r o l w as int egr at ed t o t he LabVIEW int er faceas p r es ent ed in t he fl u x diagr am s ho w n in Figu r e14.

In Figu r e 15 ar e p r es ent ed t he co mp o nent sas s embly u nder t he EW s eat fo r t he s o ft w ar eimp lement at io n.

The hardware implementation

Ap ar t fr o m t he s o ft w ar e v er s io n, t he har dw ar eimp lement at io n is des cr ibed. Tas ks do ne by t her eal-t ime co nt r o ller ar e indicat ed in Figu r e 16and t hey w er e p r o gr ammed in t he LabVIEWFPGA t o o lkit . The s ens o r s dis t ance t o o bject sar e o bt ained and w it h t ho s e dat a o t her inp u t sar e co mp u t ed: dS1, dS2, S. Nu mer ical v alu esar e no r maliz ed t o fi t t he fi x ed p o int fo r mat u s edby t he fu z z y co nt r o ller fo r t he decis io n making.Obt ained o u t p u t s ar e de-no r maliz ed t o fi t u s efu lv o lt ages fo r t he EW.

Var iable Y is no t co ns ider ed becau s e Sv ar iable help s t he co nt r o ller t o ap p r o ach t hecu r v es bet t er . The r u le s et fo r t he FPGAimp lement at io n is s ho w n in Table 3.

Variable Y is not considered because S variable helps the controller to approach the curves better. The rule set for the FPGA implementation is shown in )*+,'!8. *453&'J)'*+&'!KNU'"F<3&F&1242"01'%$3&'9&2'

1 !!!! ! !!!! ! !!!! ! !!! ! !!! 2 !!! ! !!!! ! !!!! ! !!!! ! !! ! 3 !!! ! !!!! ! !!!! ! !!!" ! !!! 4 !!! ! !!!! ! !!!! ! !!! ! !!! 5 !!! ! !!!! ! !!!! ! !!! ! !!! 6 !!! ! !!!! ! !!!! ! !!! ! !! ! 7 !!! ! !!!! ! !!!! ! !!! ! !!!" 8 !!! ! !!!! ! !!!! ! !!! ! !!! 9 !!! ! !!!! ! !!!! ! !!! ! !!!" 10 !!!!!" ! !!!!!" ! !!!" ! !!!

In "#$%&'! (4 is presented the configured fuzzy controller code created on LabVIEW FPGA toolkit, constructed with fixed point operations and configured as hardware into the FPGA chip. There have been labeled five different parts: digital I/O port and line selection for sending/receiving data from ultrasonic sensors, normalization blocks to scale signals in useful ranges for the fuzzy controller, the fuzzy controller block (which contains the membership functions, the inference engine and the rules base), the output normalization blocks for values computed, and finally, the analog output channels selected to supply voltage for movement and steering actions between 4 and 7 volts. After the compilation into the FPGA, the consumed resources shown in the summary with this configuration is shown in the next table:

*453&'Q)'E019$F&:'%&90$%/&9'7"2+'2+&'9.92&F'

Functional Block Logo Total

slices Slice registers

Slice LUTs

T1 Wheelchair Control

NA 9794 9562 14888

Moreover, in "#$%&'! (5 is presented the c-RIO installation which is online with the PC in the hardware implementation. In figure "#$%&'! (6 is presented the complete wheelchair system.

!!"#$%&'([)'MI'E0F<4/2W`I_'"192433&:',0%'2+&'%&43W2"F&'9.92&F'

!!"#$%&'(Y)'=>"2',$--.'30#"/?'/0:&'<%0#%4FF&:'7"2+'G45HI@A'!KNU'20038"2 Figu r e 17. Fu z z y lo gic co de p r o gr ammed w it h LabVIEW FPGA t o o lkit .

Page 13: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

R o j a s et al. N o v e l F u z z y L o g i c C o n t r o l l e r B a s e d o n T i m e D e l a y I n p u t s f o r a C o n v e n t i o n a l E l e c t r i c W h e e l c h a i r . 137

Table 3. The FPGA imp lement at io n r u le s et1 s1 : C ∩ s2 : C ∩ s3 : C ⇒M : N ∩D : N2 s : N ∩ s1 : F ∩ s2 : C ⇒M : MF ∩D : L3 s : P ∩ s1 : C ∩ s2 : F ⇒M : MF ∩D : R4 s : N ∩ s1 : C ∩ s2 : C ⇒M : B ∩D : R5 s : Z ∩ s1 : C ∩ s2 : C ⇒M : B ∩D : N6 s : P ∩ s1 : C ∩ s2 : C ⇒M : B ∩D : L7 s : N ∩ s1 : F ∩ s2 : F ⇒M : F ∩D : ML8 s : Z ∩ s1 : F ∩ s2 : F ⇒M : F ∩D : N9 s : P ∩ s1 : F ∩ s2 : F ⇒M : F ∩D : MR10 ds1 : GF ∪ ds2 : GF ⇒M : MF ∩D : N

Table 4. Co ns u med r es o u r ces w it h t he s y s t emFu nct io nal Lo go To t al Slice SliceBlo ck s lices r egis t er s LUTsT1Wheelchair NA 9794 9562 14888Co nt r o l

Variable Y is not considered because S variable helps the controller to approach the curves better. The rule set for the FPGA implementation is shown in )*+,'!8. *453&'J)'*+&'!KNU'"F<3&F&1242"01'%$3&'9&2'

1 !!!! ! !!!! ! !!!! ! !!! ! !!! 2 !!! ! !!!! ! !!!! ! !!!! ! !! ! 3 !!! ! !!!! ! !!!! ! !!!" ! !!! 4 !!! ! !!!! ! !!!! ! !!! ! !!! 5 !!! ! !!!! ! !!!! ! !!! ! !!! 6 !!! ! !!!! ! !!!! ! !!! ! !! ! 7 !!! ! !!!! ! !!!! ! !!! ! !!!" 8 !!! ! !!!! ! !!!! ! !!! ! !!! 9 !!! ! !!!! ! !!!! ! !!! ! !!!" 10 !!!!!" ! !!!!!" ! !!!" ! !!!

In "#$%&'! (4 is presented the configured fuzzy controller code created on LabVIEW FPGA toolkit, constructed with fixed point operations and configured as hardware into the FPGA chip. There have been labeled five different parts: digital I/O port and line selection for sending/receiving data from ultrasonic sensors, normalization blocks to scale signals in useful ranges for the fuzzy controller, the fuzzy controller block (which contains the membership functions, the inference engine and the rules base), the output normalization blocks for values computed, and finally, the analog output channels selected to supply voltage for movement and steering actions between 4 and 7 volts. After the compilation into the FPGA, the consumed resources shown in the summary with this configuration is shown in the next table:

*453&'Q)'E019$F&:'%&90$%/&9'7"2+'2+&'9.92&F'

Functional Block Logo Total

slices Slice registers

Slice LUTs

T1 Wheelchair Control

NA 9794 9562 14888

Moreover, in "#$%&'! (5 is presented the c-RIO installation which is online with the PC in the hardware implementation. In figure "#$%&'! (6 is presented the complete wheelchair system.

!!"#$%&'([)'MI'E0F<4/2W`I_'"192433&:',0%'2+&'%&43W2"F&'9.92&F'

!!"#$%&'(Y)'=>"2',$--.'30#"/?'/0:&'<%0#%4FF&:'7"2+'G45HI@A'!KNU'20038"2

Figu r e 18. NI Co mp act -RIO ins t alled fo r t her eal-t ime s y s t em.

In Figu r e 17 is p r es ent ed t he co nfi gu r edfu z z y co nt r o ller co de cr eat ed o n LabVIEWFPGA t o o lkit , co ns t r u ct ed w it h fi x ed p o into p er at io ns and co nfi gu r ed as har dw ar e int ot he FPGA chip . Ther e hav e been labeledfi v e di� er ent p ar t s : digit al I/O p o r t andline s elect io n fo r s ending/r eceiv ing dat a fr o mu lt r as o nic s ens o r s , no r maliz at io n blo cks t o s cales ignals in u s efu l r anges fo r t he fu z z y co nt r o ller ,t he fu z z y co nt r o ller blo ck (w hich co nt ains t hemember s hip fu nct io ns , t he infer ence engine andt he r u les bas e), t he o u t p u t no r maliz at io n blo cksfo r v alu es co mp u t ed, and fi nally , t he analo g

'

!"#$%&' (\)' *+&' /0F<3&2&' 9.92&F)' !0%' 2+&' +4%:74%&'"F<3&F&1242"01R' 2+&'34<20<' "9'013.'$9&:',0%'9&22"1#'2+&'/012%033&%'"1"2"43'/01:"2"019'41:'20'%&#"92&%':424)'

The maze test validation for the software version The three strategies A, B, and C implemented in LabVIEW were tested, but only the third one was completely successful. "#$%&'!-7 presents the observed trajectories for the test. Images were taken from an upper view and because of that perspective some walls look wider. By using strategy-A, the wheelchair crashed four times as indicated with arrows in "#$%&'!-7.a. and it was very close to the left wall, however it finished the maze in 1.26 minutes. Strategy-B did not finish the maze because wheelchair got stocked in the first corner as can be observed in "#$%&'!-7.b. The third trajectory corresponds to strategy-C, which was completed in 1.10 minutes without colliding. Four zones are labelled in "#$%&'!-7.c. as “1”, “2”, “3” and “4” to analyze them. It seems that in the middle of the curve (zone 2) there was a collision, but it is only a perspective effect.

!*1!

!+1!

!91!

!"#$%&'D])'_524"1&:'2%4a&/20%"&9'"1'2&92'9/&14%"0)'Z029'%&<%&9&12'342&%43'9&190%'<09"2"01':$%"1#'2+&'%0$2&R'4C'S2%42&#.'UR'5C'

S2%42&#.'VR'/C'S2%42&#.'E'

!Software and hardware implementations "#$%&'! -( shows the results trajectories observed in the hardware and software implementations. It was compared the Strategy-C implemented in software and the strategy designed for the hardware in the maze test.

Figu r e 19. The co mp let e s y s t em. Fo r t hehar dw ar e imp lement at io n, t he lap t o p is o nlyu s ed fo r s et t ing t he co nt r o ller init ial co ndit io nsand t o r egis t er dat a.

o u t p u t channels s elect ed t o s u p p ly v o lt age fo rmo v ement and s t eer ing act io ns bet w een 4 and 7v o lt s . Aft er t he co mp ilat io n int o t he FPGA, t heco ns u med r es o u r ces s ho w n in t he s u mmar y w it ht his co nfi gu r at io n is s ho w n in Table 4.

Mo r eo v er , in Figu r e 18 is p r es ent ed t he c-RIO ins t allat io n w hich is o nline w it h t he PC int he har dw ar e imp lement at io n. In fi gu r e Figu r e19 is p r es ent ed t he co mp let e w heelchair s y s t em.

The maze test validation for the softwareversion

The t hr ee s t r at egies A, B, and C imp lement edin LabVIEW w er e t es t ed, bu t o nly t he t hir d o new as co mp let ely s u cces s fu l. Figu r e 20 p r es ent st he o bs er v ed t r aject o r ies fo r t he t es t . Imagesw er e t aken fr o m an u p p er v iew and becau s eo f t hat p er s p ect iv e s o me w alls lo o k w ider .

Page 14: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

138 Revista Mexicana de Ingeniería Biomédica · volumen 35 · número 2 · Agosto, 2014

 

Figure   19.   The   complete   system.   For   the   hardware  implementation,  the   laptop   is  only  used  for  setting  the  controller  initial  conditions  and  to  register  data.  

The maze test validation for the software version The three strategies A, B, and C implemented in LabVIEW were tested, but only the third one was completely successful. Figure  20 presents the observed trajectories for the test. Images were taken from an upper view and because of that perspective some walls look wider. By using strategy-A, the wheelchair crashed four times as indicated with arrows in Figure  20.a. and it was very close to the left wall, however it finished the maze in 1.26 minutes. Strategy-B did not finish the maze because wheelchair got stocked in the first corner as can be observed in Figure  20.b. The third trajectory corresponds to strategy-C, which was completed in 1.10 minutes without colliding. Four zones are labelled in Figure  20.c. as “1”, “2”, “3” and “4” to analyze them. It seems that in the middle of the curve (zone 2) there was a collision, but it is only a perspective effect.

 a)  

 b)  

 c)  

Figure  20.  Obtained  trajectories  in  test  scenario.  Dots  represent  lateral  sensor  position  during  the  route,  a)  Strategy  A,  b)  

Strategy  B,  c)  Strategy  C  

 Software and hardware implementations Figure   21 shows the results trajectories observed in the hardware and software implementations. It was compared the Strategy-C implemented in software and the strategy designed for the hardware in the maze test.

Figure 20. Obtained trajectories in test scenario.Dots represent lateral sensor position during theroute, a) Strategy A, b) Strategy B, c) StrategyC.

a

B

Figure  21.  Hardware  and  software  trajectory  tracking  comparison  for  the  Strategy-­‐C  using,  a)  Computer  device  b)  Compact-­‐RIO  

DISCUSSION Static and dynamic controllers comparative As presented in Figure  20, the Strategy-C was the only one that completed the maze without colliding. The differences between navigation strategies implemented and the considerations done about dynamic and static controllers are remarkable. A comparison between Strategy-A and Strategy C shows that the last one results more efficient in time. Further, as presented in Figure   20.c., in the zone labeled as “1” there were oscillations caused by the wheelchair approaching to the left wall and the controller action trying to correct its trajectory. In zone “2”, a continuous soft curve to turn is described contrasting the actions observed in strategy-A (Figure  20.a.), where it is notorious that for the same curve the steering actions are more complicated. In zone “3”, there are more oscillations caused by the slow response of the system processing data in software. When the computer takes a specific action at some time instant, another obstacles is detected by sensors. In addition, when the computer sends data to the motors they react after some time. This phenomenon is repeated several times until stabilizes. Finally, in zone “4” the trajectory stabilizes and only one abrupt controller correction is noted. Other differences between the observed trajectories are caused by the dynamic inputs considered in the Strategy-C, which are designed to help the controller in tasks as turning in a curve. For the static controller

implemented with Strategy-A, it is distinguished a “squared” turn, but for the same zone the dynamic controller uses data collected from past actions to make decisions. This paper does not show all the possible devices in which the controller could be deployed, but it analyzed the performance of the proposed controller in order to validate it. Normally, micro-controllers are chipper than FPGAs, so it is a very attractive possibility to implement this controller using micro-controllers. Comparative between real-time and software versions The hardware version describes smoother trajectories and continuous movements, which are better in contrast with the abrupt movements obtained with the software implementation. The uncertainties exhibited in the marked regions of Figure  21.a. do not occur in Figure  21.b. and the described curve is smoother. In this test, the measured time to complete the maze was 20 seconds, which is really fast compared to that obtained in software Strategies A and C (1.26 and 1.19 seconds, respectively). Those differences between both implementations are remarkable. It is explained because the hardware version uses a dedicated processor to acquire and process data that do not depend on any operating system. The target processor is networked to a host PC only for the graphical interface and data logging. In Table   5 is presented a comparison. Table  5.  Comparison  table  between  hardware  and  software  implementations  

Characteristic Software implementation

Hardware implementation

Trajectories Rough, abrupt Smooth, clean Operations cycle rate

500 ms 100 ms

Operative system

Windows 7 None

Sensors 3 ultrasonic Parallax PING)))

3 ultrasonic Parallax PING)))

Sensors sample time

100 ms 100 ms

Input acquisition device

Microcontroller BS2-IC @ 20MHz

9401 digital inputs module

Output acquisition device

NI USB 6211 9263 analog outputs module

Maze time consumed

1.19 sec 20 sec

Number of rules

12 10

Processor Intel Core @ 2.4 GHz Spartan-3 Xilinx @ 40 MHz

Data Serial TCP/IP (just for data

Figure 21. Hardware and software trajectorytracking comparison for the Strategy-C using, a)Computer device b) Compact-RIO.

By using strategy-A, the wheelchair crashed fourtimes as indicated with arrows in Figure 20.a.and it was very close to the left wall, howeverit finished the maze in 1.26 minutes. Strategy-Bdid not finish the maze because wheelchair gotstocked in the first corner as can be observed inFigure 20.b. The third trajectory corresponds tostrategy-C, which was completed in 1.10 minuteswithout colliding. Four zones are labelled inFigure 20.c. as “1”, “2”, “3” and “4” to analyzethem. It seems that in the middle of the curve(zone 2) there was a collision, but it is only aperspective effect.

Software and hardware implementations

Figure 21 shows the results trajectories observedin the hardware and software implementations.It was compared the Strategy-C implementedin software and the strategy designed for thehardware in the maze test.

Page 15: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

Rojas et al. Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 139

DISCUSSION

Static and dynamic controllerscomparative

As presented in Figure 20, the Strategy-C wasthe only one that completed the maze withoutcolliding. The differences between navigationstrategies implemented and the considerationsdone about dynamic and static controllers areremarkable. A comparison between Strategy-A and Strategy C shows that the last oneresults more efficient in time. Further, aspresented in Figure 20.c., in the zone labeledas “1” there were oscillations caused by thewheelchair approaching to the left wall and thecontroller action trying to correct its trajectory.In zone “2”, a continuous soft curve to turnis described contrasting the actions observed instrategy-A (Figure 20.a.), where it is notoriousthat for the same curve the steering actionsare more complicated. In zone “3”, there aremore oscillations caused by the slow response ofthe system processing data in software. Whenthe computer takes a specific action at sometime instant, another obstacles is detected bysensors. In addition, when the computer sendsdata to the motors they react after sometime. This phenomenon is repeated severaltimes until stabilizes. Finally, in zone “4”the trajectory stabilizes and only one abruptcontroller correction is noted.

Other differences between the observedtrajectories are caused by the dynamic inputsconsidered in the Strategy-C, which are designedto help the controller in tasks as turning in acurve. For the static controller implementedwith Strategy-A, it is distinguished a “squared”turn, but for the same zone the dynamiccontroller uses data collected from past actionsto make decisions. This paper does notshow all the possible devices in which thecontroller could be deployed, but it analyzed theperformance of the proposed controller in orderto validate it. Normally, micro-controllers arechipper than FPGAs, so it is a very attractivepossibility to implement this controller usingmicro-controllers.

Comparative between real-time andsoftware versions

The hardware version describes smoothertrajectories and continuous movements, whichare better in contrast with the abrupt movementsobtained with the software implementation. Theuncertainties exhibited in the marked regions ofFigure 21.a. do not occur in Figure 21.b. andthe described curve is smoother. In this test,the measured time to complete the maze was 20seconds, which is really fast compared to thatobtained in software Strategies A and C (1.26and 1.19 seconds, respectively).

Table 5. Comparison table between hardware and software implementationsCharacteristic Software Hardware

implementation implementation

Trajectories Rough, abrupt Smooth, cleanOperations cycle rate 500 ms 100 msOperative system Windows 7 None

Sensors 3 ultrasonic Parallax PING))) 3 ultrasonic Parallax PING)))Sensors sample time 100 ms 100 ms

Input acquisition device Microcontroller BS2-IC @ 20MHz 9401 digital inputs moduleOutput acquisition device NI USB 6211 9263 analog outputs module

Maze time consumed 1.19 sec 20 secNumber of rules 12 10

Processor Intel Core @ 2.4 GHz Spartan-3 Xilinx @ 40 MHzData Communication Serial TCP/IP

to the computer (just for data sharing)

Page 16: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

140 Revista Mexicana de Ingeniería Biomédica · volumen 35 · número 2 · Agosto, 2014

Those differences between both implementationsare remarkable. It is explained because thehardware version uses a dedicated processor toacquire and process data that do not depend onany operating system. The target processor isnetworked to a host PC only for the graphicalinterface and data logging. In Table 5 ispresented a comparison.

Sensors

As reviewed in the datasheet, the Tburst is 200 µsand the maximum echo return pulse is 18.5 msfor the maximum distance, tholdoff is 740 µs andtout is 2 µs. Consequently, the fastest time inthe process of measuring data is calculated as:

5µ+ 750µ+ 18.5ms = 19.255ms

This sample time is very slow even for thesoftware version, and it limits the controllerspeed response. The acquisition cycle for thesoftware and the hardware versions is fixed to100ms. However, in the software version distancedata is passed from the microcontroller by aserial communication to the computer and, aftercalculating the outputs, the numerical result goesto the 6211 module. This recurrent process(indicated in Figure 14.) consumes 500 ms.Meanwhile in the FPGA version, the analogousprocess indicated in Figure 16 consumes 101 ms.Since sampling time for acquiring distance is 100ms, then only 1.7 ms are used by the fuzzycontroller. Comparing consumed time in thehardware and software versions, it is remarkablethat FPGA is superior. Besides, the FPGAimplementation could process data faster butit is limited by the ultrasonic sensors responsespeed.

In order to work properly, the blockingobstacles must be in front of the sensors sightline to be detected because they are strictlydirectional. However, the use of the dynamicinputs increase their performance for avoidingstatic obstacles.

CONCLUSIONS

Novel dynamic fuzzy logic navigation strategieswere proposed and evaluated using an electricwheelchair. Although the ultrasonic sensorsprovide limited information regarding thenavigation environment, the fuzzy logiccontrollers work properly because the dynamicinformation (time delay inputs) about thenavigation system was included in the linguisticrules. The dynamic controllers do not change theconventional structure of a fuzzy logic controllerbut they modified the quality of the informationabout the navigation environment by addinginput with delays. The main goal of thiscontroller is to extend the input informationusing time delay signals, hence the controller isable to find the correct solution using limitedinput information.

Initially, a study of the navigationperformance on software of each controller waspresented in order to implement in real time thebest navigation controller. The implementationbased on hardware reaches excellent results andthe electric wheelchair movements are flatterthan movements implemented on software. Sincethe FPGA implementation of the dynamiccontroller shows reduction in time response, goodavoiding obstacles performance and less severmovements, this is the best option to implementa dynamic controller for an electric wheelchair.

One of the main limitations of the controllerare the blind points, caused by the number ofsonar sensors used (only two of them provideinformation about the forward navigation).Adding sensors could expand the informationfrom the environment of the actual prototype.Besides, it is a good idea to extract dynamicinputs from the new sensors. Although thedynamic controller increases the navigationperformance, the number of fuzzy rules andmembership functions will be more and thetuning process will be more complex. It isrecommended to use an optimization method,i.e. genetic algorithms. On the other hand,the electric wheelchair controller is not robustto noisy signals, so it is recommended to use anadaptive filter and sensor signal estimator.

Page 17: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

Rojas et al. Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 141

In order to have more information about thequantitative performance of the prototype, otherissues could be evaluated. For example: theconsumed time to solve alternatively mazes, thenecessary distances for detection between themobile objects and the wheelchair, the responseto materials and composition of different objectsand the behavior of the dynamic navigationstrategy in small space scenarios.

REFERENCES

1. World Health Organization, “World reporton disability”, The World Bank, 2011.

2. D. Ding and R. A. Cooper, “Electric-Powered Wheelchairs, A Review ofCurrent Technology and Insight intoFuture Direction”, IEEE Control SystemMagazine, vol. 25, no. 2, pp. 22-34, 2005.

3. C. Urdiales, Collaborative Assistive Robotfor Mobility Enhancement (CARMEN),Malaga: Springer , 2013.

4. R. C. Simpson, “Smart Wheelchairs:A literature review”, Journal ofRehabilitation Research & Development,vol. 42, no. 4, pp. 423-436, 2005.

5. P. Boucher, “Design and validationof an intelligent wheelchair towards aclinically-functional outcome”, Journal ofNeuroengineering and Rehabilitation, vol.10, 2013.

6. S. P. Levine, “The NavChair AssistiveWheelchair”, IEEE Transactions onRehabilitation Engineering, vol. 7, no. 4,1999.

7. L. Conde, G. Pires and U. Nunes, “Abehavior based fuzzy control architecturefor path tracking and obstacle avoidance”,in Proceedings of the 5th PortugueseConference on Automatic Control, 2002.

8. J. J. Slotine and L. W., Applied NonlinearControl, New Jersey: Prentice Hall, 1991.

9. L. Zadeh, "Fuzzy sets *," Information andControl, vol. 8, no. 3, p. 338-353, 1965.

10. H. A. Hagras, “A Hierarchical Type-2 fuzzylogic Control Architecture for AutonomousMobile Robots”, IEEE Transactions onFuzzy Systems, vol. 12, no 4, 2004.

11. S.-L. El-Teleity, “Fuzzy logic controlof an autonomous mobile robot”, deMethods and Models in Automation andRobotics (MMAR), 2011 16th InternationalConference on, Miedzyzdroje, 2011.

12. K. D. a. S. T. G.P. Moustris, “FeedbackEquivalence and Control of Mobile RobotsThrough a Scalable FPGA Architecture”,de Recent Advances in Mobile Robotics,InTech, 2011, pp. 401-426.

13. M. Njah and M. Jallouli, “WheelchairObstacle Avoidance Based on FuzzyController and Ultrasonic Sensors”, inInternational Conference on ComputerApplications Technology (ICCAT), Sousse,2013.

14. G. Liu, “Fuzzy Controller for ObstacleAvoidance in Electric Wheelchair withUltrasonic Sensors”, in InternationalSymposium on Computer Science andSociety, Kota Kinabalu, 2011.

15. G. Pires and U. Nunes, “A WheelchairSteered through Voice Commands andAssisted by a Reactive Fuzzy-LogicController. Journal of Intelligent andRobotic Systems”, Journal of Intelligentand Robotic Systems, vol. 34, no. 3, pp.301-314, 2002

16. H. R. Moslehi, “Design and Developmentof fuzzy logic Operated Smart MotorizedWheelchair”, in 24th Canadian Conferenceon Electrical and Computer Engineering(CCECE), Niagara Falls, Canada., 2011.

17. I. Spacapan, J. Kocijan and T. Bajd,“Simulation of fuzzy-logic-based intelligentwheelchair control system”. Journal ofIntelligent & Robotic Systems, vol. 39, no.2, pp. 227-241, 2004.

Page 18: Novel Fuzzy Logic Controller based on Time Delay Inputs ... · Novel Fuzzy Logic Controller Based on Time Delay Inputs for a Conventional Electric Wheelchair. 127 Fuzzification Rule

142 Revista Mexicana de Ingeniería Biomédica · volumen 35 · número 2 · Agosto, 2014

18. V. Tyagi, N. Gupta and P. Tyagi., “Smartwheelchair using fuzzy inference system”,in Global Humanitarian TechnologyConference: South Asia Satellite (GHTC-SAS), 2013.

19. M. Ren and K. H.A., “A fuzzy logic mapmatching for wheelchair navigation”, GPSsolutions, vol. 16, no. 3, pp. 273-282, 2012.

20. M. Poplawski and M. Bialko.,“Implementation of parallel fuzzy logiccontroller in FPGA circuit for guidingelectric wheelchair”, in Conference onHuman System Interactions, 2008.

21. P. Marek and M. Bialko, “Implementationof fuzzy logic Controller in FPGA Circuitfor Guiding Electric Wheelchair”, in 11thInternational Conference, ICAISC 2012,

Zakopane, Poland, 2012.

22. K. Parnell and R. Bryner, “Comparing andContrasting FPGA and MicroprocessorSystem Design and Development”, 21July 2004. [Online]. Available:http://www.xilinx.com/.

23. J. Songmin and e. al., “Multimodalintelligent wheelchair control basedon fuzzy algorithm”, in InternationalConference on Information andAutomation (ICIA), 2012.

24. Parallax Inc., “Product documentationfor the PING))) Ultrasonic DistanceSensor”, 11 9 2009. [En línea]. Available:http://www.parallax.com/sites/default/files/downloads/28015-PING-Documen-tation-v1.6.pdf.