• No results found

Road Roughness Detection by Analysing IMU Data

N/A
N/A
Protected

Academic year: 2021

Share "Road Roughness Detection by Analysing IMU Data"

Copied!
101
0
0

Loading.... (view fulltext now)

Full text

(1)

Road Roughness Detection by

Analysing IMU Data

Wan Wen

Master’s of Science Thesis in Geodesy

TRITA-GIT EX 08-001

School of Architecture and the Built Environment

Royal Institute of Technology (KTH)

100 44 Stockholm, Sweden

(2)
(3)

Abstract

Abstract

Abstract

Abstract

(4)

Acknowledgements

Acknowledgements

Acknowledgements

Acknowledgements

First, I would like to express my sincerest gratitude and highest respect to my supervisor, Milan Horemuž, for his guidance and encouragement during the thesis work. I would also express my thanks to Professor Lars Sjöberg and Huaan Fan. I would thank them for all the discussions, valuable comments and kind help. I am grateful to all my teachers in KTH, both for their academic and moral support. I am also grateful to Krzysztof Gajdamowicz and Daniel Öhman for their original idea of this thesis work and the enjoyable discussions.

I would like to present my special thanks to my closest colleague and boyfriend, Xing Lin, for his love, sincerity, encouragement and support everyday.

I should also present my indebtedness to my grandparents and my best friend, Cong Liu, for their boundless love and blessings.

(5)

Table of Contents

Table of Contents

Table of Contents

Table of Contents

Glossary of Acronyms...vvvv 1. Introduction ...1111

1.1 Motivation for the project ...1

1.2 Objectives...2

1.3 Delimitation...2

1.4 Organization of the thesis ...3

2. Literature Review...4444 2.1 Roughness Measurement Systems and Road Roughness Indices...4

2.2 Roughness Measurement integrated with GPS/INS mobile mapping systems ...5

3. Data Acquisition...6666 3.1 Equipments ...7 3.2 Measurement ...7 3.3 Data preparation ...7 4. Methodology ...101010 10 4.1 Methodology...10

4.2 The Overall Work Flow ...11

5. Bump detection ...141414 14 5.1 Experimental strategy ...14

5.2 Procedure and Results...15

6. Texture Evaluation...252525 25 6.1 Experimental strategy ...25

6.2 Procedure and Results...25

7. Texture Classification...33333333 7.1 Data preparation for all classification methods...33

7.1.1 Numerical basis for classification...33

(6)

7.2 Fuzzy Logic Based Classification ...36

7.2.1 Introduction to Fuzzy Logic and Fuzzy Logic Based Classification ...36

7.2.2 Algorithm and Procedure...37

7.2.3 Accuracy Assessment...49

7.3 Maximum Likelihood Classification...50

7.3.1 Introduction to Maximum Likelihood Classification (MLC)...50

7.3.2 Algorithm and Procedure...54

7.3.3 Accuracy Assessment...56

7.4 Distance based classification ...57

7.4.1 Introduction of distance based classification – the idea of IDW...57

7.4.2 Problems when using the IDW method:...58

7.4.3 Supplementary procedures aiming at the problems...59

7.4.4 Procedure and Results ...63

7.5 Accuracy Assessment and Result Discussion ...67

7.5.1 Introduction to Accuracy Assessment ...67

7.5.2 Steps of Accuracy Assessment...68

7.5.3 Discussion of Classification Result and Accuracy ...71

7.5.4 Improvement through Integration ...73

8. Visualization of Results ...77775555 8.1 Introduction to Visualization of Results ...75

8.2 Algorithm: Interpret Geographical Location for IMU Data from GPS ...76

8.3 Visualization of Road Bumps ...77

8.4 Visualization of Road Texture of Roughness ...80

9. Conclusions and Future work ...88882222 9.1 Conclusions...82

(7)

Glossary of Acronyms

Glossary of Acronyms

Glossary of Acronyms

Glossary of Acronyms

BPR Bureau of Public Roads FIS Fuzzy Inference System GPS Global Positioning System GUI Graphical User Interface IDW Inverse Distance Weighting IMU Inertial Measurement Unit INS Inertial Navigation System IRI International Roughness Index MLC Maximum Likelihood Classification

RN Ride Number

PCA Principal Component Analysis

PI Profile Index

(8)

1.

1.

1.

1.

Introduction

Introduction

Introduction

Introduction

1.1

1.1

1.1

1.1

Motivation for the project: why deriving information of road roughness from

Motivation for the project: why deriving information of road roughness from

Motivation for the project: why deriving information of road roughness from

Motivation for the project: why deriving information of road roughness from

IMU data

IMU data

IMU data

IMU data

Roughness of a road is one of the most important indicators of road comfort and safety. Road bumps have significant effects on tire wear, fuel consumption, and thus on economy and environment; in certain cases, effects are even more. Road roughness information can be very helpful for road authorities to undertake effective control and maintenance, and also for other civil users to choose suitable routes.

For these reasons, road roughness measurements have been widely noticed in the past decades. Conventional road roughness measurements are of low speed and involve a lot of human intervention, which are not adequate for large road networks and the increasing desires for information update. Nowadays, people are resorting to many advanced measuring systems and methods, among which, this paper is proposed to find out road roughness information from a popular mobile measuring system GPS/INS.

As GPS and INS have some mutual complementary characteristics, currently the GPS/INS integrated navigation techniques are widely used in mobile measuring/mapping systems. Highly precise positioning information with sound geo-referencing ability is achieved by this measuring system, and many related software enable their data sets capability of directly integrating into a GIS database. As the extensive using of GPS/INS techniques, some people have been attempting to develop 3D model to simulate road surface, most of which are concerning analysis on real-time range based or image based data (from radar, camera or video). However, these models are still not mature to represent road surface and frequently facing a difficulty when performing large amount of data manipulation because of their huge amount of data.

(9)

1.2

1.2

1.2

1.2

Objectives

Objectives

Objectives

Objectives

To describe the roughness of road, two main factors are extracted out (Figure 1.2.1). They are texture and bump.

Figure 1.2.1: The definition of texture and bump

Texture is used to describe the overall character of a road segment. It is an important factor for evaluating the roughness level of road segments. Bump is used to describe an accidental jolt on the road surface. It could be caused by a hole or a swelling.

Work is carried out towards a successful description of these two factors of roads. Classification is used as the main method for describing texture. Road segments evaluated as of different roughness levels are classified into different classes. The magnitudes and locations of bumps are also aimed to be found in this project. All these work are based on figuring out the relationship between the IMU signal textures and signal bumps and the real road textures and bumps. The last objective is to fuse roughness information and location information and then visualize the road roughness characters on a map.

1.3

1.3

1.3

1.3

Delimitation

Delimitation

Delimitation

Delimitation

There are also some problems of importance which may hard to achieve in this study.

(10)

Secondly, as the existence of car suspension effect, it is hard to gain exact quantitative information about road bumps’ amplitude based on IMU data analyses. The evaluation of road roughness should thus be fuzzy.

