institutionen för systemteknik - diva...

67
Institutionen för systemteknik Department of Electrical Engineering Examensarbete Test Cycle Optimization using Regression Analysis. Examensarbete utfört i Reglerteknik vid Tekniska högskolan i Linköping av Dejen Meless LiTH-ISY-EX--10/4242--SE Linköping 2010 Department of Electrical Engineering Linköpings tekniska högskola Linköping University Linköpings universitet SE-581 83 Linköping, Sweden 581 83 Linköping

Upload: others

Post on 24-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Institutionen för systemteknikDepartment of Electrical Engineering

Examensarbete

Test Cycle Optimization using Regression Analysis.

Examensarbete utfört i Reglerteknikvid Tekniska högskolan i Linköping

av

Dejen Meless

LiTH-ISY-EX--10/4242--SE

Linköping 2010

Department of Electrical Engineering Linköpings tekniska högskolaLinköping University Linköpings universitetSE-581 83 Linköping, Sweden 581 83 Linköping

Page 2: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 3: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Test Cycle Optimization using Regression Analysis.

Examensarbete utfört i Reglerteknikvid Tekniska högskolan i Linköping

av

Dejen Meless

LiTH-ISY-EX--10/4242--SE

Handledare: Shiva Sander-TavalleyABB Sweden, Corporate Research

Patrik AxelssonISY, LiTH

Examinator: Erik WernholtISY, LiTH

Linköping, 29 January, 2010

Page 4: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 5: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Avdelning, InstitutionDivision, Department

ISYDepartment of Electrical EngineeringLinköping UniversitySE-581 83 Linköping, Sweden

DatumDate

2010-01-29

SpråkLanguage

� Svenska/Swedish� Engelska/English

RapporttypReport category

� Licentiatavhandling� Examensarbete� C-uppsats� D-uppsats� Övrig rapport�

URL för elektronisk version

ISBN—

ISRNLiTH-ISY-EX--10/4242--SE

Serietitel och serienummerTitle of series, numbering

ISSN—

TitelTitle

Optimering av testcykel med hjälp av regressionsanalys.Test Cycle Optimization using Regression Analysis.

FörfattareAuthor

Dejen Meless

SammanfattningAbstract

Industrial robots make up an important part in today’s industry and are assignedto a range of different tasks. Needless to say, businesses need to rely on theirmachine park to function as planned, avoiding stops in production due to machinefailures. This is where fault detection methods play a very important part. In thisthesis a specific fault detection method based on signal analysis will be considered.

When testing a robot for fault(s), a specific test cycle (trajectory) is executedin order to be able to compare test data from different test occasions. Furthermore,different test cycles yield different measurements to analyse, which may affect theperformance of the analysis. The question posed is: Can we find an optimal testcycle so that the fault is best revealed in the test data? The goal of this thesis is to,using regression analysis, investigate how the presently executed test cycle in aspecific diagnosis method relates to the faults that are monitored (in this case aso called friction fault) and decide if a different one should be recommended. Thedata also includes representations of two disturbances.

The results from the regression show that the variation in the test quantitiesutilised in the diagnosis method are not explained by neither the friction fault orthe test cycle. It showed that the disturbances had too large effect on the testquantities. This made it impossible to recommend a different (optimal) test cyclebased on the analysis.

NyckelordKeywords Optimization, Fault Detection.

Page 6: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 7: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

AbstractIndustrial robots make up an important part in today’s industry and are assignedto a range of different tasks. Needless to say, businesses need to rely on theirmachine park to function as planned, avoiding stops in production due to machinefailures. This is where fault detection methods play a very important part. In thisthesis a specific fault detection method based on signal analysis will be considered.

When testing a robot for fault(s), a specific test cycle (trajectory) is executed inorder to be able to compare test data from different test occasions. Furthermore,different test cycles yield different measurements to analyse, which may affect theperformance of the analysis. The question posed is: Can we find an optimal testcycle so that the fault is best revealed in the test data? The goal of this thesis isto, using regression analysis, investigate how the presently executed test cycle ina specific diagnosis method relates to the faults that are monitored (in this case aso called friction fault) and decide if a different one should be recommended. Thedata also includes representations of two disturbances.

The results from the regression show that the variation in the test quantitiesutilised in the diagnosis method are not explained by neither the friction fault orthe test cycle. It showed that the disturbances had too large effect on the testquantities. This made it impossible to recommend a different (optimal) test cyclebased on the analysis.

v

Page 8: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 9: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Acknowledgements

I would like to thank my project colleagues Hans Andersson, Kari Saarinen andShiva Sander-Tavalley at ABB for all their help and guidance through my workand for giving me the chance to take part in a rewarding experience. I wouldalso like to thank my mentor Patrik Axelsson and my examiner Erik Wernholtfor their valuable feedback. Lastly but definitely not the least I would like tothank all of the thesis workers at ABB Corporate Research in Västerås that I hadthe chance to become friends with, without whom, crunching Matlab code andstatistics literature would have been so much harder.

vii

Page 10: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 11: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Contents

1 Introduction 11.1 Definition of a robot . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Fault Detection in robots . . . . . . . . . . . . . . . . . . . . . . . 11.3 The diagnosis method . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3.1 Test cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3.2 Test data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3.3 Test quantities . . . . . . . . . . . . . . . . . . . . . . . . . 31.3.4 Diagnosis statement . . . . . . . . . . . . . . . . . . . . . . 3

1.4 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.5 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Robotics 52.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Homogeneous transformations . . . . . . . . . . . . . . . . . . . . . 62.3 Rigid body modelling . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Fault detection and isolation 113.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Limit checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.3 Hardware redundancy . . . . . . . . . . . . . . . . . . . . . . . . . 123.4 Model-based fault detection . . . . . . . . . . . . . . . . . . . . . . 13

3.4.1 Fault modelling . . . . . . . . . . . . . . . . . . . . . . . . . 133.4.2 Residuals and residual generation . . . . . . . . . . . . . . . 143.4.3 Fault detection using parity equations . . . . . . . . . . . . 143.4.4 Fault detection using signal models . . . . . . . . . . . . . . 153.4.5 Observer based fault detection . . . . . . . . . . . . . . . . 15

3.5 Change detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.6 Fault isolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4 Modelling of time series 194.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.2 Linear regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.2.1 The R2-statistic . . . . . . . . . . . . . . . . . . . . . . . . 214.2.2 t-statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.2.3 F -statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

ix

Page 12: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

x Contents

4.3 Autoregressive models . . . . . . . . . . . . . . . . . . . . . . . . . 244.3.1 Model-fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5 Measurements and disturbance models 275.1 Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.2 Disturbances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5.2.1 Friction fault . . . . . . . . . . . . . . . . . . . . . . . . . . 285.2.2 Shift and delay . . . . . . . . . . . . . . . . . . . . . . . . . 295.2.3 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5.3 Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315.3.1 Noise sensitivity . . . . . . . . . . . . . . . . . . . . . . . . 32

6 Design of experiment 336.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.2 Fractional factorial designs . . . . . . . . . . . . . . . . . . . . . . 336.3 Treatments and treatment levels . . . . . . . . . . . . . . . . . . . 346.4 Experiment matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

7 Sensitivity analysis 377.1 Test quantities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377.2 Calculation of main effects . . . . . . . . . . . . . . . . . . . . . . . 38

7.2.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387.2.2 Analysis of variance . . . . . . . . . . . . . . . . . . . . . . 39

7.3 Improving the model . . . . . . . . . . . . . . . . . . . . . . . . . . 417.3.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427.3.2 Analysis of variance . . . . . . . . . . . . . . . . . . . . . . 447.3.3 Plots of SSR and SSE . . . . . . . . . . . . . . . . . . . . . 48

7.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497.4.1 The model-fit measure . . . . . . . . . . . . . . . . . . . . . 497.4.2 The RMS-measure . . . . . . . . . . . . . . . . . . . . . . . 50

8 Conclusions and future work 538.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538.2 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Bibliography 55

Page 13: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Chapter 1

Introduction

Robots – man made humanoid machines once created to perform the most tediousand laborious tasks that no man was willing to preoccupy himself with, but oneday reached a point where they were able to take control over their own destiny,and did so in a violent rebellion. That’s how the Czech playwright Karel Capekin 1920 told the story about the robota in his play Rossum’s Universal Robots,where the word found its first use, literally meaning work, labour or serf labour 1.

1.1 Definition of a robotWhat defines a robot has however not always been a clear subject, many defini-tions have been proposed through the years. The human-like robots that Capektells about in his play would today be classified as androids. In this report therobots in focus are industrial six-axis robots. The International Organization forStandardization gave in 1994 this definition of a robot

An automatically controlled, reprogrammable, multipurpose, manipu-lator programmable in three or more axes, which may be either fixedin place or mobile for use in industrial automation applications.

In Merriam-Webster’s online dictionary Robotics is defined as technology deal-ing with the design, construction, and operation of robots in automation.

1.2 Fault Detection in robotsThe increasing demands on product quality and cost efficiency in the today’s in-dustry leads to ever growing complexity and automation degree. This calls formore safety and reliability in the technical processes. Thus early fault detectionand system diagnosis becomes of great importance and is increasingly becoming

1http://en.wikipedia.org/ wiki/Robot#Etymology

1

Page 14: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

2 Introduction

Figure 1.1. A six-axis industrial robot.

a common ingredient in modern automatic control [2]. This work aims at in-vestigating and optimizing a test cycle to a diagnosis method used for industrialsix-axis robots and was performed in collaboration with ABB Corporate Researchin Västerås.

1.3 The diagnosis method

The diagnosis method considered is based on fault detection by regular comparisonbetween so called test data and nominal data. For every test, a specific test cycleis executed and measurements of two signals are performed. The signals are thensubtracted with their respective nominal (normal) data, forming a residual for eachsignal. If any fault is present in the system it should thus appear as the difference(residual) between the collected data and the nominal data. The nominal data aremeasurements from the first tests performed, usually after a robot’s last reset orwhen it first entered production.

1.3.1 Test cycle

The stated test cycle in the method is to move a robot axis ±5◦ at full motorspeed for approximately three seconds. There are no requirements on the positionto move the joint about, but is typically around the point 0◦. A test cycle needsto be executed in an identical way every time and needs to be performed for everymonitored axis. In this report, however, we will only be analysing axis 3, seeChapter 2 for more on Robotics.

