Control of a robotic wheelchair

75  11  Download (0)

Full text

(1)

Univerza v Ljubljani

Fakulteta za elektrotehniko

Reza Barari Savadkouhi

Vodenje robotskega invalidskega vozička

Magistrsko delo

Mentor: prof. dr. Matjaž Mihelj

(2)

University of Ljubljana

Faculty of Electrical Engineering

Reza Barari Savadkouhi

Control of a Robotic Wheelchair

Master thesis

Mentor: prof. dr.

Matjaž Mihelj

(3)
(4)

iv

Acknowledgements

I would like to thank prof. dr. Matjaž Mihelj who provided insight and expertise that assisted me during the thesis and the whole project. Also, Laboratory of Robotics for all the help and support.

I'm also using this opportunity to express my appreciation to all members of the Team Avalanche including professors, professor assistants, and students who supported and contributed to the project.

(5)

v

Contents

1 Introduction 17

2 Kinematics and mechanics 22

2.1 Kinematics and mechanics of the wheels ...22

2.2 Kinematics and mechanics of the tracks ...23

2.2.1 Position of the tracks ...23

2.2.2 The tracks movement ...26

2.3 Kinematics and mechanics of the seat ...27

2.4 Joystick ...29 3 Control system 31 3.1 Beckhoff CX51x0 ...31 3.2 EtherCAT ...32 3.3 TwinCAT 3 ...32 3.4 EtherCAT terminals ...33

3.4.1 EL3068 - 8 channel 12bits analog input terminal ...33

3.4.2 EL1008 - 8 channel digital input terminal...34

3.4.3 EL2008 - 8 channel digital output terminal...35

3.4.4 EL7332, EL7342 - 2 channel DC motor output stage ...36

3.5 Beckhoff control concepts ...38

3.5.1 Control loop ...40

3.5.2 EL73x2 control system ...42

3.6 Roboteq MBL1660 controller...44

(6)

vi

4.1 Motion control sequence and function blocks ... 45

4.1.1 Motion control ... 45

4.1.2 Motion control function blocks ... 48

4.1.2.1 MC_Power ... 48 4.1.2.2 MC_MoveVelocity ... 49 4.1.2.3 MC_MoveAbsolute ... 49 4.1.2.4 MC_MoveRelative ... 50 4.1.2.5 MC_SetPosition ... 50 4.1.2.6 MC_Reset ... 50 4.1.2.7 MC_ReadActualPosition... 51 4.1.2.8 MC_ReadStatus... 51 4.2 Processing of joystick ... 52

4.3 Control of the four wheels ... 54

4.3.1 Four-wheel drive mode ... 56

4.3.2 Crab steering mode ... 57

4.3.3 Turn in place mode ... 57

4.4 Control of rubber tracks ... 58

4.4.1 Driving the tracks ... 58

4.4.2 Control of tracks positions ... 59

4.4.3 Control of four wheels in Track-mode ... 60

4.5 Control of driver’s seat ... 61

4.5.1 Calibration of the seat positioning motors ... 62

4.5.2 Control of seat positions ... 63

5 Safety and automatic movement 66 5.1 Sensors ... 66

(7)

vii

5.1.1 DT35 mid range distance sensors ...66

5.1.2 RPLIDAR A2 360° laser scanner ...67

5.2 Detecting obstacles and automatic backward ...69

5.2.1 Forward movement...69

5.2.2 Backward movement ...70

6 Conclusion 72

(8)

viii

List of Figures

Figure 1-1. Four-wheel robotic wheelchair with two tracks and joystick ... 18

Figure 1-2. Four-wheel steering mode ... 19

Figure 1-3. Crab steering mode ... 19

Figure 1-4. Turning in place mode ... 20

Figure 1-5. System of the tracks and tracks positioning ... 20

Figure 1-6. Overview states of controlling the robotic wheelchair ... 21

Figure 2-1. The motor can change the angle of the wheels ... 23

Figure 2-2. Location of motor and axis that is connected to the lever arm ... 24

Figure 2-3. One lever arm's joints ... 25

Figure 2-4. Position of the tracks when both arms getting close to the middle ... 25

Figure 2-5. Position of the tracks when both arms move away from the middle ... 26

Figure 2-6. Position of the tracks when both arms move in one direction ... 26

Figure 2-7.Track and its supporter ... 27

Figure 2-8. How motor drives a track ... 27

Figure 2-9. Kinematics of the seat ... 28

Figure 2-10. Different states of the seat. Bigger Ø and smaller d ... 29

Figure 2-11. Different states of the seat. Smaller Ø and larger d ... 29

Figure 2-12. The relation between joystick handle position and the velocity and the direction ... 30

Figure 3-1. Beckhoff CX51x0 series ... 32

Figure 3-2. EL3086 - 8 channel 12 bits AI module ... 34

Figure 3-3. EL1008 - 8 channel DI module ... 35

Figure 3-4. EL2008 - 8 channel DO module ... 36

Figure 3-5. EL7332 - 2 channel DC motor output stage - 24 V DC/1 A ... 37

Figure 3-6. EL7342 - 2 channel DC motor output stage 50 V DC/3.5 A ... 37

Figure 3-7. EtherCAT Master/Slave [13] ... 39

Figure 3-8. Standard axis control loop (servo drive) ... 40

Figure 3-9. Advanced axis control loop (servo drive) ... 42

Figure 3-10. Control of DC motor with travel distance control (position control in the terminal) ... 43

Figure 3-11. Control of a DC motor with encoder feedback ... 43

Figure 4-1. Behavior of an axis in different situations [21]... 46

Figure 4-2. Wheelchair's motion control and function blocks ... 48

(9)

ix