Thirdly, as the lack of highly precise measurements with road profiler, there are no reference samples for standardizing or testing in this project. For this reason, methods in this project can not provide any calculation on roughness indices. To make up this shortage, methods enabling adopting input reference samples are designed. These inputs are viewed as bridges to other measuring scales, either standardized or not.

What is more, the classification thresholds used in this paper are built empirically. If the measurements are changed (e.g., the van), the thresholds in the practical case may become invalid. If to adopt methods developed in this paper, readers are suggested to notice the limitation and perform some calibrations.

1.4

1.4

1.4

1.4

Organization of the thesis

Organization of the thesis

Organization of the thesis

Organization of the thesis

(11)

2.

2.

2.

2.

Literature Review

Literature Review

Literature Review

Literature Review

2.1

2.1

2.1

2.1

Roughness Measurement Systems and Road Roughness Indices

Roughness Measurement Systems and Road Roughness Indices

Roughness Measurement Systems and Road Roughness Indices

Roughness Measurement Systems and Road Roughness Indices

Roughness is defined as the variation in surface elevation along a road that causes vibrations in traversing vehicles (Sayers, 1984). Actually, since 1960s, a lot of studies and researches have been done on this subject and a lot of measuring equipments and techniques are developed since then. Since 1970s, profiling technology with ability to provide stable roughness results which can be compared with results generated at different time from different profiler is widely adopted. Until now, road profilers are still the most major tools applied in the road roughness measurements. Mostly triggered by the development of profilers, international standardization activities have been accelerated. Many indices are derived from profile data and people’s perception of ride quality to quantify road roughness. Some widely used indices include International Roughness Index (IRI), Ride Number (RN), Profile Index (PI) and so on. Different indices correspond to different measuring methods and systems. However, as most indices are mainly built on certain measuring methods, comparison between results from different standards faces problems. Some research shows that even with same type of devices, accuracy varies significantly (Wang, 2006). Studies on the evaluation and comparison of different indices and measuring methods, and the accuracy of measurements are still under way.

(12)

2.2

2.2

2.2

2.2

Roughness Measurement integrated with GPS/INS mobile measuring/ mapping

Roughness Measurement integrated with GPS/INS mobile measuring/ mapping

Roughness Measurement integrated with GPS/INS mobile measuring/ mapping

Roughness Measurement integrated with GPS/INS mobile measuring/ mapping

systems

systems

systems

systems

The desire for collecting road roughness and 3D road profile information in the mobile measuring/mapping systems increases as its high speed, low cost characters and its flexibility for adopting multi-sensors are more and more valued these days. As a GPS/INS system gives high quality geo-reference, road roughness detection integrated with GPS/INS system is emphasized. Generally speaking, most common approaches to obtain 3D road information are concerning either range based or image based techniques. Some researches combining both range and image based techniques are also under way but not mature.

Range based techniques (e.g., radar, laser), can directly obtain 3D data according to the range difference. However, because the beam is sent discretely and time intervals exist, the accuracy is not as high as image based techniques; and sharp discontinuities such as sharp road bumps cannot be accurately measured. Thus, I would say most current range based measurements are not sufficient enough to detect road disturbances. Image based techniques (e.g., video, camera) which computes 3D information with respect to sequences of image of different view angle, is very useful to achieve higher accuracy in 3D model; therefore it is a feasible method to detect road bumps. However, the results have a strong dependence on well defined and well illuminated features (should gain good illumination situation and avoid occlusion in its environment) (Yu, 2005). To combine sides, range and image based measurement systems have been undertaken currently. People are trying to find out a better combination of multi sensors which can make use of advantages from both sides; images are still the main source for detail road texture.

(13)

3.

3.

3.

3.

Data Acquisition

Data Acquisition

Data Acquisition

Data Acquisition

3.1

3.1

3.1

3.1

Equipments

Equipments

Equipments

Equipments

Our acquisition equipments include three components:

Figure 3.1.1: Equipment

Roughness detection component: a six-degree of freedom inertial measurement unit with sampling frequency of 100 frames/second is used. It is produced by Inertial Science, Inc. and its model type is ISIS-IMU (Figure 3.1.1 left). Detail specifies could be found on web page

http://www.inertialscience.com/manuals/ISIS_broc.PDF. The IMU is fixed inside the car when measuring.

Navigation component: only a GPS receiver is used in this project as the equipment for collecting location information. As the focal point is not about the GPS/INS integrated positioning, only data from GPS is used to provide rough location information. The model of the GPS receiver used in our measurement is called GPSMAP 76CS (Figure 3.11 middle), produced by Garmin International Inc.; detail specifies of the GPSMAP 76CS could be found on web page

https://buy.garmin.com/shop/store/assets/pdfs/specs/gpsmap76c_76cs_spec.pdf.

Video component: video camera is used to record the true road situation during the measurement. The video is viewed as a reference for testing our model. The model of the video camera used in our measurement is MVX250i Canon Digital Camcorder (Figure 3.1.1 right).

(14)

3.2

3.2

3.2

3.2

Measurement

Measurement

Measurement

Measurement

Firstly, we will present how the IMU instrument is fixed by showing Figure 3.2.1, which shows the body frame (vehicle frame), the IMU frame and their relationship used in our measurement. Outputs from different accelerometers and gyroscopes are also indicated.

Figure 3.2.1: Body frame (vehicle frame), IMU frame and their relationship

We measured two different routes with the same instruments on the same day. Speeding up and down, driving fast and slowly, passing smooth and rough roads, keeping straightly and turning, ascending and descending, and moving and ceasing are all deliberately experienced during the whole measurement.

3.3

3.3

3.3

3.3

Data preparation

Data preparation

Data preparation

Data preparation

(15)

Figure 3.3.1: Raw data file from IMU

Time Counter rx (deg/s) ry (deg/s) rz (deg/s) fx (m/s) fy (m/s) fz (m/s) Figure 3.3.2: Schema of raw data file from IMU

Data from GPS is shown in Figure 3.3.3. Totally, 200 points were obtained during the whole measurement. The file could also be imported into software MapSource (version 6.5); the routes of measurement are displayed (Figure 3.3.4).

(16)

Figure 3.3.4: Measuring routes from GPS data

The file from the video camera can be played by many common types of software with ability to show detail time scale.

(17)

4.

4.

4.

4.

Methodology

Methodology

Methodology

Methodology

4.1

4.1

4.1

4.1

Methodology

Methodology

Methodology

Methodology

Empirically, if sitting in a car, one can feel the vibration of the car, and the degree of vibration varies as road roughness character changes. The signal form the IMU, the record of instantaneous accelerations and rotational accelerations in certain directions, also changes following car’s vibration. Based on this idea, we assume that there should be certain relationship between road roughness and signal roughness from the IMU. As what is mentioned in section 1.2, the task of finding this relationship could be concretized as describing road texture and bump by analyzing signals from the IMU. Accordingly, our two main tasks are to describe road texture and to detect bumps on road.

Embarking on the data sources, data from the IMU are actually six channels of discrete digital signals. To some degree, we can ascribe the tasks of this thesis to analyzing multidimensional or multivariable digital signals. Generally speaking, there are two perspectives to analyze discrete signals: time domain analysis and frequency domain analysis. Signals can be represented either in time domain or frequency domain; some information is easier to visualize in time domain while some information is easier to visualize in frequency domain. Depending on what information we want, both domains are used in our project but for different aims: to describe road texture and to detect bumps on road.

