UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem,...

22
UAB School of Engineering – Mechanical Engineering – Early Career Technical Journal, Volume 16 Page 57 SECTION 3 Robotics & controls

Transcript of UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem,...

Page 1: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering – Mechanical Engineering – Early Career Technical Journal, Volume 16 Page 57

SECTION 3

Robotics & controls

Page 2: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering – Mechanical Engineering – Early Career Technical Journal, Volume 16 Page 58

Page 3: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 59

Journal of UAB ECTC Volume 16, 2017

Department of Mechanical Engineering The University of Alabama, Birmingham

Birmingham, Alabama USA

FINE-TUNING YOLO TO PERFORM A REAL-TIME VISUAL MULTI-OBJECT DETECTION TASK FOR AN AUTONOMOUS UNDERWATER VEHICLE

Alec Graves, Thomas Fagan, Steffen Lim, Kevin McFall PhD Kennesaw State University

Marietta, Georgia, USA

ABSTRACT In this paper, YOLOv2 is used to detect and classify

underwater objects for use in the RoboSub competition. YOLOv2 is a Convolutional Neural Network designed for object detection, which recently achieved state-of-the-art results on standardized datasets such as VOC 2012 and MS COCO. This neural network has millions of tunable parameters and requires a significant amount of time and data to train from random initialization. To avoid this problem, the network described in this paper is initialized with the weights of a fully-trained YOLOv2 model and fine-tuned to perform detection of objects specific to the RoboSub competition; this is accomplished using only 1114 labeled images.

KEY WORDS: Computer vision, Convolutional neural networks, Underwater object detection, Deep learning

INTRODUCTION The RoboSub Competition is an international competition

that involves programming an autonomous underwater vehicle to perform various tasks in an obstacle course [1]. Teams earn points by successfully navigating through the course, filling containers, accurately shooting torpedoes, etc. Taking advantage of recent, major advancements in computer vision, the Kennesaw State University team is attempting to use deep learning for the competition.

Prior to using a neural network implementation, the competition team used various traditional image processing techniques. One such technique includes using OpenCV for color and shape detection [2]. Because of the dynamic nature of the underwater environment (e.g., image distortions, changing colors, reflections, etc.), the algorithm had trouble detecting objects consistently. With these effects having such dramatic consequences, a new object tracking system (resilient to the various distortions the water would create) was required.

A critical component of the competition is for the underwater robot to be able understand its relative orientation to the appropriate objects. One possible solution to this problem is using a convolutional neural network to locate these objects with a visual camera sensor. There are many such neural

network designs that were able to successfully perform object detection and generate bounding boxes around them. Some of those methods include RCNN, Fast RCNN, Faster RCNN, YOLO, YOLOv2, YOLO9000 and SSD [3-8]. Though Faster RCNN and SSD have slightly higher accuracy than YOLOv2, the computational overhead is significantly higher [7]. Since real-time forward passes would be necessary for the RoboSub competition, YOLOv2, the most accurate network to meet those speed requirements, was chosen.

The best method for training the neural net to classify new objects using a limited amount of data is called fine-tuning. This method consists of taking a pre-trained model, stripping it of the last layer, and applying a new top layer with a custom number of outputs. This creates a network where the beginning consists of pre-trained weights and the end contains untrained weights. By keeping some of the pre-trained weights, the model has already learned relevant, low-level features for finding objects, and it reduces the time to train for the custom classes.

RELATED WORKS The YOLOv2 is the current state-of-the-art CNN

architecture for detection tasks [7]. The architecture has shown superior performance to other methods such as SSD, YOLO, and Faster RCNN on standardized datasets such as VOC [9] and MSCOCO [10]. Additionally, it can achieve real-time execution speeds on relatively accessible, inexpensive hardware. The network itself is based on an architecture called Darknet 19 [11], which has 19 convolutional layers. From Darknet 19, several modifications are made, including the addition of a pass-through layer, to reintegrate low-level features to the end of the network as well as an output layer with a custom loss function for learning box proposals [11].

YOLOv2 is very distinct from other approaches in its use of k bounding box priors which are gathered from k-means when estimating bounding box dimensions [7]. Instead of predicting box dimensions or coordinates directly, YOLOv2 predicts offsets from the width and height of the bounding box priors. Additionally, YOLOv2 outputs k box predictions for each spatial location on the output feature map and each output (corresponding to a spatial location of the output feature map) is trained to make predictions for a specific region on the input

Page 4: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 60

Figure 1. Validation and Training Loss

feature map. In this way, specific outputs correspond to specific input regions. Also, unlike many other architectures, each output has a receptive field the size of a large portion of the image, thereby allowing it to reason globally about what is contained in a specific region of the input image.

METHODOLOGY Data Collection and Preprocessing

To train and fine tune the YOLOv2, new data was collected. The underwater vehicle has a few objects it needs to detect to successfully complete the RoboSub competition such as buoys, a start gate, a path marker, and a channel. To gather training images for the network, every 10th frame was taken from various videos of the competition that had been posted on the internet or donated. These videos were selected because they were taken by front-facing cameras during actual runs of the competition in previous years. Additionally, images of a red buoy, a green buoy, and a start gate were collected in a pool. An attempt to maximize different angles, varying lighting conditions, and different combinations of objects was made. Using a custom JavaScript tool, 111 validation images and 1002 training images are labeled [12].

The original RGB images are resized from 640 x 480 to 416 x 416 in order to accommodate YOLOv2’s requirement for a multiple of 13, and every pixel channel value is normalized. Boxes gathered during the labeling process are rearranged into the format used to train YOLOv2 [7]. The greatest number of boxes labeled in a single training image is 6, so all-zero boxes are appended to training labels that have less than 6 boxes. This is done to assure a uniform label shape and easily allow training

with larger batch sizes. This does not negatively affect the loss during training because the IOU (Intersection Over Union) score for these zero-boxes is zero. Architecture Setup

The output of the customized YOLOv2 architecture has 5 boxes per spatial location of the output feature map, with 6 possible classes per box. Because Darknet 19 downscales the spatial dimension of the input by a factor of 32 and the images used have a shape of 416 x 416, the output feature map has a shape of 13 x 13. Additionally, each box has 5 parameters which describe its center location, its width and height offsets from the box priors, and the likelihood of the box prediction being correct. Accordingly, the custom output of the network is an array with the shape (13 x 13, 5 x (5 + 6)) = (169, 55). Training Methodology

To begin fine-tuning, the weights from a fully trained YOLOv2 model are loaded. Next, the top layer of the network is removed and replaced with the custom output layer for the new detection task. Additionally, all parameters are frozen (made unchangeable) except for those in the last layer. After this, the network is trained for 5 epochs on the training images to allow the randomly initialized weights of the new output layer to adjust. After these epochs are complete, all layers are unfrozen and training takes place for 15-30 epochs. The validation loss is monitored and the best performing set of weights is saved and used in the final detector. A graph of the training loss versus the validation loss being minimized over epochs can be seen in Figure 1.

Page 5: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 61

Testing Methodology Several videos were created in the pool and none of the

images extracted from them were used in the training processes. Out of 112 test images, only two were improperly classified, showing a success of more than 98%.

CONCLUSION Comparing the training loss to the validation loss, it can be

seen that the network has indeed learned rather than overfit to the data. Further, the test predictions, some of which are displayed in Figure 2, show that the network has potentially generalized in that environment.

The red buoy in the bottom, middle image of Figure 2 is understandably difficult to identify without context. In the other test failure, the lighting made the classification of a buoy vague.

The YOLO implementation used in this paper could evaluate images at a rate of 18.9 frames per second at 416 x 416 image resolution on a Nvidia GTX 1060 6GB GPU.

The results demonstrate that a pretrained YOLOv2 model can be fine-tuned for use as a real-time, multi-object detector on robots operating in aquatic environments. Additionally, presented data demonstrates the ability of this training technique to expand upon the network’s prior knowledge and teach the network to recognize new objects, even with a limited amount of training data.