Page 15: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

1.4 Outline 3

1.3.2 Test dataWhile executing a test cycle the applied motor torque τ(t) and motor angularvelocity ϕ(t) are sampled at 248 Hz. After a test has been performed the measuredsignals s = [τ ϕ] are respectively synchronised and subtracted with their nominalvalues snom = [τnom ϕnom], resulting in a torque and velocity residual sres =s − snom = [τres ϕres]. In this investigation all the measurements are generatedby a simulator provided by ABB.

1.3.3 Test quantitiesWhen there are residuals ready, two test quantities are computed on the data. Amodel-fit measure

φfit =

1−

√∑Nk=1 (sres(k)− sres(k))2√∑Nk=1 (sres(k)− sres)2

· 100 (1.1)

measuring correlation in the residual and a root mean square-measure (RMS-measure).

φRMS =

√∑Nk=1 s

2res(k)

N

/√∑Nk=1 s

2nom(k)N

· 100 (1.2)

measuring the energy ratio in the residual. Where sres(k) and sres are the estima-tion and the mean of sres(k) respectively. The variable sres(k) is the estimationproduced by an autoregressive model (AR(n)) of the residual, of order n = 2. Thetest quantities are computed for each vector in sres(k) and snom(k) (first usingthe torque vector and later the velocity vector). Naturally, the test quantities areexpected to become larger than nominal values when a fault occurs.

1.3.4 Diagnosis statementAfter a period of time of regular testing, the computed values of the test quantitiesfrom each test occasion will form a time series of values. There will thus be fourtime series, a sequence of the model-fit measure computed on the torque signal anda sequence of the model-fit measure computed on the velocity signal and similarlytwo sequences of the RMS-measure will be available. On each sequence, tests todetect trends and abrupt steps are performed. Based on these tests the methodwill yield a statement of the robot’s health.

1.4 OutlineThe outline of the report will be such that the first chapter introduces the readerto the problem at hand. The following three chapters will lay the theoreticalfoundation to the analysis that will be performed in the Chapter 7. Chapter 5aims to familiarise the reader with the analysed signals and a set of disturbance

Page 16: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

4 Introduction

models. Chapter 6 presents the method of analysis, and lastly a concluding partand suggestions for future work will final the thesis in Chapter 8.

1.5 LimitationsThe method is aimed to be applied on any axis on a robot but we will only beanalysing axis 3 in this report, see Chapter 2 for more on Robotics. Furthermore,the analysis will focus on investigating the method’s test quantities and theirvariation due to fault(s), and leave the part of diagnosis statement aside.

Page 17: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Chapter 2

Robotics

In this chapter a presentation of the basics in robot kinematics and rigid-bodymodelling will be given, based on [10]. In Section 2.3 an example of rigid-bodymodelling using the Euler-Lagrange equations will be given to show the basics inhow dynamic modelling of robots can be done.

2.1 Introduction

Figure 2.1. A six axis industrial robot.

The mechanical structure of a robot manipulator is characterised by a set ofrigid links interconnected by joints. Joints can be classified as being either pris-matic, performing translational movements, or revolute, performing rotary move-ments. Every joint provides the structure one degree of freedom (DOF). For arobot to be able to execute arbitrary movements in three dimensions six joints

5

Page 18: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

6 Robotics

are required, three for positioning and three for orientation. If a robot has moredegrees of freedom it is from a kinematic point of view said to be redundant [9].Figure 2.1 shows a robot manipulator with six revolute joints.

2.2 Homogeneous transformationsOne of the requirements of a robot, as stated in Section 1.1, is that it should beable to move autonomously. This implies the need of a programmed controllerthat plans the trajectory for the robot’s end-effector (gripper, tool). To do thisone must establish the relationship between the trajectory that is to be followedand how to translate this motion to joint rotations. This relationship is referredto as kinematics.

Let’s assume we are looking at a point p described in the two coordinate sys-tems ox0y0z0 and ox1y1z1 as shown in Figure 2.2. Point p has thus differentrepresentations p1 and p0 in respective frame.

p0 =x0i0 + y0j0 + z0k0 (2.1)p1 =x1i1 + y1j1 + z1k1 (2.2)

p0

z0

y0x0

d10

z1

y1

x1

p1

p

Figure 2.2. Rotational and translational displacement between two frames.

Vector p1 can be projected onto ox0y0z0, or the base frame, giving the rela-tionship between the frames as

x0 = p0 · i0 = p1 · i0 = x1i1 · i0 + y1j1 · i0 + z1k1 · i0 (2.3a)y0 = p0 · j0 = p1 · j0 = x1i1 · j0 + y1j1 · j0 + z1k1 · j0 (2.3b)z0 = p0 · k0 = p1 · k0 = x1i1 · k0 + y1j1 · k0 + z1k1 · k0. (2.3c)

Which can be rewritten more compactly as

Page 19: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

2.3 Rigid body modelling 7

p0 = Rp1 =

i1 · i0 j1 · i0 k1 · i0i1 · j0 j1 · j0 k1 · j0i1 · k0 j1 · k0 k1 · k0

x1y1z1

. (2.4)

The matrix R, or R10, is called the rotation matrix from system ox1y1z1 to system

ox0y0z0 and represents the coordinate transformation relating the point p in bothframes as a result of the rotational displacement between the frames.

Let P represent the transformation between two points including the transla-tional displacement as well.

P =[

p1

](2.5)

For any vector p0 in the base frame we have

p0 = R10p1 + d1

0 (2.6)

which, with the new notation, results in the transformation

P0 = H10 P1 =

[R1

0 d10

0 1

] [p11

],0 = [0 0 0]. (2.7)

The matrix H10 , is called a homogeneous transformation from frame 1 to frame

0 and describes the simple transformation between two frames.

2.3 Rigid body modellingIn this section we will through an example show how a dynamic model of a robotcan be derived, however, not used as a model in this work. The model is aimedto provide a description of the relationship between the applied joint torque andthe structure’s motion. Models play important roles for simulating motions anddesigning control algorithms facilitating a range of analyses before constructing arobot [9].

A way of deriving the equations of motion is to utilise the Euler-Lagrangeequations, also referred to as analytical mechanics. In contrast to the Newtonianvector mechanics, analytical mechanics bases the motion relations on calculatingthe (scalar) kinetic and potential energy. The Euler-Lagrange equations relatesa set of so called generalised coordinates qi, which represent a body’s motionaldegrees of freedom to a set of generalised forces τi. The equation to solve is

d

dt

∂L

∂qi− ∂L

∂qi= τi (2.8)

L = K − V, (2.9)

where L is called the Lagrangian and K and V are the kinetic and potential energyrespectively.

Page 20: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

8 Robotics

Figure 2.3(b) shows a schematic equivalent of axis 2 shown in Figure 2.1. Thearm rotates with angle ϕl, the applied motor torque is τ and we have a dampingtorque τf = γmϕm + γlϕl. Furthermore we have the link’s mass M , a distance lfrom the point of rotation, and the rotational inertias of the motor and link, Jmand Jl.

(a) Axis 1 and 2 shown in Figure 2.1.

Jm

Jl

τ

M

l

τf

ϕl

ϕm

(b) Schematic equivalent of axis 2.

Figure 2.3. Schematic of axis 2.

We start calculating the kinetic energy

K = Jmϕ2m

2 + Jlϕ2l

2 (2.10)

= 12

(Jmϕ

2m + Jlϕ

2m

n2

)(2.11)

where

ϕl = −ϕmn. (2.12)

The variable n here represents the gear reduction factor. The potential energybecomes

V = Mgl cosϕl = Mgl cos ϕmn

(2.13)

and we get the Lagrangian

L = 12

(Jmϕ

2m + Jlϕ

2m

n2

)−(Mgl cos ϕm

n

). (2.14)

Computing (2.8) treating ϕm as the generalised coordinate q now results in

d

dt

(Jmϕm + Jlϕm

n2

)+ 1nMgl sin ϕm

n= τ − τf . (2.15)

Page 21: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

2.3 Rigid body modelling 9

Which is rewritten as(Jm + Jl

n2

)ϕm +

(γm + γl

n

)ϕm + Mgl

nsin ϕm

n= τ. (2.16)

Further simplifying the differential equation, the equation of motion finally resultsin

Aϕm +Bϕm + C sin ϕmn

= τ (2.17)

where

A =(Jm + Jl

n2

)(2.18)

B =(γm + γl

n

)(2.19)

C =Mgl

n. (2.20)

Page 22: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 23: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Chapter 3

Fault detection and isolation

This chapter aims to give the reader a quick review of the field of fault detectionand isolation (FDI) and is mostly based on [5, 7, 8]. It is common to includeidentification when discussing FDI but is nevertheless left out in this discussion.

3.1 IntroductionIn every technical application there’s a need to know or estimate the state ofa process or a system under observation in relation to the requirements put onthe system. These requirements can for example be that the product needs tohold a certain quality or that the process should not be in a state too close tofailure. To do this one needs methods to diagnose the system. Figure 3.1 showsa schematic description of a typical diagnosis situation. A system is in operationeither autonomously or under control of an operator. The system is constantlysubjected to different unknown inputs such as disturbances and faults. The desireis naturally to have the system under constant normal operation, and the dutyof a fault-detection system is to monitor the process and generate an alarm ifit approaches a state of failure. The earlier a fault is detected the more time isavailable for taking proper measures.

FDI generally comprise of three functions:1. Fault detection. To indicate the occurrence of fault(s).2. Fault isolation. To localise the occurrence of fault(s).3. Fault identification. To determine the magnitude of the fault(s).

11

Page 24: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

12 Fault detection and isolation

SystemControl

Disturbances

Faults

Observations Diagnosissystem

Diagnosisstatement

Figure 3.1. A typical diagnosis situation.

TerminologyDisturbance An unknown and uncontrolled input acting on the system.Failure A fault resulting in a permanent interruption of the system’s

performance.Fault An unacceptable deviation from the nominal state of a system

property.Residual A signal which is ideally zero in the fault-free case or when

non-monitored faults are present.