Firstly, we would like to present the method of bump detection. According to observations on raw IMU data, when passing a bump, the signal on each of the six IMU variables vibrates acutely. These signal bumps are clearly expressed over time domain rather than frequency domain. Consequently, simply detecting the degree of acute vibrations of signal over time domain could be of great use. However, the signal vibrations also contain noises from turning directions and driving accelerating and decelerating, which are called maneuver noises. Necessarily, some data processing aiming at eliminating the effect of maneuver should be performed.

(18)

this work, which has the capability of extracting and removing offending components according to their locations in frequency axis. The Fourier transform is adopted as the main method for transforming signal from time domain to frequency domain. The raw data file is divided into several road segments with certain lengths and the Fourier analysis is carried out on each segment. Then, the statistics and probability approaches are used to characterize signals, which allow the roughness of these road segments to be measured and classified. The first step in developing strategies is to remove the offending components (Steven W. Smith, 1997), which is fulfilled by extracting out the optimal range for representing road texture; we call this range as range of interest (ROI) and then all the evaluation work will be based on ROI instead of other ranges containing offending components. Results from ROI are supposed to be affected by single bump(s) at minimum extent, i.e., magnitude from ROI basically indicating overall road roughness. After finding out ROI, many statistical methods will be used to classify road segments based on their numerical performances in ROI. Allowing that we don’t have sound reference samples with standard roughness evaluations, classification methods for this research must have the ability to deal with uncertainties. Some methods with ability to accept reference samples from other sources are also developed in this paper, on purpose of enabling the comparison between different classification rules or evaluation scales.

Detailed methods are mentioned in Sections 5, 6, 7 and 8 respectively.

4.2

4.2

4.2

4.2

The

The

The

The Overall Work Flow

Overall Work Flow

Overall Work Flow

Overall Work Flow

Both time domain analysis (Figure 4.1) and frequency domain analysis (Figure 4.2) are performed aiming at detecting bumps and describing road texture.

(19)

Figure 4.1: Work flow for bump detection

Figure 4.2: Work flow for texture evaluation

(20)
(21)

5.

5.

5.

5.

Bump detection

Bump detection

Bump detection

Bump detection

5.1

5.1

5.1

5.1

Experimental strategy

Experimental strategy

Experimental strategy

Experimental strategy

Referring to Figure 4.1 in Section 4, the key of bump detection is the time domain analysis. Two aims should be hit. One aim is that noises caused by maneuvers should be removed; the other aim is that results from this analysis should correctly reflect the real magnitude of bumps.

Compared with the signal bumps caused by road bumps, signal bumps caused by maneuvers are rather macroscopic. In other words, the signal changes much faster when meeting road bumps than meeting maneuvers. Consequently, if just removing micro signal vibrations, results can avoid the affection of driving maneuvers. To remove noises, a filter using the moving-window algorithm is applied. We call it maneuver-removing filter. Inside the moving window, the following algorithm (Eq. 5.1a) is performed to calculate the magnitude of bumps:

n

x

x

x

n i i old new

=

=

1 (5.1a)

where

x

newis output from this filter,

x

old is the original value before calculation, n is the window size of the filter and

in=1

x

i

/

n

is the mean of all data in the window. By subtracting the mean of the window, the whole trend caused by macro noises can be removed, and what are left are micro changes within short time span. The moving step of the window is just one datum, which means each value of the original file is replaced by a new value with consideration of its environment. If the

x

newis high, then we can say that this point varies from its environment significantly. Because this significant change belongs to micro extent, we can say that it is caused by a road bump.

The size of window is of vital meaning: it is expected to be suitable enough to both keep the bump information and remove noises. If the window size is too large, the noises from driving acceleration or rotation can still dwell; while if the window size is too small, some large bumps can be removed or reduced unexpectedly.

(22)

or slowly, and climbing up or down are all observed. Normally, signal vibrations caused by bumps have frequency greater than 1 Hz, mainly located in 5-15 Hz; whereas signal vibrations caused by accelerating or turning during driving are less than 0.05 Hz. According to these observations, various window sizes are tested in our project. Window size between 31 – 61 lines of records (0.3-0.6 seconds) is pretty good for representing bumps.

Based on the results above, we can use the square of

x

new(shown in Eq. 5.1b) as the input dataset to detect the location of acute bumps. This procedure will be explained later in Section 5.2, Procedure 4.

2

new location

x

x

=

(5.1b)

Note that

x

location is not where the road bumps are located, but just the dataset prepared for detecting bumps. The detection of bump location will be carried out by running a program, which will be introduced in Section 5.2, Procedure 4. The calculation of the square of

x

new is actually a way to enlarge the vibration of signals. Based on the enlarged singles, to extract the location of acute changes is easier to implement and result can be more accurate.

5.2

5.2

5.2

5.2

Procedure and Results

Procedure and Results

Procedure and Results

Procedure and Results

As only on route 2 there are many bumps, the data expressed in this section are just about route 2. Procedure 1: Performing

Procedure 1: Performing Procedure 1: Performing

Procedure 1: Performing ththththe maneuvere maneuvere maneuvere maneuver----removingremovingremovingremoving filter filter filter filter

(23)

Figure 5.2.1: Result from the maneuver-removing filter (window size = 31 data) Procedure 2: Find out the contribution of each variable

Procedure 2: Find out the contribution of each variable Procedure 2: Find out the contribution of each variable Procedure 2: Find out the contribution of each variable

To know how the six variables (fx, fy, fz, rx, ry, rz) contribute the Figure 5.2.1 above, the result of different variables from the maneuver-removing filter are printed out seperately. (Figure 5.2.2, Figure 5.2.3, Figure 5.2.4, Figure 5.2.5, Figure 5.2.6, Figure 5.2.7)

Figure 5.2.2: Contribution of rx Figure 5.2.3: Contribution of ry

(24)

Figure 5.2.6: Contribution of fy Figure 5.2.7: Contribution of fz

Although contributions from different variables are of different scales, if normalizing them into the same scale and comparing them, one can see that their vaibration patterns are quite similar, expect for the variable rz (shown in Figure 5.2.2- 5.2.7). The rotation variables (rx, ry) show acute bumps a bit more amply, while acceleration variables (fx, fy, fz) show detailed roughness information more richly. As we consider rz is not good enough to show road situation, out further work about bump detection will be focused on the other five variables, say variables of interest. Procedure 3: C

Procedure 3: C Procedure 3: C

Procedure 3: Calculate the magnitude of bumpsalculate the magnitude of bumpsalculate the magnitude of bumps alculate the magnitude of bumps

According to the analysis above, we can set the mean of normalized variables of interest as the bumps’ magnitude (shown in Figure 5.2.8 and Table 5.1).

(25)

Table 5.1: Arrange result file counter magnitude 0.33 7.6128E-03 0.34 5.5189E-03 0.35 1.8648E-03 0.36 4.8310E-03 0.37 7.6540E-03 … …