Figure 4-4. TwinCAT 3 MC_MoveVelocity function block [21] ... 49

Figure 4-5. TwinCAT 3 MC_MoveAbsolute function block [21] ... 49

Figure 4-6. TwinCAT 3 MC_MoveRelative function block [21] ... 50

Figure 4-7. TwinCAT 3 MC_SetPosition function block [21] ... 50

Figure 4-8. TwinCAT 3 MC_Reset function block [21] ... 51

Figure 4-9. TwinCAT 3 MC_ReadActualPosition function block [21] ... 51

Figure 4-10. TwinCAT 3 MC_ReadStatus function block [21] ... 52

Figure 4-11. Calculating the position of the joystick handle block diagram ... 53

Figure 4-12. States of controlling four wheels ... 54

Figure 4-13. Zero angle state of the wheels regarding the wheelchair body ... 55

Figure 4-14. Initialization states of control program to move a wheel to zero angle ... 55

Figure 4-15. Essential wheels states in Four-wheel drive mode ... 56

Figure 4-16. Possible wheels states in Crab steering mode ... 57

Figure 4-17. States of the wheels in the Turn in place mode ... 58

Figure 4-18. States of controlling two tracks ... 59

Figure 4-19. States of the tracks position controlling loop ... 60

Figure 4-20. States of the compliance wheels controlling ... 61

Figure 4-21. Linear motor's minimum and maximum indicators ... 62

Figure 4-22. States of the seat's calibration method ... 63

Figure 4-23. Seat positions ranges... 64

Figure 4-24. States of controlling of the seat's position ... 65

Figure 5-1. RPLIDAR System Composition [23] ... 68

Figure 5-2. RPLIDAR laser triangulation working schematic [23] ... 68

Figure 5-3. Safety program's states ... 70

Figure 5-4. States of automatic backward movement ... 71

Figure 6-1. Left: four-wheel drive – Right: crab steering ... 72

Figure 6-2. Left: turning in place – Right: stability on a ramp... 73

(10)
(11)

xi

List of Tables

Table 1. List of Symbols ... xiii

Table 3-1. EL3086 technical data [8] ... 34

Table 3-2. EL1008 technical data [9] ... 35

Table 3-3. EL2008 technical data [10] ... 36

Table 3-4. EL7332 and EL7342 technical data [12] ... 38

Table 3-5. Roboteq MBL 1660 technical data [20] ... 44

Table 5-1. DT35 Sick mid range distance laser sensor's specification and technical data [22] ... 67

(12)
(13)

xiii

List of Symbols

Symbol Description

PLC Programmable Logic Controller

I/O Input/Output

PC Personal Computer

IoT Internet of Things

LTSB Long Term Servicing Branch

CFast CompactFast

SD Secure Digital (memory card format)

UPS Universal Power Supply

USB Universal Serial Bus

DVI-I Digital Video Interface - Integrated

EtherCAT Ethernet for Control Automation Technology PCI Peripheral Component Interconnect

ARM Acorn RISC (Reduced Instruction Set Computer) Machines

IEC International Electrotechnical Commission

LED Light-Emitting Diode

DC Direct Current

PID Proportional Integral Derivative DAC Digital-to-Analog Converter

A/D Analog-to-Digital

2D Two-dimensional

Hz Unit of frequency

MB Megabyte

V Volt, unit for electric potential

mm Unit of length in the metric system: 0.001 of a meter

mA Milliampere: 0.001 of an Ampere ms Millisecond: 0.001 of a second

(14)
(15)

15

Abstract

Standard wheelchairs, also known as manual wheelchairs, are still the most commonly used type of wheelchair. However, they are limited to disabled people who can use their upper body to move and control the wheelchair or individuals who depend on the help of caregivers.

The powered wheelchair uses electrical motors. Disabled people who are incapable to self-propel a manual wheelchair can use powered wheelchairs. This technology is suitable for a broader range of people with physical impairment. Nevertheless, also powered wheelchairs still rely on the driver's response. The driver is responsible for detecting dangerous situations and avoiding obstacles.

Robotic wheelchairs use new technologies to extend the capabilities of powered wheelchairs by more intelligent control and navigation.

This document presents an approach for controlling a robotic wheelchair with safety features. A prototype of this wheelchair has been developed at the University of Ljubljana - Laboratory of Robotics and all methods described in this document were tested. Experiments demonstrate that the system can move in complex environments and that it can cross different types of obstacles. The wheelchair can be used by users who have varying degrees of limitations and disabilities in performing daily tasks with less dependency on caregivers or outside help.

(16)
(17)

17

1 Introduction

A wheelchair is a complex mechanical equipment to assist people who are unable to walk. The mechanical or manual wheelchair is operated by a person who can use their upper body or with others assistant. Wheelchairs are still the best devices to transport disabled people since its invention in 1595 by an unknown inventor for Phillip II of Spain [1]. And engineers and researchers try to improve its functionality and design to pass the limits with the new technologies.

The powered wheelchair (aka motorized wheelchair, electric-powered wheelchair) came as a new concept and helped to cover more people who suffer from mobility-impairments to rely on a wheelchair for their mobility needs. The powered wheelchair allows people with a motor problem, spinal injuries, and even amputation to be able to move around. Besides, the new generation of powered wheelchairs has unique features and methods to pass complex and challenging environments with minimum effort.

Although the powered wheelchair can assist a broader range of disabled people, it still needs user careful control combined with eye-tracking and fast response to prevent collisions and safe driving. Sometimes an assistant beside the wheelchair is necessary, which restricts the free movement of the disabled person.

In recent decades, researchers and engineers work on a newer concept called the smart wheelchair. The aim of designing a smart wheelchair is to create an intelligent device that can sense the environment and make a proper decision and prevent dangerous situations with fast response and automatically.