3.2 Limit checking

Traditionally a widely used method of keeping a system under supervision has beento watch for breached thresholds and tolerances in the process. The concept issimple; when a threshold has been breached an alarm is generated and appropriatemeasures can then be taken. This method is well suited in situations where thesystem operates approximately around a steady state. The big advantage of limitchecking methods is their simplicity [8].

3.3 Hardware redundancy

Another method of detecting and at the same time reducing the risk of systemfailure is the use of hardware redundancy, in other words to duplicate or triplicatehardware instances in the system, putting for example two sensors instead of asingle one to measure the same process variable. In this way a fault is detectedby simply comparing one sensor with its redundant instance, and there is noneed to stop the process despite the occurrence of a fault. This method is highlyreliable and offers direct localisation of the fault in the system. There is howeverno possibility to determine which sensor of the two that is defective. That canhowever be overcome by a triplication of hardware. Triple redundancy is commonpractice in security critical components such as in inner-loop controls of an aircraft[8].

Page 25: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

3.4 Model-based fault detection 13

3.4 Model-based fault detectionThe approach of model-based fault detection has been developed since the 1970’sand has developed remarkably since then. Its efficiency in detecting faults hasbeen demonstrated by many successful applications in industrial processes andautomatic control systems [2]. In contrast to hardware redundancy where com-parison is made with a physical parallel system, the idea of model-based faultdetection, or analytical redundancy, is to use mathematical process models anddependencies of measurable signals to detect faults [8]. Based on measured inputsignals and output signals, the detection methods generate residuals, parameterestimates or state estimates which are called features. Changes in present andnormal features result in analytical symptoms [7]. Model-based fault detectionhas many advantages by being able to detect smaller faults, facilitating isolationof faults and being a more cost effective alternative to hardware redundancy. Adisadvantage may be the need of well designed process models which can posea difficulty depending on the complexity of the process [5]. Figure 3.2 shows ageneral schematic of model-based fault detection.

Actuators Process Sensors

Processmodel

Featuregeneration

Changedetection

u(t) y(t)

Features

Analyticalsymptoms

Faults

Model-basedfault detection

Nominalbehaviour

Figure 3.2. Schematic of general model-based fault detection.

3.4.1 Fault modellingModelling fault in a process means in general to try to give an analytical descriptionto the faults that are to be monitored. A common way of modelling faults is tomodel them as deviations in constant model parameters from their nominal values.The aim of fault modelling is of course to detect a fault before it causes a failure,

Page 26: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

14 Fault detection and isolation

so better fault models, where for example smaller faults can be detected earlier,naturally implies better detection performance. Typical faults modelled in this wayare “gain-errors” and “biases” in sensors [5]. Faults can in their time behaviourbe abrupt, incipient or intermittent faults [7], illustrated in Figure 3.3.

f

t

(a) Abrupt fault.

f

t

(b) Incipientfault.

f

t

(c) Intermittentfault.

Figure 3.3. Time behaviour of faults.

3.4.2 Residuals and residual generationA fundamental part in model-based diagnosing is the process of formulating resid-uals. A residual can be regarded as a time-varying signal used as a fault detectorto reveal the deviation of the system’s current state from its nominal state. Asmentioned in Terminology (Section 3.1) the residual is typically designed to bezero when no fault exists and non-zero when a fault does exist. A main difficultyin achieving this is the disturbance decoupling problem, i.e. to obtain a residualfree from undesired influences that are not considered as faults [5, 8]. Generallythis is very difficult to achieve ideally, so residual generation is typically followedby residual evaluation which can comprise of filtering and testing against limitsand tolerances [2].

Residual generators are more or less filters that produce a residual from mea-surable process inputs and outputs aiming to fulfill the above stated requirements.In [7] a few examples of residual design approaches are presented, described in thefollowing sections.

3.4.3 Fault detection using parity equationsA straightforward example of model-based diagnosis is to use a fixed model GMof the monitored process GP and compute the output error

e(s) = [GP (s)−GM (s)]u(s) (3.1)

to detect any inconsistencies, also referred to as a parity equation. To utilise thismethod however a priori knowledge of the process is required and for single-input-single-output (SISO) processes, only one residual can be generated and one cannot distinguish between different faults [7]. Figure 3.4 shows the scheme of faultdetection using parity equations.

Page 27: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

3.4 Model-based fault detection 15

y(t)

u(t) y(t)

e(t)−

GP

GM

Figure 3.4. Fault detection using parity equations (simulation).

3.4.4 Fault detection using signal modelsMeasured signals can many times contain useful information such as harmonicor stochastic oscillations. Sensors can for example be used to monitor machinevibration to detect imbalances, bearing faults, knocking or chattering. If changesin these oscillations can be related to faults in the process, actuators or sensors,signal analysis can be a further source of information. The Fast Fourier Transform,autocorrelation functions or spectral densities

Xν =N−1∑k=0

xke−i2πν k

N Rxx(γ) =g∑

γ=0xkxk−γ Φ(ω) = |Xν |2

2π (3.2)

can then be useful tools to analyse data. The spectral density and auto correla-tion functions are in these cases very useful in separating stochastic signals fromperiodic signals. The deficiencies of these methods, however, are that they arenot well suited if the frequency content of the signal is unknown on beforehand.Then it is preferred to use parametric models, which are sensitive to even smallfrequency changes, in order to estimate the main frequencies and their amplitudes[7].

3.4.5 Observer based fault detectionThe basic idea behind the development of the observer-based fault diagnosis tech-nique is to replace the process model by an observer which will deliver reliableestimates of the process outputs as well as to provide the designer with the de-sign freedom to achieve the desired decoupling using the well established observertheory [2]. The method is suitable for multivariable processes as opposed to theparity equations approach [7].

Assume that we have a state space model

x(t) = Ax(t) + Bu(t) (3.3a)y(t) = Cx(t) (3.3b)

Page 28: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

16 Fault detection and isolation

where A, B and C are known and the model is a correct representation of thesystem. A state observer

˙x(t) = Ax + Bu(t) + He(t) (3.4a)e(t) = y(t)−Cx(t) (3.4b)

is used to reconstruct the unmeasurable state variables based on the measuredinputs and outputs. The errors are computed as

˙x(t) = x− ˙x (3.5)˙x(t) = [A−HC]x(t). (3.6)

The state error x vanishes asymptotically if the observer is stable, which can beachieved by proper design of the observer feedback H [7].

3.5 Change detectionDetecting change is the central task in FDI. But as described in previous sectionsa process is generally under influence of disturbances and detecting a change inthe fault indicators means thus to find a significant change. The measured orestimated quantities such as parameters, state variables or signals are usuallystochastic variables Si(t) with mean value and variance

Si = E[Si(t)]; σ2i = E[

(Si(t)− Si

)2] (3.7)

as normal values in a non-faulty case. Changes, or analytic symptoms, are thenobtained as the deviations

∆Si = E[Si(t)− Si]; ∆σi = E[σi − σi] (3.8)

from the normal values. To determine then if a change is deviating significantlyenough, methods of hypothesis testing are applied [7, 8].

3.6 Fault isolationThe objective of fault isolation is to determine what type of fault or where afault has occurred. There are several methods of achieving fault isolation, a fewexamples from [8] being;

Directional residuals The principle of directional residuals is to design a resid-ual vector that changes direction depending on the fault that is present. One canthen by classifying certain faults to specific directions isolate the type of faultthat is acting on the system. According to [8] this approach has not been widelyused, probably because of the difficulties of designing a residual vector with desiredproperties.

Page 29: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

3.6 Fault isolation 17

Structured residuals A more used approach is the method of structured resid-uals. Structured residuals are sets of residuals where every residual reacts to aspecific subset of faults. By observing which residuals are responding one can inthat way isolate the fault.

Structured hypothesis tests In [8] structured hypothesis tests are describedas being a generalisation of structured residuals but where the isolation method ismore formally defined to be available to work with any fault model.

Page 30: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 31: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Chapter 4

Modelling of time series

In this chapter a brief presentation of two methods of modelling time series, linearregression and autoregression, will be given. A derivation of the R2-statistic, F -statistic, confidence intervals and the model-fit will be given. The largest part ofthe chapter is based on [3, 4]. The section on autoregressive models however isbased on [6].

4.1 IntroductionTime series are sequences of data points that take on different stochastic be-haviours where the temporal ordering of the data is of crucial importance. Timeseries are typically measured at equidistant time points and the goal of time se-ries analysis is to find patterns and meaningful statistical properties in the data inquestion. Methods for time series analysis can be divided in two classes; frequency-domain methods and time-domain methods. Frequency-domain methods comprisefor example of spectral analysis of time series while time-domain methods comprisemainly of autocorrelation and cross-correlation between data points. A few exam-ples of time series are; share prices on the stock market, temperature fluctuationsduring a day, or, in our case a residual in a diagnosis process.

4.2 Linear regressionA common tool to model time series is the method of linear regression. Linearregression has come to be used in a wide range of applications and the methodbasically models the relationship between a measured response variable y and alinear combination of measured regression variables x1, x2, . . . , xn, where y is anobservation of the stochastic variable

Y = β0 + β1x1 + . . .+ βnxn + ε

and ε is normally distributed with zero mean and variance σ. Furthermore, all εkare independent for every observation k = 1, 2, . . . , N . To estimate the parameters

19

Page 32: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

20 Modelling of time series

θ = [β0 β1 . . . βn]T we use the method of least-squares, which is based on estimatingthe parameters so that the squared error between observed y and model output isminimised. In algebraic terms, it should fulfil

minθ

N∑k=1

(yk − E[Yk])2 (4.1a)

E[Y ] = β0 + β1x1 + . . .+ βnxn (4.1b)

where E[Y ] stands for the expectation of Y.

Example 4.1: Curve fittingLet’s assume we have been given the data set and the plot shown in Figure 4.1,where y is a 10×1 vector and x is a 10×2 matrix. The question posed is; Whichline

y = β0 + β1x1

passes through the data so that there is equal error to data points above the lineas well as below the line, and how do we calculate it?

y [x0 x1]11.61 1 1.0011.46 1 2.0010.02 1 3.0015.68 1 4.0014.58 1 5.00