Procedure 4: Detect the relative location of bumps Procedure 4: Detect the relative location of bumps Procedure 4: Detect the relative location of bumps Procedure 4: Detect the relative location of bumps

Firstly, the square of

x

new,

x

location is calculated for each variable. Secondly, to elimilate the difference caused by scales, we normalized all the

x

location about the five variables into the same scale. Figure 5.2.9 shows the mean of the five normalized

x

location.

Figure 5.2.9: The mean of normalized

x

location

(26)

environment changes. When this change between two adjacent windows exceeds a certain threshold, we say that an abrupt bump may happen. As can be seen from Figure 5.2.10, both current windows detect an acute change compared with the previous windows, but only the left case will be viewed as a real bump; the right case can only be viewed as a beginning of a rough road segment. The length (shown as d in Figure 5.2.10) of a greatly vibrating segment is the criterion to judge whether it is a bump.

Figure 5.2.10: Only an isolated bump can be viewed as a real bump

To solve for d, we defined the large enviromental changes as two types: positive change and negtive change, corresponding to the starting point and the ending point respectively. If the distance between the starting and ending points is shorter than a specified threshold, we accept that a bump happens there. If the distance is too large, we can just say that there is a rough road segment. The whole process could be illustrated in the following three steps:

(1) (1) (1)

(27)

(2) (2) (2)

(2) Move the current window step by step until it reaches the end of whole data series. The length for each step is pre-defined and controlled by the variable named ‘move_threshold’. For each step, do the following procedures to detect bumps:

a. a. a.

a. Move the current window by a single step b.

b. b.

b. Calculate the range of the new window. The same approach as step (1) will be applied here.

c. c. c.

c. Compare the new range and previous range to get the change of range. Do one of the following steps:

i. i. i.

i. If this range change is positive and bigger than a certain threshold (range_threshold), the location of current window is marked as the starting point of a bump. Increase the number of bumps detected by one; remember this location; Let the current range be the previous range, and mark previous range as range_before_begin and return to step a) to continue searching for the end of the bump.

ii. ii.ii.

ii. If this range change is negative, and the absolute value of it is greater than a certain threshold (range_threshold), i.e., the previous one is bigger than the current one over a certain threshold, then the location of the current window is considered as the end of the bump just detected. Repeat current step to see if this location of bump’s end is also the ending point for previous detected bumps. Mark the bumps with both starting and ending points found as fully detected bumps. After all the processing steps associated with bumps’ ending points are finished, go to step d) for further operations.

iii. iii.iii.

iii. If nothing special happened, just go back to step a) and continue to the next window.

(28)

Figure 5.2.11: Stack data structure used to detect nested bumps

After carrying out the algorithm using this stack data structure, we can deal with all the common possible cases listed in Figure 5.2.12.

(29)

d. d. d.

d. If the whole bump has been detected (both starting point(s) and ending point(s)), we have to check the length between a pair of starting point and ending point. If following a starting point an ending point corresponding to it comes, do one of the two steps listed in the following text.

i. i. i.

i. Start a loop to check the bump whether it is complete from the right to left order. ii.

ii.ii.

ii. If current bump is completely detected, then go on to the next step iii or iv; else break this loop and go to the step v.

iii. iii.iii.

iii. If the length of newly detected bump is greater than a certain length (bump_threshold), we consider this one as a high platform, but not a bump.

iv. iv. iv.

iv. If the length of newly detected bump is smaller than a certain length (bump_threshold), we consider this one as a real bump and store its starting and ending point in the output matrix.

v. v.v.

v. Clear all the flags and go to the next windows.

e. e. e.

e. If current window reach the end of data series, stop search and end this loop.

(3) (3) (3)

(3) Until here, all bumps have been detected and stored in the output matrix. In this matrix, all the sampling points that are considered to be a part of bumps will have a flag of 100; otherwise, they will be flagged.

(30)

Figure 5.2.13: The result of relative locations of bumps Procedure 5: Fuse bump information with GPS data and Visualize bumps Procedure 5: Fuse bump information with GPS data and Visualize bumps Procedure 5: Fuse bump information with GPS data and Visualize bumps Procedure 5: Fuse bump information with GPS data and Visualize bumps

For further use, the information of bumps are arranged into the format shown in Table 5.2: Table 5.2: Arrangement of the location and magnitude of bumps

TrackTime Longitude Latitude Height Class BumpMag 10:48:06.48 18.05759492 59.35446104 26.81718967 100 0.25714 10:48:06.49 18.05759512 59.35446102 26.81558743 100 0.35724 10:48:06.5 18.05759532 59.35446101 26.81398519 100 0.63481 10:48:06.51 18.05759551 59.35446099 26.81238295 100 0.6035 10:48:06.52 18.05759571 59.35446097 26.81078071 100 0.724 10:48:06.53 18.05759591 59.35446095 26.80917847 100 0.56962 10:48:22.52 18.05795602 59.35444636 26.067264 100 0.75166 10:48:22.53 18.05795627 59.35444636 26.06779799 100 0.86897 10:48:22.54 18.05795652 59.35444636 26.06833198 100 0.92395 10:48:22.55 18.05795676 59.35444635 26.06886597 100 1.121 10:48:23.3 18.05799134 59.35444795 26.07847779 100 0.93486 10:48:23.31 18.05799212 59.354448 26.07799719 100 0.75207 … … … …

(31)
(32)

6.

6.

6.

6.

Texture Evaluation

Texture Evaluation

Texture Evaluation

Texture Evaluation

6.1

6.1

6.1

6.1

Experimental strategy

Experimental strategy

Experimental strategy

Experimental strategy

To evaluate the overall texture of the road, a 10-second length of the IMU data is chosen as a unit for the evaluation. Within 10 seconds, road roughness situation can change seriously, but our evaluation will be given based on the overall performance of one unit length of road, rather than some parts. As our aim is to evaluate the roughness of an overall road segment of the length of10 seconds, cutting off the contribution of individual bumps from the signal is required. This requirment leads our work from time domain to frequency domain.

If a road segment is of a certain texture, this texture can force a passing car to vibrate slightly in a certain frequency corresponding to the texture. Althouth, depending on the velocity of the car, the frequency changes, but this kind of change must be limited in a certain small range. Rough road texture can force the car to vibrate significantly while smooth road can not force the car to vibrate much. Accordingly, if we can find out the specific range in frequency axis, and build evaluation rules based on numerical analysis and probability studies over this range, we should successfully hit the final aim.

In further detail, some discussions about the transformation from time domain to frequecy domain are still needed. The Fourier transform is used as the way to go between these two domains. But as our Fourier transform is carryed out on small segments of data, some very low frequences with respect to the whole data can produce a trend with respect to the small samples. These very low frequences are mainly caused by maneuvers, which means the accelerating up or down or turning directions during the driving. Normally, detrending on a small segment of data are fulfilled by linear regression (Feige, 1999). However, when practicing linear regression in our case, some maneuver effects could be removed but not all. As these unremovable low frequency signals cannot only affect the behaviour of other frequency bands, but they are also of no interest, we adopt a higher order polynomial regression for detrending. Such a polynomial regression will squeeze the focus into the higher frequency part, which is relative to road texture.