The idea of a robotic wheelchair comes with a sophisticated control algorithm that uses hi-tech materials and systems to create a state-of-art controllable vehicle. This robotic machine helps a disabled driver to control the wheelchair easily and safely.

(18)

1 Introduction

Furthermore, programmable controller that supports closed-loop control of external devices, like motors, helps programmers and designers to focus on extra safety features and functionality. These controllers take the responsibility of low-level programming and developer defines the high-level instruction using a programming interface.

The wheelchair discussed in this document is a four-wheel vehicle with different driving modes. It is also equipped with two auxiliary tracks for certain situations when wheels are not able to pass through.

The driver controls the movement of the wheelchair by the joystick installed on it. Several sensors provide additional safety features and automatic movement.

The combination of these features makes a modern and versatile controllable vehicle that moves in the different types of environments. Also, the driver controls it comfortably relying on several safety features provided on the wheelchair to drive it. Figure 1-1 shows the wheelchair which is described in this document.

Figure 1-1. Four-wheel robotic wheelchair with two tracks and joystick

It can move on its four wheels, and the driver can steer with a small turning radius by the joystick. Also, several additional driving modes on the four wheels are provided to move the wheelchair with the parallel wheels at a certain angle (crab steering mode) or rotate the wheelchair without changing its position to the left or right in environments with limited space (turn in place mode).

(19)

1 Introduction

19

Figure 1-2, Figure 1-3 and Figure 1-4 show different modes of driving this wheelchair.

Figure 1-2. Four-wheel steering mode

(20)

1 Introduction

Figure 1-4. Turning in place mode

The driver, by help of the tracks, passes more complex obstacles and environments like ramps or stairs. The ability to change the position and angle of the tracks is useful when the driver wants to go upstairs or downstairs safely. Figure 1-5 shows the wheelchair's tracks.

Figure 1-5. System of the tracks and tracks positioning

The wheelchair is equipped with a Beckhoff controller and several analog and digital inputs and outputs, also motion control modules to integrate all the necessary control aspects together in a simple programmable system.

(21)
(22)

2 Kinematics and mechanics

The idea of having a multi-functional wheelchair with complex movements needs a different design from a regular four-wheel wheelchair. The wheelchair discussed in this document has 14 degrees of freedom, and 14 motors are responsible for all necessary movements.

The advanced design of mechanical parts and joints helps the controller program to pass the driver's desired command to the right mechanical block of the wheelchair. A rotational joint, which is controlled by a motor, provides the steering of each wheel. Also, each wheel has its controllable in-wheel motor for translational movement. Two motors determine tracks position and each track has a motor for its translational movement. Two motors move the seat to the desired position.

In this section, the three main blocks of the mechanical design including the wheels, the tracks, and the seat are explained, and then the joystick as the primary control interface between the driver and the controller will be discussed.

2.1 Kinematics and mechanics of the wheels

The wheelchair is designed to be a mobile robot platform with four independent drive and steering wheels as its primary movement operation mode.

Therefore, even if one of the wheels gets stuck or stops, the remaining wheels can move the robot to the desired path. But, if one of the motors that steers stops working, it stops the wheelchair from going to the right direction. Each wheel needs two motors; one for driving, and one for steering. The in-wheel motors drive the wheels forward and backward. Figure 2-1 shows the combination of one wheel and its steering motor.

(23)

2 Kinematics and mechanics

23

Figure 2-1. The motor can change the angle of the wheels

The wheel is attached to an axis, and the steering motor can rotate this axis using a timing belt. Each wheel rotates separately and in different angles from the other wheels. The driver has numerous possible directions to choose.

2.2 Kinematics and mechanics of the tracks

The kinematics of the tracks can be discussed in two different topics; the position of the tracks and the translational movement of the wheelchair by using the tracks.

2.2.1 Position of the tracks

The wheelchair regularly uses the wheels to move, and the tracks are used in specific situations; like when the driver wants to drive the wheelchair on a ramp and the wheels are not suitable, or going upstairs and downstairs. For this reason, the position of the tracks is flexible, and the driver can change this position in different circumstances.

In a typical situation when the wheels move the wheelchair, the tracks are in their higher position and have the most distance from the surface. Two crossed levers on each side, totally four levers and two servo motors are responsible for the tracks positioning.

The position of servo motors is controlled by the Beckhoff EL7332 module and the PLC program. Each motor is equipped with an encoder that is also connected to the Beckhoff controller. The motors and the lever arms are parallel, and the new positions are transferred

(24)
(25)

2 Kinematics and mechanics

25

Figure 2-3. One lever arm's joints

The described structure makes the whole system versatile to work in various situations. Figure 2-3, Figure 2-4, and Figure 2-5 show how various lever arms replacements can change positions of the tracks.

(26)

2 Kinematics and mechanics

Figure 2-5. Position of the tracks when both arms move away from the middle

Figure 2-6. Position of the tracks when both arms move in one direction

2.2.2 The tracks movement

Two rubber tracks under the wheelchair can be used in situations that the wheels are not practical or it's hard to use them. Each track is installed on a supporter bar with pulleys on both sides. Figure 2-7 presents a supporter and a rubber track installed on it.

(27)
(28)
(29)
(30)
(31)

31

3 Control system

The control system consists of hardware and software. The control system in the robotic wheelchair is responsible for gathering data from analog and digital sensors, and for sending commands via analog and digital outputs to several units of the system.

The wheelchair, which is described in this document, is equipped with the Beckhoff control system. Beckhoff control hardware is a modular I/O bus, and PC and the software is a feature-rich programming tool for developing the control unit of the system.