y [x0 x1]17.96 1 6.0018.28 1 7.0015.63 1 8.0015.42 1 9.0018.85 1 10.00

0 2 4 6 8 10 12

10

12

14

16

18

20

x

y

Figure 4.1. Table of paired data and its corresponding plot. x0 symbolises the constantthat is multiplied with β0.

We recall from (4.1)

Q (β0, β1 . . . , βn) =N∑k=1

(yk − β0 − β1xk1 − . . .− βnxkn)2. (4.2)

Given n ≤ N we can choose to see this as a system of n equations and considersolving ∂Q

∂βi= 0. We thus have a system of equations

∂Q

∂βi=

N∑k=1

2(yk − β0 − β1xk1 − . . .− βnxkn)(−xki) = 0 (4.3)

which can be formulated as

Page 33: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

4.2 Linear regression 21

xT (y− xβ) = 0 (4.4)

or

xTy = xTxβ. (4.5)

These equations are called the normal equations to the solution. If now det(xTx) 6=0, we get

β =(xTx

)−1 xTy (4.6)

β =[

10.540.80

]. (4.7)

4.2.1 The R2-statisticAfter computing the regression coefficients in the previous example it is useful andalso common practice to evaluate the estimated model, performing for example ananalysis of variance (ANOVA) and/or computing the R2-statistic. The R2 statisticindicates how much of the variation in the observed data that can be explained bythe model and how much of the variation that is attributed to error. A value R2

= 0 is equivalent to using only β0 to model the response variable, while R2 = 1corresponds to a perfect model that yields exact predictions. We start derivingR2 by first stating

yk − y = (yk − yk) + (yk − y). (4.8)

Equation (4.8) simply states that the vertical distance between an observed datapoint yk and the mean y is the sum of the distances between the point and themodel output yk and between the model output and the mean. It can be shownthat

N∑k=1

(yk − y)2 =N∑k=1

(yk − yk)2 +N∑k=1

(yk − y)2 (4.9)

or otherwise formulated

SSTOT = SSE + SSR. (4.10)

Which says that the total squared sum (SS) of variation is equal to the squaredsum of variation related to model error plus the squared sum of variation relatedto the regression model, and R2 is

R2 = SSRSSTOT

. (4.11)

Page 34: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

22 Modelling of time series

4.2.2 t-statisticsConfidence intervals can be computed for both the response variable and the es-timated regression coefficients for the purpose of estimating their interval of vari-ation and furthermore show a variable’s significance in the model, i.e. show if itsinterval includes zero (variation around zero indicates insignificance). A confidenceinterval for β is in an ideal situation, i.e. when the entire population of samples isknown, defined as

I = β ± σ.

For non-ideal situations, as in nearly every practical situation, we need to estimatethe population mean and variance and make use of Gossets t-distribution. Thet-distribution is the probability function of the ratio

A√B/c

where

• A is normally distributed with expectation value 0 and variance 1.

• B is a χ2-distribution with c degrees of freedom.

• A and B are independent, i.e. the probability of observing a certain valuein A does not depend on the value of B.

We will derive an expression for the confidence interval of β by first defining ahelp variable. It can be shown that

βi ∼ N(βi, σ

√hii

)(4.12)

where

(xTx

)−1 =

h00 h01 · · · h0nh10 h11 · · · h1n...

.... . .

...hn0 hn1 · · · hnn

.

We can thus state

βi − βiσ√hii∼ N(0, 1). (4.13)

It can also be shown that

(N − n− 1)s2

σ2 ∼ χ2(N − n− 1) (4.14)

Page 35: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

4.2 Linear regression 23

where

s2 = SSEN − n− 1 .

Furthermore, using the definition of the t-distribution, (4.13) and (4.14), we canstate

βi − βiσ√hii

/√(N − n− 1)s2/σ2

(N − n− 1) ∼ t(N − n− 1) (4.15)

which can be rewritten as

βi − βis√hii∼ t(N − n− 1). (4.16)

Relation (4.16) can now be used to compute the confidence interval I by firstlooking up the needed t-value T and creating

βi − T · s√hii ≤ βi ≤ βi + T · s

√hii. (4.17)

4.2.3 F -statistics

The F -statistic is mainly used to investigate if it is worthwhile to add more pa-rameters to a stated linear model and is based on assessing the magnitude of theextra sum of squares derived from the added parameters. If we assume that theadded extra model parameters make no significant difference in the model andthat SS(1)

R and SS(2)R represent the sums of squares from regression for model 1

(original) and model 2 (with added parameters), it can be shown that

w =

(SS

(2)R − SS

(1)R

)/p

SS(2)R /(N − n− p− 1)

(4.18)

is an observation of the stochastic variable

W ∼ F (p,N − n− p− 1),

where p is the number of added parameters. N and n remain as the number ofobservations and number of original parameters respectively. The larger the sumSS

(2)R becomes the more likely it is that the added parameters make a significant

difference in the model. A common criterion is that w is so large that it belongsto the 10% - 5% largest values in the F -distribution, i.e. so large that there wouldbe 10% to 5% percent chance (or more correctly, risk) of observing a larger w.

Page 36: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

24 Modelling of time series

4.3 Autoregressive modelsAs mentioned previously time series are temporally ordered data sequences thatcan retain certain characteristics in the time-domain as well as in the frequency-domain. The key to time series modelling is to recognise these patterns, andanother way of doing so is to use autoregressive models. Autoregressive modelsare models that are based on the assumption that present values can be modelledas a combination of past values. The difference equation

y(t)+β1y(t−1)+ . . .+βny(t−n) = α0e(t)+α1e(t−1)+ . . .+αme(t−m) (4.19)

is called an autoregressive moving average-model of order (n,m), also writtenARMA(n,m). It is quite common to have the case m = 0, resulting in a socalled AR(n)-model [6]

y(t) = −β1y(t− 1)− . . .− βny(t− n) + e(t). (4.20)

Similarly the case of n = 0 results in a so called moving average model MA(m)

y(t) = α0e(t) + α1e(t− 1) + . . .+ αme(t−m). (4.21)

To estimate θ = [β1 β2 . . . βn]T in (4.20) we go about in a similar fashion as inthe regression example by first stating

E[Y ] = −β1y(t− 1)− . . .− βny(t− n) = ϕ(t)T θ (4.22)

where

ϕ(t)T = [−y(t− 1)− y(t− 2) . . .− y(t− n)]

θ = [β1 β2 . . . βn]T .

Again utilising the least-squares method we state the minimising criterion

minθ

1N

N∑t=1

(y(t)− ϕ(t)T θ

)2. (4.23)

Skipping the intermediate steps we state that the following can be shown

θ =[N∑t=1

ϕ(t)ϕ(t)T]−1 N∑

t=1ϕ(t)y(t). (4.24)

The expression in (4.24) shows that the best approximation θ is based entirely onthe covariation in the time series.

Page 37: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

4.3 Autoregressive models 25

4.3.1 Model-fitA way of assessing autoregressive models is to calculate the model’s goodness offit in the same way as in Section 1.3.3, and is computed as

V 2 = 1−∑Nt=1 (y(t)− y(t))2∑Nt=1 (y(t)− y)2 , y(t) = ϕT θ. (4.25)

There are a couple of issues to address, mentioned in [6], when estimatingautoregressive models.

• Deterministic components such as trends should be checked for before mod-elling a signal to not get misleading results.

• If the signal is oversampled this should also be addressed. A rule of thumbis that the signal should be approximately sampled ten times the bandwidthof the signal.

• A signal may contain high frequency components that are not desired to bemodelled. One should consider filtering the signal with an appropriate low-pass filter. It should be noted however that the filter will affect the signaldynamics.

Page 38: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 39: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Chapter 5

Measurements anddisturbance models

The purpose of this chapter is to familiarise the reader with the robot measure-ments that will be analysed and also describe the disturbances that are representedin the simulated measurements.

5.1 Measurements

Figure 5.1 shows the torque τ(t) and velocity ϕ(t) from a simulation of a test. Itcan be seen that the motion is periodic. Figure 5.2 shows the frequency contentin these signals, revealing that the signals’ period lies around 2.5 Hz.

0 0.5 1 1.5−1.5

−1

−0.5

0

0.5

1

Time [s]

Tor

que

[Nm

]

(a) Torque signal in time domain.

0 0.5 1 1.5−200

−150

−100

−50

0

50

100

150

200

Time [s]

Ang

ular

vel

ocity

[rad

/s]

(b) Velocity signal in time domain.

Figure 5.1. Measurements in time domain.

27

Page 40: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

28 Measurements and disturbance models

0 5 10 15 200

0.005

0.01

0.015

0.02

0.025

0.03

0.035

0.04

Frequency [Hz]

Am

plitu

de

(a) Torque signal in frequency domain.

0 5 10 15 200

200

400

600

800

1000

Frequency [Hz]

Am

plitu

de

(b) Velocity signal in frequency domain.

Figure 5.2. Measurements in frequency domain.

5.2 DisturbancesAs discussed in Chapter 3 a fundamental part of model-based diagnosis is faultmodelling. In this report the investigated diagnosis method is evaluated on itsability of detecting a friction fault in a robot joint under the influence of a set ofdisturbance factors. A description of their representation follows below.

5.2.1 Friction faultThe monitored fault is represented as a changed friction torque and will be referredto as friction fault. The extra torque does not have to be attributed to any specificcause or causes. The investigation is concerned with all faults that imply an addedtorque of the kind that is explained by the friction model

τf (ϕm) =(Fc + (Fs − Fc) e−( ϕm

ϕs)2)

tanh(βϕm) + Fvϕm. (5.1)

The behaviour of the modelled fault is plotted in Figure 5.3. The figure showsseveral superimposed friction curves illustrating an increasing fault, where thelowest curve represents the normal friction curve, i.e. the non-faulty case and theuppermost torque curve represents the fault used in this analysis. The model’sparameters Fc, Fs and ϕs are variable and change for every increase in the mag-nitude of the fault. The variable ϕm denotes the motor angular velocity. Addedfriction torque naturally results in a larger applied motor torque and Figure 5.4shows plots of the torque and velocity signals when affected by the friction faultand when not affected by the friction fault, on top of each other. The markingsin the figure hints where the largest differences appear for the first time in theperiodic signal. It should be noted that the model is not derived from a specificrobot. It has, nevertheless, authentic characteristics seen from previous robotfriction identification situations.