The next step is to apply the trained network in the actual RoboSub competition. It is expected to work just as well as the prototype described in this paper once labeled data from the site is used to further fine-tune the network.

Figure 2. Test Results

Page 6: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 62

ACKNOWLEDGEMENTS This project was possible thanks to the RoboSub

competition team members (Kevin Larose, NCSU, and Julio Guillén) who posted their test runs to Youtube, the Kennesaw State Autonomous Underwater Vehicle Team for helping to collect and label data, and the developers of YOLOv2 and its Keras port YAD2K (https://github.com/allanzelener/YAD2K) who made the code freely available. REFERENCES [1] RoboSub Final Mission and Scoring A Pirate’s Life for Thee. (2016, May 9). Retrieved from http://www.robonation.org/sites/default/files/RoboSub_2016_Final_Mission%20and%20Scoring.pdf [2] Bradski, G., 2000, “OpenCV library,” Dr. Dobb's Journal of Software Tools. 2236121 [3] Girshick, R. B., and Donahue, J., and Darrell, T., and Malik, J., 2013, “Rich feature hierarchies for accurate object detection and semantic segmentation,” CoRR, http://arxiv.org/abs/1311.2524 [4] Girshick, R. B., 2015, “Fast R-CNN,” CoRR, http://arxiv.org/abs/1504.08083 [5] Ren, S., and Girshick, R. B., and Sun, J., 2015, “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks,” CoRR, http://arxiv.org/abs/1506.01497

[6] Redmon, J., and Divvala, S. K., and Girshick, R. B., and Farhadi, A., 2015, “You Only Look Once: Unified, Real-Time Object Detection,” CoRR, http://arxiv.org/abs/1506.02640 [7] Redmon, J., and Farhadi, A., 2016, "YOLO9000: Better, Faster, Stronger." ASME J. Tribol., 124(1), pp. 5-13. [8] Liu, W., and Anguelov, D., and Erhan, D., and Szegedy, C., and Reed S. E., Fu, C. Y., and Berg, A. C., 2015, “SSD: Single Shot MultiBox Detector,” CoRR, http://arxiv.org/abs/1512.02325 [9] Everingham, M., and Van~Gool, L., and Williams, C. K. I., and Winn, J., and Zisserman, A., 2012, “The PASCAL Visual Object Classes Challenge 2012 (VOC2012) Results,” http://www.pascal-network.org/challenges/VOC/voc2012/workshop/index.html [10] Lin, T., and Maire, M., and Belongie, S. J., and Bourdev, L. D., and Girshick, R. B., and Hays, J., and Perona, P., and Ramanan, D., and Dollár, P., and Zitnick, C. L., 2014, “Microsoft COCO: Common Objects in Context,” CoRR, http://arxiv.org/abs/1405.0312 [11] Redmon, J., 2013–2016, “Darknet: Open source neural networks in c.” http://pjreddie.com/darknet/ [12] Underwater Data Labeler (2016, May 9). Retrieved from https://github.com/shadySource/shadysource.github.io

Page 7: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 63

Journal of UAB ECTC Volume 16, 2017

Department of Mechanical Engineering The University of Alabama, Birmingham

Birmingham, Alabama USA

AN ANALYSIS OF AN OPEN ARCHITECTURE SYSTEM APPROACH TO THE INDIVIDUAL PROPULSION SYSTEM OF ELECTRIC VEHICLES

Bing Wang, Siyuan Zhang, Vladimir Vantsevich

School of Mechanical Engineering University of Alabama at Birmingham

Birmingham, AL, USA

Linhui Zhao Department of Control Science and Engineering

Harbin Institute of Technology Harbin, Heilongjiang, China

ABSTRACT The Intelligent wheel driving system (IWDS) is one of the

subsystems of an entire electric vehicle system. In IWDS, all conventional subsystems of the vehicle are reduced into one wheel boundary. All subsystems are integrated based on the concept of an open architecture system, which considers the coupling of the subsystems. Due to the functions of all subsystems in IWDS, their merged action directly affects the vehicle’s operational properties, such as handling, mobility, safety, etc. Moreover, each property is simultaneously affected by several subsystems. The propulsion system with one e-motor, as the major subsystem in IWDS, not only provides the longitudinal motion of the vehicle but also affects the other vehicle properties. In this paper, the propulsion system installed in an IWDS will be described, and the motor parameters and their influences on the motor characteristics are analyzed. This study leaves the potential to analyze the influence of the merged action of all subsystems on the entire vehicle in the future.

KEY WORDS: Electric vehicle, open architecture system, Individual propulsion system, e-motor

INTRODUCTION As is commonly known, a complete system contains

countable subsystems that work for different purposes. All subsystems are integrated and generate a merged action that affects the entire system. Moreover, each subsystem in the entire system might also interact with each of the others. The open architecture system (OAS) mainly focuses on considering the coupling of each of the subsystems and the interactions between them. In electric vehicle engineering, the design of the vehicle drive system employs this OAS concept while considering the coupling and interactions of each subsystem.

In conventional vehicles, the subsystems installed in a powertrain system are the internal combustion engine (ICE), transmission, driveline system, steering system, etc. All subsystems are mechanically linked. Each of these subsystems

is designed and manufactured by different individual departments, and assembled together into the powertrain layout afterwards [1]. Each subsystem-design department can upgrade its subsystem in order to improve the vehicle’s operational properties from different angles, such as mobility, energy efficiency, stability, turnability, etc. Moreover, because each vehicle’s operational properties are affected not by only one subsystem but by several, many studies have considered the coupling of the individual subsystems. For example, the suspension system directly influences both the turnability and the stability of motion [2]. Beloousov et al. [3] proved that the suspension system also impacts the tire traction force and the normal reaction force. Another study demonstrated that the vibration of the sprung and unsprung mass in the suspension system could impact the wheel traction and braking dynamics [4, 5]. In addition, Vantsevich et al. [5] proved that the driveline system and suspension system affect each other. As a result, with considering the coupling of all subsystems and their merged actions, the OAS concept is applied to vehicle design.

However, in recent decades, with drastic development of electric vehicles (EV), a new type of intelligent wheel driving system (IWDS) is replacing the conventional drive system. All subsystems of conventional powertrain systems are replaced and integrated within one wheel boundary [6, 7]. IWDS subsystems installed in an EV are not mechanically linked with each other but are individually controlled or are controlled by a central control unit [8]. Similar to conventional vehicles, the couplings of all subsystems in IWDS are supposed to be concerned, and the propulsion subsystem, as a major component, directly affects the dynamic system of IWDS. As a result, in this study, an analysis of the propulsion system of an IWDS will be presented, in which the motor parameters and their influence on motor characteristics will be analyzed. This study leaves a potential to analyze the coupling of the subsystems in IWDS and their merged action to the entire IWDS in the future.

Page 8: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 64

INDIVIDUAL PROPULSION SYSTEM OF ELECTRIC VEHICLES

The intelligent wheel driving system (IWDS) is one subsystem of an entire electric vehicle (EV) system. Figure 1 presents a typical example, Active Wheel produced by Michelin Company. It can be seen from Fig. 1, in an IWDS, all conventional subsystems of powertrain and chassis are compressed into one wheel within the wheel’s boundary, but all subsystems are driven by electricity.

Figure 1 Michelin Unveils Active Wheel

In an IWDS, the propulsion system with one motor provides the wheel dynamic motion in the longitudinal direction. The required torques and angular velocities are given to the wheel by the e-motor. In a conventional vehicle, the throttle plate of the ICE is mechanically linked with the accelerator, and the driving wheel is propelled by pressing the accelerator to determine the position of the throttle plate in the engine cylinders. However, in an IWDS, an electric motor is used in place of an ICE. The corresponding function to ICE in IWDS is a by-wire system [8], which controls the angular velocity and the driving torque of the e-motor. The angular velocity and driving torque are calculated by one or several control units, depending on the driver inputs and the information obtained from different wheel sensors, such as pressure, acceleration and position sensors, etc.

Many types of e-motors are employed in EVs. Two major types are the alternating current (AC) motor and the direct current (DC) motor. Table 1 lists the characteristics of AC motors and DC motors.

Table 1 Characteristics of AC motors and DC motors

AC Motor DC Motor

Single-speed Transmission Multi-Speed Transmission

Light Weight Heavier at Equivalent Power

Less expensive More Expensive

95% efficiency at full load 85-95% efficiency at full load

More expensive controller Simple controller

Motor/Controller/Inverter

more expensive

Motor/controller less

expensive

As can be seen from Table 1, AC motors are high efficiency and light weight. Thus, many EVs choose AC motors to install in their propulsion system. However, DC motors have

simpler controllers, and their mathematical models are simpler. Considering this advantage of DC motors, several EVs employ DC motors. In this study, the characteristics of a DC motor will be analyzed.

MATHEMATICAL MODEL OF DC MOTORS As mentioned above, the electric motor provides the

required torques 𝑇𝑇𝑤𝑤 and angular velocities 𝜔𝜔𝑤𝑤 to the wheel. The angular velocity 𝜔𝜔𝑤𝑤 can be determined by the mathematical model of the DC motor. The unit of a DC motor can be considered as a set of two subsystems: the electric system and the dynamic system, which are presented in Fig. 2,

Figure 2 Subsystems of an unit of DC motor

Here, 𝑅𝑅𝑎𝑎 is the armature resistance, 𝐿𝐿𝑎𝑎 is the armature electric inductance, 𝑣𝑣𝑎𝑎 is the supplied voltage, 𝐾𝐾𝑏𝑏 is the motor’s back emf, 𝑖𝑖𝑎𝑎 is the current. 𝐼𝐼𝑚𝑚 is the motor’s inertia, 𝜔𝜔𝑒𝑒 is the angular velocity of the motor, 𝑇𝑇𝐿𝐿 is the load torque. The mathematical models of both systems are described in Eqs. (1) and (2) respectively.

𝑖𝑖𝑎𝑎𝑅𝑅𝑎𝑎 + 𝐿𝐿𝑎𝑎𝑑𝑑𝑖𝑖𝑎𝑎𝑑𝑑𝑑𝑑

+ 𝐾𝐾𝑏𝑏𝜔𝜔𝑒𝑒 = 𝑣𝑣𝑎𝑎 (1)

𝐼𝐼𝑚𝑚𝑑𝑑𝜔𝜔𝑒𝑒𝑑𝑑𝑑𝑑

= 𝐾𝐾𝑏𝑏𝑖𝑖𝑎𝑎 − 𝑐𝑐𝜔𝜔𝑒𝑒 − 𝑇𝑇𝐿𝐿 (2)

Here,

𝐾𝐾𝑏𝑏𝑖𝑖𝑎𝑎 = 𝑇𝑇𝑤𝑤 (3)

Solving the differential Eqs. (1) and (2), the angular velocity of the wheel can be determined.

When the motor is in a steady-state situation, the electric inductance 𝐿𝐿𝑎𝑎 becomes zero. As a result, substituting Eqs. (1) and (3) into Eq. (2) yields,

𝜔𝜔𝑒𝑒 = 𝑣𝑣𝑎𝑎𝐾𝐾𝑏𝑏− 𝑇𝑇𝑤𝑤

𝑅𝑅𝑎𝑎𝐾𝐾𝑏𝑏2

(4)

As can be seen from Eq. (4), the driving torque of an e-motor can be determined while knowing the motor’s angular velocities. Thus, specifying the values of the motor parameters and solving the set of Eqs. (1)-(4) can obtain the required torque and angular velocity of the driving wheel while the wheel is moving in specific terrain conditions.

Page 9: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 65

SIMULATION RESULTS The previous section indicates that specifying the

parameters of e-motors can yield the required driving torque and angular velocity for a wheel. As a result, in this section, several simulation results are presented. These results leave clues to readers to design the e-motors, by changing the parameters, in order to obtain the torques and velocities. It should be mentioned that the load torque 𝑇𝑇𝐿𝐿 relates to the terrain conditions. However, this study only considers the characteristics of motors. As a result, load torque 𝑇𝑇𝐿𝐿 is considered as zero while simulating the mathematical models. Table 2 presents a set of parameters of DC motors. Set 1 is considered as the standard motor. In sets 2-7, the value of one parameter decreases while the others are held constant. Figures 3-10 present the simulation results.

Table 2 Tested parameters Set # 𝐾𝐾𝑏𝑏 𝑉𝑉𝑎𝑎 𝐿𝐿𝑎𝑎 𝑅𝑅𝑎𝑎 𝑐𝑐 𝐼𝐼𝑚𝑚

1 2 450 0.0012 0.25 0.3 0.3 2 1↓ - - - - -

3 - 350↓ - - - - 4 - - 0.00012↓ - - - 5 - - - 0.05↓ - - 6 - - - - 0.2↓ - 7 - - - - - 0.2↓

Figure 3 Simulation results of set 1

Figure 4 Set 2 𝐾𝐾𝑏𝑏 = 1 𝑁𝑁 ∙ 𝑚𝑚/𝐴𝐴

Figure 4 provides the simulation results when 𝐾𝐾𝑏𝑏 = 1 𝑁𝑁 ∙𝑚𝑚/𝐴𝐴. Comparing these results with those in Fig. 3, it can be found that the greater the values of parameter 𝐾𝐾𝑏𝑏, the faster the response of the angular velocity, and the smaller the maximum value of the current and angular velocity.

Figure 5 Set 3 𝑉𝑉𝒂𝒂 = 350 𝑉𝑉

0 0.02 0.04 0.06 0.08

Time (s)

0

50

100

150

200

250

Ang

ular

Vel

ocity

(rad

/s)

ts l o p e

= 0.011; ws l o p e

= 64.0506

t6 3

= 0.021; w6 3

= 139.9725

t9 8

= 0.047; w9 8

= 212.1573

0 0.02 0.04 0.06 0.08

Time (s)

-500

0

500

1000

1500

Cur

rent

(A)

ts l o p e 1

= 0.002; Ia slope1

= 337.8887

tp e a k

= 0.011; Ia peak

= 1318.2752

ts l o p e 2

= 0.021; Ia slope2

= 923.2687

0 0.02 0.04 0.06 0.08

Time (s)

0

50

100

150

200

250

300

Ang

ular

Vel

ocity

(rad

/s)

ts l o p e

= 0.016; ws l o p e

= 59.6413

t6 3

= 0.042; w6 3

= 176.758

t9 8

= 0.076; w9 8

= 275.3184

0 0.05 0.1 0.15 0.2 0.25

Time (s)

0

500

1000

1500

2000

Cur

rent

(A)

ts l o p e 1

= 0.002; Ia slope1

= 338.358

tp e a k

= 0.016; Ia peak

= 1570.5872

ts l o p e 2

= 0.03; Ia slope2

= 1374.6842

0 0.02 0.04 0.06 0.08

Time (s)

0

50

100

150

200

Ang

ular

Vel

ocity

(rad

/s)

ts l o p e

= 0.011; ws l o p e

= 49.8171

t6 3

= 0.021; w6 3

= 108.8675

t9 8

= 0.046; w9 8

= 164.3465

0 0.02 0.04 0.06 0.08

Time (s)

-200

0

200

400

600

800

1000

1200

Cur

rent

(A)

ts l o p e 1

= 0.002; Ia slope1

= 262.8023

tp e a k

= 0.011; Ia peak

= 1025.3252

ts l o p e 2

= 0.021; Ia slope2

= 718.0979

Page 10: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 66

Figure 5 presents the simulation results when 𝑉𝑉𝒂𝒂 is 350 𝑉𝑉. Comparing with these results with those in Fig. 3, it can be found that the change of the voltage has little influence on the response of the angular velocity, and the greater the values of voltage, the larger the maximum value of the current and angular velocity.

Figure 6 Set 3 Figure 6 presents the simulation results when 𝑳𝑳𝒂𝒂 =

0.00012 𝐻𝐻. Comparing these results with those in Fig. 3, it can be found that the greater the values of parameter 𝐿𝐿𝑎𝑎, the faster the response of the angular velocity, and this has little influence on the steady-state value of the angular velocity. Comparatively, the change of 𝐿𝐿𝑎𝑎 is most significant to the maximum current of motor, and the greater the values of parameter 𝐿𝐿𝑎𝑎, the greater the maximum current.

Figure 7 Set 4 Figure 7 shows the simulation results when 𝑅𝑅𝑎𝑎 = 0.05 Ω,.

Comparing these results with those in Fig. 3, it can be found that the smaller the values of parameter 𝑅𝑅𝑎𝑎 , the faster the response of the angular velocity, and this has little influence on the steady-state value of the angular velocity. Comparatively, the change of 𝑅𝑅𝑎𝑎 is most significant to the maximum current of motor, and the smaller the values of parameter 𝑅𝑅𝑎𝑎 , the greater the maximum current.

0 0.02 0.04 0.06 0.08

Time (s)

0

50

100

150

200

250

Ang

ular

Vel

ocity

(rad

/s)

ts l o p e

= 0.003; ws l o p e

= 17.8432

t6 3

= 0.019; w6 3

= 137.6797

t9 8

= 0.056; w9 8

= 210.3065

0 0.02 0.04 0.06 0.08

Time (s)

0

500

1000

1500

2000

Cur

rent

(A)

ts l o p e 1

= 0.002; Ia slope1

= 1548.7601

tp e a k

= 0.003; Ia peak

= 1669.972

ts l o p e 2

= 0.005; Ia slope2

= 1525.9507

0 0.02 0.04 0.06 0.08 0.1

Time (s)

0

50

100

150

200

250

300

350

Ang

ular

Vel

ocity

(rad

/s)

ts l o p e

= 0.015; ws l o p e

= 169.7547

t6 3

= 0.014; w6 3

= 151.9156

t9 8

= 0.083; w9 8

= 240.5272

0 0.02 0.04 0.06 0.08 0.1 0.12

Time (s)

-2000

-1000

0

1000

2000

3000

Cur

rent

(A)

ts l o p e 1

= 0.002; Ia slope1

= 366.6153

tp e a k

= 0.014; Ia peak

= 2700.3179

ts l o p e 2

= 0.028; Ia slope2

= 747.0015

Page 11: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 67

Figure 8 Set 5

Figure 8 shows the simulation results with 𝑐𝑐 = 0.2 𝑁𝑁 ∙𝑚𝑚 ∙ 𝑠𝑠𝑠𝑠𝑐𝑐/𝑟𝑟𝑠𝑠𝑟𝑟. Comparing these results with those in Fig. 3, it can be found that the change of the damping has little influence on the response times and steady-state values of angular velocity and current.

Figure 9 Set 6

Figure 9 shows the simulation results with 𝐼𝐼𝑚𝑚 =0.2 𝑘𝑘𝑘𝑘𝑚𝑚2. Comparing these results with those in Fig. 3, it can be found that the smaller the values of parameter 𝐼𝐼𝑚𝑚, the faster the response of the angular velocity, and this has little influence on the steady-state value of the angular velocity. Comparatively, the change of 𝐼𝐼𝑚𝑚 has a little more influence on the maximum current of motor, and the smaller the values of parameters 𝐼𝐼𝑚𝑚, the smaller the maximum current.

Table 3 presents the resultant values of the torques of different sets of motor parameters.

Table 3 Generated torques of different sets Sets 1 2 3 4 5 6 7

Torque(Nm) 3600 1800 2800 3600 18000 3600 3600

It can be seen from Table 3 that the generated torques of a motor keep constant while the motor inductance, damping and inertia change (See sets 4, 6 and 7). Moreover, decreasing the motor’s back emf and voltage directly decrease the generated torque (set 2), while decreasing the motor resistance increases the generated torque.

In summary, with the simulation results based on the mathematical model of a DC motor, the trend of generated torques and angular velocities when changing the motor’s parameters can be found.

CONCLUSION This study introduces the new type of individual

propulsion system in IWDS of electric vehicles. This study indicates that the motor, as the major part of individual propulsion system, delivers torques and angular velocities to the driving wheels. This torque and angular velocity directly affect the vehicle’s operational properties. As a result, the mathematical model of a DC motor is presented in the 4th section. According to the mathematical model, the torque and angular velocity generated by the motor can be obtained based on the known motor parameters.

Moreover, when EVs move on different terrain conditions, the motor should provide suitable torques and velocities to the wheel in order to meet the driving conditions. The 5th section presents the simulation results of different sets of motor parameters and provide the way that the parameters affects the motor characteristics. This study leaves a potential to design the motor for different terrain condition.

Since the motor characteristics (angular velocity and driving torques) directly impact the wheel’s longitudinal dynamic motion, the next step of this study is to combine the mathematical models of motor with the differential equations of dynamic motion of an IWDS. This study could be used to analyze and consequently control the IWDS longitudinal dynamic motion. This research is ongoing.

0 0.02 0.04 0.06 0.08

Time (s)

0

50

100

150

200

250A

ngul

ar V

eloc

ity (r

ad/s

)

ts l o p e

= 0.011; ws l o p e

= 64.131

t6 3

= 0.021; w6 3

= 140.3378

t9 8

= 0.048; w9 8

= 214.0528

0 0.02 0.04 0.06 0.08

Time (s)

-500

0

500

1000

1500

Cur

rent

(A)

ts l o p e 1

= 0.002; Ia slope1

= 337.8886

tp e a k

= 0.011; Ia peak

= 1318.0212

ts l o p e 2

= 0.021; Ia slope2

= 921.4285

0 0.01 0.02 0.03 0.04 0.05 0.06

Time (s)

0

50

100

150

200

250

Ang

ular

Vel

ocity

(rad

/s)

ts l o p e

= 0.01; ws l o p e

= 80.1688

t6 3

= 0.015; w6 3

= 136.0425

t9 8

= 0.029; w9 8

= 214.2219

0 0.01 0.02 0.03 0.04 0.05 0.06

Time (s)

-500

0

500

1000

1500

Cur

rent

(A)

ts l o p e 1

= 0.002; Ia slope1

= 337.5761

tp e a k

= 0.009; Ia peak

= 1225.2111

ts l o p e 2

= 0.018; Ia slope2

= 813.0267

Page 12: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Early Career Technical Journal, Volume 16 Page 68

REFERENCES [1] A. F. Andreev, V. I. Kabanau, V. V. Vantsevich: Driveline

of Ground Vehicles: Theory and Design; V. V. Vantsevich, Scientific and Engineering Editor; Taylor and Francis Group/CRC Press, 792 pages, 2010.

[2] Vladimir V. Vantsevich. 2015, “Road and off-road vehicle system dynamics. Understanding the future from the past”, Vehicle System Dynamics 53:2, pages 137-153.

[3] Beloousov, B., Ksenevich, T., and Vantsevich, V., "Load Estimation of an Open-Link Locomotion Module for Robotic and Commercial Multi-Wheel Applications," SAE Int. J. Commer. Veh. 6(2):301-307, 2013

[4] Soliman, A., Kaldas, M., and Mahmoud, K., “Active Suspension and Anti-lock Braking Systems for Passenger Cars,” SAE Technical Paper 2009-01-0357, 2009, doi:10.4271/2009-01-0357.

[5] Vantsevich, V. V., Stuart, Ch., “Probabilistic Interaction between Vehicle and Surroundings: Modelling for Control”, IMECE2007-44071, ASME Congress, Seattle, Washington, November 10-16, 2007

[6] Zeid A, Chang D. A modular computer model for the design of vehicle dynamics control systems. Veh Syst Dyn. 1989;18(4):201–221.

[7] J. Hag. Wheel Corner Module. Master Thesis, Royal Institute of Technology, 2011.

[8] E. Bretz, _By-wire cars turn the corner,_ in IEEE Spectrum 2001, vol. 38, no. 4, pp.68 _ 73, ISSN 0018-9235.

Page 13: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 69

Journal of UAB ECTC Volume 16, 2017

Department of Mechanical Engineering The University of Alabama, Birmingham

Birmingham, Alabama USA

SURFACE IDENTIFICATION INSPIRED BY REINFORCEMENT LEARNING USING SOFT ROBOTS

Miranda Tanouye University of Alabama

Tuscaloosa, Alabama, USA

Vishesh Vikas University of Alabama

Tuscaloosa, Alabama, USA

ABSTRACT A terrestrial soft robots’ dynamic movement can be

discretized and modelled using graph theory for different actuation or material. This representation allows for learning from the environment and generating control sequences to manipulate the robots’ movements. Inversely, provided the knowledge of different environments (captured in the individual graphs), the robot has the ability to optimally identify the environment through experimentation and interaction. This paper presents a method for soft robots to process the information from known environments and apply it to new ones to optimize their movement. The soft robot comprises multiple limbs with accelerometers attached to the robot. In real time, data from the accelerometers can be compared to stored data. If all the data from each limb falls within a threshold for a known environment, then the robot is acting optimally based on previous experimentation for that environment. If not, then the robot may be in a new environment. Following a predetermined path, data can be collected from the sensors and compared to known data. From that, the robot may readjust based off the known data and retest to see the new reaction to the environment.

KEYWORDS: soft robotics, environment identification, graph theory, control

INTRODUCTION Soft robotics is a growing field with many applications

from manufacturing to health care. The design, manipulation, and control of these soft robots is very difficult due to their deformability and continuum nature, which makes them difficult to model. While their intrinsic nature makes them difficult, it also gives them extreme potential for instances where classic rigid body robots cannot be adapted, such as navigating structurally unstructured environments. This adaptability can be exploited to learn about the environment by comparing the robot-environment interaction with prior knowledge.

Soft robot modeling has been performed using continuum modeling [1]–[3] and fast-FEM numerical methods [4] for soft

manipulator control. Modeling of environmental interaction has also been researched [5]; however, it is computationally expensive and very difficult for unstructured environments. Finally, the modeling of soft robot actuators – ranging from pneumatic actuation [6], [7], motor-tendon [8], [9] and shape memory alloys [10], is very difficult. A counter approach is to find motion primitives [11] in task space – discretize the factors that dominate the robot-environment interaction. Locomotion can be viewed as optimization of forces acting on a robot – maximizing them at one end and minimizing at the other to effect movement [12]. Hence, in principle, locomotion can be effected by manipulating ‘relative’ friction between two ends of a robot, rather than the absolute friction of each end. While analyzing robot locomotion, the factors that dominate robot-environment interaction primarily involve friction-manipulation. Friction manipulation has been implemented in soft material robots through relative changes in the frictional coefficients of materials of contact or directional friction [9], [10].

Quantification of the environment has not been explored by observing the interaction between a soft material robot and the surface/environment. A model-free control approach [13] for soft robots utilizes the feedback from robot-environment interaction for obtaining periodic control sequences to effect desired locomotion on a surface. The most interesting aspect of this approach is the adaptability; i.e. due to use of graph theory and discretization of motion primitives, the robot is able to learn about the “new environment” and is even fault tolerant—it can handle loss-of-limb scenarios. The presented research uses the inverse approach to learn about the environment – given the knowledge (graph) for different environments, what is the environment the current robot is navigating?

The paper is structured as follows – design and manufacturing of the SMA-actuated soft robot (Section 2), model-free control and graph theory (Section 3), experimental data and discussion about results (Section 4).

Page 14: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 70

MANUFACTURING The soft robot used in this study was designed to be small

and modular with a tube-shaped body. Modularity is implemented by having interchangeable end pieces, from here on called grippers, to provide a variety of friction interactions between the environment and the robot. This is important for the robot’s locomotion as it can perform more effectively in an environment based on the type of gripper attachment. It is also modular as several two limbed bodies can be joined at a common center piece to quickly create a multi-limbed robot. For this study however, the robot has a two limbed body with two modular grippers. Further studies will be conducted later for modular multi-limbed bodies.

Casting was the chosen manufacturing method because it is fast and cheap. The two main casting materials are the mold and casting material. A mold can quickly be designed using any solid modeling software and then 3D printed allowing for quick robot design or mold modifications as well as being reusable. The casting material is Smooth On Dragon Skin 10. The size of the robots also means that several can be produced with an extremely small amount of material, saving costs. Figure 1 shows the manufacturing process of the robot body.

Figure 1. Manufacturing process of the soft robot The mold has two components, the base and press. The

base holds most of the material and forms the top half of the body. The press portion forms the legs of the main body. These legs are inspired by soft linear creatures such as caterpillars and centipedes. They provide grip as well as friction manipulation. Once the mold is printed and ready three metal rods, one 17 gauge and two 20 gauge, are inserted through the mold. Steps A to D in Figure 1 show the Dragon Skin 10 being prepared and then poured into the base. The press is then pushed down into the excess material as allowed by design, shown as step E. Once dry, the three rods and press are removed and then the final body is complete and removed as demonstrated by step F. Each rod creates a channel through the top portion of the body, set in a triangular pattern with the

two smaller rods on bottom. Wires are run through the larger channel and shape memory alloy is placed in the two smaller channels to act as actuators. Rods were chosen to create these channels because of their placement in the body. The rods are reusable and easy to install and remove while casting. Other materials were tested, but were difficult to remove after the silicone cured.

Figure 2. Two-limbed robot body where each end comprise of two different materials to manipulate frictional interaction with the surface of contact

GRAPH THEORY Locomotion of this robot is modeled using graph theory.

A graph for this study is a set of vertices, or nodes, with connecting edges. Each node represents a different binary state of the robot in question. The number of states (n) for this system is defined as

𝑛𝑛 = 𝑏𝑏𝑚𝑚 where 𝑏𝑏 is the number of behaviors and 𝑚𝑚 is the number of grippers

Figure 3. The directed graph indicating the robot

shapes/states and the corresponding nodes. The arcs indicate the transition between these robot states.

Page 15: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 71

Each gripper has two possible behaviors, on (0) or off (1). For a two limbed robot, such as in this study, there are two grippers meaning that there are four possible states which can be represented as (0,0), (1,0), (0,1), and (1,1). The edges connecting each node represent the transition between states, or in other terms, the movement of the robot. Since it is possible for the robot to move from one node to any other node except itself, the graph is considered complete and directed. By analyzing each edge and seeing its effect on the locomotion of the robot we can apply weights to them based on performance. Figure 2 shows a drawing of this graph as well as the states at each node.

If the goal is to move the body in the +X direction, the edges that aid this movement are weighted heavier than the rest and create a simple cycle within the graph. To test this each edge of the graph must be analyzed and observed. This is not difficult, as there are only twelve total edges for the robot in this study. However, the number of edges increases as the number of nodes increases, which makes testing each individually difficult and time consuming. The solution would be to find a path that crosses every edge once; this is called an Eulerian path.

Euler paths are any path in a graph which traverses every edge of that graph exactly once. Theorem 1.8.1 from Reinhard Diestel: Graph Theory states “A connected graph is Eulerian if and only if every vertex has even degree.” The degree of a vertex refers to how many edges are connected to that vertex. Since each vertex of the graph in our study is connected to every other vertex twice, to and from, the degree of every vertex will always be even. From that we can conclude that the graph has an Eulerian path. There are two common algorithms for determining an Euler circuit within a graph, Fleury’s and Hierholzer’s. Fleury’s algorithm starts at a vertex of odd degree within a given graph if there are at most two vertices of odd degree within the graph. If there are no vertices of odd degree then the path may start at any vertex. From there the path moves across edges and deletes the edges after crossing. The algorithm chooses which edge to cross based on whether or not the deletion of the edge would cause the graph to disconnect. If there is no such edge then it picks the remaining edge and continues this process until there are no edges left. The order in which these edges are chosen forms the Eulerian path. This algorithm however is inefficient time wise, as it detects which edges have been deleted at every node it visits. Hierholzer’s algorithm then is our method of choice. This algorithm begins at an arbitrary vertex in a given graph and travels across edges until reaching the starting vertex. From there it will enter another vertex along the trail and follow the unused edges from this vertex until returning to itself. Using this algorithm a path was chosen that is viable for all graphs used in this study.

Starting at the first node the path moves clockwise to every other node until arriving back at the first node. From there it moves counter-clockwise to the last node, and then goes back and forth between that node and every other node besides the first. Once completing all of those edges, the path

continues counter-clockwise to the second to last node and repeats the action omitting the edges already traversed. This action is repeated until it arrives at the second node which ends the path by traversing the edge that connects it back to the first node. The Eulerian paths can be represented as the order in which the nodes are passed, so for a four node graph the path is 1 → 2 → 3 → 4 → 1 → 4 → 2 → 4 → 3 → 1 →3 → 2 → 1

The pattern can be seen clearer when the path is shown in a matrix where the path starts at the first row, first column and the zeros are viewed as only placeholders.

1 2 3 0 04 1 4 2 43 1 3 0 02 1 0 0 0

Here is a matrix of an Eulerian path for a three limbed

robot illustrated in Figure 3, whose graph would contain eight nodes

⎣⎢⎢⎢⎢⎢⎢⎡1 2 3 4 5 6 7 0 0 0 0 0 08 1 8 2 8 3 8 4 8 5 8 6 87 1 7 2 7 3 7 4 7 5 7 0 06 1 6 2 6 3 6 4 6 0 0 0 05 1 5 2 5 3 5 0 0 0 0 0 04 1 4 2 4 0 0 0 0 0 0 0 03 1 3 0 0 0 0 0 0 0 0 0 02 1 0 0 0 0 0 0 0 0 0 0 0⎦

⎥⎥⎥⎥⎥⎥⎤

Based on this pattern a MATLAB code was developed that accepts the number of nodes as input and returns the Eulerian path as the order in which to pass through the nodes of the graph. This is only one possible Eulerian path in these types of graphs, but it provides a tool that produces a known one quickly and easily.

Edges in graphs are assigned numerical values called weights, which can represent a variety of things. For example, if the nodes represent cities the edges can be weighted by the distance between each city and this provides a better representation of the relationship between each node. This is also useful when the goal is to use the graph to determine a shortest path. For an unweighted graph, the algorithm would treat each edge the same; however, as in the previous example that would be inappropriate.

In the case of observing the locomotion of a soft robot, the edges are weighted by how the edge affects the overall motion of the robot. If we are looking at the robot translating in the +X direction, then the edges are weighted based on the displacement and velocity they effect on the body along the +X axis as observed in the experiments. Taking several sets of data for the same surface environment provides an average weight and an expected threshold. This means that every time the robot is placed in that environment again, it should react in a predictable manner based on edge weights. This test can be repeated for any surface environment, and the data will be used for comparison between surfaces.

Page 16: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 72

Given the graph remains the same, the graphs for different surfaces will only differ by the assigned edge weights. This comparison is the key for the robot determining which surface environment it is in. The robot collects data in real time from the sensors mounted to its body while traversing a preprogrammed path, which will be determined based on the largest edge comparison of the two paths. The robot can then determine which environment it is in based on which threshold the real time data lies in. If the thresholds of the two edges overlap, and the actual data falls within the overlap, the robot could then determine based on which of the average weights it is closest to. Once determining its environment, the robot would know which preset graph to follow.

EXPERIMENTS The experiments were set up using a two limbed, two

gripper robot controlled by an Arduino. A test stand was erected with aluminum slotted bars, and a camera was set up directly over the robot to record its movements. A video of the robot going through the Eulerian path was recorded then uploaded into the free Kinovea imaging software program for analysis of the robot’s overall displacement and velocity. Table 1 shows the displacement results from two environments, a smooth surface and carpet.

Figure 4. Three limbed soft robot that has correspondingly 8 nodes and the corresponding directed

graph.

Path Smooth Carpet

X (in) Y (in) X (in) Y (in) 1→2 0.04 0.17 0.01 0.15 2→3 0.02 0.11 0 0.1 3→4 0.01 0.2 0.07 0.08 4→1 0 0.09 0.07 0.02 1→4 0.03 0.03 0.07 0 4→2 0 0.42 0.11 0.13 2→4 0 0.1 0.08 0.09 4→3 0 0.03 0.05 0 3→1 0.01 0 0 0 1→3 0.01 0 0.01 0 3→2 0.04 0.55 0.12 0.2 2→1 0 0.14 0.02 0.08 Table 1. Eulerian path results of a two limbed soft robot

shown as its displacement along the x and y axis in inches

From the results we can see first that there is a clear

difference in displacement along the y-axis between the two environments. The soft robot could go along the simple cycle 3 → 2 → 4 → 2 as it goes across the two paths of the greatest difference along the y-axis (3 → 2 and 4 → 2). Knowing this, the robot could collect data from sensors attached to its body and analyze it to determine which environment it is in.

CONCLUSION In conclusion, this method of discretizing a soft robot’s

movements to learn about the surface of contact looks promising. Table 1 shows a clear difference in locomotion of the robot across different surface environments; however, only two surfaces were tested for this study. To further show the ability of this theory a larger variety of surfaces will need to be tested. Comparing a variety of surfaces may also show a relationship between paths and the locomotion of soft robots allowing for the control and prediction of the robots’ movements. This method is inspired by reinforcement learning, and continues the study of optimizing the robot-environment interaction by taking it further through determination of its environment.

REFERENCES [1] F. Renda, M. Cianchetti, M. Giorelli, A. Arienti, and C. Laschi, “A 3D steady-state model of a tendon-driven

Page 17: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 73

continuum soft manipulator inspired by the octopus arm,” Bioinspir. Biomim., vol. 7, no. 2, p. 025006, Jun. 2012. [2] I. D. Walker, H. Choset, and G. S. Chirikjian, “Snake-Like and Continuum Robots,” in Springer Handbook of Robotics, B. Siciliano and O. Khatib, Eds. Springer International Publishing, 2016, pp. 481–498. [3] D. Trivedi, A. Lotfi, and C. D. Rahn, “Geometrically Exact Models for Soft Robotic Manipulators,” IEEE Trans. Robot., vol. 24, no. 4, pp. 773–780, Aug. 2008. [4] C. Duriez, “Control of elastic soft robots based on real-time finite element method,” in IEEE International Conference on Robotics and Automation, 2013, pp. 3982–3987. [5] K. Autumn et al., “Robotics in scansorial environments,” 2005, vol. 5804, pp. 291–302. [6] R. F. Shepherd et al., “Multigait soft robot,” Proc. Natl. Acad. Sci., vol. 108, no. 51, pp. 20400–20403, Dec. 2011. [7] J. Bishop-Moser and S. Kota, “Design and Modeling of Generalized Fiber-Reinforced Pneumatic Soft Actuators,” IEEE Trans. Robot., vol. 31, no. 3, pp. 536–545, Jun. 2015. [8] M. Cianchetti, A. Arienti, M. Follador, B. Mazzolai, P. Dario, and C. Laschi, “Design concept and validation of a robotic arm inspired by the octopus,” Mater. Sci. Eng. C, vol. 31, no. 6, pp. 1230–1239, Aug. 2011. [9] V. Vikas, E. Cohen, R. Grassi, C. Sözer, and B. Trimmer, “Design and Locomotion Control of a Soft Robot Using Friction Manipulation and Motor-Tendon Actuation,” IEEE Trans. Robot., vol. 32, no. 4, pp. 949–959, Aug. 2016. [10] T. Umedachi, V. Vikas, and B. A. Trimmer, “Softworms : the design and control of non-pneumatic, 3D-printed, deformable robots,” Bioinspir. Biomim., vol. 11, no. 2, p. 025001, 2016. [11] S. Schaal, “Dynamic Movement Primitives -A Framework for Motor Control in Humans and Humanoid Robotics,” in Adaptive Motion of Animals and Machines, Springer, Tokyo, 2006, pp. 261–280. [12] V. Radhakrishnan, “Locomotion: Dealing with friction,” Proc. Natl. Acad. Sci., vol. 95, no. 10, pp. 5448–5455, May 1998. [13] V. Vikas, P. Grover, and B. Trimmer, “Model-free control framework for multi-limb soft robots,” in 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2015, pp. 1111–1116.

Page 18: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 74

Journal of UAB ECTC Volume 16, 2017

Department of Mechanical Engineering The University of Alabama, Birmingham

Birmingham, Alabama USA

ROBUSTNESS TO NOISE TEST FOR THE MACHINE LEARNING MODEL OF NEUROLOGY PROBLEMS

Khaled Elzaafarany University of Alabama at Birmingham

Birmingham, Alabama, USA

Moustafa H. Aly Arab Academy for Science, Technology and

Maritime Transport, Alexandria, EGYPT

ABSTRACT Cerebral Vasospasm (CV) is a narrowing of the blood

vessels in the human brain. A Transcranial Doppler (TCD) system is a noninvasive device that can be used for diagnosis of various brain diseases and CV detection. TCD signals can be contaminated with noise from sources such as power lines and electrodes before using these signals in signal processing steps. The goal of this study is to evaluate the CV detection model’s accuracy against this noise. Time-frequency feature extraction is used as a technique to enhance the detection accuracy and efficiency. In previous studies, we extracted the CV and normal classifier model by using a combination of 12-time frequency features, but the results generated moderate accuracy when examined in real-time [22]. In this study, we test the robustness to noise of a proposed model; experiments are applied in real-time on recorded TCD signals from the right and left middle cerebral artery (MCA) region of the brains of 160 subjects. The experimental results give 87.5% sensitivity for CV. This percentage starts to decrease at a signal to noise ratio of 30 (SNR), and 89 % specificity for normal and this percentage starts to decrease at a SNR value of 60.

KEY WORDS: Neurology, Signal Processing, Machine Learning, Feature Extraction.

INTRODUCTION The Transcranial Doppler (TCD) device is generally used

to diagnose cerebral hemodynamics, stenosis, trauma, aneurysm and hemorrhage [1]. The measurement of the brain blood flow rate requires advanced image processing techniques. The Doppler concepts in the medical field depend on transmitting a frequency to the brain and observing the difference between the transmitted and reflected frequencies. The Doppler shift 𝚫𝚫f is given by the equation (1):

𝚫𝚫 𝐟𝐟 = 𝟐𝟐 𝒗𝒗𝒄𝒄

𝐅𝐅 𝐜𝐜𝐜𝐜𝐜𝐜 ϴ (1) where F is the transmitted frequency, v is the velocity of blood, 𝚹𝚹 is the beam-vessel angle and c is the speed of sound in the middle cerebral artery (MCA). TCD can detect a decrease or increase in blood flow rate or resistivity variation. The second choice is magnetic resonance or angiography techniques, but

those techniques are very expensive, and require continuous attendance of expert physicians.

In the literature, TCD signals were classified by Ozturk et al. using a neuro-fuzzy classifier of the non-stationary chaotic invariant TCD signal [2]. Uguz proposed the Rocchio-based hidden Markov model(HMM) and fuzzy discrete hidden Markov model (FDHMM) for enhancing the classifications of TCD signals [3,4]. Guler et al. applied the fast Fourier transform (FFT) and adaptive autoregressive-moving average (A-ARMA) for spectral image analysis of TCD signals. A-ARMA produced the best spectral resolution [5]. Serhatlioglu et al. used the neural network as a classifier of FFT transcranial signals [6].

As seen in many studies, Fourier transform is used widely, but it is a technique that cannot display all time and frequency information details, which means that it has a significant problem in detecting many diseases due to poor spectral resolution and to the different noise power especially in non-stationary signals. So, we will try in the future to use the wavelets as a feature extraction method, because it gives optimal time-frequency resolution in all ranges of frequencies. The major advantage of the wavelet transform is that the window size can be varied for low and high frequencies. For this benefit, the wavelet transform is applied in image processing [7,8], signal processing [9,10] and biomedicine [11].

In this work, previously recorded TCD signals obtained from the right and left middle cerebral arteries (RMCA, LMCA) of 16 patients were sent by auxiliary cable to a personal computer (PC) using a 16-bit sound card. The machine learning model method was applied to the recorded signals in order to classify the CV. The results were compared with the physician’s decision for verification of the proposed work, and then the extracted model was tested at different values of noise power. Internal or external noise to the signal will cause the appearance of a new or extra frequency that can influence the estimation detection of neurology problems, so our goal is to calculate the signal to noise ratio after adding the noise, and to find the effect of that on the system’s sensitivity and specificity detection rate.

The following section presents the structure of the methods and techniques for TCD signal processing for medical diagnosis of cerebral vasospasm (CV). In the Results and Discussion

Page 19: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 75

section, we display the results of CV detection, taking into consideration the effect of noise on the dataset and the performance of the different SNR. Finally, the Conclusion section summarizes our studies and proposes future research directions.

RESEARCH METHODOLOGIES A.TCD Signal Collection

An audio database was used. It has 160 wave files of 3-10 seconds in duration with a sampling rate of 44.3kHz. All of them were transferred from TCD to the PC by an auxiliary audio cable. Two steps were applied on the dataset to detect the CV subjects. The first was feature extraction and the second was the classifier; the settings used for each step are described below. All the results were compared with the decision of a vascular neurologist. B.1 Feature Extraction

This step was used in machine learning and audio signal processing to compress the redundancy that is found in the data set [12], where the output data sets are small in size and help to enhance the performance of the classifier. We used the two domains, time and frequency, features. The time domain features used here were zero cross rate, energy, and energy entropy. The frequency features used are Mel-frequency cepstral coefficients (MFCC), chroma coefficients, spectral centroid, spread, entropy, spectral roll-off, spectral flux and harmonic ratio. We display the effect of each of these 12 features on the CV detection in the results section. These features were fed to different classifiers, as described below. B.1.1 Zero Crossing Rate and Harmonic Ratio

ZCR is used as a feature in the narrowband signals. It occurs when the sample changes the algebraic sign [13]. The average rate can be used as a feature in the classifier input. On the other hand, concerning the harmonic ratio, we can assume the TCD signals are quasi-periodic to calculate the fundamental period by applying the algorithm explained in [14] by comparing the signal with its shifting. B.1.2 Energy and Energy Entropy

These are used for feature extraction in the audio signal analysis. The energy entropy is measured by dividing each wave file into frames and each frame to segments, then normalizing by the energy of the frame [15]. It can reflect the sudden energy transition. B1.1.3 Mel-Frequency Cepstral Coefficients and Chroma

MFCC is defined as the short time speech spectrum; it can be measured by taking the log to the power spectrum of nonlinear Mel frequency and then applying the linear cosine transform [16]. MFCC is used in speech analysis and in the application of human speech prediction [17,18]. It also measures the signal cepstral. On the other hand, Chroma is the

displaying of spectral energy as Wakefield. It can be measured by transforming the Discrete Fourier transform (DFT) coefficients into bins. It is widely used to predict the music that is produced from piano [19]. B.1.4 Spectral Centroid, Spread, and Entropy

These features are used for music and speech discrimination [20]. The spectral centroid represents the mass center of the spectrum, and the spectral spread is then calculated by the second moment of the spectral centroid. With regard to spectral entropy, it can be obtained using the same technique like the energy entropy. But, in this technique, the frame spectrum is divided to sub-bands and is then normalized by the energy of the spectrum frame. B.1.5 Spectral Roll-off and Flux

Spectral roll-off is used to distinguish between the voiced and unvoiced signal [21]. It can be obtained by calculating the frequency under 85% of the concentrated spectrum magnitude. With regard to the spectrum flux, it monitored the deviation between two successive frames. B.1.6 Classifiers

First, for standardizing the feature values, we applied feature scaling and mean normalization as a preprocessing step. We applied various classifying methods like a decision tree, K-nearest neighbors (KNN), support vector machine (SVM), and logistic regression. We found that the bagged decision tree and KNN methods gave the highest detection percentage.

RESULTS AND DISCUSSION Firstly, we tested the efficiency and evaluated the success

of the proposed algorithm, which is based on 12 features. The 12 features were added, and the results were calculated in terms of sensitivity, specificity, and accuracy using the decision tree classifier. The main purpose in this article is to test the influence of noise on the tested dataset. The experimental results of 160 wave files, which were processed using the bagged decision tree classifier, are 87.5% for sensitivity and 89.77% for specificity, but all these results were obtained from the previous studies [22] that were conducted without adding any type of noise to the signal, so in this study we added noise to evaluate our algorithm.

In the TCD device, the Power M-mode program is a built-in component. It can simulate the velocity of blood in RMCA, LMCA, and Basial artery (BA) by calculating its power, the number of samples, mean, DIAS (Desmoteplase (chemical compound) in Acute Stroke) and PI (pulsatility index is calculated by peak systolic velocity-end diastolic velocity)/time averaged velocity). This can be shown in Figure 1. After this calculation is concluded, the recorded wave file is taken from TCD to Matlab to confirm signal processing on the wave file and then to detect the patient in normal case or CV. Figure 2 shows the signal before training and testing by machine