This section describes several modules for acquiring digital input and analog input, communication, and sending digital output, which are used in the control system of the wheelchair. Motion controller modules of the control system are also explained in this section.

3.1 Beckhoff CX51x0

The Beckhoff embedded PCs are the combination of PC technology and modular I/O and communication boards. The CX device series combines the industrial PC and PLC hardware to perform control tasks. By adding or omitting units and interfaces, it covers a wide range of control technology and budget. Beckhoff introduces the CX51x0 Embedded PC, a full-fledged PC with the following basic configuration:

• CFast card slot, • MicroSD card slot,

• two independent Gbit Ethernet interfaces, • four USB 2.0 interfaces,

• and a DVI-I interface [2].

Microsoft Windows 10 IoT Enterprise LTSB, Microsoft Windows Embedded Standard 7 P or Microsoft Windows Embedded Compact 7 are suitable operating systems. The Embedded PC indicates an internal 1-second UPS as persistent data memory. In a power

(32)

3 Control system

failure event, the 1-second UPS can store up to 1 MB of persistent data on a CFast card or MicroSD card [2]. CX5130, which is used in this project, works based on the Intel® Atom™ multi-core processors. Four USB 2.0, two independent Gigabit-capable Ethernet interfaces, and one DVI-I interface are available [2]. Figure 3-1 shows a CX51x0 Embedded PC.

Figure 3-1. Beckhoff CX51x0 series

3.2 EtherCAT

EtherCAT (Ethernet for Control Automation Technology) is a high performance, easy to deploy, open application layer protocol for Ethernet applications. A unique principle called “processing on the fly” gives EtherCAT some unique advantages [3].

Besides, EtherCAT benefits from excellent infrastructure. Because EtherCAT messages are transferred before being processed in each node, EtherCAT operates at high speed and efficiency. Among other things, EtherCAT includes a safety protocol and multiple device profiles [3].

EtherCAT is integrated into Beckhoff components. The Beckhoff industrial PCs, the embedded PCs of the CX series, the control panels with control functionality, and the Ethernet PCI cards already offer inherent EtherCAT capability. The Beckhoff servo drives are also available with EtherCAT interface [4].

3.3 TwinCAT 3

The TwinCAT (The Windows Control and Automation Technology) software is the master application for EtherCAT and represents the core Beckhoff PC technology.

(33)

3 Control system

33

TwinCAT3 enables advanced PLC programming with object-oriented extensions, C++ and MATLAB®/Simulink® integration. The modular runtime can be used by a whole range of devices from small ARM chips up to advanced multi-core x86 processors [5]. TwinCAT can program a PLC in the standard IEC-1131 programming languages. It consists of three different programs [6]:

• System Manager: The central tool for the configuration of the TwinCAT System. The TwinCAT System Manager manages the inputs and outputs of the participating software tasks and the physical inputs and outputs of the connected fieldbuses. Additionally, the online values of the active configurations can be observed. The logical inputs and outputs are assigned to the physical I/O by logically linking variables of the software tasks and variables of the fieldbuses. • PLC Controller: TwinCAT PLC Control is a development environment for a PLC.

It allows the use of the editors and debugging functions on the advanced development programming languages environments.

• Scope View: An analysis tool providing a graphical display of the variables related to various PLC- and NC tasks.

3.4 EtherCAT terminals

The EtherCAT Terminal system is a modular I/O system consisting of electronic terminal blocks. An I/O station consists of an EtherCAT Coupler and almost limitless number of terminals [7]. The EtherCAT Coupler is the link between the EtherCAT network and the I/O Modules. Since up to 65,535 devices can be connected, the size of the network is almost unlimited [7]. Various EtherCAT Terminals are available for all standard digital and analog signal types encountered in the world of automation.

3.4.1 EL3068 - 8 channel 12bits analog input terminal

The EL3068 analog input terminals operate in the range between 0 and 10 V. The voltage is digitized to a resolution of 12 bits and is transmitted, electrically isolated, to the higher-level automation device. The power contacts are directly connected [8]. The EL3068 EtherCAT Terminal combines eight channels in one housing. The reference ground for the inputs is the 0 V power contact [8]. Figure 3-2 shows an EL3086 module.

(34)

3 Control system

Figure 3-2. EL3086 - 8 channel 12 bits AI module Table 3-1 shows technical data of EL3086.

Technical data EL3068

Number of inputs 8 (single-ended)

Power supply via the E-bus

Technology single-ended

Signal voltage 0…10 V

Conversion time 1.25 ms default setting, configurable

Resolution 12 bit (16-bit presentation, incl. sign)

Measuring error < ±0.3 % (relative to full scale value)

Electrical isolation 500 V (E-bus/signal voltage)

Current consumption E-bus typ. 130 mA

Bit width in the process image inputs: 32 byte

Table 3-1. EL3086 technical data [8]

3.4.2 EL1008 - 8 channel digital input terminal

The EL1008 digital input terminal collects the binary control signals from the process level and transmits them to the higher-level automation unit. Digital input terminals from the EL100x series have a 3ms input filter. The EtherCAT Terminals indicate their state via a LED [9]. Figure 3-3 shows an EL1008 module.

(35)

3 Control system

35

Figure 3-3. EL1008 - 8 channel DI module Table 3-2 shows technical data of EL1008.

Technical data EL1008

Specification EN 61131-2, type 1/3

Number of inputs 8

Nominal voltage 24 V DC (-15 %/+20 %)

“0“ signal voltage -3…+5 V (EN 61131-2, type 3)

“1“ signal voltage 15…30 V (EN 61131-2, type 3)

Input current typ. 3 mA (EN 61131-2, type 3)

Input filter typ. 3.0 ms