6.2

6.2

6.2

(33)

Firstly, the whole data file is segmented into 10-second interval files. The names of these 10 sec files are given based on the counter ID of points inside the files. For example, all the points of counter ID greater than 0 but not greater than 10 are arranged in to one file named ‘10’. Then in order to perform the Fourier analysis, data about the same variable are arranged into the same folder. Data are split into six folders with names rx, ry, rz, fx, fy and fz.

Procedure 2: Remove trend from raw data Procedure 2: Remove trend from raw data Procedure 2: Remove trend from raw data Procedure 2: Remove trend from raw data

As we memtioned before, the signals from the IMU are also affected by maneuvers. Accordingly, the raw data contains some trends in macro extent, which is not accepted by the Fourer transform. Therefor before performing the Fourier trasform, the trend of raw data should be removed. This procedure is fulfilled by fitting the raw data using a polynomial curve and reducing the raw data to the horizon according to this curve.

The degree of trends in different files varies largely. For most segments, a straight line is enough to remove the trends. However, in some special places, where driving speed changes significantly within a short time, i.e. the macro problem is not really macro, then higher order polynomial fits are required. For some segments, a higher order polynomial fit removes some low frequency components, which can not be called as trends; but these low frequency components are of no use because they are still too low to be related to road texture. After carefully experimenting, we find that the fourth order polynomial fit is quite sufficient for all cases we have. The following graphes (Figure6.2.1 and 6.2.2) show a special case in which the first order polynomial fit does not work.

(34)

Figure 6.2.2: Comparing with Figure 6.2.1, the fourth order polynomial fit works quite well. Pro

Pro Pro

Procedure 3: Fourier Transformcedure 3: Fourier Transformcedure 3: Fourier Transform cedure 3: Fourier Transform

The algorithm named Fast Fourier Transform (FFT) is used to perform the Fourier transform on each file of each folder. The FFT algorithm is an efficient algorithm to compute the Discrete Fourier transform (DFT). In other words, the return value from the FFT is the same result from DFT but it is computed in a fast way. For a 10-second file, there are 1000 points within it. Accordingly, we set the sampling point of the DFT as 300, which is suffient enough to express the information in frequency domain.

Procedure 4: Choosing reference samples by refering to video. Procedure 4: Choosing reference samples by refering to video. Procedure 4: Choosing reference samples by refering to video. Procedure 4: Choosing reference samples by refering to video.

Reference samples are the standard and basis for texture evaluation and classification. They could be collected by accepting numerical reference samples based on certain measurements, or by adopting samples with certain classification rules.

According to different measurement scales, there are three types of reference samples that could be accepted:

(1) (1) (1)

(1) Nominal reference samples: one can neither tell the numerical meaning of different types of sample, nor compare their roughness. Samples just belong to different classes with differernt names refering to different road textures.

(2) (2) (2)

(35)

to," or "less than." One can not say that the roughness of class 2 is twice the roughness of class 1.

(3) (3) (3)

(3) Numerical reference samples: both interval and ratio measurement scales are mentioned here. This kind of samples can be numerically expressed by some indices.

Usually, the first two kinds of samples are defined empirically based on people’s knowledge, while the third kind of sample is mainly based on precise measurement.

In our project, as we do not have equipment to measure detail roughness level on certain places, the reference samples are just picked out by refering to video. The rule of classes are also judged subjectively. Consequently, the reference samples used in our project can just show roughness classes instead of roughness values; the classification scale is more ordinal than numerical.

Procedure 5: Frequency domain anal Procedure 5: Frequency domain anal Procedure 5: Frequency domain anal

Procedure 5: Frequency domain analysis: Find out the expressive ability of different variables and ysis: Find out the expressive ability of different variables and ysis: Find out the expressive ability of different variables and ysis: Find out the expressive ability of different variables and define the varaibles of interest

define the varaibles of interest define the varaibles of interest define the varaibles of interest

To examine the expressive ability of different variables ((fx, fy, fz,rx, ry and rz)), one experiment is performed as following:

(1) (1) (1)

(1) Firstly, pick up several samples with different kind of driving situations (low speed, high speed, turning directions, running straightly, climbing up and down, passing significant bumps or not…). According to their roughness, give scores for them empirically based on video (Figure 6.2.3). This score figure can not indicate the real roughness level; it is just used to show the pattern in order to find out the expressive abilities of variables.

(36)

(2) (2) (2)

(2) Secondly, check the numerical behaviours of different variables one sample by another sample. In order to compare the expressive abilities of variables with different numerical scales, they are normalized into the same scale when comparing. Many comparisons are performed for this work. One example is shown in following figure (Figure 6.3.4). You can see that except for rz, all the variables express similar patterns as the pattern of the score figure (Figure 6.2.3). Accordingly, we say that the five variables rx, ry, fx, fy and fz are useful for road texture evaluation; and we call them variables of interst. Actually, this result is also in accordance with the result from time domain.

Figure 6.3.4: Check the expressive abilities of different variables Procedure 6: Frequency domain analysis: Find out frequency range of interest (ROI) Procedure 6: Frequency domain analysis: Find out frequency range of interest (ROI) Procedure 6: Frequency domain analysis: Find out frequency range of interest (ROI) Procedure 6: Frequency domain analysis: Find out frequency range of interest (ROI) The following three steps are carried out to find out ROI and basic classification rules:

(1) (1) (1)

(1) Observe raw data about different driving situations. Referring to video, samples about smooth or rough road texture, fast or low driving speed, turning directions quickly or slowly, speeding up or down quickly or slowly, and climbing up or down are all observed. Based on our observation, the frequency of micro signal vibration, which is mainly caused by road texture, is located between 10-35Hz.

(2) (2) (2)

(37)

segment inaccurate. Accordingly, we consider the low frequency part is not useful for this problem.

Figure 6.2.5: The 10-20 frequency range is still significantly affected by big bumps (3)

(3) (3)

(3) Apply statistical numerical analysis on different frequency segments and compare the results. Before comparison, the indicator representing the road roughness should be found out and data of different numerical scales should be normalized.

0 1 2 3 4 5 6 2 0 2 0 .7 2 1 .3 22 2 2 .7 2 3 .3 24 2 4 .7 2 5 .3 26 2 6 .7 2 7 .3 28 2 8 .7 2 9 .3 30 3 0 .7 3 1 .3 32 3 2 .7 3 3 .3 34 3 4 .7 Se rie s1 Se rie s2 Se rie s3 Se rie s4 Se rie s5 Se rie s6 Se rie s7

(38)

different frequency epoches, their sum of all values within certain frequency range represent the overall road roughness.

As what is shown in Figure 6.2.6, the sum of signal magnitudes in certain frequency range is considered to be the roughness indicator. In different frequency ranges, the expressive abilities of the roughness indicators vary. By checking their expressive abilities in different frequency ranges, we can find out the range of interest (ROI).

Firstly, we picked out two groups of samples: one for rough road segments and one for smooth road segments. Then the roughness indicators of all the samples in different frequency ranges are arranged (Table 6.2.1 shows the values of the variable fz). To examine the the expressive abilities in different frequency ranges better, we performed some statistical analyses shown in Table 6.2.2.