Page 20: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 76

learning. Later on, it would be desirable to predict CV before it happens.

Figure1. TCD Signal Monitoring.

Figure 2. Simulated TCD Signal before Appling Machine

Learning Step.

As seen, there are slight differences between the TCD signal and the signal that reached Matlab. So it is important to study the robustness to noise on the dataset using different noise power. Figure 3 shows the evaluation of the proposed model to noise robustness, by adding the Additive White Gaussian noise (AWGN) to the dataset. The experiments show that the CV detection model is robust to noise until the SNR reaches 30, and in the normal detection until the SNR reaches 60. This AWGN can be generated from the TCD cable, the power line or the TCD probes.

CONCLUSION This research aimed to test the CV detection model against

the noise by using an ensemble of 12 features implemented with a bagged decision tree. When the developed algorithm is tested, the classification efficiency performance achieves 87.5%

sensitivity and 89% specificity. But applying a difference noise power ratio gives us a different result at SNR values of 60 for sensitivity and dBSNR values of 30 for specificity. In a future work, we can use the wavelet features as an additional feature with the proposed model as an assistant diagnostic tool for brain problem evaluation and decreasing the physician’s attendance in the neurology clinics and on other the hand denoising or eliminating noise using infinite impulse response filter (IIR).

Figure3. SNR Percentage with Sensitivity and Specificity Percentage.