Current consumption power contacts typ. 2 mA + load

Electrical isolation 500 V (E-bus/field potential)

Bit width in the process image 8 inputs

Table 3-2. EL1008 technical data [9]

3.4.3 EL2008 - 8 channel digital output terminal

The EL2008 digital output terminal connects the binary control signals from the automation unit on to the actuators at the process level with electrical isolation. The EtherCAT Terminal indicates its signal state via a LED [10]. Figure 3-4 shows an EL2008 module.

(36)

3 Control system

Figure 3-4. EL2008 - 8 channel DO module Table 3-3 shows technical data of EL2008.

Technical data EL2008

Number of outputs 8

Rated load voltage 24 V DC (-15 %/+20 %)

Load type ohmic, inductive, lamp load

Max. output current 0.5 A (short-circuit-proof) per channel

Short circuit current typ. < 2 A

Reverse voltage protection yes

Breaking energy < 150 mJ/channel

Switching times typ. TON: 60 µs, typ. TOFF: 300 µs

Electrical isolation 500 V (E-bus/field potential)

Bit width in the process image 8 outputs

Table 3-3. EL2008 technical data [10]

3.4.4 EL7332, EL7342 - 2 channel DC motor output stage

A DC motor can be integrated into the control system using the EL7332 and EL7342 EtherCAT Terminals [11]. They enable direct operation of two DC motors. All parameters are adjustable via the fieldbus [12]. The output stages are protected against overload and short circuit and offer an integrated feedback system for incremental encoders on a case-by-case

(37)

3 Control system

37

basis. Two DC motors can be controlled by one DC motor output stage. The peak current may briefly significantly exceed the rated current and in this way makes the whole drive system very dynamic [11]. In such dynamic applications, negative acceleration causes the feedback of energy, which leads to voltage peaks at the power supply unit. If the voltage exceeds the capacity of the terminal, it gets rid of the excess energy via an external resistance [11]. Figure 3-5 and Figure 3-6 show EL7332 and EL7342 modules.

Figure 3-5. EL7332 - 2 channel DC motor output stage - 24 V DC/1 A

(38)

3 Control system

The EL7332 and EL7342 are galvanically isolated from the E-bus. The automation device specifies the speed or position via a 16-bit value. The output stage is protected against overload and short-circuit. The EtherCAT Terminal has two channels that indicate their signal state via LEDs which enable quick local diagnosis [12].

Table 3-4 shows the EL7332 and EL7342 technical data.

Technical data EL7332 EL7342

Technology direct motor connection direct motor connection

Number of outputs 2 2

Number of channels 2 DC motors, 2 digital inputs 2 DC motors, 2 digital inputs,

encoder input

Rated load voltage 24 V DC (-15 %/+20 %) 8…50 V DC

Load type DC brush motors, inductive DC brush motors, inductive

Nominal voltage 24 V DC (-15 %/+20 %) 8…50 V DC

Max. output current 2 x 1 A 2 x 3.5 A

Performance increase Yes, through ZB8610 fan cartridge Yes, through ZB8610 fan cartridge

output current with ZB8610 max. 3.0 A (overload- and

short-circuit-proof)

max. 6.5 A (overload- and short-circuit-proof)

PWM clock frequency 32 kHz with 180° phase shift each 32 kHz with 180° phase shift each

Duty factor 0…100 % (voltage-controlled) 0…100 % (voltage-controlled)

Electrical isolation 500 V (E-bus/field potential) 500 V (E-bus/field potential)

Bit width in the process image 2 x 16 bit status, 2 x 16 bit control,

2 x 16 bit output

2 x 32 bit status, 2 x 32 bit control, 2 x 32 bit input, 2 x 32 bit output

Distributed clocks yes yes

Control resolution max. 10 bits current, 16 bits speed max. 10 bits current, 16 bits speed

Table 3-4. EL7332 and EL7342 technical data [12]

3.5 Beckhoff control concepts

Servo motion control technology has been widely used in various automation fields [13], and with the passing of the traditional point-to-point motion control method, networked

(39)
(40)
(41)

3 Control system

41

as possible) and controllers for special axes (high/low speed axes, stepper motor, SERCOS) [17].

As is shown in Figure 3-8, three types of position controller are used: • Position controller P: tracking error proportional controller.

• Position controller with two P-constants: tracking error proportional controller with different constants for the stationary state and movement.

• Position controller PID: position PID-T1 controller with proportional acceleration feedforward.

In addition to the proportional feedback of the tracking error, almost all position controllers contain a proportional acceleration feedforward (the �factor). This should normally only be used together with the proportional component (� factor) of the position controller [17].

The axis must be adjusted for strict symmetry in acceleration feedforward control, and the stages are:

• in stationary state, the tracking error is symmetrical about 0 with automatic DAC offset adjustment (Any controller with no I component has automatic DAC offset adjustment as an option. When the velocity feedforward of the axis falls down below a specified magnitude, DAC offset adjustment is active. Defined limitation in this adjustment prevents the effect of the dynamic behavior of the axis.).

• when moving steadily the tracking error is symmetrical about 0 using reference velocity (The reference velocity is an option to set, and compares with physical velocity of axis motion).

• and set ��.

• measure the extreme value of the acceleration (deceleration) �+ �� (�− ��), and

the associated tracking error + �� ( − �� ) in the middle of the accelerating/braking phase. • Then ��: ��+ = ���+���+��� ��− = ���−��� −��� ( 3-1) �� =��++�2 �−

(42)
(43)
(44)

3 Control system

3.6 Roboteq MBL1660 controller

Roboteq’s MBL1660 is a high-current controller for hall-sensor equipped brushless DC motors. The controller uses the Hall sensor or encoder input information to compute speed and measure traveled distance inside a 32-bit counter. The motor may be operated in open or closed loop speed mode.