Page 41: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

5.2 Disturbances 29

0 100 200 300 4000.1

0.15

0.2

0.25

Angular velocity [rad/s]

Tor

que

[Nm

]

Figure 5.3. Ten torque curves representing increasing friction fault.

0 0.5 1 1.5−1.5

−1

−0.5

0

0.5

1

1.5

Time [s]

Tor

que

[Nm

]

(a) Effect of friction fault on the torque signal.

0 0.5 1 1.5−400

−300

−200

−100

0

100

200

300

400

Time [s]

Ang

ular

vel

ocity

[rad

/s]

(b) Effect of friction fault on the velocity signal(the fault has no effect on the velocity).

Figure 5.4. Faulty signals superimposed on non-faulty signals.

5.2.2 Shift and delay

Other disturbances that have been represented in the signal model are angle shiftand delay. The angle shift is a disturbance which occurs when a robot arm reachesa too high velocity and performs a larger angle displacement than anticipated,resulting in a slight shift in time causing a desynchronisation with nominal mea-surements (of exactly the same test cycle). The delay disturbance occurs when therobot arm moves through a zero-velocity point, also referred to as a fine-point, andremains there for too long and therefore causing a slight shift in time, i.e. a desyn-chronisation with nominal measurements. These disturbances have been seen to

Page 42: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

30 Measurements and disturbance models

appear in the practical application of the method on physical robots and are mostlikely a result of the robot manipulator being a mechanical device and subject toinevitable deviation from one occasion to another (even though performing thesame test cycle). The disturbances do not have any analytical representations asthe friction torque has but are represented by direct manipulation in the test data.The effects of these disturbances are illustrated in Figure 5.5 and Figure 5.6. Themarkings in the figures show where the effect of the fault appears for the first timein the periodic signal.

0 0.5 1 1.5−1.5

−1

−0.5

0

0.5

1

1.5

Time [s]

Tor

que

[Nm

]

(a) Effect of angle shift on torque data.

0 0.5 1 1.5−400

−300

−200

−100

0

100

200

300

400

Time [s]

Ang

ular

vel

ocity

[rad

/s]

(b) The angle shift occurs every time thevelocity reaches an extremum point.

Figure 5.5. Faulty signals superimposed on non-faulty signals.

0 0.5 1 1.5−1.5

−1

−0.5

0

0.5

1

1.5

Time [s]

Tor

que

[Nm

]

(a) Effect of delay on torque data.

0 0.5 1 1.5−400

−300

−200

−100

0

100

200

300

400

Time [s]

Ang

ular

vel

ocity

[rad

/s]

(b) The delay occurs at every zero-velocitypoint.

Figure 5.6. Faulty signals superimposed on non-faulty signals.

Page 43: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

5.3 Residuals 31

5.2.3 NoiseThe noise that we expect in the torque and velocity data, which is a simulation ofthe noise in the resolver, is in this investigation approximated as

nτ (s) = − 4.2s3 + 154s2 + 140ss3 + 32s2 + 6.1 · 103s+ 3 · 105 · u(s) (5.2)

nϕ(s) = s2

s2 + 200s+ 104 · v(s) (5.3)

for the torque and velocity signal respectively. Here u(s) and v(s) are white noisesequences both with variance ν = (0.5 · 103)2. Figure 5.7 shows the periodogramsof nτ (t) and nϕ(t).

0 0.2 0.4 0.6 0.8 10

1

2

3

4

5

6

7

8

Frequency [Hz]

Den

sity

(a) Periodogram of the signal nτ (t).

0 0.2 0.4 0.6 0.8 10

10

20

30

40

50

60

Frequency [Hz]

Den

sity

(b) Periodogram of the signal nϕ(t).

Figure 5.7. Periodogram of noise models.

5.3 ResidualsThe residuals can be considered as generated through the scheme described inSection 3.4.3, i.e. as a subtraction between process and model output, where past(nominal) measurements can be seen as the model output. We will continuallywork with these two residuals, the torque residual and the velocity residual. Figure5.8 shows an example of how the respective residuals may look in the time andfrequency domain when the signals are affected by the maximum values (used inthe analysis) of the disturbances and the friction fault.

Page 44: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

32 Measurements and disturbance models

0 0.5 1 1.5 2 2.5 3−3

−2

−1

0

1

2

3

Time [s]

Tor

que

[Nm

]

(a) Torque residual affected by friction fault, de-lay, shift and noise.

0 0.5 1 1.5 2 2.5 3−1000

−500

0

500

1000

Time [s]

Vel

ocity

[rad

/s]

(b) Velocity residual affected by friction fault,delay, shift and noise.

0 5 10 15 200

0.02

0.04

0.06

0.08

0.1

Frequency [Hz]

Den

sity

(c) Torque residual in frequency domain.

0 5 10 15 200

0.5

1

1.5

2

2.5x 10

4

Frequency [Hz]

Den

sity

(d) Velocity residual in frequency domain.

Figure 5.8. Torque and velocity residuals with added noise nτ (t) and nϕ(t), in timeand frequency domain.

5.3.1 Noise sensitivityIt is always of interest to assess how much of a signal is useful data and howmuch is noise. This is commonly evaluated by calculating the signal-to-noise ratio(SNR) of the signal. In our case we had the noise models nτ (s) and nϕ(s) andresiduals τres(t) and ϕres(t) to calculate the measure. The SNR is for the torqueand velocity residual calculated as

SNRτ =∑τres(k)2∑nτ (k)2 SNRϕ =

∑ϕres(k)2∑nϕ(k)2 (5.4)

where τres(k) and ϕres(k) are the residuals of respective signal. The SNR com-puted on the residuals shown in Figure 5.8 is

SNRτ ≈ 31, SNRϕ ≈ 1.79 · 103. (5.5)

Page 45: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Chapter 6

Design of experiment

In this chapter the design of experiment used in the analysis will be explained aswell as some brief background theory. The design described here was constructedby Dr. Kari Saarinen, principal scientist at ABB in Västerås.

6.1 IntroductionOne of the most important steps in research often pointed out by statisticians,is the conduct of efficient and reliable experiments and doing so in a systematicmanner. It is in the literature advised not to perform experiments arbitrarilyand change control factors one at a time, but to utilise variation in multiple vari-ables simultaneously and to let them do so in a systematic way. This is calledconstructing factorial experiment designs [1]. Assuming that researchers typicallyface limited resources in terms of time and money, to use them efficiently, obviouslyis of benefit.

TerminologyTreatment A controllable factor of influence (on the yield), also re-

ferred to as an experiment design variable.Treatment level A symbol for when a treatment is high, low or in the middle.Run One experiment trial.Experiment project A set of runs.

6.2 Fractional factorial designsWhen a researcher is about to construct an experiment project (set of runs) he orshe needs to decide which influences (treatments) to test the response to. A simpleexample could be deciding whether to test plant growth with respect to varyingsun light or with respect to amount of given water, or both! The central pointin factorial design is to assign these factors of influence a discrete set of levels in

33

Page 46: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

34 Design of experiment

TreatmentsRun a b c1 - - -2 - - +3 - + -4 - + +5 + - -6 + - +7 + + -8 + + +

Table 6.1. A full factorial matrix.

TreatmentsRun d a b c1 - - - -2 + - - +3 + - + -4 - - + +5 + + - -6 - + - +7 - + + -8 + + + +

Table 6.2. Augmented matrix with anextra factor d by confounding a, b andc.

which they are let to vary. Levels may for example be represented as (+) and (-)or 1 and 0, for high and low levels. Next task being to assign real values to theselevels and be consistent in their application throughout the experiment project. Asetup of experimental runs can for example look like Table 6.1, where + and - havebeen used. The number of test runs is determined by the amount of treatmentsand treatment levels. For a setup of two-level treatments and three-treatment runswe have for a full factorial design a total of 23 = 8 runs.

Assume now that we have the 8-run design shown in Table 6.1. Assume furtherthat we only have time to perform half of these experiment runs and thus wouldlike to fractionalise, i.e. choose a subset of the 8-run design. We would do this,as is usually done, by creating a fourth treatment by confounding the existingones, e.g. letting d = abc, where the sign of d is a multiplication of the signs ofa,b and c. We would then get a setup shown in Table 6.2. From this setup wechoose the runs where d remains constant (either + or -), which for d = +, givesruns number 2, 3, 5 and 8 as our subset. This choice of fraction is said to havethe highest resolution from the fact that the variable d was defined using all theoriginal variables. One could of course also choose a subset in a purely randomway. For more on this specific issue and experiment designs [1] is recommended.

6.3 Treatments and treatment levels

In our case we have five factors of influence (treatments) shown in Table 6.3. Thechosen variables are selected with the expectation that they would be significantin explaining the variation in the test quantities. Three of the variables have threelevels while the other two have two levels. This results in when constructing afull factorial design, a total of 108 experiment runs. The used experiment matrix,however, is fractionalised to 42 runs and is shown in Table 6.5 in the end of thischapter. Table 6.3 and Table 6.4 describe the influence factors, their levels andthe levels’ values.

Page 47: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

6.4 Experiment matrix 35

Test cycle variablesAngular velocity ϕAngle movement ϕ

Disturbance factorsFriction fault fDelay ∆tAngle shift ∆ϕ

Table 6.3. Factors of influence, treatments.

LevelVariables 1 2 3

x1 f Friction fault - 0 1x2 ϕ Angular velocity 1.2 rad/s 1.5 rad/s 1.8 rad/sx3 ϕ Angle movement 10 ◦ 18 ◦ 26 ◦

x4 ∆t Delay time - 0 ms 50 msx5 ∆ϕ Angle shift −0.5 ◦ 0 ◦ 0.5 ◦

Table 6.4. Treatment levels and their values.

6.4 Experiment matrix

The construction of the experiment design originated from the variables angularvelocity ϕ and angular displacement ϕ, both varying in three levels. Moreover,there are inherent physical constraints between the velocities that can be reachedand the displaced angle. The robot arm may for example not be able to reacha specific (high) velocity before it completes its movement if a too small angle isdefined, because of the constraints on the maximal acceleration of the robot arm.Therefore the following was stated; The velocity level ϕ = 3 should correspondto the highest achievable velocity when performing the angle movement with levelϕ = 2. This makes the combination [ϕ, ϕ] = [3, 1] unachievable.