ACKNOWLEDGMENT We would like to express our appreciation to Dr. Kumar, Department of Neurology, in Mayo Clinic, USA, for providing TCD files. We are also grateful to AASTMT for continuous assistance.

REFERENCES [1] Evans, D. H., McDicken, W.N., Skidmore, R., J., 1989,

“Doppler Ultrasound: Physics,” Instrumentation and Clinical Applications, Wiley, Chichester.

[2] Ozturk, A., Arslan, A., Hardalac, F., 2008, “Comparison of Neuro-Fuzzy Systems for Classification of Transcranial Doppler Signals with their Chaotic Invariant Measures,” Expert Systems with Applications 34, pp. 1044–1055.

[3] Uguz, H., Ozturk, A., Sarac, R., Arslan, A. 2008, “A Biomedical System Based on Fuzzy Discrete Hidden Markov Model for the Diagnosis of the Brain Diseases,” Expert Systems with Applications 35 (3), pp. 1104–1114.

[4] Uguz, H., Arslan, A., 2010, “A New Approach Based on Discrete Hidden Markov Model Using Rocchio Algorithm for the Diagnosis of the Brain Diseases,” Digital Signal Processing 20(3), pp. 923–934.

[5] Guler, I., Hardalac, F., Kaymaz, M., 2002, “Comparison of FFT and Adaptive ARMA Methods in Transcranial Doppler Signals Recorded from the Cerebral Vessels,” Computers in Biologyand Medicine, 32, pp. 445–453.