The operation of the controller can be automated and customized using Basic Language scripts. Table 3-5 shows MBL 1660 technical data.

Technical Data MBL1660

Motor Type Brushless DC

Max Voltage 60

Number of Channels 1

Max Amps per Channel 120

Analog Yes

RS232 Yes

USB Yes

CANbus Yes

MicroBasic Scripting Yes

Control Loop (ms) 1ms

Max Analog Inputs 4

Max Digital Inputs 6

Digital Outputs 2

Max Pulse Inputs 5

Encoder Yes

Table 3-5. Roboteq MBL 1660 technical data [20]

MBL1660 is used for the steering wheel control, and the motor's encoder is the input of the controller. It is connected to the Beckhoff controller via CAN communication.

(45)

45

4 Control of the wheelchair

All elements of the control system of the wheelchair are described in previous sections. This section is about how to use those elements and how to program the controller.

The first part of this section is about the software blocks that are used in the control algorithm. Then the design algorithm of all features of the wheelchair will be discussed.

4.1 Motion control sequence and function blocks

TwinCAT3 is developed in line with the IEC 61131-3 standard, and a Project in it contains a PLC program composed of various programming objects, called POU (Programming Organization Unit), which refers to programs, functions, function blocks, methods, etc.

To control a motor, in TwinCAT, axis component is defined. TwinCAT can send several commands via this object to a motor and programmer uses pre-defined function blocks to program it.

A function block is a POU, which provides one or more values during the processing of a PLC program. A function returns the result and removes all internal variables and memory blocks it has occupied, but all internal variables and the value of output remain from one execution of the function block to the next.

Although, Beckhoff controller supports multi-tasking and different tasks run simultaneously in a program, when it comes to controlling an axis, the basic rule is that commands are processed sequentially.

4.1.1 Motion control

The state diagram in Figure 4-1 shows the behavior of an axis and the motion control function blocks related to each state. The states are sequential and calling a function block changes the axis state immediately.

(46)

4 Control of the wheelchair

(47)

4 Control of the wheelchair

47

Note 1 - From any state in which an error occurs

Note 2 - From any state if MC_Power.Enable = FALSE and the axis has no error Note 3 - MC_Reset and MC_Power.Status = FALSE

Note 4 - MC_Reset and MC_Power.Status = TRUE and MC_Power.Enable = TRUE Note 5 - MC_Power.Status = TRUE and MC_Power.Enable = TRUE

Note 6 - MC_Stop.Done = TRUE and MC_Stop.Execute = FALSE

This group of function blocks is called motion commands and starts with 'MC_'. The default state of an axis is Disabled and by calling MC_Power, the axis changes to state

Standstill or ErrorStop. The velocity control or position control is the next step depending on

the use of the motor which happen by calling related motion command.

Both position control and velocity control are useful in the wheelchair. To move the wheelchair forward and backward (four wheels or tracks use the same control concepts), the program sends velocity to the motor calculated based on several inputs like the joystick. But controlling the steering motors relies on the calculated position. Figure 4-2 shows the control states of each axis and related function blocks.

(48)
(49)

4 Control of the wheelchair

49

Figure 4-3. TwinCAT 3 MC_Power function block [21]

4.1.2.2 MC_MoveVelocity

MC_MoveVelocity starts a continuous movement with specified velocity and direction. Once constant velocity has been reached, the function block is complete, and no further monitoring of the movement takes place, and the movement can be stopped through a stop command [21]. Figure 4-4 shows a MC_MoveVelocity function block and its inputs and outputs.

Figure 4-4. TwinCAT 3 MC_MoveVelocity function block [21]

4.1.2.3 MC_MoveAbsolute

MC_MoveAbsolute starts positioning to an absolute target position and monitors the axis movement over the whole travel path. Once the target position has been reached the output will be status Done [21]. Figure 4-5 shows a MC_MoveAbsolute function block and its inputs and outputs.

(50)

4 Control of the wheelchair

4.1.2.4 MC_MoveRelative

MC_MoveRelative starts a relative positioning procedure based on the current set position and monitors the axis movement over the whole travel path. Once the target position has been reached the output will be status Done [21]. Figure 4-6 shows a MC_MoveRelative function block and its inputs and outputs.

Figure 4-6. TwinCAT 3 MC_MoveRelative function block [21]

4.1.2.5 MC_SetPosition

MC_SetPosition sets the current axis position to a parameterizable value.

In absolute mode, the actual position is set to the parameterized absolute Position value. In relative mode, the actual position is offset by the parameterized Position value. In both cases, the set position of the axis is set in such way that any tracking error that may exist is retained. Relative mode can be used to change the axis position during the motion [21]. Figure 4-7 shows a MC_SetPosition function block and its inputs and outputs.

Figure 4-7. TwinCAT 3 MC_SetPosition function block [21]

4.1.2.6 MC_Reset

MC_Reset takes an axis from the Errorstop state to the Standstill state and discards all axis errors. Calling up MC_Reset does not influence the outputs of the other function blocks [21]. Figure 4-8 shows a MC_Reset function block and its inputs and outputs.

(51)

4 Control of the wheelchair

51

Figure 4-8. TwinCAT 3 MC_Reset function block [21]

4.1.2.7 MC_ReadActualPosition

MC_ReadActualPosition returns actual value of position of a connected axis on the output. The output is valid only if the block is enabled by the logical input signal Enable. In case no absolute position encoder is used or the internal position is set in other way, output may display different value [21]. Figure 4-9 shows a MC_ReadActualPosition function block and its inputs and outputs.