Table 6.2.1: Arrange the roughness indicators in different frequency ranges.

Sample cases 110 120 130 140 190 200 210 … Sum_20-35 Hz 17.2514 18.7522 17.9411 44.6458 17.7741 28.0417 16.5173 … Sum_10-25 Hz 114.638 87.812 124.851 209.988 128.969 117.661 49.4974 … Sum_15-30 Hz 60.702 49.9825 45.8416 110.135 40.7033 39.3273 20.7803 … Sum_20-30 Hz 15.213 16.5064 14.9194 35.8136 13.0313 18.9639 9.25016 … Sum_30-40 Hz 3.65925 4.60024 7.30696 11.7642 10.1203 12.9592 11.9458 … … … … …

Table 6.2.2: A comparison among different frequency ranges

Rough group Smooth group

Mean Max Min Mean Max Min

Sum_20-35 Hz 22.9891 44.6458 16.5173 2.4553 8.3697 0.4576 Sum_10-25 Hz 119.0595 209.9884 49.4974 25.5060 65.5613 7.5257 Sum_15-30 Hz 52.4960 110.1352 20.7803 12.3247 26.6717 4.2477 Sum_20-30 Hz 17.6711 35.8136 9.2502 1.8621 6.3613 0.3260 Sum_30-40 Hz 8.9080 12.9592 3.6593 1.2376 3.7787 0.4956

(39)

rx, and ry). By comparing all the results from all the six variables, we consider the 20-35 Hz is the optimal choice. Acoordingly, we define this range as range of interest (ROI). Procedure 7: Arrange data for further uses

Procedure 7: Arrange data for further uses Procedure 7: Arrange data for further uses Procedure 7: Arrange data for further uses

According to the analysis above, for each 10-second file, the sum of magnitudes in the frequency range 20-35 Hz is considered to be the index for indicating the overall roughness of that road segment. For further uses (classification and visulization), data are arranged into the format like below (Table 6.2.3).

Table 6.2.3 Data file for further uses The sum of magnitudes in ROI

Case ID fx fy fz rx ry rz

10.00 0.00000 0 .00000 0.00005 0.01071 0.01015 0 .03844 20.00 0.00609 0.00532 0.00547 0.01641 0.02154 0.03732 30.00 0.00000 0.00005 0.00010 0.00828 0 .01101 0.05581

(40)

7.

7.

7.

7.

Texture Classification

Texture Classification

Texture Classification

Texture Classification

7.1

7.1

7.1

7.1

Data preparation for all classification methods

Data preparation for all classification methods

Data preparation for all classification methods

Data preparation for all classification methods

7.1.1

7.1.1

7.1.1

7.1.1

Numerical basis for classification

Numerical basis for classification

Numerical basis for classification

Numerical basis for classification

At the beginning of this section, we would like to show the preparation work for all the three types of classification methods. Based on the result of Section 6, we have already derived that the sum of magnitudes in ROI (20-35Hz) is the numerical basis for classification. We have also known that the texture of road roughness has great positive concern with the IMU signal in the dimension of fx, fy, fz, rx and ry. The rz acts unstably in determining the roughness of road segments. Therefore, we view fx, fy, fz, rx and ry as the five variables of interest. The rotation variables (rx, ry) are a bit better at detecting sharp bumps in the road segments, while the (fx, fy, fz) are slightly more suitable for expressing detail roughness of road. They all are of use.

7.1.2

7.1.2

7.1.2

7.1.2

Reference samples and testing samples

Reference samples and testing samples

Reference samples and testing samples

Reference samples and testing samples

(41)

In this research, data for classification can be arranged into different formats for different methods, but they all share the same reference samples and testing samples. These samples are picked out referring to video records. As during this measurement, there are not many types of road roughness and the total number of samples is really small (around eighty), only three typical types of roughness are classified: smooth, medium and rough. Road segments picked for representing the rough type are really rough, but their roughness changes seriously. Medium segments and smooth segments do not differ so much. One should note that during this research the reference samples are not dense, and their roughness is numerically not precise. The following video clips show some examples of rough, medium and smooth roughness samples.

Figure 7.1.1: Three types of road: rough (left), medium (middle), and smooth (right) (1)

(1) (1)

(1) Reference samples

Reference samples are the standard for classification. It defines the scale of one deciding rules, and all the other unknown samples are classified referring to these standard samples. Reference samples are picked up referring to the video records, and the number of reference samples for each class ought to be in proportion to the ratio of this class to all the road segments under research.

Table 7.1.1: Reference samples for classification: ‘ID’ is the ID for each 10 second file, and ‘class’ is the evaluation of that sample. ‘3’ means rough, ‘2’ means medium and ‘1’ means smooth.

(42)

Based on the table listed above (Table 7.1.1), we can draw a scatter plot to see how well the statistical facts of these three classes are separate to each other. We can see that in different input variables, the distance between two different types of samples varies. (In Figure 7.1.2, the three classes are labeled in different grey scales; the mean and standard deviation of the statistical samples are used to locate the bar as well as set the length of bar. The values labeled in x-axes show the sum of magnitudes.) From Figure 7.1.2, one can see that statistical facts about different types of roughness are basically separate to each other. Thus, it is suitable to use these statistical facts in ROI to classify the road segments into these three classes. But one should also notice that the scales of statistical facts from different variables are different. Thus, the statistical facts from different variables cannot be compared directly.

Figure 7.1.2: Scatter plot of reference road segments

(2) (2) (2)

(2) Testing samples

(43)

Table 7.1.2: Testing samples Testing Samples

Route 1 Route 2

case ID class case ID class

530 2 2 80 2 590 1 1 120 3 620 1 1 140 3 640 1 1 220 3 660 1 1 250 2 670 2 2 270 1 690 2 2 300 3 720 2 1 360 2 400 1 420 1

7.2

7.2

7.2

7.2

F

F

F

Fuzzy Logic Based Classification

uzzy Logic Based Classification

uzzy Logic Based Classification

uzzy Logic Based Classification

7.2.1

7.2.1

7.2.1

7.2.1

Introduction to Fuzzy Logic and Fuzzy Logic Based Classification

Introduction to Fuzzy Logic and Fuzzy Logic Based Classification

Introduction to Fuzzy Logic and Fuzzy Logic Based Classification

Introduction to Fuzzy Logic and Fuzzy Logic Based Classification

Different from classical predicate logic, fuzzy logic is a sound type of mathematics dealing with reasoning that is based on information with uncertainty. Fuzzy logic originates from fuzzy set theory and was first introduced by Lotfi Zadeh at the University of California, Berkeley, in 1965. As its close relationship with fuzzy set theory, fuzzy logic could be considered as one application of fuzzy set theory. It is true that in the real world, some things can hardly be recognized very clearly and people can hardly perform reasoning or classification in a traditional numerical way. Generally speaking, both fuzzy logic and probability-based approach could handle such tasks with incomplete information together with uncertainty. Unlike the probability-based approach, which tells how much probability for one thing to be true, fuzzy logic turns to say how true the thing is. Actually, when facing the lack of crispness, most naturally people resort to use linguistic terms to identify objects and describe their properties by saying how one thing could be instead of saying how probably may one thing turns to be another thing. Fuzzy logic provides a most natural and accurate way to manipulate these non-crisp problems in a consistent, reasonable intuitive way (Yuan etc., 1994).