[6] Seraglio, S., Hardalac, F., Guler, I., 2003, “Classification of

Page 21: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 77

Transcranial Doppler Signals Using Artificial Neural Network,” Journal of Medical Systems, 27 (2), pp. 205–214.

[7] Bruni, V., Vitulano, D., 2007, “Combined Image Compression and Denoising Using Wavelets,” Signal Processing: Image Communication, 22 (1), pp. 86–101.

[8] Chen, J., Zhang, Y., Shi, X., 2006, “Image Coding Based on Wavelet Transform and Uniform Scalar Dead Zone Quantize Signal Processing,” Image Communication 21 (7), pp. 562–572.

[9] Wu, J., Hsu, C., 2009, “Fault Gear Identification Using Vibration Signal with Discrete Wavelet Transform Technique and Fuzzy-Logic Inference,” Expert Systems with Applications 36(2), pp. 3785–3794.

[10] Ekici, S., Yildirim, S., Poyraz, M., 2008, “Energy and Entropy-Based Feature Extraction for Location Fault on Transmission Lines by Using Neural Network and Wavelet Packet Decomposition,” Expert Systems with Applications 34, pp. 2937–2944.

[11] Guler, I., Ubeyli, E. D., 2005, “ECG Beat Classifier Designed by Combined Neural Network Model,” Pattern Recognition 38, pp. 199–208.