Figure 4-9. TwinCAT 3 MC_ReadActualPosition function block [21]

4.1.2.8 MC_ReadStatus

MC_ReadStatus determines the current operating state of an axis. The operating state only has to be read once at the start of each PLC cycle and can then be accessed via Axis.Status. Also, the operating state of an axis can be updated at the beginning of a PLC cycle by calling up Axis.ReadStatus [21]. Figure 4-10 shows a MC_ReadStatus function block and its inputs and outputs.

(52)

4 Control of the wheelchair

Figure 4-10. TwinCAT 3 MC_ReadStatus function block [21]

4.2 Processing of joystick

The primary measurement devices inside the joystick are potentiometers and an A/D converter digitizes these analog values. Since potentiometer is not an accurate device, A/D converter also converts the noise added to the main value of the joystick handle position. Advanced joysticks have internal filters to solve this problem, but with the simple joystick that is used on the wheelchair, software is responsible for solving this issue. Besides, the handle is connected to springs which cause bounces, when the driver moves the handle. These are reasons not to use the raw value of the controller's analog input in the program. Figure 4-11 shows the block diagram of the states to filter and find the current position of the joystick before using the analog input value in the program.

(53)
(54)
(55)
(56)
(57)
(58)
(59)
(60)
(61)
(62)
(63)
(64)
(65)
(66)

5 Safety and automatic movement

A more complex and featured robotic wheelchair has additional ability to interact with the environment and react faster than the driver in an unsafe situation. It needs more complex control algorithm and extra data that are provided by additional sensors.

The robotic wheelchair can stop the vehicle predicting a crash with an obstacle on route. Meanwhile, the ability to go backward automatically makes it a richer-featured robotic device especially for the drivers with spinal problems.

5.1 Sensors

When the driver controls the wheelchair, the program receives commands from the driver and conditions of internal devices like encoders to control the movements of the wheelchair. Safety features and automatic movement need more information about the surroundings to control the wheelchair. Different sensors in the robotic devices are responsible for collecting information about the surrounding area around the robot. In the wheelchair, two laser distance sensors installed on the rear side and one rangefinder in front of the vehicle provide input data for the control program.

5.1.1 DT35 mid range distance sensors

The Sick DT35 is a member of Dx35 distance sensors family produced by the Sick company. This versatile distance sensor covers up to 35 meters based on HDDM (High-Definition Distance Measurement) technology. Table 5-1 shows the characteristic of the sensor.

Technical Data DT35

Measuring range 50 mm ... 12,000 mm, 90 % remission

50 mm ... 5,300 mm, 18 % remission 50 mm ... 3,100 mm, 6 % remission 1)

(67)

5 Safety and automatic movement 67 Resolution 0.1 mm Repeatability 0.5 mm ... 5 mm Accuracy Typ. ± 10 mm Response time 2.5 ms / 6.5 ms / 12.5 ms / 24.5 ms / 96.5 ms 1) Switching frequency 333 Hz / 100 Hz / 50 Hz / 25 Hz / 6 Hz 1) Output time 1) 1 ms/2 ms/4 ms/8 ms/32 ms

Light source Laser, red

Analog output 1 x 4 mA ... 20 mA (≤ 450 Ω) / 1 x 0 V ... 10 V (≥ 50 kΩ) / – 1)

Resolution analog output 12 bit

Data interface IO-Link

Supply voltage Vs DC 12 V ... 30 V

Power consumption ≤ 1.7 W 2)

Initialization time ≤ 500 ms

Warm-up time ≤ 20 min

Table 5-1. DT35 Sick mid range distance laser sensor's specification and technical data [22]

High accuracy, fast sampling with very low power consumption make it a perfect choice to use in the wheelchair.

5.1.2 RPLIDAR A2 360° laser scanner

RPLIDAR A2 is a 360° 2D laser scanner and adopts laser triangulation measurement system. With high rotation speed, it takes up to 4000 samples per second in each rotation. It covers 6 meters and generates 2D point cloud data to be used in different programs. The sampling frequency can be between 5 Hz to 15 Hz, and the sampling frequency is set to 10 Hz with the 0.9 mm resolution in the wheelchair. Figure 5-1 shows a RPLIDAR and the mechanical structure of it.

(68)

5 Safety and automatic movement

Figure 5-1. RPLIDAR System Composition [23]

The RPLIDAR A2 comes with a rotation speed detection that automatically adjusts the angular resolution of the rangefinder according to the rotating speed. Figure 5-2 shows how the RPLIDAR uses the laser triangulation ranging principle to detect objects.

Figure 5-2. RPLIDAR laser triangulation working schematic [23] Table 5-2 shows the RPLIDAR A2 specifications.

Technical Specification RPLIDAR A2

Power voltage 5 V

Distance Range 0.15-8 m

Angular Range 0-360 Degree

(69)

5 Safety and automatic movement

69

Angular Resolution (10Hz scan rate) 0.9 Degree

Sample Duration 0.25 ms

Sample Frequency 2000-4100 Hz

Scan Rate 5-15 Hz

Laser power ~3-5 mW

Pulse length 60-90 Microsecond

Baud rate 115200

Working Mode 8N1

Table 5-2. RPLIDAR 2 specifications

This laser scanner comes with its SDK tool for programming the device and using the output in customized software.

5.2 Detecting obstacles and automatic backward

5.2.1 Forward movement

A laser rangefinder covers the front area of the wheelchair. Each record of sampled data contains the angle and the distance to the obstacle in that corner. The program based on the specified safe area defines if the wheelchair is at a safe distance from the obstacle or not. Otherwise, it calculates if the speed of the wheelchair is high and it can hit the barrier then the program reduces the velocity. If the program predicts a collision, it immediately stops the wheelchair. The schematic states of how the program decides with the data gathered by the sensor are shown in Figure 5-3.