(44)

and not complete. In this research, the author borrowed some idea from classification methods in remote sensing fields; some good examples could be found in Nedeljkovic’s work (Nedeljkovic, 2004).

7.2.2

7.2.2

7.2.2

7.2.2

Algorithm and Procedure

Algorithm and Procedure

Algorithm and Procedure

Algorithm and Procedure

The fuzzy logic based classification of road texture will be carried out with the help of MATLAB scientific computing environment. The algorithm, procedure as well as MATLAB fuzzy toolbox will be introduced in this section.

(1) Principle of algorithm to apply fuzzy logic based approach (1) Principle of algorithm to apply fuzzy logic based approach (1) Principle of algorithm to apply fuzzy logic based approach (1) Principle of algorithm to apply fuzzy logic based approach

The five variables of interest (fx, fy, fz, rx, ry) from IMU provide a five-dimensional space of roughness information of road segments. Since we don’t know the quantitative definition of a given class of road roughness, we cannot tell the decision point which differentiates one class from another class which has different level of roughness.

Due to the lack of road roughness levels as a prior knowledge, none definite numerical mapping could be made from the six components to the destination classes. But on the other hand, for a single 10-second case, it could be inferred that the greater its magnitude in ROI is, the more possible this segment of road is a bumpy one. Based on the positive relationship between roughness classes and the magnitude of each variable in ROI, we can distinguish several typical types of roughness. However, as this kind of distinguishing is empirically built on the collection of reference samples, we cannot figure out the definite dividing point between two classes. That is why the fuzzy logic based approach is applied here. Major advantage of this theory is that it allows the natural description and non-crisp definition of problems that should be solved rather than in terms of relationships between precise numerical values. This advantage, dealing with the complicated systems in a simple way, is the main reason why fuzzy logic theory is widely applied in technique (Nedeljkovic, 2004).

(45)

fuzzy set, an element with its membership equal to 1 means it completely belongs to that fussy set. Conversely, the 0 membership means the element doesn’t belong to that fuzzy set at all.

(46)

After the classification part, it is also necessary to evaluate how accurate the classification is; we call this procedure as the accuracy assessment of road roughness classification. This procedure is fulfilled by checking the degree of correctness of testing samples.

(2) Fuzzy toolbox in MATLAB (2) Fuzzy toolbox in MATLAB (2) Fuzzy toolbox in MATLAB (2) Fuzzy toolbox in MATLAB

As one important part of MATLAB® numeric computing environment, fuzzy logic toolbox consists of an outstanding collection of functions. With the help from these functions, one can establish one’s own FIS, which is based on the input data. It is also allowed to add new input variables / output variables, specify membership functions, and make rules for fuzzy decision-making and so on. Two fuzzy logic models are provided: Mamdani-type and Segeno-type. One is free to use them by choosing the model, specifying parameters and evaluating his model within MATLAB. To operate the fuzzy logic toolbox, one can either use the GUI (Graphical User Interface) or MATLAB commands. The Fuzzy Logic Toolbox in MATLAB is mainly divided into five parts: FIS editor, membership function editor, rule editor, rule viewer and surface viewer, just as what are shown in Figure 7.2.1.

(47)

The process of fuzzy inference in MATLAB involves: FIS model, membership functions, fuzzy logic operators, if-then rules and defuzzification. Two types of fuzzy inference systems can be implemented using the Fuzzy Logic Toolbox. Of them, the Mamdani’s fuzzy inference method is the most commonly seen fuzzy methodology, which expects the output membership functions to be fuzzy sets. Another type of FIS is called Sugeno where the output membership functions are either linear or constant. More information about these two inference systems could be found in the next sections or the MATAB documentation (MATLAB Documentation, 2007).

In this paper the Sugeno fuzzy model is applied, because the outputs of classification are three discrete values standing for rough, medium and smooth, respectively; and therefore we want output membership functions to be in a constant way. The same approach has been applied in classification of remote sensing imagery. More details about the procedures of classification and partial results will be shown in the following section.

(3) Procedure of class (3) Procedure of class (3) Procedure of class

(3) Procedure of classification and resultsification and resultsification and resultsification and results

The classification of bumpy roads regarding their texture or roughness using fuzzy logic based approach could be achieved by the following 6 steps. The first five procedures create the definition of the FIS using Fuzzy Logic Toolbox of MATLAB. Such a FIS could then be applied in Procedure 6 to carry out the classification though MATLAB commands.

Procedure 1: Procedure 1: Procedure 1:

Procedure 1: FIS FIS FIS FIS Initialization and Data PreparationInitialization and Data PreparationInitialization and Data Preparation Initialization and Data Preparation

(48)

Figure 7.2.2 Create a Sugeno-Type FIS and 5 Variables in MATLAB

In order to use fuzzy logic based approach to classify road segments, the data is prepared in the following style. Within each 10-second segment, the roughness indicators of the five variables are listed (like Table 7.2.1 below). The reference samples and testing samples are as what are shown in Section 7.1.2.

Table 7.2.1: Reformatted data after pre-processing: ‘Case ID’ is the ID for each road segment

Case ID fx fy fz rx ry 1 0.00000 0.00000 0.00000 0.00436 0.00315 2 0.00011 0.00015 0.00039 0.00669 0.00668 3 0.00000 0.00000 0.00001 0.00337 0.00341 … … … …

Procedure 2: Fuzzification of the Input Variables Procedure 2: Fuzzification of the Input Variables Procedure 2: Fuzzification of the Input Variables Procedure 2: Fuzzification of the Input Variables

(49)

curve) and gauss2mf (using Gauss curves as the left-most and the right-most curves, and the range between these two curves is of constant value as 1) as the models of our membership functions. For each variable of five, the membership functions are defined as Figure 7.2.3:

Figure 7.2.3: Membership functions for input variable fx in this research. The membership functions for other variables are defined as similar as those for fx. P1 and P5 are the maximum values of reference samples for smooth road and medium road respectively. P3 and P7 are the minimum values of reference samples for medium road and rough road respectively. P4 is equal to P3 and P6 is equal to P5. The distance between P1 and P3 is equal to four times of the standard deviation of the left-most Gauss curve and P2 is defined according to it. In similar manner, the shape of the right-most Gauss curve is defined by setting the standard deviation of a quarter of the distance between P5 and P7.

Actually, the way to control the location and shape of membership functions uses two prior pieces of knowledge. Firstly, as what is mentioned above, the bigger the magnitude from statistic facts is, the rougher the road is. Secondly, it is assumed that all the reference samples are correctly collected because the data are not dense enough in our research.

(50)

Figure 7.2.4: Membership function for the outputs. Our membership function specifies only three values as the output ranging from 1 to 3. Of them, 1 stands for the smooth type, 2 stands for the medium type and 3 stands for the rough type.