Figure 6.1 shows the experimental region with an X-mark for the unachievableexperimental situation.

1

2

3

4

5

6

X

3

2

1

1 2 3

ϕ

ϕ

Figure 6.1. Experimental region.

Page 48: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

36 Design of experiment

For every point in the figure the variables ∆ϕ and ∆t are let to vary between2 and 3 and 1 and 3 respectively, except for point 6. For the experiment situation6 all variables remain on level 2. This setup resulted in a design matrix of totally21 trials, as seen as the first 21 trials in Table 6.5.

The two-leveled friction fault f was added at a later point and led to thedoubling of the design matrix to totally 42 trials resulting in the final designmatrix.

Exp. No f ϕ ϕ ∆t ∆ϕ1 2 1 1 2 12 2 1 1 2 33 2 1 1 3 14 2 1 1 3 35 2 1 3 2 16 2 1 3 2 37 2 1 3 3 18 2 1 3 3 39 2 2 1 2 110 2 2 1 2 311 2 2 1 3 112 2 2 1 3 313 2 3 2 2 114 2 3 2 2 315 2 3 2 3 116 2 3 2 3 317 2 3 3 2 118 2 3 3 2 319 2 3 3 3 120 2 3 3 3 321 2 2 2 2 222 3 1 1 2 123 3 1 1 2 324 3 1 1 3 125 3 1 1 3 326 3 1 3 2 127 3 1 3 2 328 3 1 3 3 129 3 1 3 3 330 3 2 1 2 131 3 2 1 2 332 3 2 1 3 1

Exp. No f ϕ ϕ ∆t ∆ϕ33 3 2 1 3 334 3 3 2 2 135 3 3 2 2 336 3 3 2 3 137 3 3 2 3 338 3 3 3 2 139 3 3 3 2 340 3 3 3 3 141 3 3 3 3 342 3 2 2 2 2

Table 6.5. Experiment design matrix.

Page 49: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Chapter 7

Sensitivity analysis

In this chapter we will perform a sensitivity analysis of the chosen test quantitieswith respect to different test cycles while assuming that the signals are subjected toa friction fault and two disturbances. This will be done using regression analysis.An analysis of main effects will be performed and presented, followed by a similaranalysis of an improved model.

7.1 Test quantitiesIn our diagnosis method the test quantities that are used as base for decisionmaking are the RMS-measure and model fit-measure mentioned in Section 1.3.3.They are computed on the generated residuals. They are repeated below forconvenience.

φfit =

1−

√∑Nk=1 (sres(k)− sres(k))2√∑Nk=1 (sres(k)− sres)2

· 100 (7.1)

φRMS =

√∑Nk=1 s

2res(k)

N

/√∑Nk=1 s

2nom(k)N

· 100 (7.2)

Where s(k) is either τ(k) or ϕ(k).The objective now is to run an experiment project (using the experiment ma-

trix) for each test quantity and use regression to perform a sensitivity analysis, i.e.to analyse how the quantities vary with respect to the chosen treatments (controlfactors). We will refer to these projects as

• Project 1 Sensitivity analysis of the model-fit measure when applied on thetorque signal.

• Project 2 Sensitivity analysis of the model-fit measure when applied on thevelocity signal.

37

Page 50: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

38 Sensitivity analysis

• Project 3 Sensitivity analysis of the RMS-measure when applied on thetorque signal.

• Project 4 Sensitivity analysis of the RMS-measure when applied on the ve-locity signal.

7.2 Calculation of main effectsWe will now perform a multivariable regression analysis with the test quantities asresponse variables. The experiment matrix is regarded as the x-matrix. We statethe linear model

Y = β0 + β1x1 + β2x2 + β3x3 + β4x4 + β5x5 + ε. (7.3)

Refer to Table 6.4 for explanation of the variables corresponding to respective xi.

7.2.1 ResultsTable 7.1 - Table 7.4 below show the results from the regression. The first columnshows the parameter βi corresponding to experiment variable xi while the secondcolumn shows the least-squares estimate of that parameter. The third columnshows the probability of the parameter being insignificant in the model, i.e. theprobability of the parameter’s confidence interval encompassing the zero value(recall Section 4.2.2).

Project 1β β P(βi = 0)β0 82.5622 8.8009e-08β1(f) 1.2343 0.6940β2(ϕ) -0.4107 0.8248β3(ϕ) 1.6430 0.3781β4(∆t) -0.0714 0.9818β5(∆ϕ) -3.2437 0.0493

Table 7.1. Regression results of themodel-fit measure when computed onthe torque signal.

Project 2β β P(βi = 0)β0 99.4533 3.0339e-51β1(f) -2.5584e-14 1.0000β2(ϕ) 0.2080 0.0514β3(ϕ) -0.0697 0.5039β4(∆t) -0.3244 0.0714β5(∆ϕ) -0.3795 1.4633e-04

Table 7.2. Regression results of themodel-fit measure when computed onthe velocity signal.

Table 7.1 shows that the model mean β0 lies around 82.56 and that the velocityvariable β2, and the disturbance variables β4 and β5 contribute negatively to themodel-fit measure. The friction fault f however contributes positively, which isreasonable since we expect that a fault would contribute to larger values in thetest quantities (recall 1.3.3). It is necessary however to note that all β are showinghigh P -values even if we haven’t chosen any tolerance level to go by.

Table 7.2 shows on one hand a notably high β0 value of 99.45, considering thatφfit’s largest value is 100, while on the other hand it shows that in fact almostall the other parameters have negative weights. Interesting to see is that the

Page 51: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

7.2 Calculation of main effects 39

parameter of the friction fault β1 is basically zero, i.e. the variable doesn’t seemto have any impact on the model-fit measure in this setup.

Project 3β β P(βi = 0)β0 128.6522 6.8211e-05β1(f) -1.4747 0.8387β2(ϕ) -5.3737 0.2147β3(ϕ) -6.5952 0.1299β4(∆t) -3.1129 0.6681β5(∆ϕ) -20.4456 2.7857e-06

Table 7.3. Regression results of theRMS-measure when computed on thetorque signal.

Project 4β β P(βi = 0)β0 80.1256 3.0471e-04β1(f) -2.1958e-14 1.0000β2(ϕ) -2.2209 0.4616β3(ϕ) -10.3871 0.0013β4(∆t) 2.6357 0.6050β5(∆ϕ) -15.1859 1.0198e-06

Table 7.4. Regression results of theRMS-measure when computed on thevelocity signal.

Recalling that the RMS-measure gives a measure of the energy ratio betweenthe residual and nominal data, one would expect it to be relatively small, sincethe residual should be a fraction of the nominal data (even in presence of fault).Nevertheless Table 7.3 shows a significantly large β0, implying a variation of thequantity around approximately 80. Table 7.4 also shows a large β0 albeit smallerthan in Project 3. Another observation is that in both tables the angle parameterβ3 and angle shift parameter β5 are the most significant ones.

7.2.2 Analysis of varianceTable 7.5 - Table 7.8 below describe how well the model performs in each project bydisplaying the R2-statistic and the analysis of variance (ANOVA) for every project.The R2-statistic and the components of the ANOVA are explained in Section 4.2.1and Section 4.2.3. The ANOVA basically shows how much of the sums of squaresare attributed to the model parameters and how much that are attributed to error,i.e. SSR and SSE . They are used to estimate the significance of the used model,which is indicated in the F -value and the probability P(βi = 0). They showthe significance of including the “extra” parameters β1, β2,. . . ,βn compared toonly modelling with the constant β0 (which can be seen as the “original” model).More specifically, the last column shows the probability (P(βi = 0)) of the nullhypothesis H0 being true, in this case H0 : βi = 0, i = 1, 2, . . . , n. How to computethis probability is briefly described in Section 4.2.3. Fore more on this matter [3, 4]may be consulted. The second column (DF) displays the degrees of freedom ofthe model and of the error. The degrees of freedom of the model and error are byconventionDFM = n−1 andDFE = N−n−1 respectively, where N is the numberof samples and n is the total number of model parameters. The fourth column(SS/DF) shows the sum of square for respective source averaged over degrees offreedom.

Page 52: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

40 Sensitivity analysis

Looking at Table 7.5 the P -value shows that the used model isn’t that muchbetter than it would be using only the constant β0 to model the response variable.The regression coefficients run a 42% “risk” of being insignificant in modelling theresponse variable. This is even more evident when looking at the R2-statistic.

Project 1R2 0.1239

ANOVASource DF SS SS/DF F P(βi = 0)Regression 5 517.8910 101.7056 1.0184 0.4213Error 36 3.6614e+03 103.5782Total 41

Table 7.5. Residual analysis of Project 1.

We see from Table 7.6 - Table 7.8 that the model on average “catches” about50% of the variation in the data indicated by the R2-value. That’s quite a lownumber, not mentioning its performance in Project 1. Even so it is rather arbitraryto state what’s low and what’s not, there are no specific rules here to follow, andwe have yet to decide what can be considered as a sufficient P -value.

Project 2R2 0.4153

ANOVASource DF SS SS/DF F P(βi = 0)Regression 5 8.1720 1.6344 5.1137 0.0012Error 36 11.5060 0.3196Total 41

Table 7.6. Residual analysis of Project 2.

Project 3R2 0.5023

ANOVASource DF SS SS/DF F P(βi = 0)Regression 5 1.9728e+04 3.9457e+03 7.2658 8.5829e-05Error 36 1.9550e+04 543.0459Total 41

Table 7.7. Residual analysis of Project 3.

Page 53: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

7.3 Improving the model 41

Project 4R2 0.5799

ANOVASource DF SS SS/DF F P(βi = 0)Regression 5 1.3277e+04 2.6553e+03 9.9368 4.9398e-06Error 36 9.6200e+03 267.2214Total 41

Table 7.8. Residual analysis of Project 4.