(70)
(71)
(72)

6 Conclusion

Wheelchair was invented and designed to assist people who cannot walk. But the original design needed the upper body of the driver to move the wheelchair and steer it. The powered wheelchair is an improved version of a manual wheelchair to cover a wider range of disabled people. It uses electric motors and a control input like a joystick to help people with some upper body problem to move.

This document discussed designing of a robotic wheelchair from the control point of view. A prototype robotic wheelchair has been developed and tested at the University of Ljubljana - Laboratory of Robotics. All methods and control algorithms were tested on the prototype version of the robotic wheelchair. Figure 6-1, Figure 6-2 and Figure 6-3 show how different modes of the wheelchair were tested and how they are useful in different situations.

(73)

6 Conclusion

73

Figure 6-2. Left: turning in place – Right: stability on a ramp

Figure 6-3. Tracks and wheels on stairs

Although this is not a robotic wheelchair with all required safety features in the market, it's a big step to design a safe and self-navigating robotic wheelchair for disabled people who cannot use a regular powered wheelchair. Using separated subsystems gives the ability to replace some parts of the wheelchair based on the requirement. One simple example is replacing the joystick with a voice command input device.

Future work includes improvement of the life of the battery by using an intelligent method to suspend unnecessary parts of the wheelchair during the operation. Also, it’s possible to use the current libraries to add more automatic movement and safety features to the wheelchair.

(74)

7 References

[1] T. Borangiu, Advances in robot design and intelligent control : proceedings of the 24th

International Conference on Robotics in Alpe-Adria-Danube Region (RAAD). .

[2] Beckhoff Automation, “Manual CX51x0 Embedded-PC,” vol. 1.8, 2017.

[3] rtaautomation.com, “EtherCAT Leopard-like Speed and Efficiency,” Real Time

Autom., pp. 1–93, 2013.

[4] Beckhoff Automation, “EtherCAT - The real-time Ethernet fieldbus.” [Online]. Available: https://www.beckhoff.com/english.asp?ethercat/default.htm?id=23563557. [Accessed: 03-Jun-2017].

[5] “TwinCAT 3 - eXtended Automation.” [Online]. Available: https://www.svet-el.si/o-reviji/predstavljamo/2253-205-24. [Accessed: 03-Jun-2017].

[6] Beckhoff Automation, “TwinCAT Manual Quick Start,” vol. 1.

[7] Beckhoff Automation, “EtherCAT Terminals - Utra high-speed communication.”

[Online]. Available:

https://www.beckhoff.com/english.asp?ethercat/ethercat_terminals.htm. [8] Beckhoff Automation, “EL30xx - Analog Input Terminals (12 Bit),” 2017. [9] Beckhoff Automation, “EL10xx, EL11xx - Digital Input Terminals,” 2016. [10] Beckhoff Automation, “EL20xx, EL2124 Digital Output Terminals,” 2017. [11] Beckhoff Automation, “Product Overview | Compact Drive Technology.” [12] Beckhoff Automation, “EL73x2 - 2 channel DC motor output stage,” 2017.

[13] L. Wang, H. Jia, J. Qi, and B. Fang, “The construction of soft servo networked motion control system based on EtherCAT,” in 2010 2nd Conference on Environmental

Science and Information Application Technology, ESIAT 2010, 2010, vol. 3, pp. 356

358.

[14] Zhu Qixin, Liu Hongli, Chen Shiming, and Hu Shousong, “Exponential stability of networked control systems with short time delay,” in 2008 27th Chinese Control

Conference, 2008, pp. 316–319.

[15] “TwinCAT 3 Tutorial: Introduction to Motion Control · Contact and Coil,” Contact

(75)

75

http://www.contactandcoil.com/twincat-3-tutorial/introduction-to-motion-control/. [Accessed: 04-Jun-2017].

[16] “TwinCAT NC - overview,” Beckhoff Automation. [Online]. Available: https://infosys.beckhoff.com/english.php?content=../content/1033/tcncgeneral/html/tcn c.htm&id=. [Accessed: 04-Jun-2017].

[17] “TwinCAT NC - Controller,” Beckhoff Automation. [Online]. Available: https://infosys.beckhoff.com/english.php?content=../content/1033/tcncgeneral/html/tcn caxiscomponentscontroller.htm&id=. [Accessed: 05-Jun-2017].

[18] “Acceleration pre-control,” Beckhoff Automation. [Online]. Available: https://infosys.beckhoff.com/english.php?content=../content/1033/ax5000_function_do ku_hw2/9007202123118347.html&id=1096156154000187361. [Accessed: 05-Jun-2017].

[19] “BECKHOFF EL73x2 - Technology,” Beckhoff Automation. [Online]. Available: https://infosys.beckhoff.com/italiano.php?content=../content/1040/el73x2/html/Bt_EL7 3x2_Technology.htm&id=. [Accessed: 05-Jun-2017].

[20] A. Joy- et al., “MBL1xxx Brushless DC Motor,” pp. 1–15.

[21] “TwinCAT 3 PLC Lib: Tc2_MC2,” Beckhoff Automation. [Online]. Available: https://infosys.beckhoff.com/content/1033/tcplclib_tc2_mc2/index.html?id=478608129 3094367280. [Accessed: 09-May-2017].

[22] www.sick.com, “Dx35 Mid Range Distance Sensors.”

[23] L. www. slamtec. co. Shanghai Slam tec Co., “RPLIDAR A2 Low Cost 360 Degree Laser Range Scanner Introduction and Datasheet,” 2016.

Figure

Updating...

References

Related subjects : Control of a robotic wheelchair