Skip to content

tbs-ualberta/Fuzzy-Control-Smart-Walker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Fuzzy Control for Smart Walker

This repository contains an explanation of the implementation of a fuzzy control system for a smart walker. This repository is associated with our paper titled "Vision-Based Fuzzy Control System for Smart Walkers: Enhancing Usability for Stroke Survivors with Unilateral Upper Limb Impairments", accepted for presentation at the IEEE International Conference on Robotics and Automation (ICRA), Atlanta, USA, 2025.

The fuzzy controller enhances user intention detection, especially for individuals with unilateral upper limb impairments, providing an adaptive and intuitive control interface. By combining fuzzy logic for angular velocity control with a conventional admittance controller for linear motion, this system ensures smooth and responsive operation tailored to the user's needs.


Overview

Problem Statement

Traditional control systems for assistive devices often rely on direct force or torque inputs. However, users with impairments may find it difficult to provide consistent inputs, leading to unreliable operation. A fuzzy control system provides a robust alternative by using human-like reasoning to handle variability and noise in sensor inputs while enabling smooth and adaptive control actions.

System

Fuzzy Control Approach

This fuzzy controller uses two primary inputs to determine the angular velocity (steering) of the walker:

  1. Exerted Torque on the Handles (ty):
    • Linguistic Terms: Negative, Neutral, Positive
    • Represents the torque applied by the user on the walker handles.
  2. Shoulder Abduction Angle (rta in the code):
    • Linguistic Terms: Low, Middle, High
    • Indicates the user's intention to turn based on shoulder movement.

The output of the fuzzy controller is the angular velocity (steering), described by:

  • Sharp Right, Gentle Right, Go Straight, Gentle Left, Sharp Left

Features

  • Robustness to Noise: Gaussian membership functions handle variability in sensor readings.
  • Intuitive Rules: Fuzzy rules map user inputs to smooth and adaptive control actions.
  • Hybrid Control: Combines fuzzy logic for angular velocity with admittance control for linear motion.
  • Ease of Customization: Fuzzy rules and membership functions can be easily modified to suit individual users.

How It Works

Inputs and Outputs

  1. Inputs:

    • Torque on Handles (ty): Captured from an Axia80 force/torque sensor
    • Shoulder Abduction Angle (rta): Derived from a ZED2i camera.
  2. Output:

    • Angular Velocity: Command sent to the smart walker's motion controller.

Fuzzy Logic Flow

  1. Inputs are fuzzified into linguistic terms using Gaussian membership functions.
  2. A set of fuzzy rules determines the relationship between inputs and the desired output.
  3. Outputs are defuzzified into crisp values, providing angular velocity commands.

Block


Inputs and Topics

Subscribed Topics

  • /calibrated_wrench (geometry_msgs/WrenchStamped):
    Provides torque data from the force/torque sensor. Specifically, the torque in the y-direction is used as an input to the fuzzy controller.

  • /angles (std_msgs/Float32MultiArray):
    Provides the shoulder abduction angle. The second element in the array is used as the input to the fuzzy controller.

Published Topics

  • /mux/cmd_vel (geometry_msgs/Twist):
    Publishes velocity commands for the walker, including:
    • linear.x: Forward/backward motion based on the user's force inputs.
    • angular.z: Turning motion determined by the fuzzy controller.

Results

The fuzzy control system was tested in both simulated and real-world scenarios, showcasing the following results:

  1. Robust Performance:

    • The system handled noisy sensor inputs effectively, ensuring smooth operation even under variable input conditions.
  2. Intuitive Control:

    • Users with unilateral upper limb impairments reported improved usability due to the system's natural responsiveness to their movements.
  3. Smooth Steering:

    • The fuzzy controller's smooth transitions between angular velocity commands reduced jerky motions, enhancing user comfort and stability.

Example Rule Behavior:

  • If the shoulder abduction angle is High and the torque applied is Negative, the fuzzy controller interprets this as the intention to turn Sharp Right.

Output Range:

  • Angular velocity (angular.z) commands ranged between -90 to 90 degrees per second, enabling precise and adaptive turning.

Key Features of the Code

  • Fuzzy Membership Functions:

    • Gaussian membership functions were used for smoother transitions between fuzzy sets, improving noise handling and control accuracy.
    • Inputs:
      • Torque (ty): Right Torque, Neutral Torque, Left Torque.
      • Shoulder Abduction Angle (rta): Right Turn, Straight, Left Turn.
    • Output:
      • Steering (angular velocity): Sharp Right, Gentle Right, Go Straight, Gentle Left, Sharp Left.
  • Fuzzy Rules:

    • The controller operates on a predefined rule set that maps combinations of the two inputs to steering commands.
      For example:
      • Rule: If rta is "Straight" and ty is "Neutral Torque", then steering is "Go Straight".
  • Smoothing Algorithm:

    • Weighted averaging was applied to the velocity commands (linear.x, angular.z) to reduce jerky motions:
      ratio = 0.95
      cmd_vel_msg.angular.z = ratio * self.last_cmd_vel.angular.z + (1 - ratio) * cmd_vel_msg.angular.z

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published