Procedure 3: Choose of t Procedure 3: Choose of t Procedure 3: Choose of t

Procedure 3: Choose of the Fuzzy Operatorhe Fuzzy Operatorhe Fuzzy Operator he Fuzzy Operator

After the inputs are fuzzified, the degree of how well each part of the antecedent is satisfied for each set is solved by calculating the membership of each input. Then the fuzzy operator is applied to obtain one single number that represents the combined results of the antecedent from the five variables (fx, fy, fz, rx, ry). This number could then be applied to the output membership function later. In our case of this paper, the built-in fuzzy operators (OR and AND) are adopted. For the OR operator, the max function is applied, while for the AND operator, the min function is applied.

min(

,

)

max(

,

)

a b a b

a AND b

MF MF

a OR b

MF MF

(7.2a)

(51)

use the default settings for fuzzy operators (AND is the min algorithm and OR is the max algorithm) from Fuzzy Logic Toolbox in MATLAB.

Figure 7.2.5: Fuzzy Operators in FIS

Procedure 4: Implication from the Antecedent to the Consequent using Rules Procedure 4: Implication from the Antecedent to the Consequent using Rules Procedure 4: Implication from the Antecedent to the Consequent using Rules Procedure 4: Implication from the Antecedent to the Consequent using Rules

As explained before, we use the Sugeno-type FIS in this research. A typical rule in a Sugeno fuzzy model has the form as Eq. 7.2b.

"

IF Input

1

=

x AND Input

2

=

y

,

THEN Output is z

=

ax by

+ +

c

"

(7.2b)

For a zero-order Sugeno model, the output z from a piece of rule is a constant (

a

=

b

=

0

). In this research, the inputs from different variables are of no linear relationships, so we use the zero-order Sugeno. For a Sugeno-type FIS, the output from an implication is of two aspects. The first aspect is which roughness class is specified by the rule. For the example as “IF fx is low AND fy is low, THEN the texture is smooth”, the class is specified as "smooth". We call this result as class result, which could be equal to 3 (rough), 2 (medium), or 1 (smooth). The second aspect is the degree to which the output belongs to that class. This is determined by the result from procedure 3, i.e., if using AND operator, the degree is 0.1 (min(0.1, 0.3)=0.1). We call this kind of result as degree result.

(52)

SWITCH ( the five input components ) {

CASE (more than 4 inputs are {low}) : output = {smooth};

BREAK;

CASE (3 inputs are {low} AND the other 2 inputs are {medium}) output = {smooth};

BREAK;

CASE (3 inputs are {low}) output = {medium}; BREAK;

CASE (2 inputs are {medium} AND less than 3 of the other inputs are {high}) output = {medium};

BREAK;

CASE (no input is {low} AND less than 2 of the other inputs are {high}) output = {medium};

BREAK;

CASE (2 inputs are {low} AND the other 3 inputs are {high}) output = {rough};

BREAK;

CASE (1 input is {low} AND more than 2 of the other inputs are {high}) output = {rough};

BREAK;

CASE (no input is {low} AND more than 1 of the other inputs are {high}) output = {rough}; BREAK; DEFAULT : output = {unknown}; BREAK; } (7.2c)

(53)

Figure 7.2.6: Rule editor in Fuzzy Logic Toolbox of MATLAB Procedure 5: Aggregation of the Consequents across the Rules and Defuzzification Procedure 5: Aggregation of the Consequents across the Rules and Defuzzification Procedure 5: Aggregation of the Consequents across the Rules and Defuzzification Procedure 5: Aggregation of the Consequents across the Rules and Defuzzification

As stated in the above section, the output of FIS will be a group of results from all the rules. We need to integrate them to generate the final single output for the decision support purpose. This process is also called defuzzification in the fuzzy logic.

The formula for aggregating rules is shown as Eq. 7.2d. For each rulei, there will be an output

z

i (=1, 2 or 3) from it. The output

z

i from each rule is then weighted by the strength

ω

i of the rule. For the Sugeno-type model,

ω

i is equal to the degree result from implication procedure, and

z

i is equal to the class result. The final output of the system is the weighted average of all rule outputs, computed as the following formula.

1 1

,

N i i i N i i

z

FinalOutput

N is number of

rules

ω

ω

= =

=

(7.2d)

(54)

1.5 _ { }; 2.5 _ { }; _ { }; IF FinalOutput THEN final class smooth

ELSEIF FinalOutput THEN final class medium

ELSE

final class rough END <= = <= = = (7.2e)

After defuzzification, the result will be stored in the last column of the input data. Then this column of data will be used to make report of accuracy assessment in the next section.

Procedure 6: Apply Fuzzy Logic Classification using MATLAB m Procedure 6: Apply Fuzzy Logic Classification using MATLAB m Procedure 6: Apply Fuzzy Logic Classification using MATLAB m

Procedure 6: Apply Fuzzy Logic Classification using MATLAB m----file or Cfile or Cfile or C----codesfile or C codescodescodes

After Procedure 1-5, you will receive a definition file for the fuzzy inference system. Then by loading this definition file, you can build a real decision support system by integrating the FIS with Simulink module of MATLAB (which provides the input and output interfaces for the FIS in a simulated environment). You can also apply the FIS though MATLAB commands in a m-file or stand-alone C program. In this case, you need to specify the inputs of the FIS, and also take over its output. We adopted the m-file approach.

The whole procedure of making a fuzzy classification in MATLAB could be illustrated in the following 3 steps:

1. Before using the Fuzzy Inference System, three data files are needed: (a) the input IMU data file containing the 5 variables of interest with route numbers and counters; (b) the reference samples data file; (c) the testing samples data file. These three data files are reformatted in the following form (shown in Figure 7.2.7) before they could be used in FIS we made previously.

% --- % <Input IMU Data File>

% route_no counter fx fy fz rx ry % 1 500 .. .. .. .. ..

% .. .. .. .. .. .. .. %

% <Reference Samples Data File> % route_no counter class % 1 500 1 % .. .. .. %

References

Related documents

However, the approach to exclusionary screening adopted by the Swedish Ap-funds and Norwegian GPFG that we analyse in our study are remarkably different to the ones studied in

– Visst kan man se det som lyx, en musiklektion med guldkant, säger Göran Berg, verksamhetsledare på Musik i Väst och ansvarig för projektet.. – Men vi hoppas att det snarare

This thesis aims to interpret the chromosphere using simulations, with a focus on the resonance lines Ca II H&amp;K, using 3D non-LTE radiative transfer and solving the problem

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

It is also possible that the spatial tetrahedral configuration of the Cluster satellites at any given moment may [7] affect the current density approximated by the curlometer method.

“Det är dålig uppfostran” är ett examensarbete skrivet av Jenny Spik och Alexander Villafuerte. Studien undersöker utifrån ett föräldraperspektiv hur föräldrarnas

The use of the OECD Model as a basis for treaties concluded in the field of international double taxation is widespread and if the ECJ does not accept a provision based on it,

As the public spheres addressed by traditional (legacy) media remain largely national or local, the issues mentioned above and indeed other related ones are increasingly global,