7.3 Improving the modelWe consider improving the model to find out if we can get better results of per-formance. Another motivation being the results from Project 1, where the modelonly contributed with approximately 12% to the variation. We will therefore addto the model all possible two-way interaction terms and then progressively selecta subset of the most significant ones. The selection will be carried out using back-ward elimination as explained in [4] ([3] proposes a slightly different method). Thebasic steps of the procedure are

1. Compute a regression equation including all desired variables.

2. Compute the t-test value for every parameter (weight) and perform a signif-icance test.

3. Of all parameters that exceed the tolerance level ν =P(βi = 0), the one thatshows the largest ν is eliminated. Return to step 2. If no parameter exceedsthe tolerance level then stop.

We now state a new model including all possible two-way interactions βijxij

Y = β0 + β1x1 + β2x2 + β3x3 + β4x4 + β5x5 + β12x12 + β13x13 + β14x14

+ β15x15 + β23x23 + β24x24 + β25x25 + β34x34 + β35x35 + β45x45 + ε (7.4)

where xij = xixj . The tolerance criterion will be that the probabilities P(βi = 0)of the remaining parameters may not exceed 5%.

Page 54: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

42 Sensitivity analysis

7.3.1 ResultsResults from regression before elimination are shown in Table 7.9 - Table 7.12,and results after elimination are shown in Table 7.13 - Table 7.16. The same typeof statistics as displayed in Table 7.1 - Table 7.4 are shown.

Table 7.9 and Table 7.10 show that the parameters for the main model variablesdo not change much with the addition of interaction terms. The friction fault fremains insignificant in Table 7.10, so do all of the interaction terms associatedwith it.

Project 1β β P(βi = 0)β0 93.5970 0.1264β1(f) 4.3515 0.8272β2(ϕ) -1.5528 0.9193β3(ϕ) -16.4707 0.2702β4(∆t) -1.4185 0.9436β5(∆ϕ) 3.1059 0.8068β12 0.4999 0.8958β13 0.4073 0.9150

β β P(βi = 0)β14 -1.6614 0.7971β15 -0.4088 0.9016β23 -1.7350 0.4938β24 1.7672 0.6440β25 -0.2387 0.9005β34 5.4669 0.1600β35 3.1600 0.1065β45 -4.4681 0.1839

Table 7.9. Estimated parameters and their respective significance,before elimination.

Project 2β β P(βi = 0)β0 97.6955 4.6381e-22β1(f) -2.4112e-14 1.0000β2(ϕ) -0.2562 0.7535β3(ϕ) -0.1874 0.8114β4(∆t) 0.5703 0.5938β5(∆ϕ) 0.8394 0.2203β12 1.0011e-14 1.0000β13 3.9694e-15 1.0000

β β P(βi = 0)β14 -1.1933e-14 1.0000β15 2.4186e-16 1.0000β23 0.0143 0.9150β24 0.1190 0.5588β25 0.0666 0.5133β34 0.0059 0.9767β35 0.0395 0.6975β45 -0.5725 0.0029

Table 7.10. Estimated parameters and their respective significance, beforeelimination.

The same can be said of Table 7.11 and Table 7.12. They show howevernoticeable change in the parameters of the main model variables, they have allbecome much larger.

Page 55: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

7.3 Improving the model 43

Project 3β β P(βi = 0)β0 36.9042 0.6978β1(f) 0.2018 0.9949β2(ϕ) -37.4139 0.1321β3(ϕ) -23.6478 0.3170β4(∆t) 47.0078 0.1475β5(∆ϕ) 53.8395 0.0120β12 0.2441 0.9678β13 0.0302 0.9960

β β P(βi = 0)β14 0.0284 0.9978β15 -0.7329 0.8888β23 4.2338 0.2952β24 7.6388 0.2136β25 1.3065 0.6664β34 0.6702 0.9118β35 4.1442 0.1783β45 -33.5047 7.6540e-07

Table 7.11. Estimated parameters and their respective significance, beforeelimination.

Project 4β β P(βi = 0)β0 41.8216 0.4832β1(f) -8.9019e-14 1.0000β2(ϕ) -27.6536 0.0777β3(ϕ) -33.3837 0.0296β4(∆t) 38.2604 0.0630β5(∆ϕ) 6.0418 0.0466β12 1.9266e-14 1.0000β13 1.2584e-15 1.0000

β β P(βi = 0)β14 1.2464e-14 1.0000β15 5.1545e-15 1.0000β23 5.7953 0.0274β24 3.5965 0.3461β25 1.4595 0.4431β34 0.7661 0.8396β35 5.7112 0.0052β45 -22.2277 2.8656e-07

Table 7.12. Estimated parameters and their respective significance, beforeelimination.

Table 7.13 - Table 7.16 show the results after elimination. We can see in Table7.13 and Table 7.14 that all remaining regression coefficients are significant in theircontribution although some of the original variables have disappeared while someof the interaction terms have remained.

The remaining model still have a large β0 in both projects. In Table 7.13 we seethat the angle parameter β3 has the largest impact on the response. It looks likethe angle and its interaction terms explain the model-fit measure the best whenusing the torque signal. Even though neither β4 or β5 remained after eliminationtheir interaction term, β45, did.

Looking at Table 7.14 it looks like that the disturbance parameters β4, β5 andtheir interaction β45 explain most of the variation of the model-fit measure, whenusing the velocity signal. The interaction term β25 have also remained.

Page 56: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

44 Sensitivity analysis

Project 1β β P(βi = 0)β0 99.1059 5.0846e-17β3(ϕ) -16.4209 0.0111β34 4.3980 0.0089β35 3.4832 0.0154β45 -4.1453 0.0010

Table 7.13. Estimated parametersand their respective significance, af-ter elimination.

Project 2β β P(βi = 0)β0 96.8677 7.4929e-49β4(∆t) 0.8205 0.0180β5(∆ϕ) 0.8686 0.0308β25 0.0915 0.0187β45 -0.5725 4.5733e-04

Table 7.14. Estimated parametersand their respective significance, af-ter elimination.

Table 7.15 and Table 7.16 show a few interesting changes from the calculationof the main model. The results here show that β0 is not included in the finalmodel. Furthermore, it is seen that an increase in the disturbance parameters(β4,β5,β45) results in an increase in the RMS-measure while the angle parameterβ3 in contrast has a negative contribution to the measure. The model is in largesimilar for both projects.

Project 3β β P(βi = 0)β3(ϕ) -65.7919 0.0329β4(∆t) 68.4446 1.3332e-06β5(∆ϕ) 62.9088 3.4453e-05β24 -2.3354 0.0493β45 -33.5047 1.8353e-07

Table 7.15. Estimated parametersand their respective significance, af-ter elimination.

Project 4β β P(βi = 0)β3(ϕ) -56.2288 0.0290β4(∆t) 47.0911 2.2858e-05β5(∆ϕ) 46.7067 2.0710e-04β35 -3.1617 0.0063β45 -22.2277 1.0718e-05

Table 7.16. Estimated parametersand their respective significance, af-ter elimination.

7.3.2 Analysis of varianceThe following tables will show the same type of statistics as shown in the tables inSection 7.2.2. In this section however two tables will be shown for every project.One table showing the statistics of the new model before elimination has beenperformed and the other showing the same data for the model after eliminationhas been performed. This is more for illustrational purposes, while all comparisonswill be made between the main model (7.3) and the new models after elimination.This will tell if the inclusion of interaction terms improves the model.

Page 57: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

7.3 Improving the model 45

In Table 7.18 we see that the resulting model after elimination greatly improvesthe main model. The R2-statistic shows much better model explanation comparedto the main model. We can also see that all regression coefficients now show farmore significance in the model. The improvement can also be seen in the values ofthe sum of squares. Similarly, in Table 7.20 the R2-statistic shows an increase ofapproximately 40% from the main model. The P -value is also greatly improved.

Project 1 - Before elimination.R2 0.3336

ANOVASource DF SS SS/DF F PRegression 15 1.3942e+03 92.9467 0.8677 0.6035Error 26 2.7851e+03 107.1192Total 41

Table 7.17. Number of degrees of freedom for respective source and square of sums,before elimination. The P-value shows the significance of the added model parametersβi, 1. . . n.

Project 1 - After elimination.R2 0.3003

ANOVASource DF SS SS/DF F PRegression 4 1.2549e+03 313.7250 3.9695 0.0089Error 37 2.9243e+03 79.0351Total 41

Table 7.18. Number of degrees of freedom for respective source and square of sums,after elimination. The P-value shows the significance of the added model parameters βi,1. . . n.

Project 2- Before elimination.R2 0.5998

ANOVASource DF SS SS/DF F PRegression 15 11.8030 0.7869 2.5979 0.0158Error 26 7.8750 0.3029Total 41

Table 7.19. Number of degrees of freedom for respective source and square of sums,before elimination. The P-value shows the significance of the added model parametersβi, 1. . . n.

Page 58: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

46 Sensitivity analysis

Project 2 - After elimination.R2 0.5835

ANOVASource DF SS SS/DF F PRegression 4 11.4815 2.8704 12.9588 1.0845e-006Error 37 8.1966 0.2215Total 41

Table 7.20. Number of degrees of freedom for respective source and square of sums,after elimination. The P-value shows the significance of the added model parameters βi,1. . . n.

Table 7.22 shows a 50% improvement in the R2-statistic compared to the mainmodel. The sum of squares have also greatly improved, where SSR has risen byapproximately 158% from 1.9e+04 to 3e+04, while SSE has lowered by approxi-mately 47% from 1.9e+04 to 1e+04 compared to the main model (see Table 7.7).

Project 3 - Before elimination.R2 0.8251

ANOVASource DF SS SS/DF F PRegression 15 3.3019e+004 2.2013e+03 8.1757 2.1122e-06Error 26 7.0004e+003 269.2462Total 41

Table 7.21. Number of degrees of freedom for respective source and square of sums,before elimination. The P-value shows the significance of the added model parametersβi, 1. . . n.

Project 3 - After elimination.R2 0.7462

ANOVASource DF SS SS/DF F PRegression 4 2.9864e+04 7466 27.1999 1.4208e-10Error 37 1.0156e+04 274.4865Total 41

Table 7.22. Number of degrees of freedom for respective source and square of sums,after elimination. The P-value shows the significance of the added model parameters βi,1. . . n.

Page 59: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

7.3 Improving the model 47