[12] Umapathy, K., Rao, R., 2007, “Audio Signal Feature Extraction and Classification Using Local Discriminant Bases,” IEEE Transactions on Audio, Speech, and Language Processing 15(4), pp. 1236.

[13] Xu, M., et al., 2003, “Creating Audio Keywords for Event Detection in Soccer Video,” Multimedia and Expo. ICME '03. Proceedings.

[14] Pfeiffer, S., Fischer, S. and Effels berg, W., 1996, “Automatic Audio Content Analysis,” in Proc. 4th ACM Int. Conf. on Multimedia, pp. 21

[15] Nam, J., Alghoniemy, M., and Tewfik, H., 1998, “Audio-Visual Content-Based Violent Scene Characterization,” Image Processing. ICIP.

[16] Anusuya1, M. A., and Katti, S. K., 2010, “Mel-Frequency

Discrete Wavelet Coefficients for Kannada Speech Recognition using PCA,” International Conference on Advances in Computer Science; Trivandrum, Kerala, India.

[17] Hasan, R., Jamil, M., Rabbani, G., Rahman, S. 2004, “Rehman MS. Speaker Identification using MFCC coefficients,” 3rd International Conference on Electrical and Computer Engineering (ICECE).

[18] Indrebo, K., Povinelli, R., Johnson, M., 2008, “Minimum Mean-Squared Error Estimation of Mel-Frequency Cepstral Coefficients Using a Novel Distortion Model,” IEEE Transactions on Audio, Speech and Language Processing; 16(8), pp. 1654–61.

[19] Kwun, T., Jeong, D., and Nam, J., 2017, “Audio-to-Score Alignment of Piano Music Using Rnn-Based Automatic Music Transcription,” Proceedings of the 14th Sound and Music Computing Conference, Espoo, Finland.

[20] Yadati, K., et al., 2017, “On the Automatic Identification of Music for Common Activities,” Multimedia Applications (Oral Presentation), ICMR’17, Bucharest, Romania, pp. 192

[21] Kim, K., Kim, S., Jeon, J. and Park, K., 2006, “Quick Audio Retrieval Using Multiple Feature Vectors,” IEEE Transactions on Consumer Electronics 52(1), pp. 200

[22] Kumar, G., Elzaafrani, K., & Nakhmani, A., 2017, “Machine Learning Approach to Automate Detection of Cerebral Vasospasm Using Transcranial Doppler Monitoring,” American Academy of Neurology.

Page 22: UAB - ECTC 2016 JOURNAL- Section 01 Page w footer · random initialization. To avoid this problem, the network described in this paper is initialized with the weights of fully- a

UAB School of Engineering - Mechanical Engineering - Journal of the ECTC, Volume 16 Page 78