Table 7.24 shows that the R2-value has risen by approximately 19% from themain model (see 7.8).

Project 4 - Before elimination.R2 0.8804

ANOVASource DF SS SS/DF F PRegression 15 2.0158e+04 1.3439e+03 12.7565 2.2214e-08Error 26 2.7391e+003 105.3500Total 41

Table 7.23. Number of degrees of freedom for respective source and square of sums,before elimination. The P-value shows the significance of the added model parametersβi, 1. . . n.

Project 4 - After elimination.R2 0.6917

ANOVASource DF SS SS/DF F PRegression 4 1.5837e+004 3.9593e+003 20.7520 4.8540e-009Error 37 7.0593e+003 190.7919Total 41

Table 7.24. Number of degrees of freedom for respective source and square of sums,after elimination. The P-value shows the significance of the added model parameters βi,1. . . n.

Page 60: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

48 Sensitivity analysis

7.3.3 Plots of SSR and SSE

Figure 7.1 - Figure 7.4 show how the SSR and SSE values behave during the(backward) elimination of the most insignificant model parameters. The blacklines show the corresponding SS-values from the main model projects. The closestblack line to respective SS-curve is its corresponding value from the main model.Figure 7.3 shows that the SS-values from the original model are very close to eachother (see also Table 7.7 to confirm).

2 4 6 8 10 120

1000

2000

3000

4000

5000

SS

Regression run

SS

E

SSR

Figure 7.1. Filled line shows the changein SSE while dashed line shows thechange in SSR. Black lines correspondto the SS-values in the main model.

2 4 6 8 10 125

10

15

SS

Regression run

SS

E

SSR

Figure 7.2. Filled line shows the changein SSE while dashed line shows thechange in SSR. Black lines correspondto the SS-values in the main model.

2 4 6 8 10 120.5

1

1.5

2

2.5

3

3.5

4

4.5x 10

4

SS

Regression run

SS

E

SSR

Figure 7.3. Filled line shows the changein SSE while dashed line shows thechange in SSR. Black lines correspondto the SS-values in the main model.

2 4 6 8 10 12

0.5

1

1.5

2

2.5

x 104

SS

Regression run

SS

E

SSR

Figure 7.4. Filled line shows the changein SSE while dashed line shows thechange in SSR. Black lines correspondto the SS-values in the main model.

Page 61: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

7.4 Summary 49

7.4 SummaryWe started off by stating a linear model with five variables evaluated in four exper-iment projects. The results showed that the model in experiment Project 1 onlyhad an approximate 12% 1 contribution in explaining the variation in the responsevariable. Looking to improve the model we added all two-way interaction termsto the original model and used backward elimination to progressively eliminatevariables that showed to be insignificant. These results showed improvements inall cases, especially in Project 1, where the R2-value increased by approximately250%.

Only two-way interaction terms were added in the improved model not to makethe model too large but also because the extra contribution of higher order inter-action terms is reduced with the order. The resulting improved models indicatenevertheless that interaction between the variables are of concern and that morecomplex interaction terms might need more consideration.

In following sections we will discuss the results from the sensitivity analysisand try to characterise the behaviour of the test quantities and conclude whetherthe analysis can give us any basis for stating an optimal or better test cycle ornot.

7.4.1 The model-fit measureThe purpose of AR-modelling the residual is to detect correlation in the timeseries, where the model-fit measure acts as a measure of the magnitude of thisphenomenon, thus a higher model-fit should mean that the residual is not a se-quence of white noise, implying a presence of fault.

Main effects in Project 1 The results from regressing the original model inexperiment Project 1 showed that

• only the shift disturbance (β5) is significant on a 5%-level (excluding theconstant term β0)

• R2 ≈ 0.12.

Main effects in Project 2 Looking at the results from experiment Project 2we see that

• angular velocity (β2) shows significance on a 5%-level while the friction faultf seems to be insignificant

• R2 ≈ 0.41.

The model explains approximately 41% (less than half!) of the variation, indicatinga general difficulty in modelling the relationship between the model-fit measureand the treatments.

1Recall from Section 4.2.1 that a value R2 = 0 is equivalent to using only β0 to model theresponse variable

Page 62: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

50 Sensitivity analysis

Interaction effects in Project 1 The results from the interaction models forthese projects showed great increases in the R2-statistics. Looking at Table 7.17and Table 7.18 we see that in Project 1

• only the angle parameter (β3) has remained from all main variables, alongwith interaction terms β34, β35 and β45.

• R2 increased from ≈ 0.12 to ≈ 0.33.

Interaction effects in Project 2 In Project 2 we see that

• only the parameters β4 and β5 along with interactions β25 and β45, all of thesevariables representing disturbances, remained. Neither test cycle parameterβ4 or β5 or friction fault f remained

• while R2 increased by approximately 46% to ≈ 0.58.

When calculating the model-fit measure on the torque signal it seems as ifangle movement (β3) is of importance, while calculating the same measure usingvelocity data shows that only the disturbances are explanatory. The measure thusseems more useful when analysing the torque signal than the velocity signal. Ouranalysis also indicate that the friction fault doesn’t seem to have an influenceon the model-fit measure, as seen from the results both before and after modelimprovement.

Notes: Note that the friction fault only affects the torque signal while the dis-turbances affect both the torque and velocity signal, seen in Section 5.2.

Notes: Table 7.13 shows that the angle movement has a negative parameterapproximately four times larger than any other, which means that had the frictionfault been a significant variable, all else being equal, then we would recommend atest cycle with a small angle movement to keep a high model-fit value.

7.4.2 The RMS-measureThe purpose of the RMS-measure is to measure the energy ratio in the residualsignal compared to the nominal data. Where a smaller energy ratio indicates thatthe residual is close to “zero” while a large energy ratio, to the contrary, implies alarger residual and thus a presence of fault.

Main effects in Project 3 Regression results of main effects in Project 3showed that

• only disturbance factor β5 is significant on a 5%-level

• the model has a contribution R2 of approximately 50%.

Page 63: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

7.4 Summary 51

Main effects in Project 4 From Project 4 we saw that

• angular movement (β3) along with angle shift (β5) show significance on a5%-level. Similar to the results of main effects in Project 2, the friction faultis very close to 0 here as well

• R2 ≈ 0.58.

Interaction effects in Project 3 The results from adding interaction termsshowed that, in Project 3

• angle movement β3 remains as explanatory parameter. The parameter forfriction f fault has disappeared

• R2 has increased by approximately 50% to ≈ 0.75.

Interaction effects in Project 4 In Project 4 the results showed that

• angle movement β3 remains as explanatory parameter. The parameter forfriction fault has disappeared

• R2 has increased by approximately 19% to ≈ 0.69.

The elimination shows for both Project 3 and Project 4 that the angle move-ment remains as an explanatory variable in the model and in both cases witha negative weight, but we also see that the disturbances delay (β4) and angleshift (β5) together with their interaction term (β45) also remain as explanatoryvariables. Moreover they are relatively large in their values, on par with β3. Thisseems to indicate that the RMS-measure is equally sensitive to the disturbances asit is to different angular movements. We may also add that the friction parameterf , as in the analysis of the model-fit measure, does not remain after elimination.

Page 64: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 65: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Chapter 8

Conclusions and future work

8.1 ConclusionsWe conducted a sensitivity analysis of the test quantities in the diagnosis methodusing regression analysis. A linear model of five parameters was used to model theresponse (test quantities). The variation in the response due to the parameters ofinfluence was analysed using both the torque and velocity signal from the robot.The sensitivity analysis could not show that the test quantities depend on eitherthe friction fault nor the test cycle variables. Instead it showed that the testquantities varied much more with respect to the disturbance factors “angle shift”and “delay”. This in turn gave us no basis to state a better or optimal test cycleor to assess whether the method is more sensitive to a friction fault or to theattributes of the test cycle. We can thus not state any new better test cycle basedon the analysis performed and for now therefore will have to keep the present testcycle.

8.2 Future workConsidering the results from the regression analyses it seems like the disturbanceshad too large effect on the response variables than desired and it showed to bedifficult to characterise the test quantities in terms of the main model variables.The magnitudes of the disturbances might need re-evaluation in a future work. Asuggestion for future work may also be to investigate different ways of representingfaults in the signals, but also to investigate the test quantities a little further. Forexample to try out AR models of higher order. Another suggestion of future workmight be to try nonlinear regression analysis. The test quantities are evidentlynonlinear so other model orders might reveal the relationship between the modeland response better.

53

Page 66: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering
Page 67: Institutionen för systemteknik - DiVA portalliu.diva-portal.org/smash/get/diva2:310495/FULLTEXT01.pdf · Institutionen för systemteknik Department of Electrical Engineering

Bibliography

[1] George E.P. Box, William G. Hunter, and J. Stuart Hunter. Statistics forexperimenters. John Wiley & Sons, USA, 1978.

[2] Steven X. Ding. Model-based fault diagnosis techniques - design schemes,algorithms, and tools. Springer, Berlin, 2008.

[3] Norman R. Draper and Harry Smith. Applied regression analysis, third edi-tion. John Wiley & Sons, USA, 1998.

[4] Eva Enqvist. Grundläggande regressionsanalys. Bokab, Linköping, 2007.Course material, First course in statistics (TAMS08).

[5] Erik Frisk. Residual generation for fault diagnosis. Department of ElectricalEngineering, Linköping University, Linköping, 2001. Dissertation No.716.

[6] Fredrik Gustafsson, Lennart Ljung, and Mille Millnert. Signalbehandling.Studentlitteratur, Linköping, 2001.

[7] Rolf Isermann. Supervision, fault detection and fault-diagnosis methods - anintroduction. Control Eng. Practice, 5(3):639–652, 1997.

[8] Mattias Nyberg and Erik Frisk. Model based diagnosis of technical processes.Linköping University, Linköping, 2004. Course book, Diagnosis and supervi-sion (TSFS06).

[9] Bruno Siciliano, Lorenzo Sciavicco, Luigi Villani, and Giuseppe Oriolo.Robotics - Modelling, planning and control. Springer, London, 2009.

[10] Mark W. Spong and Mathukumalli Vidyasagar. Robot dynamics and control.John Wiley & Sons, USA, 1989.

55