2016 zhengyi jiang - research explorer
TRANSCRIPT
DESIGN, DEVELOPMENT AND TESTING OF AN
AUTOMATED SYSTEM FOR MEASURING WALL
THICKNESSES IN TURBINE BLADES WITH COOLING
CHANNELS
A thesis submitted to the University of Manchester for the degree of
PhD
in the Faculty of Faculty of Engineering and Physical Sciences
2016
ZHENGYI JIANG
SCHOOL OF MECHANICAL, AEROSPACE AND CIVIL ENGINEERING
VOLUME I OF II
2
Contents
VOLUME I
CONTENTS 2
LIST OF TABLES 10
LIST OF FIGURES 13
LIST OF EQUATIONS 22
ABSTRACT 25
DECLARATION 26
COPYRIGHT STATEMENT 27
ACKNOWLEDGEMENT 28
30
34
Ultrasonics 35
3
Definition of ultrasound 35
Capabilities and limitations 35
Characteristics of ultrasonic testing 36
Data Processing 39
Application 41
Conclusion 43
Reverse engineering 44
Digitization 45
Registration 50
Triangulation 54
Surface fitting 58
Parameterisation 65
Conclusion 68
69
Robot, ultrasonic probe and laser sensor 72
Robot 72
Ultrasonic probe and ultrasonic card 73
Laser sensor and analogue data acquisition 74
Design of the water tank 76
Overview of the design 76
Detailed parts and dimensions 78
Finite element analysis of the water tank 84
Float switches, pump and solenoid valve 86
Design of the shaft-bearing system 88
Overview 89
Designed parts and detailed dimensions 91
Water sealing mechanism 94
Bearing arrangement 95
FEA of the shaft 95
Transmission system for the shaft 99
Design of the rotary axis pedestal 102
Overview 102
Detailed dimensions 106
4
Design of a tool change system 109
Design of the tool holder for the Keyence laser sensor 111
Design of the tool holder for the Olympus ultrasonic probe 115
Design of the tool magazine 119
Design of the base structure 125
The conceptual designs 125
The final design 128
Fixture 134
Design overview 135
FEA of the fixture design 136
The final assembly 138
Procedure for assembling the inspection machine 138
The assembled inspection machine 140
144
Robot control 145
Robot motion and variables 146
Vibrations 147
Communication and dynamic-link library 148
Control software block diagrams 152
Laser digitizing algorithm 153
Ultrasonic measurement algorithm 159
163
Ultrasonics 164
Determination of thickness 164
Noise 167
Bubbles 168
Angle of incidence 170
Reverse engineering 172
Digitizing turbine blades 172
Fitting methods tested in the early stages. 174
Triangulation 176
5
Parameterisation 187
B-spline surface fitting 195
Localisation 199
Closest point problem 199
Least square transformation 200
ICP with initial alignment error correction 202
Performance test 204
Probe path 210
Definition of a probe path 210
Calculation of a probe path 211
Regions of inspection 214
Dividing and grouping of a probe path 217
220
Effect of varying water paths 222
Background, aim and methodology 222
Experiment setup and procedures 222
Results and discussions 224
Conclusion 228
Calibration 229
Background, aim and methodology 229
Experiment setup and procedures 230
Results and discussions 231
Effect of varying angle of incidence 232
Background, aim and methodology 232
Experimental setup and procedures 233
Results and discussions 234
Conclusion 240
Measuring a curved component from curved surface 241
Background, aim and methodology 241
Experimental setup and procedures 242
Results and discussions 242
Conclusion 243
Measuring the disc blade on a 4-axis milling machine 244
6
Background, aim and methodology 244
Experimental setup and procedures 245
Results and discussions 245
Conclusion 247
Measuring the disc blade on the inspection machine 248
Background, aim and methodology 248
Experimental setup and procedures 248
Results and discussions 249
Conclusion 252
Reverse engineering of the PSM104 turbine blade 253
Background, aim and methodology 253
Experimental setup and procedures 254
Results and discussions 256
Summary 262
Measuring three PSM104 turbine blades with a common probe path 263
Background, aim and methodology 263
Experimental setup and procedures 263
Results and discussions 266
Summary 277
278
280
REFERENCES 281
292
310
313
316
318
7
VOLUME II
CONTENTS 321
CHAPTER 1 C# CODES 324
1.1 Robot control 325
1.1.1 Connect to the robot 325
1.1.2 Number register 328
1.1.3 Position register 330
1.1.4 Robot program 333
1.1.5 Robot program execution 335
1.1.6 File header fix 337
1.1.7 Variables and configurations 338
1.1.8 Advanced robot position enquiry 339
1.1.9 Advanced robot motion control 346
1.2 Ultrasonic control 352
1.3 DAQ device 363
1.3.1 Connect to the DAQ device 363
1.3.2 Data transmission 364
1.3.3 Error message handling 368
1.3.4 Special function 369
1.3.5 Variables and configurations 369
1.3.6 Advanced Digital IO control 370
1.3.7 Advanced analog IO control 370
1.4 Stepper motor control 372
1.4.1 Connect to the stepper motor 372
1.4.2 Stepper motor instructions 373
1.4.3 Variables and configurations 376
1.4.4 Advanced stepper motor control 376
1.5 Matlab interaction 381
1.6 Miscellaneous classes 383
1.6.1 Extended type conversions 383
8
1.7 Demo software 385
1.7.1 Initilisation 385
1.7.2 Connect to equipment 386
1.7.3 Private Methods 388
1.7.4 Laser digitization 391
1.7.5 Probe path localisation 395
1.7.6 Ultrasonic data acquisition 397
1.7.7 Wall thickness evaluation 405
CHAPTER 2 MATLAB CODES 407
2.1 Reverse engineering 408
2.1.1 The main Matlab function 408
2.1.2 B-spline curve 410
2.1.3 Shape-preserving parameterisation 412
2.1.4 B-spline surface 415
2.2 Probe path calculation 421
2.2.1 Data preparation 421
2.2.2 The main path calculation function 422
2.2.3 Tangent vectors in u direction 428
2.2.4 Tangent vectors in w direction 430
2.3 Localisation 434
2.3.1 Initialisation 434
2.3.2 Multi-approach algorithm 435
2.3.3 Quaternion method 438
2.3.4 Closest point 438
2.4 Path grouping 440
2.4.1 The main function 440
2.4.2 Path grouping sub-function 445
2.4.3 Probe path transformation sub-function 447
2.4.4 Path ordering sub-function 448
2.4.5 Robot rotation parameter calculation 449
2.5 Thickness evaluation 451
2.5.1 The main function 451
2.5.2 Interface echo detection 452
2.5.3 Backwall echo detection and thickness calculation 456
10
List of Tables
Table 3.1-1 Specifications of a Keyence IL-S065 ............................................................................... 75
Table 3.3-1 Mechanical properties of the materials used in FEA ..................................................... 97
Table 3.4-1 Specifications of timing pulleys and belt (all units in mm) .......................................... 100
Table 3.7-1 Conceptual design marking in scale of 1-5 .................................................................. 128
Table 5.2-1 Example input and output of t=Delaunay(u,w) [121] in Matlab .................................. 187
Table 5.3-1 ICP configurations and results ..................................................................................... 205
Table 6.1-1 Standard deviations of the evaluated time of flight at each step ............................... 224
Table 6.1-2 Theoretical optimal water path for each steps ............................................................ 224
Table 6.1-3 Optimum receiver gain found for different thickness range ....................................... 228
Table 6.2-1 Planned calibration set ................................................................................................ 230
Table 6.2-2 Calibration results for seven different thickness sets .................................................. 231
Table 6.3-1 Maximum ΔT and standard deviations of ΔT ............................................................... 236
Table 6.3-2 Wall thicknesses and signal-to-noise ratio of the backwall echoes measured at
different angles of incidence at five holes (units in mm otherwise specified) ............................... 237
Table 6.3-3 Comparison of time differences between peaks in interface echoes at various angles
of incidence ..................................................................................................................................... 239
Table 6.4-1 Comparison between CMM results and Ultrasonic results ......................................... 242
Table 6.5-1 Wall thicknesses measured with ultrasonic probe compared with CMM results ....... 245
Table 6.6-1 Comparison between errors of evaluated thicknesses from two experiments .......... 251
Table 6.7-1 Linear errors of surface fitting of B1 (units in mm) ..................................................... 256
Table 6.7-2 Mean errors and standard deviations of wall thicknesses measured on the inspection
machine and using the touch probe ............................................................................................... 261
Table 6.8-1 Linear errors of surface fittings of B2 and B3 (units in mm) ........................................ 267
Table 6.8-2 Comparison of the three turbine blades ...................................................................... 270
Table 6.8-3 Differences in measured wall thickness ....................................................................... 276
Table I-1 Variations of amplitudes of the first backwall echo ........................................................ 292
Table I-2 Variations of amplitudes of the second backwall echo ................................................... 292
Table I-3 Variations of amplitudes of the interface echo ............................................................... 293
11
Table I-4 Variations of interpreted time of flight ............................................................................ 293
Table I-5 Variations of amplitudes of the first backwall echo ........................................................ 294
Table I-6 Variations of amplitudes of the second backwall echo ................................................... 294
Table I-7 Variations of amplitudes of the interface echo ............................................................... 295
Table I-8 Variations of interpreted time of flight ............................................................................ 295
Table I-9 Variations of amplitudes of the first backwall echo ........................................................ 296
Table I-10 Variations of amplitudes of the second backwall echo ................................................. 297
Table I-11 Variations of amplitudes of the interface echo ............................................................. 297
Table I-12 Variations of interpreted time of flight .......................................................................... 298
Table I-13 Variations of amplitudes of the first backwall echo ...................................................... 298
Table I-14 Variations of amplitudes of the second backwall echo ................................................. 299
Table I-15 Variations of amplitudes of the interface echo ............................................................. 299
Table I-16 Variations of interpreted time of flight .......................................................................... 300
Table I-17 Variations of amplitudes of the first backwall echo ...................................................... 300
Table I-18 Variations of amplitudes of the second backwall echo ................................................. 301
Table I-19 Variations of amplitudes of the interface echo ............................................................. 301
Table I-20 Variations of interpreted time of flight .......................................................................... 302
Table I-21 Variations of amplitudes of the first backwall echo ...................................................... 303
Table I-22 Variations of amplitudes of the second backwall echo ................................................. 303
Table I-23 Variations of amplitudes of the interface echo ............................................................. 304
Table I-24 Variations of interpreted time of flight .......................................................................... 304
Table I-25 Variations of amplitudes of the first backwall echo ...................................................... 305
Table I-26 Variations of amplitudes of the second backwall echo ................................................. 305
Table I-27 Variations of amplitudes of the interface echo ............................................................. 306
Table I-28 Variations of interpreted time of flight .......................................................................... 306
Table I-29 Variations of amplitudes of the first backwall echo ...................................................... 307
Table I-30 Variations of amplitudes of the second backwall echo ................................................. 308
Table I-31 Variations of amplitudes of the interface echo ............................................................. 308
Table I-32 Variations of interpreted time of flight .......................................................................... 309
Table III-1 Wall thicknesses measured on the curved component with angles of incidence from 0°
to 1.98° ............................................................................................................................................ 313
Table III-2 Wall thicknesses measured on the curved component with angles of incidence from
2.475° to 4.455° .............................................................................................................................. 313
12
Table III-3 Wall thicknesses measured on the curved component with angles of incidence from
4.95° to 5.94° .................................................................................................................................. 314
Table V-1 Thicknesses measured on B1 using P1, P2, P3 and a touch probe at ELE ...................... 318
Table V-2 Thickness measured on B2 using P1, P2, P3 and a touch probe at ELE .......................... 318
Table V-3 Thickness measured on B3 using P1, P2, P3 and a touch probe at ELE .......................... 318
13
List of Figures
Fig. 2.1-1 (a) A CAD model of a turbine blade. (b) A cross-section of the blade and the wall
thickness. .......................................................................................................................................... 30
Fig. 2.1-2 (a) An illustration of ultrasonic delay-line transducer. (b) The ultrasonic probe is kept
normal to the surface of the blade at various inspection locations ................................................. 31
Fig. 2.1-1 Different bands of sound frequencies............................................................................... 35
Fig. 2.1-2 Near field and far field [11] ............................................................................................... 36
Fig. 2.1-3 -6dB focal zone .................................................................................................................. 37
Fig. 2.1-4 Normalized beginning and ending points of the -6dB focal zone [11]. ............................. 38
Fig. 2.1-5 Variation of relative increase in signal amplitude with normailized focal length SF [11]. 38
Fig. 2.1-6 Focal point shifts when an ultrasonic wave enters the workpiece. Reproduced from
Olympus NDT (2011) [11]. ................................................................................................................ 39
Fig. 2.1-7 Different modes for time of flight measurement. ............................................................ 40
Fig. 2.1-8 Errors in time of flight (ToF) measurement (reproduced from Hammond [16]) .............. 41
Fig. 2.1-9 Blood flow in the carotid artery bifurcation [21] .............................................................. 42
Fig. 2.2-1 Surface of a turbine blade generated by lofting from a set of cross section profiles [29]45
Fig. 2.2-2 Examples of different probe actuators ............................................................................. 46
Fig. 2.2-3 A Nikon hand-held laser scanning system [42] ................................................................. 47
Fig. 2.2-4 Principle of laser triangulation [50] ................................................................................... 48
Fig. 2.2-5 (a) 2D laser scanning; (b) acquired data points structure in 2D laser scanning.
Reproduced from Woo et al. (2002) [54] .......................................................................................... 49
Fig. 2.2-6 Measuring vertical surfaces with a touch probe and a laser probe. Reproduced from
McDonald, J.A. (2001) [56]. .............................................................................................................. 50
Fig. 2.2-7 Registration of two separated surfaces of a cylinder ....................................................... 50
Fig. 2.2-8 Two partially-overlapping surfaces ................................................................................... 51
Fig. 2.2-9 (a) A free-form surface, (b) extracted regions (1’, 2’, 3’, 4’ and 5’) from the measured
surface and (c) extracted regions (1, 2, 3, 4 and 5) from the target surface. Figure is reproduced
from Li and Gu [72] ........................................................................................................................... 53
Fig. 2.2-10 A parametric representation of a torus is shown at the top left corner. Three points are
selected from the torus and the corresponding signature image of each point is plotted. [73] ..... 54
Fig. 2.2-11 Delaunay triangulation .................................................................................................... 55
Fig. 2.2-12 A Voronoi diagram .......................................................................................................... 55
Fig. 2.2-13 Bisectors and the Voronoi diagram ................................................................................. 55
14
Fig. 2.2-14 Generate Delaunay triangulation based on Voronoi diagram ........................................ 56
Fig. 2.2-15 The non-uniqueness problem ......................................................................................... 56
Fig. 2.2-16 Two Delaunay triangulations computed with implementation of preferred direction
rule at two different selected directions [84] ................................................................................... 56
Fig. 2.2-17 (a) A fine Delaunay tetrahedron and (b) a distorted Delaunay tetrahedron. Figure is
reproduced from Cavendish et al (1985) [78]................................................................................... 57
Fig. 2.2-18 Tetrahedrons in through the thickness of the blade ...................................................... 57
Fig. 2.2-19 Effect of control points on a seven degree Bezier curves ............................................... 59
Fig. 2.2-20 A cubic B-spline curve ..................................................................................................... 60
Fig. 2.2-21 (a) a Hermite bicubic patch and a F-surface patch ......................................................... 60
Fig. 2.2-22 A Bezier patch and its characteristic polyhedrons .......................................................... 61
Fig. 2.2-23 (a) clamped B-spline surface and (b) unclamped B-spline surface [91] .......................... 62
Fig. 2.2-24 Mesh refinement: original mesh (bold meshes) and refined mesh (thin lines) [92] ...... 62
Fig. 2.2-25 The quad-net corresponding to the vertex of the refined mesh [92] ............................. 63
Fig. 2.2-26 Examples of smooth surfaces reconstructed based on coarse meshes [92] .................. 63
Fig. 2.2-28 A set of input points (left) and the approximating mesh (right) ..................................... 64
Fig. 2.2-28 Triangular base complex (left) and quadrilateral base complex (right) .......................... 64
Fig. 2.2-29 Control polyhedron (left), B-spline surface (middle) and refined surface (right) .......... 64
Fig. 2.2-30 Representation of a section curve, reproduced from [96] ............................................. 65
Fig. 2.2-31 Triangulated model ......................................................................................................... 66
Fig. 2.2-32 Shape preserving parameterisation (left) and surface approximation (right) ................ 67
Fig. 2.2-33 The three mapping methods ........................................................................................... 68
Fig. 3.1-1 The purchased Fanuc LRMate 200iD robot and R-30iB controller .................................... 72
Fig. 3.1-2 (a) An Olympus V316-SU ultrasonic probe and (b) a USUltratek PCIUT3100 ultrasonic
card ................................................................................................................................................... 73
Fig. 3.1-3 (a) A Keyence IL-S065 CMOS laser sensor and (b) a Keyence IL-1000 amplifier ............... 74
Fig. 3.1-4 A USB-1208FS DAQ by Measurement Computing ............................................................ 75
Fig. 3.2-1 Different views of the water tank (units in mm) ............................................................... 77
Fig. 3.2-2 An exploded view of the water tank ................................................................................. 78
Fig. 3.2-3 Detailed dimensions of the water tank body (units in mm) ............................................. 80
Fig. 3.2-4 Detailed dimensions of the Perspex window (units in mm) ............................................. 81
Fig. 3.2-5 Detailed dimensions of the pipe connectors (units in mm) .............................................. 82
Fig. 3.2-6 Detailed dimensions of the inlet manifold (units in mm) ................................................. 83
15
Fig. 3.2-7 Finite element stress analysis of the water tank .............................................................. 85
Fig. 3.2-8 Deflection of the water tank ............................................................................................. 85
Fig. 3.2-9 The purchased Cynergy3 SSF212 float switch, Asco Joucomatic S210 valve and Flotec VIP
130/6 Auto pump .............................................................................................................................. 87
Fig. 3.3-1 Different views of the shaft-bearing system (units in mm) .............................................. 89
Fig. 3.3-2 An exploded view of the shaft-bearing system ................................................................. 90
Fig. 3.3-3 Detailed dimensions of the shaft-bearing housing (units in mm) ..................................... 92
Fig. 3.3-4 Detailed dimensions of the in-tank flange (units in mm).................................................. 93
Fig. 3.3-5 Detailed dimensions of the shaft (units in mm) ................................................................ 93
Fig. 3.3-6 Seals and possible water paths ......................................................................................... 94
Fig. 3.3-7 A sectional view of the shaft-bearing system ................................................................... 95
Fig. 3.3-8 Model of the blade, fixture and the shaft for analysis (units in mm) ............................... 96
Fig. 3.3-9 Finite element stress analysis of the blade, fixture and the shaft .................................... 97
Fig. 3.3-10 Deflection of the blade, fixture and the shaft ................................................................. 97
Fig. 3.4-1 Transmission system assembled on the shaft (units in mm) ............................................ 99
Fig. 3.4-2 Detailed dimensions of the motor and the gearbox (units in mm) ................................ 100
Fig. 3.5-1 Different views of the rotary axis pedestal (units in mm) .............................................. 102
Fig. 3.5-2 Different views of the rotary axis pedestal with shaft-bearing system and transmission
system assembled ........................................................................................................................... 103
Fig. 3.5-3 Assembling the shaft-bearing system onto the rotary axis pedestal .............................. 103
Fig. 3.5-4 An exploded view of the rotary axis pedestal ................................................................. 104
Fig. 3.5-5 Assembling the motor and gearbox onto the rotary axis pedestal ................................ 104
Fig. 3.5-6 Assembling the rotary axis pedestal onto the cast iron table......................................... 105
Fig. 3.5-7 Detailed dimensions of the top plate (units in mm) ....................................................... 106
Fig. 3.5-8 Detailed dimensions of the base (units in mm) .............................................................. 107
Fig. 3.5-9 Detailed dimensions of the mounting plate (units in mm) ............................................. 108
Fig. 3.6-1 Robot face plate .............................................................................................................. 109
Fig. 3.6-2 An exploded view of a Schunk SWS005 pneumatic tool change system ........................ 109
Fig. 3.6-3 Detailed dimensions of a Schunk SWK005 and SWA005 (units in mm) .......................... 110
Fig. 3.6-4 A Schunk quick-change adaptor SWA005 stored in a SWM-TSS storage plate .............. 111
Fig. 3.6-5 Detailed dimensions of a Keyence ILS065 laser sensor (units in mm) ............................ 111
Fig. 3.6-6 Different views of the laser sensor holder (units in mm) ............................................... 112
Fig. 3.6-7 An exploded view of the laser sensor holder .................................................................. 113
Fig. 3.6-8 Detailed dimensions of the L plate (units in mm) ........................................................... 114
16
Fig. 3.6-9 Detailed dimensions of the adaptor (units in mm) ......................................................... 115
Fig. 3.6-10 Dimensions of an Olympus V316-SU ultrasonic probe (units in mm) ........................... 116
Fig. 3.6-11 The ultrasonic probe holder (units in mm) ................................................................... 116
Fig. 3.6-12 An exploded view of the ultrasonic probe holder......................................................... 117
Fig. 3.6-13 Sectional view of the ultrasonic probe holder with the probe and O-rings assembled
........................................................................................................................................................ 117
Fig. 3.6-14 Detailed dimensions of the probe holder lower part (units in mm) ............................. 118
Fig. 3.6-15 Detailed dimensions of the probe holder upper part (units in mm) ............................ 119
Fig. 3.6-16 An SWA005 quick-change adaptor and support bolts by Schunk (units in mm) .......... 120
Fig. 3.6-17 Detailed dimensions of a Schunk SWM-TSS storage plate ........................................... 120
Fig. 3.6-18 Detailed dimensions of a Schunk proximity sensor and a sensor bracket (units in mm)
........................................................................................................................................................ 121
Fig. 3.6-19 Model of the tool magazine .......................................................................................... 121
Fig. 3.6-20 An exploded view of the tool magazine ........................................................................ 122
Fig. 3.6-21 Detailed dimensions of the stand profile ...................................................................... 123
Fig. 3.6-22 Detailed dimensions of the mounting plate for tool magazine (units in mm) .............. 123
Fig. 3.6-23 Detail dimensions of the storage plate adapter (units in mm) ..................................... 124
Fig. 3.7-1 The first design of base structure.................................................................................... 125
Fig. 3.7-2 The second design of base structure .............................................................................. 126
Fig. 3.7-3 The third design of base structure .................................................................................. 127
Fig. 3.7-4 The 101.6mm*76.2mm cast iron surface table .............................................................. 128
Fig. 3.7-5 Assembling components onto the cast iron surface ....................................................... 129
Fig. 3.7-6 Components installed on the cast iron table .................................................................. 130
Fig. 3.7-7 Detailed dimensions of the locating block (units in mm) ............................................... 130
Fig. 3.7-8 Arrangement of the locating blocks on the cast iron table ............................................ 131
Fig. 3.7-9 Dimensions of (a) the base [112] and (b) the operating space of [113] of FANUC LR Mate
200iD Robot .................................................................................................................................... 131
Fig. 3.7-10 Detailed dimensions of the robot pedestal (units in mm) ............................................ 132
Fig. 3.7-11 Assembling the robot onto the robot pedestal ............................................................ 133
Fig. 3.7-12 Assembling the robot pedestal onto the cast iron table .............................................. 133
Fig. 3.8-1 The fir-tree root of the test blade ................................................................................... 134
Fig. 3.8-2 A jaw with four inserts on each side clamped on the fir-tree root ................................. 134
Fig. 3.8-3 Different views of the fixture .......................................................................................... 135
Fig. 3.8-4 An exploded view of the fixture ...................................................................................... 135
17
Fig. 3.8-5 Definition of the load and contacts for the analysis ....................................................... 136
Fig. 3.8-6 (a) Von Mises Stress distribution and (b) Displacement distribution ............................. 137
Fig. 3.9-1 Guards ............................................................................................................................. 140
Fig. 3.9-2 The water tank, rotary axis and robot............................................................................. 140
Fig. 3.9-3 Rotary axis consisting of the stepper motor, timing pulleys and belt, and spindle housing
........................................................................................................................................................ 141
Fig. 3.9-4 The in-tank flange............................................................................................................ 141
Fig. 3.9-5 The water tank ................................................................................................................ 141
Fig. 3.9-6 Pipe connectors ............................................................................................................... 142
Fig. 3.9-7 The tool magazine ........................................................................................................... 142
Fig. 3.9-8 Rear view of the table showing the cabinet and the robot control ................................ 142
Fig. 3.9-9 The Keyence laser sensor mounted in the laser sensor holder ...................................... 143
Fig. 3.9-10 The Olympus ultrasonic probe mounted in the ultrasonic probe holder ..................... 143
Fig. 4.1-2 Six axes of the Fanuc robot [112] .................................................................................... 145
Fig. 4.1-1 Fanuc teach pendant ....................................................................................................... 145
Fig. 4.1-3 Effects of using CNT0 and CNT100 at P2 and P3 .............................................................. 146
Fig. 4.1-4 Vibration of the robot during a linear motion ................................................................ 147
Fig. 4.1-5 Vibration at the end of the motion ................................................................................. 147
Fig. 4.1-6 Accessing the robot controller using a web browser ...................................................... 148
Fig. 4.2-1 Block diagrams legend .................................................................................................... 152
Fig. 4.2-2 A general laser digitizing procedure – initialisation ........................................................ 153
Fig. 4.2-3 A general laser digitizing procedure – motion loop 1 ..................................................... 154
Fig. 4.2-4 A general laser digitizing procedure – motion loop 2 ..................................................... 156
Fig. 4.2-5 A general procedure of ultrasonic data acquisition – initialisation and robot motion ... 159
Fig. 4.2-6 A general procedure of ultrasonic data acquisition - Ultrasonic data acquisition .......... 161
Fig. 5.1-1 A schematic drawing of the path of ultrasound for immersion ultrasonic testing ......... 164
Fig. 5.1-2 Ultrasonic signals in time domain ................................................................................... 165
Fig. 5.1-3 Two types of bubbles that affect ultrasonic testing ....................................................... 168
Fig. 5.1-4 Effect of having bubbles on surface of inspection and probe lens ................................. 169
Fig. 5.1-5 Nose caused by surface bubbles at receiver gain = 70 ................................................... 170
Fig. 5.1-6 Refraction and reflection of ultrasonic signal ................................................................. 171
Fig. 5.2-1 The five regions defined on the surface of the blade ..................................................... 173
18
Fig. 5.2-2 Acquired surface points and calculated points on the B-spline surface ......................... 173
Fig. 5.2-3 Generated CMM path based on the calculated 1404 points .......................................... 174
Fig. 5.2-4 Failed surface triangulation extraction result ................................................................. 175
Fig. 5.2-5 Triangulation of a sphere surface ................................................................................... 177
Fig. 5.2-6 Starting points of each cross section in 2D and 3D ......................................................... 178
Fig. 5.2-7 Spherical surface after B-spline curve fitting and the line connecting the end points of
the cross sections ............................................................................................................................ 179
Fig. 5.2-8 Triangulation result based on points generated by B-spline curves ............................... 180
Fig. 5.2-9 Triangulated surface of a turbine blade .......................................................................... 181
Fig. 5.2-10 Calculation procedures in the triangulation algorithm ................................................. 182
Fig. 5.2-11 (a) number of control points = 50, degree of curve = 10; (b) number of control points =
65, degree of curve = 45 ................................................................................................................. 184
Fig. 5.2-12 Measured points and control points ............................................................................. 185
Fig. 5.2-13 Cross-sections of the sphere fitted B-spline curves ...................................................... 186
Fig. 5.2-14 Triangulation results with above input and output ...................................................... 187
Fig. 5.2-15 Local parameterisation of a sub-triangulation. Reproduced from Floater (1997) [100]
........................................................................................................................................................ 189
Fig. 5.2-16 The straight line 𝑙 passing through 𝑝𝑙 and 𝑝𝑖 and intersects the polygon at a second
point. ............................................................................................................................................... 190
Fig. 5.2-17 Mapping a Polyhedron onto a 2D plane ....................................................................... 192
Fig. 5.2-18 Parameterised spherical surface based on a coarse triangular mesh .......................... 193
Fig. 5.2-19 Parameterised spherical surface based on a refined triangular mesh ......................... 194
Fig. 5.2-20 Parameterised turbine blade surface (see Fig. 5.2-9 for the triangular mesh) ............. 194
Fig. 5.2-21 Control points calculated for (a) the spherical surface and (b) the surface of the blade
........................................................................................................................................................ 197
Fig. 5.2-22 Surfaces calculated with B-spline surface for (a) the sphere and (b) the turbine blade
........................................................................................................................................................ 198
Fig. 5.3-1 Two conditions of convergence ...................................................................................... 203
Fig. 5.3-2 Flowchart of the ICP algorithm ....................................................................................... 204
Fig. 5.3-3 The surface created with a peak function used for testing the ICP algorithm ............... 205
Fig. 5.3-4 B-spline surfaces for localisation ..................................................................................... 206
Fig. 5.3-5 B-spline surfaces matched using the ICP algorithm ........................................................ 207
Fig. 5.3-6 Convergence plot for matching the B-spline surfaces .................................................... 207
Fig. 5.3-7 Turbine blade surfaces for localisation ........................................................................... 208
19
Fig. 5.3-8 Blade surfaces matched using the ICP algorithm ............................................................ 208
Fig. 5.3-9 Convergence plot for matching the turbine blade surfaces ........................................... 209
Fig. 5.4-1 Coordinate systems and axes in the inspection machine ............................................... 210
Fig. 5.4-2 B-spline surface representation of a blade and evaluated surface normals .................. 212
Fig. 5.4-3 Acquiring points from a CAD model ................................................................................ 214
Fig. 5.4-4 Positions of holes ............................................................................................................ 215
Fig. 5.4-5 Regions of inspection ...................................................................................................... 216
Fig. 5.4-6 A complete probe path for the convex side of a cross section ....................................... 217
Fig. 5.4-7 Maximum angle of swing ................................................................................................ 217
Fig. 5.4-8 Robot arm is restricted by the water tank ...................................................................... 218
Fig. 5.4-9 probe path grouping ....................................................................................................... 219
Fig. 6.1-1 (a) The Inconel stepped specimen and (b) the clamping of the stepped component .... 222
Fig. 6.1-2 Amplitudes of the first backwall echoes ......................................................................... 225
Fig. 6.1-3 Low limit and high limit of noise ..................................................................................... 226
Fig. 6.1-4 Effect of varying gain regarding noise ............................................................................. 226
Fig. 6.1-5 Signals captured with different receiver gains ................................................................ 227
Fig. 6.2-1 Peak-to-peak calibration was used in the experiment ................................................... 229
Fig. 6.2-2 A linear curve fitted to the ultrasonic data acquired at Step 1 and Step2...................... 230
Fig. 6.3-1 (a) The curved component and (b) dimensions of the component (units in mm).......... 232
Fig. 6.3-2 Clamp of the curved component .................................................................................... 233
Fig. 6.3-3 Ultrasonic inspection image interpreted from experiment results obtained at 𝜃1 = 0°
........................................................................................................................................................ 234
Fig. 6.3-4 Errors of measured wall thickness at 𝜃1 = 0 ................................................................. 234
Fig. 6.3-5 ΔT against angle of incidence for each wall thickness .................................................... 235
Fig. 6.3-6 Variation of signal-to-noise ratio of the backwall echoes with angle of incidence ........ 237
Fig. 6.3-7 Distorted interface echoes .............................................................................................. 238
Fig. 6.3-8 Ultrasonic inspection image interpreted from experiment results obtained at 𝜃1 =
5.94°................................................................................................................................................ 239
Fig. 6.3-9 Time differences between peaks in interface echoes increase with angles of incidence
........................................................................................................................................................ 240
Fig. 6.4-1 The curved component ................................................................................................... 241
Fig. 6.4-2 Experimental setup for measuring the curved component on the OKK milling machine
........................................................................................................................................................ 241
20
Fig. 6.4-3 Processed ultrasonic thickness data ............................................................................... 243
Fig. 6.5-1 The long blade and wall thicknesses from both convex and concave surfaces (units in
mm) ................................................................................................................................................. 244
Fig. 6.5-2 Distorted interface echoes captured above Hole 1 from (a) the convex surface and (b)
the concave surface, gain = 60 compared with (c) a healthy interface echo ................................. 246
Fig. 6.6-1 Clamp of the disc blade on the inspection machine ....................................................... 248
Fig. 6.6-2 Fitted B-spline surfaces (units in mm) ............................................................................. 249
Fig. 6.6-3 Surface normals at the top cross section (units in mm) ................................................. 250
Fig. 6.6-4 Comparison between thicknesses obtained from difference sources (units in mm) ..... 252
Fig. 6.7-1 (a) A PSM104 turbine blade with the fixture; (b) the turbine blade being measured on
the CMM ......................................................................................................................................... 253
Fig. 6.7-2 Five regions defined on the surface of the blade............................................................ 254
Fig. 6.7-3 Procedures of measuring blades in the prototype cell ................................................... 254
Fig. 6.7-4 Turbine blade fixed on the shaft of the inspection machine .......................................... 255
Fig. 6.7-5 (a) CMM data points collected on Blade 1, (b) generated Model 1 and (c) Model 2 (units
in mm) ............................................................................................................................................. 256
Fig. 6.7-6 Surface fitting error of (a) the convex surface and (b) the concave surface of Model 1,
and (a) the convex surface and (b) the concave surface of Model 2 (units in mm) ....................... 257
Fig. 6.7-7 (a) CMM points measured at section A and B; (b) Mismatch between two sets of data
points when the same surface was measured but with different CMM orientations of the probe
on the CMM; (c) Unmatched points on the convex surface have been removed; (d) B-spline curve
smoothed out the displacement found in CMM data after unmatched points were removed. (units
in mm) ............................................................................................................................................. 258
Fig. 6.7-8 Probe path for measuring from the convex surface ((a) and (b)); probe path for
measuring from the concave surface ((c) and (d)) (units in mm) ................................................... 259
Fig. 6.7-9 Wall thicknesses obtained from a CT image of the blade cross section (units in mm) .. 260
Fig. 6.7-10 Wall thicknesses measured using the inspection machine and touch probe compared
with the reference values ............................................................................................................... 261
Fig. 6.8-1 The four regions A, B, C and D defined on the surface of the blade ............................... 263
Fig. 6.8-2 Procedures of measuring blades in the prototype cell ................................................... 264
Fig. 6.8-3 (a) CMM data points measured on B2; (b) Fitted B-spline surfaces of B2; (c) CMM data
points measured on B3; (d) Fitted B-spline surfaces of B3 (units in mm) ...................................... 266
Fig. 6.8-4 Linear deviation between the CMM points and the fitted (a) convex and (b) concave
surface of B2, and the fitted (c) convex and (d) concave surface of B3 (units in mm) ................... 267
21
Fig. 6.8-5 Rate of change in slopes of the (a) convex and (b) concave B-spline surfaces of B2, (c)
convex and (d) concave B-spline surfaces of B3 and (e) convex and (f) concave B-spline surfaces of
B1 (units in mm) .............................................................................................................................. 268
Fig. 6.8-6 Blade surface section profiles and CMM points on the concave surface, at Z ≈ -101 mm
(all point data were localised to B1 CMM points and units in mm) ............................................... 269
Fig. 6.8-7 Linear deviations compared between each two of the three blades (units in mm) ....... 271
Fig. 6.8-8 Slope deviations compared between each two of the three blades (units in mm) ........ 273
Fig. 6.8-9 Cross sections of the localised B-spline surfaces and surface normals (units in mm) .... 274
Fig. 6.8-10 Comparison between different probe paths (units in mm) .......................................... 275
Fig. II-1 Ultrasonic image for angle of incidence from 0° to 1.485° ................................................ 310
Fig. II-2 Ultrasonic image for angle of incidence from 1.98° to 3.96° ............................................. 311
Fig. II-3 Ultrasonic image for angle of incidence from 4.4455° to 5.94° ......................................... 312
Fig. IV-1 Variations of amplitude of backwall echoes at the first 12 holes (excluding hole 2) ....... 316
Fig. IV-2 Variations of amplitude of backwall echoes at the last 11 holes ..................................... 317
22
List of Equations
Eq. 2.1-1 ............................................................................................................................................ 37
Eq. 2.1-2 ............................................................................................................................................ 37
Eq. 2.1-3 ............................................................................................................................................ 37
Eq. 2.1-4 ............................................................................................................................................ 39
Eq. 2.1-5 ............................................................................................................................................ 40
Eq. 2.1-6 ............................................................................................................................................ 40
Eq. 2.1-7 ............................................................................................................................................ 41
Eq. 2.1-8 ............................................................................................................................................ 42
Eq. 2.2-1 ............................................................................................................................................ 51
Eq. 2.2-2 ............................................................................................................................................ 52
Eq. 2.2-3 ............................................................................................................................................ 65
Eq. 2.2-4 ............................................................................................................................................ 66
Eq. 2.2-5 ............................................................................................................................................ 67
Eq. 2.2-6 ............................................................................................................................................ 67
Eq. 2.2-7 ............................................................................................................................................ 67
Eq. 5.1-1 .......................................................................................................................................... 164
Eq. 5.1-2 .......................................................................................................................................... 166
Eq. 5.1-3 .......................................................................................................................................... 171
Eq. 5.1-4 .......................................................................................................................................... 171
Eq. 5.1-5 .......................................................................................................................................... 171
Eq. 5.2-1 .......................................................................................................................................... 182
Eq. 5.2-2 .......................................................................................................................................... 182
Eq. 5.2-3 .......................................................................................................................................... 182
Eq. 5.2-4 .......................................................................................................................................... 184
Eq. 5.2-5 .......................................................................................................................................... 184
Eq. 5.2-6 .......................................................................................................................................... 185
Eq. 5.2-7 .......................................................................................................................................... 186
Eq. 5.2-8 .......................................................................................................................................... 188
Eq. 5.2-9 .......................................................................................................................................... 188
Eq. 5.2-10 ........................................................................................................................................ 189
23
Eq. 5.2-11 ........................................................................................................................................ 189
Eq. 5.2-12 ........................................................................................................................................ 190
Eq. 5.2-13 ........................................................................................................................................ 190
Eq. 5.2-14 ........................................................................................................................................ 191
Eq. 5.2-15 ........................................................................................................................................ 191
Eq. 5.2-16 ........................................................................................................................................ 191
Eq. 5.2-17 ........................................................................................................................................ 191
Eq. 5.2-18 ........................................................................................................................................ 191
Eq. 5.2-19 ........................................................................................................................................ 192
Eq. 5.2-20 ........................................................................................................................................ 195
Eq. 5.2-21 ........................................................................................................................................ 195
Eq. 5.2-22 ........................................................................................................................................ 195
Eq. 5.2-23 ........................................................................................................................................ 196
Eq. 5.2-24 ........................................................................................................................................ 196
Eq. 5.3-1 .......................................................................................................................................... 200
Eq. 5.3-2 .......................................................................................................................................... 200
Eq. 5.3-3 .......................................................................................................................................... 201
Eq. 5.3-4 .......................................................................................................................................... 201
Eq. 5.3-5 .......................................................................................................................................... 201
Eq. 5.3-6 .......................................................................................................................................... 201
Eq. 5.3-7 .......................................................................................................................................... 201
Eq. 5.3-8 .......................................................................................................................................... 201
Eq. 5.3-9 .......................................................................................................................................... 202
Eq. 5.3-10 ........................................................................................................................................ 202
Eq. 5.4-1 .......................................................................................................................................... 212
Eq. 5.4-2 .......................................................................................................................................... 212
Eq. 5.4-3 .......................................................................................................................................... 212
Eq. 5.4-4 .......................................................................................................................................... 213
Eq. 5.4-5 .......................................................................................................................................... 213
Eq. 5.4-6 .......................................................................................................................................... 213
Eq. 5.4-7 .......................................................................................................................................... 213
Eq. 5.4-8 .......................................................................................................................................... 213
Eq. 5.4-9 .......................................................................................................................................... 213
Eq. 6.3-1 .......................................................................................................................................... 235
25
Abstract
Cooling channels are designed in blades to protect the blades from damage at high
temperature in a gas turbine. ELE Advanced Technology Ltd. is a UK company specialised
in machining cooling channels in turbine blades using electro-chemical techniques. The wall
thicknesses between these cooling channels and the surface of the turbine blade influences
the performance of cooling channels and are required to be accurately machined and then
inspected. At present, the company measures the wall thicknesses using a hand-held contact
ultrasonic probe, which is time-consuming and not very accurate.
In this project, an inspection machine has been designed and built for the purpose of
automating the procedure of measuring wall thicknesses in turbine blades. The inspection
machine measures wall thicknesses based on immersion ultrasonic testing technique and the
actuator is a six-axis industrial robot controlled by a computer. Control algorithms have been
developed to automate the entire measuring process. Acquired ultrasonic data is also
automatically processed using Matlab scripts for wall thickness evaluation. However, prior
to the ultrasonic measurement, the probe path has to be calculated.
Matlab script has been developed to automatically calculate a probe path using a point cloud
of the blade digitized on a CMM as an input. The calculation of the probe path, in general,
involves triangulation, parameterisation and B-spline surface approximation. Normal 3D
triangulation methods were tested; nevertheless, the results were unsatisfactory. Therefore, a
triangulation algorithm is developed based on B-spline curve and 2D Delaunay triangulation.
After the probe path is calculated, a localisation method, based on iterative closest point
algorithm, is implemented to transform the probe path from CMM to the inspection machine.
Several experiments were designed and conducted to study the capability of the ultrasonic
probe. Experimental results confirmed the feasibility of using an immersion ultrasonic probe
for measuring the wall thicknesses; however, the experiments revealed several limitations of
immersion ultrasonic testing, such as the angle of incidence of ultrasonic waves must be
maintained within an angular deviation of ±1° from the surface normal to achieve accurate
test results. Wall thicknesses of three turbine blades from one batch were measured on the
inspection machine. A CT scan image was used as reference to compare the measured wall
thicknesses with results obtained using contact probes. The comparison showed the wall
thicknesses measured on the inspection machine were much more accurate than using
contact probes.
The University of Manchester
Zhengyi Jiang
PhD
Design, development and testing of an automated system for measuring wall thicknesses in
turbine blades with cooling channels
13/07/2016
26
Declaration
I declare that no portion of the work referred to in the thesis has been submitted in support of an
application for another degree or qualification of this or any other university or other institute of
learning.
Zhengyi Jiang
2016
27
Copyright Statement
i. The author of this thesis (including any appendices and/or schedules to this thesis) owns
certain copyright or related rights in it (the “Copyright”) and s/he has given The University
of Manchester certain rights to use such Copyright, including for administrative purposes.
ii. Copies of this thesis, either in full or in extracts and whether in hard or electronic copy,
may be made only in accordance with the Copyright, Designs and Patents Act 1988 (as
amended) and regulations issued under it or, where appropriate, in accordance with
licensing agreements which the University has from time to time. This page must form part
of any such copies made.
iii. The ownership of certain Copyright, patents, designs, trade marks and other intellectual
property (the “Intellectual Property”) and any reproductions of copyright works in the
thesis, for example graphs and tables (“Reproductions”), which may be described in this
thesis, may not be owned by the author and may be owned by third parties. Such
Intellectual Property and Reproductions cannot and must not be made available for use
without the prior written permission of the owner(s) of the relevant Intellectual Property
and/or Reproductions.
iv. Further information on the conditions under which disclosure, publication and
commercialisation of this thesis, the Copyright and any Intellectual Property University IP
Policy (see http://documents.manchester.ac.uk/display.aspx?DocID=24420), in any
relevant Thesis restriction declarations deposited in the University Library, The University
Library’s regulations (see http://www.library.manchester.ac.uk/about/regulations/) and
in The University’s policy on Presentation of Theses
28
Acknowledgement
First and foremost, I want to express my deepest appreciation to my supervisor Professor Srichand
Hinduja. He is one of the most dedicated scientist and teacher I have ever met. It has been a great
honour to be one of his Ph.D. student. He has taught me patiently and enthusiastically. He would
miss a train home to guide me through a mathematical formula. For every piece of knowledge I
learnt during this journey, I owe my gratitude to him. He has a kind heart and thoughtful mind. I
want to thank him for all the afternoon teas he bought me. I thank him for offering me financial
assistance when my funding was discontinued and the following year he tried hard, and succeeded,
in obtaining funding which I greatly appreciate.
I would like to show my gratitude to Dr Robert Heinemann for his immense knowledge in design
and metrology that helped me throughout the study. I appreciate his contributions of time and
ideas to make the design of the inspection machine successful. I also want to thank him for those
excellent suggestions regarding testing of the machine.
I will forever be thankful to Dr John Atkinson. He taught me and supported me as an academic
tutor during my undergraduate study and recommended me as a candidate for this Ph.D. project.
Without him, I would not have become aware of this project.
I gratefully acknowledge the funding received towards my Ph.D. from ELE Advanced Technologies
Ltd and Knowledge Transfer Partnerships. I also want to thank Mr Peter Calderbank from ELE for
his contributions of ideas during the first two years.
My thanks also go out to all my collaborators: to Mohammed Saeed Ali Aljommah and C Indrajid
for their ideas and work in testing the ultrasonic probe; to Guolong Zhong, Kai Zhang and Ziyu
Meng for their explorations and findings in reverse engineering turbine blades; to Sigurdur Thor
Larusson for his ideas and work towards localisation algorithms. Without them, this Ph.D. would
not have been achievable.
I would like to offer a special thanks to all the team members in DigitME at the University of
Central Lancashire. They help in robot control and robot programming is greatly appreciated. Their
C# examples were the most precious resources during the early stage of software development.
I appreciate all the support Dr Hugh Frost provided me during selecting and assembling electronic
devices for the inspection machine. I would like to thank Robert Brown for the tips he provided
regarding control of the robot and testing of the machine. I also want to thank Phil Oaks and all
29
the technicians on A floor in the Pariser building for all the components they machined for me and
all the assistance during experiments.
Lastly, I would like to thank my families for all their love and encouragement. I thank my mum and
dad who raised me up, cared me and taught me. They believed in me and funded me throughout
the journey of this nearly eight-year overseas study. And for my beloved wife who came to the UK
from China and supported me in life during the final stage of this Ph.D., I thank you.
Zhengyi Jiang
30
Introduction
A turbine blade is an important component in a gas engine, which is responsible for extracting
energy from high temperature and high pressure gases that are produced by the combustor. In
order to increase the efficiency of an aero-engine, combustion occurs at temperatures in excess of
1100°C. Turbine blades are mostly made of nickel based super alloys, namely Inconel, by
investment casting. The melting points of different classes of Inconel are between 1390°C and
1425°C. These high temperatures make the turbine blades vulnerable to damages such as creep
and corrosion [1]. To protect the turbine blade from these damages, multiple cooling channels, as
shown in Fig. 2.1-1 (a), are machined in the blades through which cold air is forced through, thus
lowering the overall temperature of the turbine blade [2].
Fig. 2.1-1 (a) A CAD model of a turbine blade. (b) A cross-section of the blade and the wall thickness.
ELE Advanced Technologies Ltd (hereafterwards referred to as ELE) is a company located in the
North West of England and it specializes in the machining of cooling channels in blades using
electro-chemical techniques for industrial gas turbines. Cooling channels are designed and
machined so that they are at a certain distance from the high and low pressure surfaces of the
blade. The distance from the surface of the blade is referred to as the wall thickness, illustrated in
Fig. 2.1-1 (b). Wall thickness is an important parameter as it influences the effectiveness of the
(a) (b)
Wall thickness
31
cooling channels, and hence the performance of the blade. Thus clients of ELE (like Siemens, Rolls
Royce, etc.) insist on the company measuring the wall thicknesses of cooling channels at several
positions on the blade accurately.
At present, ELE measures the wall thickness manually using an ultrasonic delay-line transducer. At
first, one blade from the batch is selected and scanned by X-ray to identify the locations of cooling
channels. These locations for inspection are then marked onto a mask and then marked onto
blades for inspection. As shown in Fig. 2.1-2, the operator applies a thin layer of couplant covering
the entire area of the transducer’s wear cap and then presses the transducer onto the desired
location of the blade surface precisely and firmly. In the process of inspection, the ultrasonic probe
must be kept normal to the blade surface all the time to obtain the maximum signal from the
ultrasonic probe. However, even a skilled operator requires time and skill to ensure that the probe
is normal to the desired position on the blade surface in practice. In addition, there are positional
tolerances and shape tolerances during the manufacture of both the turbine blade (investment
casting) and cooling channel machining (EDM), which means the blade shape and the position of a
cooling channel might be different from the original CAD drawing. If the shape of the blade is
different, even if the probe is exactly perpendicular to the designed blade surface, the result may
still not be the correct wall thickness. Unacceptable errors may show up during the inspection
process. Moreover, for a blade of typical size (blades inspected by ELE vary from 100 to 500 mm in
length), there are about 64 positions that need to be inspected. When the number of positions is
combined with the time required to find the normal direction at each position, inspection of a blade
becomes a time- consuming task. At the moment, it takes an operator just over half an hour to
measure, and record, the wall thicknesses for an average-sized blade.
A system is therefore required which would automate the inspection of wall thicknesses in turbine
blades. The requirements of such a system are listed below.
Fig. 2.1-2 (a) An illustration of ultrasonic delay-line transducer. (b) The ultrasonic probe is kept normal to the surface of the blade at various inspection locations
Couplant
Ultrasonic probe
Test piece
Pressure
Wear cap
(b) (a)
32
i. Ultrasonics and CT scanning are two techniques that can be employed for measuring wall
thicknesses. However, a CT scanner is expensive (costs involved are in in excess of £750k)
and the time required for scanning and analysis can be a few hours. Both these factors
make it uneconomical for a small company like ELE. The company has been using
ultrasonics for a long time and has considerable expertise in this area; therefore, ELE
would like to continue using ultrasonics.
ii. The system should be more accurate and consistent than current practice. At the moment,
the accuracy that can be achieved with a hand-held ultrasonic probe is around 0.5 mm.
Therefore, the target accuracy for this project is 0.2 mm.
iii. The CAD blade geometry will be different from the actual manufactured blade and
therefore the former cannot be used to generate the probe path.
iv. The time for inspecting a blade should be less than that required for manual inspection.
v. Incorporate a high degree of automation.
vi. Be cost effective. A budget of around £45000 was set by ELE.
Research direction
i. In ultrasonic testing, both contact and non-contact probes are available. To automate the
testing procedures, contact probes can be used but a mechanism must be designed to
avoid damaging the probe caused by operator’s mistakes. This mechanism may however
result in errors and increase the complexity of the project. Non-contact probes, on the
other hand, are usually preferred [3]. Non-contact probes are immersion ultrasonic probes
which use water as the coupling medium. In this case, only a water tank is needed to
immerse the test workpiece (i.e. turbine blade in our case) as well as the probe.
ii. The accuracy requirement of the inspection system can be easily achieved with a
computer-controlled actuator. This actuator must have at least five degrees of freedom
because it is necessary to keep the ultrasonic probe normal to the surface of inspection
during measuring. In practice, a six-axes system would be required as it would not be able
for the actuator to measure all the wall thicknesses of a blade in one pose. The sixth axis
would rotate the blade through a certain angle.
iii. Similar to CNC machining, a path for the tool, in our case the probe, needs to be
determined. This would require knowledge of the geometry of the turbine blade. Since a
CAD model cannot be used, a mathematical model of the blade has to be constructed,
based on which the probe path can be calculated.
33
iv. As reverse engineering each blade is time consuming and this may violate the time
requirement for the inspection system, research should be conducted to investigate if the
same free-form representation and probe path can be used for all the blades in a batch.
v. Apart from the actuator, to achieve a high degree of automation, the PC should also
control the entire system, including the ultrasonic PCI card that would be required to
acquire the probe data.
Aim and objectives
The main aim of this project is to develop an inspection system to automatically measure wall
thicknesses of turbine blades.
The objectives are summarized as follows:
i. Test and study the capabilities of the ultrasonic probe, investigating the parameters that
affect its accuracy.
ii. Design and manufacture a prototype of the inspection machine.
iii. Develop algorithms for reverse engineering turbine blades and probe path generation.
iv. Investigate whether a common probe path can be used for all blades from the same batch.
v. Develop software to integrate and control the various parts of the inspection machine i.e.
robot control, blade rotation, loading/unloading of ultrasonic probe and laser probe.
vi. Develop software to anlyse and extract the wall thicknesses from the acquired ultrasonic
signals.
vii. Test and evaluate the inspection machine for a range of components including blades.
The thesis is mainly divided into four parts. The first part (Chapter 1 and Chapter 2) includes the
Introduction and Literature Review, which will help the reader to understand the main aim and
methods used in this thesis. The second part (Chapter 3 and Chapter 4) presents the design of the
inspection machine and control algorithms. In the third part (Chapter 5), theories and algorithms
for reverse engineering and probe path generations are discussed. The last part (Chapter 6)
discusses research results including the capabilities of the ultrasonic probe, geometry deviations of
turbine blades and ultrasonic measuring turbine blades on the inspection machine.
34
Literature Review
In industry, the current method of measuring wall thicknesses in turbine blades is to use an
ultrasonic contact probe. However, this method is time-consuming and sometimes there are
problems in obtaining accurate results. Automation of the measuring process would require an
ultrasonic immersion probe, which could be attached to an actuator and moved above the surface
of the turbine blade for taking measurement. In this case, the probe paths for the actuator have to
be calculated.
Literature reviews in the field of ultrasonics reveal that during ultrasonic testing, the probe has to
be held normal to the surface. This means that the surfaces of turbine blades need to be reverse
engineered and from the reverse engineered models surface normals can be calculated in order to
compute the probe paths.
In this chapter, literature reviews are presented for both ultrasonic testing and reverse
engineering.
35
Ultrasonics
Definition of ultrasound
Fig. 2.1-1 Different bands of sound frequencies
The term “ultrasound” refers to a cyclic acoustic pressure wave (expansion and compression) at
frequencies beyond the audible range, i.e. above 20 kHz [4]. The different bands of sound
frequencies are shown in Fig. 2.1-1.
Sound with a frequency below 20Hz is called infrasound, which has special applications in geology,
seismology and medicine; from 20Hz to 20kHz is the audible range; above 20kHz is ultrasound.
The ultrasonic range can be further classified into three regions depending on the magnitude of
the operating frequency [4]:
20kHz – 100kHz, power ultrasonics, used for sensitive chemical systems where physical
and chemical alterations are desired.
100kHz – 1MHz, high frequency ultrasonics.
1MHz – 500MHz, diagnostic ultrasonics, within which from 2MHz to 200MHz is the non-
destructive testing (NDT) frequency range.
Capabilities and limitations
Ultrasonics has the capability of detecting both surface and subsurface discontinuities and
determining reflector location with high accuracy and high resolution. This capability of ultrasonics
defines its importance in flaw detection and thickness gauging. Other advantages of ultrasonic
testing include no requirement for samples to be prepared or a severely controlled environment [5]
[6].
On the other hand, the main disadvantage of ultrasonic testing, noted by Cawley [7], is that when
ultrasonics is employed for scanning a large area, the process can be time consuming. This is due
to the fact that the inspection area of one pulse is essentially limited to a small zone.
The accuracy of ultrasonic thickness measurement is affected by surface roughness of the
inspected object. Due to surface roughness, ultrasonic waves may travel in several different sound
20Hz 20KHz 2MHz 200MHz
Infrasound Acoustic Ultrasound NDE1 range
1 Non-destructive evaluation
36
paths in the material which causes wave interference. Therefore, the shapes of the returning
echoes may be distorted and the accuracy of thickness measurement lowered [8]. Blitz and
Simpson [9] suggest that the effect of surface roughness on measurement accuracy should be
considered on both the front and back walls.
Another limitation of ultrasonic testing, according to Thompson [10], is that materials with a
microstructure larger than the wavelength of the ultrasonic transducer can cause excessive
attenuation and backscattering.
In addition, both Cawley [7] and Thompson [10] argue that the correct alignment of ultrasonic
beam is sometimes challenging. During ultrasonic inspection, it is essential to maintain the
ultrasonic beam perpendicular to the surface of inspection to avoid refraction at interfaces. This
becomes especially challenging when inspecting a non-planar surface. Thompson [10] notes that
this problem becomes even more severe when inspecting metal which is submerged in a coupling
medium (such as water) rather than the direct contact technique because the difference between
acoustic velocities in water and metal is usually greater than threefold.
Characteristics of ultrasonic testing
While use of the immersion technique in inspecting curved surfaces brings more challenge, a
specific type of immersion transducer, a point-target focused (PTF) transducer, is employed to
overcome this problem. A point-focused transducer gradually narrows the spread of ultrasonic
energy giving a boost in signal strength within the focal zone. Besides, the area of attack of an
ultrasonic wave at interfaces is reduced and consequently refraction of ultrasonic wave is
minimized. Other benefits of using a focused immersion transducer include improved resolution,
sensitivity and precision within the focal zone [6].
Fig. 2.1-2 Near field and far field [11]
37
For both focused and unfocused ultrasonic waves, near field and far field (see Fig. 2.1-2) are
important characteristics. The near field is defined by a region directly in front of the transducer
face where the intensity of the ultrasound is affected by interference both constructively and
destructively. Owing to the two modes of wave interference, within the near field distance 𝑁, the
intensity of ultrasound varies significantly [12].
The end of the near field is referred as the natural focus of ultrasound. Beyond the natural focus
begins the far field where ultrasound waves are relatively uniform whereas the intensity reduces
gradually. Near field distance can be calculated by:
𝑁 =𝐷2𝑓
4𝑉 Eq. 2.1-1
where 𝐷 is the element diameter of the transducer, 𝑓 the frequency of ultrasound and 𝑉 the
acoustic velocity.
Due to fluctuation of the intensity of ultrasound in the near field, it is suggested that in ultrasonic
flaw detection or distance gauging, the reflector should be placed beyond the near field [12] [13].
Focused ultrasound enjoys a shortened focal distance, which means a uniform ultrasonic beam is
formed faster. Olympus [11], an ultrasonic transducer manufacturer, has documented their
research on focused transducers. The -6dB focal zone1, 𝐹𝑍, of a transducer can be calculated using
Eq. 2.1-2.
𝐹𝑍 =2𝑁𝑆𝐹
2
1 + 0.5𝑆𝐹
Eq. 2.1-2
where 𝑆𝐹 is the normalized focal length given by Eq. 2.1-3.
𝑆𝐹 = 𝐹 𝑁⁄ Eq. 2.1-3
where 𝐹 is the focal length.
Fig. 2.1-3 -6dB focal zone
1 The focal zone wherein the amplitudes of on-axis ultrasonic signals are within -6db of the amplitude at the focal point, also see Fig. 2.1-3
38
For a specific focal length, the normalized beginning point of the focal zone, SB, and the
normalized ending point, SE, can be obtained using Fig. 2.1-4.
Fig. 2.1-4 Normalized beginning and ending points of the -6dB focal zone [11].
These equations can be used to determine an optimized water path for positioning the transducer
such that the ultrasonic wave attacks interfaces around the beginning point of its focal zone and
hits the reflector before it reaches the ending point. Therefore, this requires a transducer with a
correct focal length that is sufficient to provide a focal zone to cover the entire material path,
which is the distance between the interface and reflector. Nevertheless, such requirement is
difficult to achieve if the reflector is deep inside the test piece. This is because the focal length for
transducers of a given element diameter and frequency is limited in practice. As shown in Fig.
2.1-5, Olympus [11] notes that the increase in signal strength is inversely proportional to the focal
length. To avoid a weakly focused transducer, the focal length should not exceed 0.8 times the
near field.
Fig. 2.1-5 Variation of relative increase in signal amplitude with normailized focal length SF [11].
Besides, Olympus [11] suggests that the focal length is normally shortened due to the effect of
refraction at the interface, as shown in Fig. 2.1-6. According to Snell’s Law, the optimum water
path (path at which the response is a maximum) can be calculated using Eq. 2.1-4. Due to the fact
39
that the sound velocity is usually faster in the test piece than in water, for inspecting deep
subsurface features, the focal length must be sufficient to work out a positive amount of water
path.
𝐹𝐸𝑛𝑒𝑤 = (𝐹𝐸 − 𝑊𝑃) (𝑐𝑤
𝑐𝑡𝑝
) Eq. 2.1-4
where 𝐹𝐸𝑛𝑒𝑤 is the shifted end point of the focal zone, 𝐹𝐸 is the new end point of focal zone, 𝑊𝑃 is
the length of water path, 𝑐𝑤 is the acoustic velocity in water and 𝑐𝑤 is the acoustic velocity in the
test piece.
Fig. 2.1-6 Focal point shifts when an ultrasonic wave enters the workpiece. Reproduced from Olympus NDT
(2011) [11].
Data Processing
2.1.4.1. Time of flight
Blitz and Simpson [9] summarise that ultrasonic testing includes the measurement of “time of flight
(or delay) of the waves, path length, frequency, phase angle, amplitude, impedance and angle of
wave deflection (reflection and refraction)”. Some measurements such as time of flight, path
length, frequency etc. can be simply deduced from ultrasonic signal plots.
In amplitude-vs-time plots, known as the time domain, valleys and peaks of reflected sound waves
can be identified as they are usually strong spikes. The measurement of the time difference
between these valleys and peaks, i.e. the measurement of the time of flight, can be used for
evaluating the thicknesses or locations of flaws [14]. For time of flight measurement, depending on
the selection of pulses or echoes, Fowler et al. [8] classify the method into three basic modes:
WP
F
Transducers
Water
Workpiece
Focal point in workpiece
Focal point in water
i. Mode 1: the measurement is taken between the
excitation pulse and the first backwall echo.
40
Fig. 2.1-7 Different modes for time of flight measurement.
Mode 2 is typically used for curved shapes. Mode 3 usually gives the highest accuracy and best
resolution, but it is only practical when sound attenuation is low and the material has a high
acoustic impedance which is usually the case with fine-grained metals. [8]
2.1.4.2. Calibration
Calibration, as defined by Berke [15], is a linear representation, from the zero position on the
scale, of a certain distance range of the test sample. The zero position is usually the surface of the
test sample. The calibration must be associated with the material of the test sample because the
sound path is always half the product of the sound velocity in the material and the time of flight of
the sound wave, expressed by Eq. 2.1-5.
𝑆 =𝑐𝑡
2
Eq. 2.1-5
where 𝑆 is the sound path, 𝑐 the acoustic velocity in material and 𝑡 the time of flight.
However, Berke [15] states that this equation is not essential for calibration procedures. The
calibration is established by placing the transducer over a series of known thicknesses of a
calibration block, which is made with the same material as the test sample, and linearly relating
the associated scale position with the thicknesses, or sound path:
𝑇𝑖 =𝑆𝑖
𝑘
Eq. 2.1-6
where 𝑇𝑖 is the scale position of the ith echo, 𝑆𝑖 is the sound path of the ith echo and 𝑘 is the scale
factor.
Fowler et al. [8] observed that for ultrasonic thickness measurement, one calibration is only
accurate to a degree in the thickness range the calibration is performed. It is particularly the case
for materials with non-uniform grain structures, such as some cast metals. Therefore, sets of
calibration should be performed for different thickness ranges to achieve most accurate calibration
results.
ii. Mode 2: the measurement is taken between the first
interface echo and the first backwall echo.
iii. Mode 3: the measurement is taken between two backwall
echoes.
41
Fowler et al. [8] also argue that due to the variation in the types of transducer, cable length and
the meansuring mode, a zero offset is needed. A modified equation is shown in Eq. 2.1-7.
𝑇𝑖 =𝑆𝑖
𝑘+ 𝑐
Eq. 2.1-7
where 𝑐 is the zero offset.
2.1.4.3. Error
Hammond [16] identifies three types of
error in determining an accurate time
of flight.
As shown in Fig. 2.1-8, the
determination of time of flight is
affected by two errors, ΔRϕ and Δθ
[16]. ΔRϕ is the error caused by the
sampling rate. Δθ is called phase angle
error, which results from cropping of a
peak at the detection threshold of
signal strength level. This error,
however, can be avoided by using a lower receiver gain to reduce the amplitude of the peak below
the detection threshold [16].
Determination of time of flight is also affected by another error, Δø, related to the precision of the
internal clock. Nevertheless, with modern precision electronics, this error is usually negligible.
2.1.4.4. Noise
Along with ultrasonic wave signals, noise or unexpected signals are captured by the receiver.
According to Diederichs [17], noise usually originates from:
(a) probe noise;
(b) weak echo due to material grain, texture and composition;
(c) electronic noise due to amplifier, pulser reverberations and reflection in cable [8], and
(d) interferences due to electro-magnetic.
Application
In science, industry and medicine, ultrasonic testing has a broad range of applications [18].
True ToF Δθ
Detection
Time Tick Evaluated ToF ΔRϕ
Threshold
Fig. 2.1-8 Errors in time of flight (ToF) measurement (reproduced from Hammond [16])
42
In medicine and the field of biology, ultrasound, along with X-ray and nuclear, is one of the
important diagnostic tools. It is employed mainly for measuring and visualizing biological tissues
and organs as well as detecting tumours [19] [20]. Recent developments in ultrasonics have
significantly extended the application of ultrasound in biology, such as flow speed detection based
on Doppler effect (see Fig. 2.1-9 (a)) [21], delivering drugs to skin [22] and assisting microsurgery
for Cushing’s Disease [14].
Fig. 2.1-9 Blood flow in the carotid artery bifurcation [21]
In engineering, ultrasonic testing is widely used in inspecting subsurface features, e.g. air gap and
cracks, in different objects. Krautkraemer, one of the companies specializing in ultrasonic
inspection highlights many different ultrasonic applications in [23], including crack detection in a
disk brake, measurement of corrosion tension cracks in aluminium and wall thickness
measurement of bent copper tubes.
Amulele et al [24] carried out experiments in which a cylindrical component and a gas turbine
blade were measured using a focused ultrasonic immersion probe. Both components were made of
the same nickel-based superalloy, i.e. Inconel. They used a CMM to obtain the external surface
profile of the test pieces, from which probe paths were calculated. During their experiments, the
probe was kept normal to the surface of the test piece at a distance equal to the focal length of
the probe. Regarding thickness determination, they used a velocity-time equation:
𝑑 =𝑣(𝐿)𝑡
2
Eq. 2.1-8
where 𝑣(𝐿) is the velocity of longitudinal wave and 𝑡 is time of flight.
43
In order to find an accurate value of 𝑣(𝐿), three elastic constants of the Inconel were determined
using Laue X-ray diffraction. The thickness measurement results were compared between CMM
and ultrasonic results, which show a 2% differences for the cylindrical test piece and 10% for the
turbine blade.
Conclusion
Ultrasonic testing is widely used as a non-destructive testing technique. The accuracy of ultrasonic
testing depends upon, amongst other factors, the accuracy of calibration, sampling rate and the
amount of phase angle error. For measuring turbine blades, an immersion probe was used in the
research conducted by Amulele et al [24]. However, the difference between the CMM and the
ultrasonic measured values, in the case of turbine blades, is as much as 10%. Investigations are
therefore required whether these differences can be reduced by considering not only the above
mentioned factors but also the length of the water path and the normality between the probe and
the surface of the component.
44
Reverse engineering
In order to obtain accurate wall thicknesses from ultrasonic testing, it is essential that the probe
path is calculated accurately. This probe path requires not only precise X-, Y- and Z-coordinates
but also precise angular positions so that the probe is kept normal to the surface of the test piece.
To calculate the probe path, a mathematical model of the turbine blade must be established such
that the probe path at a particular surface point is represented by a vector that is normal to the
surface at that point. This vector can be obtained from the cross product of the tangent vectors at
this point. Since the aerofoil part of a turbine blade is a free-form surface, the mathematical model
can only be obtained by reverse engineering. The CAD model of the blade cannot be used because
of differences between it and the actual manufactured blade.
A typical reverse engineering procedure consists of the following steps [25] [26] [27] [28]:
1. 3D digitizing;
2. registration;
3. pre-processing and triangulation;
4. data editing and segmentation, and
5. surface fitting and CAD model generation.
In the digitization process, the physical object is scanned to acquire point data on the surface of
the object. These points are usually unordered and separated. Ordering and combining of the
points are done in the process of registration. After registration, pre-processing takes place to
remove noisy points [27]. The remaining points are triangulated and a point cloud mesh is
generated. Next, the point cloud mesh is revised, edited and refined for a most precise
representation of the original object. Examples of editing are edge sharpening, boundary repair
and surface smoothing [26]. At the end of the editing process, a refined polygon model is
generated. In segmentation, the polygon model is divided into surface patches and these patches
are, in the next step, fitted with surfaces [27]. Surfaces are finally stitched together and a CAD
model is generated.
In the following chapter, published literature for digitization, registration, triangulation and surface
fitting including parameterisation is reviewed.
45
Digitization
The surfaces of turbine blades are commonly constructed from a set of parallel cross sections by
lofting [29].
Fig. 2.2-1 Surface of a turbine blade generated by lofting from a set of cross section profiles [29]
Digitization can be accomplished with either contact or non-contact methods depending on the
equipment deployed [27] [30].
2.2.1.1. Contact methods
In contact methods, measurements are performed based on mechanical contact between a
contact-type probe and the physical object. Modern contact-type probes are available in two forms,
touch-trigger probes or analogue scanning probes [31]. A touch-trigger probe performs a point-to-
point measurement whilst an analogue scanning probe provides a continuous measure of
deflections of the probe that can be associated with machine positions and thereby translated into
surface point data [32]. An analogue scanning probe typically measures up to three-times faster
than a touch-trigger probe [33].
The actuator of the probe can be either a coordinate measurement machine (CMM), a computer
numerical control (CNC) machine, an articulated mechanical arm or a robot [30] [31]. The
accuracy of contact measurements is highly related to probe positioning, as a contact-type probe is
usually very accurate in itself. For example, the accuracy of a TP200 touch-trigger probe from
Renishaw is, in the worst case, ±1.4µm [34]. CMM and CNC machines are normally more accurate
than a robot or an articulated mechanical arm. A Nikon LK V bridge CMM has a volumetric accuracy
46
of ±2.1µm [35] and this is still not the most accurate CMM, as they can have an accuracy of less
than 1 µm [35]. The accuracy of a calibrated robot, Fanuc LR Mate 200iC, according to Joubair and
Bonev’s work [36], is 32µm at best. One of the most accurate articulated mechanical arm, Faro
Gage is 18µm [37]. On the other hand, robots and articulated arms offer more degrees of
freedoms than a CMM or a CNC machine tool. For example, both the Fanuc LR robot and the Faro
Gage can provide six degrees of freedoms [38] [37]. This is particularly useful when measuring
components with complex shapes.
Fig. 2.2-2 Examples of different probe actuators
Contact methods usually suffer from many disadvantages when applied for numerous measuring
points on 3-D free-form surfaces such as low efficiency, inadequate data points, complicated tip
radius compensation and accelerated wear of the probe tip [39].
2.2.1.2. Non-contact methods
Non-contact methods are commonly based on the principle of acoustic, optical, magnetic and x-ray
[27] [30]. Geometric data of the scanned part are evaluated using time of flight (acoustic),
triangulation (optical), wave interference information (magnetic) and image processing techniques
(x-ray) [25]. Devices employ sound, magnetic field and x-ray are exceptionally effective in
obtaining 2D cross-sectional images. Optical devices, such as laser sensors and vision systems
(consists of a projector and a camera) [40], are mainly used for scanning the outer skin of an
object.
Non-contact probes can be equipped on hand-held devices such as the Nikon K-Scan MMDx laser
scanner shown in Fig. 2.2-3 (a), which offers full freedom. Hand-held devices usually work with a
series of other non-contact probes, such as the Nikon K600 laser tracker shown in Fig. 2.2-3 (b),
which continuously measure the location and orientation of the hand-held device and thereby
(a) A Nikon LK V CMM [35] (b) A Fanuc LR Mate 200iC robot [38] (c) A Faro Gage [37]
47
interpret the geometric data of the object. The actuators of non-contact probes can also be CMMs
[41], CNC machines, robots and articulated arms.
Fig. 2.2-3 A Nikon hand-held laser scanning system [42]
The biggest advantage of using non-contact methods is the significant increase in sampling
rate/digitizing speed. For example, a 2D laser scanner is capable of taking 2500 data points per
second with a resolution of 10µm [43], while a CMM with a touch probe needs 2s to take one point
[44]. Another advantage that is mentioned by several researchers [45] [25] is non-contact
methods enable the capability of measuring soft objects.
Although many researchers prefer to use CMMs with a touch probe to acquire reference surfaces
for their research [40] [43] [46], it is difficult to justify the accuracy of a non-contact system over
a contact system when the probe actuator is different. A cheap Keyence 1D laser sensor, IL-S025,
offers an average accuracy of ±7.5 µm [47], compared with ±1.4µm accuracy offered by an
expensive touch-trigger probe [34]. However, with modern technologies, ultra-high accuracy laser
sensors are also available, such as a Keyence LK-H008W laser sensor, which offers an average
accuracy of ±0.5 µm and a repeatability of 0.005 µm and it is still a lot cheaper than the TP200
touch probe [47].
Vision system and laser sensor
In our case, the test objects are the aerofoil surfaces of turbine blades for industrial gas turbines
and therefore efficiency and accuracy are both our concerns.
Chen and Lin [48] explain an approach for reverse engineering a wax model of a turbine blade
incorporating a vision system and a CMM. In their approach, an initial triangulation representation
of the model was obtained rapidly with the vision system, based on which probe exploration paths
were calculated for a subsequent detailed digitization using the CMM.
(a) A Nikon K-Scan MMDx laser scanner (b) A Nikon K600 laser tracker
48
In 2001, Carbone et al [40] demonstrated a method to digitize a turbine blade using a vision
system. In their vision system, a projector was used for projecting a dense mesh of points onto the
surface of the blade and a video camera was used to capture images of the mesh, which were
then processed to obtain surface data. The surface of the blade was also re-digitized with a CMM
to set up a reference point cloud. The maximum digitizing errors using the vision system are
0.155mm and 0.658mm on the concave and the convex surface respectively.
In a more recent research, Gameros et al [46] reverse engineered a turbine blade with three
different methods using a CMM, which was used to obtain a reference surface, a 3Shape Q800
laser scanner and a Zeiss METROTOM 1500 CT scanner. The surface constructed from point data
obtained with the laser scanner shows a closer representation to the reference surface, with
majority of the deviation values within ±20µm. A CT scanner has a relatively poorer accuracy with
most of the deviation values within ±60µm.
In both researches, CMM results are used as references, and three types of non-contact digitizing
methods are tested. It is found that the laser scanner is the most accurate device, even though a
3Shape Q800 is only an industrial laser scanner for general purposes [49].
Triangulation is the theory of distance measurement for most laser sensors [25]. As shown in Fig.
2.2-4, the principle employs a laser diode or a source for laser beam to project a high-energy light
spot on the surface of an object and the reflection of the light spot is focused through a lens at a
known angle to the laser beam and captured by a sensor, usually a charge-coupled device (CCD)
[50] [51]. The coordinate of the reflected light on the sensor is recorded and the distance of the
object can then be calculated.
Fig. 2.2-4 Principle of laser triangulation [50]
The major contributors to errors in laser measurement are the high surface smoothness, surface
curvature and slope, volume scattering and inhomogeneous surface texture [52]. In the case of a
turbine blade, the aerofoil section has various surface curvatures, which could distort the laser spot
49
thereby reducing accuracy of laser measurement. Hüser-Teuchert et al. [50] simulated distance
measurement of an inclined surface and a 2mm sphere using a laser sensor. They note that a
surface inclined by 60° can cause an error of 1.7µm and a curvature of a 2mm sphere can cause
an error of 6µm. In a more recent research by Vukašinović [53], the problem was studied
experimentally. They found the accuracy decreases dramatically when measuring a surface beyond
an angle of inclination of 55°. They also suggest the use of the minimum possible measuring
distance as the accuracy also decreases with an increase in measuring distance.
The most developed laser sensors are of the 1D and 2D type. A 1D laser sensor only measures one
point at a time, while a 2D laser sensor measures a stripe on the surface containing thousands of
points as shown in Fig. 2.2-5 [54] [45]. Thus, a 2D laser sensor is considerably faster than a 1D
laser sensor in acquiring a substantial size of point cloud. However, 1D laser sensors typically
offers higher accuracy and repeatability than 2D laser sensors. The previously mentioned Keyence
LK-H008W laser sensor is the most accurate 1D laser sensor in current Keyence production line
while the most accurate Keyence 2D laser sensor, LJ-G015K, offers an average accuracy of ±1 µm
[47].
Fig. 2.2-5 (a) 2D laser scanning; (b) acquired data points structure in 2D laser scanning. Reproduced from Woo et al. (2002) [54]
It is essential to properly select the size of sampling for digitization [55]. Although the non-contact
technique improves the efficiency of the digitization process, allowing more points to be acquired
in a short time, excessive number of points only burdens subsequent data processing. Besides, as
a 1D scanner normally cost less, it is very logical to consider reducing the density of data points
required so that the cheaper option becomes viable.
One major disadvantage of laser measurement, as McDonald et al [56] point out, is its inability to
measure surfaces parallel to the axis of the laser as shown in Fig. 2.2-6. Thus either the test
object or the laser sensor has to be re-positioned. This means that several sets of data points
should be combined together to have a common system of co-ordinates, a procedure known as
registration. Registration will result in a unified model for the entire object.
Laser sensor
Laser stripe
Test piece
Scanning direction
(a) (b)
… …
Sca
nnin
g d
irect
ion
… …
…
…
… …
Stripe 1 Stripe 2
50
Registration
A single view represents one part of an object, e.g. top view or front view. In order to obtain a
complete model, sets of points from multiple views need to be merged. This step is referred to as
registration. It involves transforming points in other views to one of the views used as the
coordinating system. The view used as coordinating system is referred to as the fixed view, while
the others are floating views, as shown in Fig. 2.2-7. [27]
Fig. 2.2-7 Registration of two separated surfaces of a cylinder
One method of obtaining the correct transformation for an object consisting of a general surface is
to measure three fixed points (which are not co-linear) in each view used. These points have to be
marked on the actual part so that they can be found again [27] [57]. In this case, transformation
matrices can be easily found between the three fixed points on the fixed surface and the three
other points on each of the floating surfaces.
2.2.1.1. Iterative closest point algorithm
However, if the floating surface overlaps the fixed surface as shown in Fig. 2.2-8, the
transformation is best solved by minimizing the distances between the points in the two point
meshes. The minimization problem is usually presented in form of least squares and is commonly
solved iteratively, known as the iterative closest point (ICP) algorithm.
Missed feature
Fig. 2.2-6 Measuring vertical surfaces with a touch probe and a laser probe. Reproduced from McDonald, J.A. (2001) [56].
(a) a touch probe (b) a laser probe
(a) Fixed view (b) Floating view (c) A complete surface
Fixed points
51
Fig. 2.2-8 Two partially-overlapping surfaces
In a typical ICP algorithm, one of the objects, 𝑄, is fixed being the target of the other, 𝑃, to get
the closest match iteratively. An ICP algorithm is usually constructed by looping the following steps
until convergence is achieved:
1. For each point in 𝑃, find its closest match in 𝑄.
2. Estimate a combination of rotation and translation that can align 𝑃 and 𝑄 as closely as
possible by minimizing the square errors between the matched points.
3. Transform 𝑃 with the transformation obtained in Step 2. Replace 𝑃 with the transformed
point set.
Depending on the required accuracy of the final result and the size of the point sets, ICP can be
especially time-consuming. This is because the conventional method for minimizing the function
developed in Step 2 involves iteratively solving nonlinear equations and this is repeated in every
loop, such as solving Eq. 2.2-1 by differentiating 𝐹 proposed by Menq and Sahoo [58].
𝐹𝑘 = ∑ ∑‖𝑇𝑘−1𝒑𝑖,𝑗 − 𝒒𝑖,𝑗‖
2
𝑁𝑃
𝑗=1
𝑁𝑄
𝑖=1
Eq. 2.2-1
where 𝑘 = 1,2,3… representing the number of iteration, 𝒑 ∈ 𝑃 = {𝒑𝑖}, 𝒒 ∈ 𝑄 = {𝒒𝑗}, 𝑁𝑄 is the total
number of points in 𝑄, 𝑁𝑃 is the total number of points in 𝑃, and 𝑇 is the transformation matrix
estimated in Step 2.
𝑇 is a 4 × 4 matrix consisting of zeros and one and six variables 𝑡𝑥, 𝑡𝑦 , 𝑡𝑧, 𝛼, 𝛽, 𝛾, which quantifies
the amount of translation along the x-axis, y-axis and z-axis and rotations about these axes
respectively. Solving these six unknowns involves differentiating a non-linear equation for each of
them, so the solutions are achieved iteratively. In the next step, 𝑇 is substituted into Eq. 2.2-1 and
for each 𝒑 the corresponding 𝒒 must be found to obtain a minimum 𝐹 in this iteration and again
this process is iterative.
(a) Before registration (b) After registration
52
2.2.1.2. Modified ICP and variants
Many researchers have developed different techniques to improve efficiency in solving Eq. 2.2-1.
Menq et al [59] introduced Eq. 2.2-2 to determine the transformation matrix 𝑇 by pseudoinverse.
𝑇𝑘 = (𝑃𝑘𝑃𝑘𝑇)(𝑄𝑘𝑃𝑘
𝑇)−1 Eq. 2.2-2
The algorithm starts with computing a transformation matrix with the original sets of points, i.e. 𝑃
and 𝑄 . After the first transformation matrix is found, 𝑃 is transformed with the transformation
matrix and a new set of points 𝑃𝑘+1 is obtained, which is used as the measured point set for the
next iteration. The target point set for the next iteration, 𝑄𝑘+1, is also replaced by a new set of
points which is created by projecting 𝑃𝑘+1 onto 𝑄, the target surface for this iteration. The new
standard deviation is, therefore, calculated between the two new surfaces.
The efficiency of the pseudoinverse technique was confirmed by Huang et al [60]. However, they
suggested parameterising the target surface and using control points instead of projected
measurement points to improve the accuracy.
So far in this literature survey, all researchers use axial-angle-based transformation matrix to
represent rotation, whereas Faugeras and Hebert [61], Horn [62], and Besl and McKay [63]
demonstrated quaternion representations of the transformation matrix, which can be solved non-
iteratively.
Arun et al. [64] also illustrated a non-iterative solution for solving the transformation matrix using
singular value decomposition (SVD). Haralick et al. [65] extended the previous work on SVD and
proposed a robust algorithm to solve 3D pose estimation problems. Their algorithm identifies
outliers which quaternion methods are not capable of, which is especially useful when localising a
small surface patch. However, the SVD method sometimes fails to determine a correct rotation
matrix [66].
Li et al. compares both Menq’s [59] and Besl’s [63] algorithms in [67], along with two other
algorithms, referred to as the variational algorithm [68], which is based on SVD, and Hong-Tan’s
algorithm [69]. In another research [70], a localisation method based on cyclic optimisation is
compared with Hong-Tan’s algorithm [69] and tangent algorithm [67]. Both researchers agree that
Hong-tan algorithm is the most accurate and fastest.
2.2.1.3. Two-step localisation
According to Campbell and Flynn [71], one of the most significant drawbacks of the above
discussed ICP method is that it is only effective when the two surfaces are initially closely aligned.
In order to overcome this problem, it is useful to set up a two-step localisation procedure where a
general localisation is first performed to reduce the initial alignment error between the two
53
surfaces and then the ICP algorithm is applied. Li and Gu [72], Yamany and Farag [73] and
Galantucci et al [74] demonstrated different methods for general localisation.
Fig. 2.2-9 (a) A free-form surface, (b) extracted regions (1’, 2’, 3’, 4’ and 5’) from the measured surface and
(c) extracted regions (1, 2, 3, 4 and 5) from the target surface. Figure is reproduced from Li and Gu [72]
In the general localisation procedure, Li and Gu [72] divide both the measured and target surfaces
into several regions which are characterised by either convex, concave, saddle or flat. To define
these regions, curvatures at each point are first calculated. Depending on the characteristics of the
curvature, each point is assigned with a shape code. Adjacent points with the same shape code are
grouped and this group of points is now a region. An illustration of a free-form surface defined by
regions is shown in Fig. 2.2-9, where both surfaces shown in (b) and (c) are divided into five
regions, which are labelled by 1’, 2’, 3’, 4’, 5’ and 1, 2, 3, 4, 5 respectively [72]. The shape codes
of the regions on one surface are then compared with those on the other. A general localisation
between two surfaces is found when the deviation in the shape codes of all regions is a minimum
and the transformation to roughly align the two surfaces can be calculated.
Yamany and Farag [73] introduce another algorithm for general localisation wherein simplex points
are generated and encoded with signatures for surface comparison. Simplexes can be obtained
from triangulation of the model. For each landmark point, 𝑃𝑙 , the signature contains two
components. The first component is the distance between 𝑃𝑙 and all other points in the model, 𝑃𝑙𝑖.
The second component is the angles between the normal vector at 𝑃𝑙 and the direction vectors
𝑃𝑙− 𝑃𝑙𝑖
‖𝑃𝑙−𝑃𝑙𝑖‖. With these signatures, a reduced representation of the surface at landmark points can be
obtained. A signature image can be plotted to visualise the representation as shown in Fig. 2.2-10
[73]. Once signatures are established in both models, the models can be brought together and the
transformation can be obtained.
Comparing the above two methods, it is obvious that Li’s method is more efficient in terms of
computational power as it does not require further complex calculation after the curvature at each
point is obtained. However, the effectiveness of Li’s method is limited when the model contains
very few geometric features that can be categorised into different patches, such as an aerofoil
surfaces of a blade where there are often two distinct features only, the high-pressure and low–
pressure sides which are convex and concave. Yamany’s method is slower; however, it is not
effective in surfaces of revolution, e.g. a cylinder and a cone but should be suitable for an aerofoil
surface.
(b) (c) (a)
54
Fig. 2.2-10 A parametric representation of a torus is shown at the top left corner. Three points are selected
from the torus and the corresponding signature image of each point is plotted. [73]
Triangulation
The purpose of triangulation is to establish the topological relationships amongst the data points
acquired during the digitization process, thereby creating a faceted surface in the form of a
triangular mesh generated by joining the acquired points [31].
One of the most well-known triangulation algorithms is the Delaunay triangulation, published by
Boris N. Delaunay in 1934 [75]. One important and distinctive property of a 2D Delaunay
triangulation is the empty circle constraint. This is defined as:
For a set of points S in the plane, a triangulation T is a Delaunay triangulation if no point in S is
inside the circumcircle of any triangle in T [76] [77].
Fig. 2.2-11 displays an illustration of a Delaunay triangulation. Consider the finite point set of
seven points {P0, P1, …, P6} as shown in Fig. 2.2-11 (a). There are different ways of constructing
triangles to form a triangular mesh. In Fig. 2.2-11 (b), P0, P1 and P2 are connected and this
defines a Delaunay triangle as there is no point inside the circumcircle of this triangle. Continuing
to connect P0, P2 and P3, P0, P3 and P4, etc., a Delaunay triangulation (Fig. 2.2-11 (c)) can be
Dis
tance
D
ista
nce
Dis
tance
Angle Angle
Angle
①
③
②
55
created. However, if P1, P2 and P3 are connected, as shown in Fig. 2.2-11 (d), a non-Delaunay
triangle is formed, because P0 is inside the circumcircle of this triangle and continuing connecting
other points does not create a Delaunay triangulation ( Fig. 2.2-11 (e)). It is clear from the figure
that the Delaunay triangulation is a better mesh compared to the non-Delaunay triangulation, in
which two of the triangles, P1-P2-P3 and P1-P0-P3, contain small acute angles. The empty circle
constraint ensures that the quality of the mesh is optimised i.e. acute angles in the triangular mesh
are maximised and obtuse angles minimised [78].
Fig. 2.2-11 Delaunay triangulation
A 2D Delaunay triangulation is easily generated from the Voronoi
diagram, also known as Dirichlet Tessellation, of the data points [78].
Fig. 2.2-12 demonstrates a Voronoi diagram of the finite point set
shown in the above figure. The Voronoi Diagram consists of cells, one
for each data point [31]. In a Voronoi cell, any point p inserted inside
the cell is nearer to Pi than any other data point; and if this point p is on
the edge of the cell, the distance between Pi and p is equal to the
distance between p and another point that is in the cell which shares the edge. The cell, in other
words, is a collection of the bisectors between two points, as shown in Fig. 2.2-13.
Fig. 2.2-13 Bisectors and the Voronoi diagram
The simple rule for generating the mesh is to draw the perpendicular bisector between each two
points and connect [79]. Thus, each vertex in the Voronoi diagram becomes the circumcentre for
(d) A non-Delaunay triangle
(c) A Delaunay triangulation (b) A Delaunay triangle
(e) A non-Delaunay triangulation
(a) A finite point set
P6
P1
P2 P3
P4
P5
P0
(a) Perpendicular bisectors (b) A Voronoi diagram
Fig. 2.2-12 A Voronoi diagram
p
P6
P1
P2 P3
P4
P5
Pi
56
its nearest three points as shown in Fig. 2.2-14 (a). Connecting points on the same circumcircle
produces a triangulation satisfying Delaunay’s empty circle constraint as shown in Fig. 2.2-14 (b).
Fig. 2.2-14 Generate Delaunay triangulation based on Voronoi diagram
Many works have been devoted into calculating Delaunay triangulation for the convex hull of the
point set based on the divide and conquer algorithm [80] [81] [76] [82]. In this algorithm, a
complete point set is divided into several subsets and triangulation is computed within each subset.
These subsets are then merged to construct a complete triangulation for the point set. Lee and
Schachter [76] also introduced a method to construct Delaunay triangulation by iteratively adding
points to existing triangulation.
Nonetheless, Delaunay triangulation is not
always unique. Non-uniqueness happens
when there are more than three points
which lie on the circumcircle [83], as
shown in Fig. 2.2-15. Four points ABCD all
lie on the same circle and there are two
solutions to Delaunay triangulation. It is obvious, however, that Fig. 2.2-15 (a) presents a better
triangulation than Fig. 2.2-15 (b). In order to compute a unique Delaunay triangulation, Dyken and
Floater [84] implemented a preferred direction rule in Lawson’s [80] local optimisation algorithm
for Delaunay triangulation. The preferred direction rule selects the diagonal in a convex
quadrilateral that is at a smaller angle to the selected direction.
Fig. 2.2-16 Two Delaunay triangulations computed with implementation of preferred direction rule at two different selected directions [84]
(a) Circumcentres and Circumcircles (b) Delaunay triangulation
(a) (b)
A
B
C
D
A
B
C
D
Fig. 2.2-15 The non-uniqueness problem
57
In a 3D Delaunay triangulation, tetrahedrons are generated instead of triangles and circumspheres
are used as a boundary criterion instead of a circumcircle as shown in Fig. 2.2-17 (a). An efficient
procedure to generate Delaunay tetrahedrons is proposed by Watson [85]. However, Cavendish et
al [78] found a serious flaw in Watson’s method as well as in 3D Delaunay triangulation. For a
Delaunay tetrahedron ABCD, fixing points A, B and C and moving D to any other position on the
circumsphere makes the tetrahedron ABCD still valid. Taking an extreme case as shown in Fig.
2.2-17 (b), if point D is moved to position D’ just above the circumcircle defined by ABC, ABCD’ still
defines a Delaunay tetrahedron but it is ill-constructed. This problem seems to be more common in
3D free-form surfaces with small but cluttered surface variations or a very scattered point set.
Golias and Dutton [83] found a solution to avoid distorted Delaunay tetrahedrons by inserting new
nodes at the middle of edges to subdivide the tetrahedrons.
Fig. 2.2-17 (a) A fine Delaunay tetrahedron and (b) a distorted Delaunay tetrahedron. Figure is reproduced from Cavendish et al (1985) [78].
In our case, the aerofoil surfaces are relatively smooth so distorted Delaunay tetrahedrons are
unlikely to occur. The use of tetrahedrons means that these solid elements are even created
between the high and low pressure surfaces of the blade i.e. through the thickness of the blade.
In our case, this is not required and all such elements must be deleted. Angelo et al [86] describe
a method to extract the triangulated surface from a full 3D Delaunay triangulation.
Fig. 2.2-18 Tetrahedrons in through the thickness of the blade
A
B C
D
C
A
B
D’
(a) (b)
58
Surface fitting
3D surfaces, similar to 2D curves, can be represented in both non-parametric and parametric
forms. In non-parametric form, x, y and z coordinates are related by functions whilst in parametric
forms, x, y and z coordinates are related by parameters, such as u and w, defined by functions.
Non-parametric representations are not commonly used in either 2D or 3D fitting problems
because in non-parametric representations, curve or surface evaluation is difficult [87]. Therefore,
non-parametric representations are not discussed herein.
Parametric representation usually involves control points and blending functions. Control points are
points defined in Cartesian coordinate systems that control the shape of the curves or surfaces.
Blending functions are functions of parameters used to weight the effect of the control points.
It is reasonable to understand 2D problems first because many 3D fitting approaches are
developed based on 2D fitting approaches.
2.2.3.1. Curve fitting approaches
Historically, curve fitting problems were solved using interpolation techniques, such as Hermite
curves [88] [87]. Hermite curves are most commonly seen as cubic curves, because every increase
in the degree of curve beyond three introduces small oscillations in the shape of curves and a
considerable increase in computation power [89]. The shape of any Hermite cubic curve is
determined by one position vector and one tangent vector at each end of the curve. Modification in
the shape of the curve is allowed by intuitively changing the vectors. However, it is difficult to
calculate the correct magnitude of the tangent vectors [87].
In the 1960s, Bezier developed a different curve fitting method, which is based on approximation
techniques, known as Bezier curves [90]. A significant departure from interpolation techniques is,
in approximation techniques, fitted curves pass around given data points rather than pass through
as in the case of interpolation techniques. This adds additional flexibility in controlling the curve
shape [89]. The shape and degree of Bezier curves is determined by vertices called control points;
an nth degree curve is defined by n+1 control points [90]. Higher order Bezier curves can be
obtained by increasing the number of control points with a reasonable amount of extra computing,
which in turn produce smoother curves. Shown in Fig. 2.2-19 are three seven-degree Bezier
curves, where dots and dashed lines represent control points and characteristic polygons defined
by control points. As the third control point is moved, the shape of the curve changes accordingly.
It can be observed that the first and the last control points in a Bezier curve constrain the two
ends of the curve and the remaining points define “the order, derivatives and shape of the curve”
[89]. The tangents at the two ends are defined by the first and last segments of the characteristic
polygon. This enables implementation of continuity between two Bezier curves.
59
Fig. 2.2-19 Effect of control points on a seven degree Bezier curves
While Bezier curves offer many advantages, its disadvantages are very obvious when Bezier curves
are employed for representing a complex shape. In this situation, there are two options. The first
option is to define this shape with many control points and consequently, a very high degree curve
must be calculated. Nevertheless, a high degree curve may introduce undesirable oscillations and
increase computational cost. The second option is to segment the shape and use many lower
degree curves. The problem with this option, however, is the difficulty in defining continuities
between each two of the Bezier curves while maintaining the shape of the curve [87]. Another
problem of Bezier curves is its global modification property, which means it is impossible to
selectively modify the shape of one part of the curve without affecting the rest parts of the curve.
This effect can be reduced by introducing additional control points. Nevertheless, the degree of the
curve is increased as well as computational cost. As shown in Fig. 2.2-19, moving P2 affects the
shape of the entire curve [87].
An approach known as B-spline curves overcomes these disadvantages found in Bezier curves. In a
B-spline curve, the shape of the curve is controlled by control points as well as some vectors that
divide the curve into several segments. These vectors are called knot vectors. The degree of the B-
spline curve, n, is defined by the degree of these segments and between each segment Cn-1
continuities are achieved automatically by merit of the equation of the blending function. Thus, the
degree of the B-spline curve is independent of the number of control points, which allows a low
degree curve that is defined by a large number of control points [89]. The number of segments is
determined from the number of control points, assuming that the degree of each segment has
𝑃0
𝑃1
𝑃2’ 𝑃4
𝑃2
𝑃2’’
𝑃5
𝑃6
𝑃7
𝑃3
60
already been decided upon. The shape of the curve can also be edited locally because the knot
vectors limit the effective range of control points. As shown in Fig. 2.2-20, moving P2 to P2’ or P2’’
only affects the part of the curve up to P4.
Fig. 2.2-20 A cubic B-spline curve
2.2.3.2. Surface fitting approaches
Similar to Hermite curves, a legacy approach to solve surface fitting based on interpolation is
known as Hermite surface. Two forms of Hermite surfaces are found in literature, bilinear and
bicubic surfaces. Bilinear surfaces are determined with four corner points with linear blending
functions and the resultant surfaces are generally flat [87].
(a) (b)
Fig. 2.2-21 (a) a Hermite bicubic patch and a F-surface patch
𝑃0
𝑃1
𝑃2’ 𝑃4
𝑃2
𝑃2’’
𝑃5
𝑃6
𝑃7
𝑃3
61
The bicubic surface is an extension of Hermite bicubic curves. As shown in Fig. 2.2-21 (a), the
shape of a bicubic surface patch is determined by the u and w coordinates, tangent vectors in u
and w direction (Pw and Pu) and a twist vector (Pt) at each corner. Bicubic surfaces are more
often used in form of surface patches that can be combined into a complete surface with C1
continuity at boundaries [89]. A simplified bicubic patch know as Ferguson surface patch (F-surface
patch) is useful in design and machining applications. As shown in Fig. 2.2-21 (b), a F-surface
patch is generated by assigning zeros to all twist vectors [89]. However, F-surfaces are generally
inaccurate and thus, rarely used in surface fitting problems.
The problems found in Hermite bicubic curves can also be found in bicubic patches, such as
difficulties in calculating tangent vectors, dramatic increase in computation for higher degrees, etc.
These problems are addressed in Bezier surface or Bezier patch, which is considered as an
extension of Bezier curve. The shape of a Bezier patch is defined by the control points and
characteristic polyhedrons as shown in Fig. 2.2-22. The four corners of a Bezier patch are given by
the four corner control points and the tangents at the corners in u and w directions are given by
the slopes of the segment and the remaining control points determines the boundary and internal
shape of the patch. Similar to Bezier curves, the degree of a Bezier patch in a certain direction is
given by the number of control points in that direction minus one [89] [87]. Continuities can be
specified at boundaries of Bezier patches to stitch several of them into one complete surface.
Fig. 2.2-22 A Bezier patch and its characteristic polyhedrons
However, when representing a complex surface, Bezier surfaces inherits similar disadvantages
from Bezier curves. Oscillations and additional computational cost are introduced if a Bezier surface
of high degrees is used; if multiple Bezier patches of lower degrees are used, it is difficult to
maintain continuity without excessively altering the shape of the patch which is constrained by
limited number of control points [87]. The extension of the B-spline curve, i.e. B-spline surface,
overcomes these problems.
Similar to B-spline curves, the degree of the surface is not related to the number of control points
and continuity between patches, which are divided by knot vectors, is automatically maintained by
62
the blending function. The B-spline surface also provides local control of the shape. Thus, the B-
spline surface is often suggested as a better surface fitting method over others [89].
2.2.3.3. B-spline surface fitting
The B-spline surface can be categorised into different types, such as uniform and non-uniform
B-splines, clamped and unclamped B-splines and non-uniform rational B-splines (NURBS). This
is also the case for the B-spline curve.
In uniform B-splines, knot vectors are uniformly spaced whereas in non-uniform B-splines knot
vectors are not. The use of non-uniform knot vectors offers additional flexibility in changing the
shape of the surface. Interpolation of corner points of the control polyhedron (indicated in red
colour), as can be seen in Fig. 2.2-23 (a) [91], is possible by repeating the corresponding knot
vectors several times; these B-splines are commonly referred as clamped B-splines. Fig. 2.2-23
(b) shows an unclamped B-spline surface, which does not interpolate corner points.
Fig. 2.2-23 (a) clamped B-spline surface and (b) unclamped B-spline surface [91]
The NURBS is the rationalised form of the B-spline. In the NURBS, each control point is assigned
with a weight which adjusts the level of effect of the control point on the local shape. This feature
is especially important in design since more shape variations can be achieved by manipulating both
the control points and the weights when fixed
knots were given.
Loop [92] demonstrated an algorithm for
generating smooth spline surfaces using
irregular meshes as input. The mesh is first
refined by generating more vertices, edges and
faces that corresponds to the vertices and faces
of the original mesh as shown in Fig. 2.2-24.
Next, based on the vertices of the refined
mesh, a “quad-net” (see Fig. 2.2-25) is
constructed. Quartic triangular patches can
(a) (b)
Fig. 2.2-24 Mesh refinement: original mesh (bold meshes) and refined mesh (thin lines) [92]
63
thereby be constructed by connecting the vertices in the “quad-net”. These patches are united in
the final step to form a complete B-spline. The outcome of this algorithm is quite good. Several
smooth surfaces generated using this algorithm are shown in Fig. 2.2-26.
Fig. 2.2-25 The quad-net corresponding to the vertex of the refined mesh [92]
Fig. 2.2-26 Examples of smooth surfaces reconstructed based on coarse meshes [92]
64
Similar to Loop’s work, Eck and Hoppe [93] introduced an algorithm for creating a tensor product
B-spline surface. Their algorithm is generalised for any topological type and can use an
unorganised set of points as input.
The B-spline surface is created in
five steps.
In the first step (see Fig. 2.2-28
(a)), a dense approximating mesh is
constructed from an unorganised
point set using a surface
reconstruction method introduced in
[94] and [95]. Based on this
approximating mesh, the points can
be parameterised.
The second step (see Fig. 2.2-28
(b), left) is to construct a simple
triangular base complex over which
the input points are re-
parameterised using a harmonic
map built upon the approximating
mesh.
The third step (see Fig. 2.2-28 (b),
right) starts with merging triangular faces of the triangular base complex to form a quadrilateral
base complex. Then the input points are taken for a final parameterisation.
In the fourth step, B-spline surface is used to reconstruct a surface. Finally, the re-constructed
surface is refined by subdividing the quadrilateral base complex (see Fig. 2.2-29).
Fig. 2.2-29 Control polyhedron (left), B-spline surface (middle) and refined surface (right)
Fig. 2.2-28 (a) A set of input points (left) and the approximating mesh (right)
Fig. 2.2-28 (b) Triangular base complex (left) and quadrilateral base complex (right)
65
2.2.3.4. Fitting of turbine blade surfaces
In the case of representing the surface of a turbine blade, Lin et al [96] use lofting methods to
create a surface model of a turbine blade from several cross sections. For approximating the cross
sections, they use two separate B-spline curves to model the low pressure and high pressure side
and two circular arcs to approximate the leading and trailing edge, as shown in Fig. 2.2-30, where
the blue curves are B-spline curves and the orange curves are circular arcs.
Fig. 2.2-30 Representation of a section curve, reproduced from [96]
The lofting method is also deployed by Lin et al. in [97]. The lofting algorithm is literally a curve
fitting method. The cross sections of a turbine are first fitted with B-spline curves with fixed
number of control points. Then B-spline curves are fitted in the vertical direction using the control
points corresponding to the same index number on each cross section. The accuracy of this
method is slightly poor than generic B-spline surface, but is more efficient in terms of computation.
Parameterisation
The B-spline surface fitting algorithm requires the Cartesian co-ordinates of each point to be
transformed into curvilinear iso-parameteric u and w co-ordinates. This process of transforming
from 3D into 2D is known as parameterisation. Many different parameterisation methods have
been developed for a 2D B-spline curve, such as uniform, exponential, universal, hybrid, chord
length and an extended exponential method proposed by Haron et al [98]. These methods also
work for a 3D problem by applying the same method twice, i.e. once for u and the other for w
[99]. Haron et al [98] also summarised the merits and drawback of these methods. In general, the
accuracy of these methods is limited and highly dependent on the shape of the object.
Nevertheless, some of these methods, such as the chord length method, are widely used for their
simplicity and fine accuracy in many less complex problems.
Chord length is the Euclidean metric between two neighbour points Pi, Pi+1 on the curve:
|PiPi+1| = √(𝑥𝑖+1 − 𝑥𝑖)2 + (𝑦𝑖+1 − 𝑦𝑖)
2 + (𝑧𝑖+1 − 𝑧𝑖)2 Eq. 2.2-3
For example, chord length between P1, P2 can be calculated by:
|P1P2| = √(𝑥1 − 𝑥2)2 + (𝑦1 − 𝑦2)
2 + (𝑧1 − 𝑧2)2
66
The u co-ordinate of one point on the curve is equal to the sum of all chord lengths before it
divided by the total chord length.
In terms of one B-spline segment, the u-coordinates are defined in the criterion [0,1], i.e.
𝑢1 = 0, and 𝑢𝑛 = 1.
𝑢1 = 0
𝑢2 =|𝑃1𝑃2|
|𝑃1𝑃2|+|𝑃2𝑃3| + |𝑃3𝑃4| + ⋯+ |𝑃𝑛−1𝑃𝑛|
𝑢3 =|𝑃1𝑃2|+|𝑃2𝑃3|
|𝑃1𝑃2|+|𝑃2𝑃3| + |𝑃3𝑃4|+⋯+ |𝑃𝑛−1𝑃𝑛|
⋮
𝑢n =|𝑃1𝑃2|+|𝑃2𝑃3| + |𝑃3𝑃4|+⋯+ |𝑃𝑛−1𝑃𝑛|
|𝑃1𝑃2|+|𝑃2𝑃3| + |𝑃3𝑃4|+⋯+ |𝑃𝑛−1𝑃𝑛|= 1
2.2.4.1. Barycentric mappings
Floater [100] demonstrated parameterisation of 3D points using a variation of Barycentric
mapping, known as shape preserving parameterisation. Barycentric mappings are widely used to
parameterise 2D images as well as in some 3D applications. It is based on the equation of affine
combination [101]:
∑𝜆𝑖𝑥𝑖
𝑛
𝑖=1
, ∑𝜆𝑖
𝑛
𝑖=1
= 1 Eq. 2.2-4
where 𝜆 are coefficients whose summation is equal to 1, 𝑥
can be vectors in which case, the equation represents a
linear combination.
In Barycentric mappings, 𝑥 either represents 3D points or the
parameterised representation of points, referred as the
barycentres. 𝜆 define the relationships between neighbouring
points in the triangular mesh, referred as barycentric
coordinates. The differences between different barycentric
mappings are basically the differences in weight functions
P2(𝑥2, 𝑦2, 𝑧2)
P3(𝑥3, 𝑦3, 𝑧3)
P𝑛(𝑥𝑛, 𝑦𝑛, 𝑧𝑛) P1(𝑥1, 𝑦1, 𝑧1)
Fig. 2.2-31 Triangulated model
67
which calculate barycentric coordinates.
In Floater’s [100] shape preserving parameterisation, the barycentric coordinates are weighted by
calculating the areas of triangles defined uniquely at each vertex for each barycentre. This weight
method preserves the solid angles at each vertex. He compared the quality of the shape
preserving parameterisation with two other parameterisation method, uniform and weighted least
square parameterisation by surface approximating a trangulated model shown in Fig. 2.2-31. The
result shows only the surface based on shape preserving parameterisation is smooth and accurate.
Fig. 2.2-32 Shape preserving parameterisation (left) and surface approximation (right)
Other well-known mapping methods are Wachspress mapping, discrete harmonic mapping and
mean value mapping [101].
The earliest work that demonstrates a weight function is done by Wachspress in 1975. The
equation he published is the Wachspress mapping [102]:
𝜆𝑖 =cot 𝛾𝑖−1 + cot 𝛽𝑖
𝑟𝑖2 Eq. 2.2-5
Discrete harmonic mapping is published by Eck et al [103] in 1995:
𝜆𝑖 = cot 𝛽𝑖−1 + cot 𝛾𝑖 Eq. 2.2-6
Mean value mapping is the most recent method developed by Floater [104]:
𝜆𝑖 =tan (
𝛼𝑖−1
2) + tan(
𝛼𝑖
2)
𝑟𝑖 Eq. 2.2-7
The unknowns used in these equations are shown in Fig. 2.2-33.
68
Fig. 2.2-33 The three mapping methods
Conclusion
For blade data acquisition, a fast and accurate method would be to use a laser sensor on a CMM. A
robot could also be used for acquiring data, but the positioning accuracy of the robot is likely to be
lower, likely to be around 32µm for a calibrated robot [36].
Free-form surfaces are commonly represented by B-spline surfaces. Non-uniform B-splines and
NURBS are typically useful in design-oriented tasks where the shape of the surface is required to
be modified. Uniform B-spine offers less flexibility in changing shapes but is the simplest form of B-
splines.
The Bezier surface and the B-spline surface are two good surface fitting techniques. Compared
with the Bezier surface, the B-spline surface is easier to control and eliminates the difficulties of
maintaining continuities. However, the Bezier surface is relatively easier to be programmed and is
probably sufficiently accurate for turbine blade surfaces.
Both fitting techniques require the surface to be parameterised which can be achieved using
Barycentric mapping methods such as Floater’s shape preserving parameterisation [100]. However,
Barycentric mapping requires surface triangulation. Delaunay’s triangulation calculates the
optimum triangulation for a given surface. Additional algorithm such as mesh growing algorithm
[86] should be used to extract the surface triangular mesh.
𝑣𝑖
𝛽𝑖 𝛾𝑖−1
𝑣𝑖−1
𝑣𝑖+1 𝑟𝑖
𝑣
𝑟𝑖
𝑣𝑖+1
𝑣𝑖 𝑣𝑖−1
𝑣
𝛼𝑖−1
𝛼𝑖
𝑣𝑖
𝛾𝑖
𝛽𝑖−1
𝑣𝑖+1
𝑣𝑖−1
(a) Wachspress mapping (b) Discrete harmonic mapping (c) Mean value mapping
69
Design of the Prototype Machine
The specifications as discussed earlier are as follows:
1. the accuracy must be lower than 0.3mm;
2. the system must have a high degree of automation;
3. it must make use of ultrasonics;
4. the cost of the system must be less than £45,000.
Since the cost of the system must be less than £45,000, the use of a five-axis machine is ruled out,
although the positioning accuracy obtainable with such a machine could be around five microns or
less. Therefore, the only other alternative is to use a six-axis robot.
Since an ultrasonic immersion probe must be used, an underwater environment must be provided
for inspection. Therefore, a water tank is required. Since the turbine blade is immersed in the
water tank and restricted by the limited space inside the tank, only part of the blade surface can
be measured at a time. In order to measure the entire blade, the blade must be rotated to allow
different parts of the surface to be inspected. Therefore, the system should be able to rotate the
blade through a specified angle, i.e. the system must have a rotary axis.
The use of an ultrasonic probe requires probe paths that are capable of maintaining normality
between the probe and blade surfaces during inspection. This requires knowledge of the blade
geometry. Since the cast blade is likely to be different from its CAD model, the blade has to be
reverse engineered. Therefore, the blade surfaces need to be measured and due to the low cost
requirement, a single point laser sensor should be used.
In order to achieve a higher level of automation, filling and draining of the water in the tank must
be controllable from a PC using software; therefore, float switches, a pump, a solenoid valve and a
compatible digital/analogue input/output device are required. The change of end effectors, i.e. the
tool attached to the face plate of the robot, should be completed with minimum human
intervention.
Finally, a rigid table is needed to accommodate the above-mentioned equipment.
70
The design of the system aims to create an inspection facility that uses an ultrasonic immersion
probe, a laser sensor, robot and computer to automate the inspection process. The proposed
design of the prototype machine, as shown in Fig. 3-1, consists of the following major
components:
1. a cast iron table that supports all the other components;
2. a FANUC robot;
3. an Olympus ultrasonic probe and an ultrasonic tool holder;
4. a Keyence laser sensor and a laser tool holder;
5. a water tank including a solenoid valve, a pump and two float switches;
6. a shaft-bearing system that holds blades;
7. a transmission system that drives the shaft;
8. a rotary axis pedestal for 6 and 7;
9. a tool change system that enables automatic tool change during the inspection process;
10. a wire mesh guard with two safety switches and relays;
11. other electronic equipment including a digital/analog I/O box and a PC, and
12. a fixture to hold the blade to be inspected.
71
Fig. 3-1 Rendered 3D model of the prototype inspection machine (mesh guard removed for clarity purposes)
72
Robot, ultrasonic probe and laser sensor
Robot
Because of this budget limitation, purchase of a five/six-axes machine tool, which would cost more
than £100k, was ruled out. Instead, it was decided that the actuator would be an industrial robot.
In this case, the inspection machine would have one additional rotary axis about which the spindle,
holding the blade, would be rotated.
The robot purchased was a Fanuc LRMate 200iD robot, as shown in Fig. 3.1-1 (a). It is a six-axis
robot and has a maximum reach of 717mm. The repeatability of the robot is ±0.02mm. Although
its motion accuracy is not specified by the manufacture, the accuracy of the predecessor of this
type of robot, LRMate 200iC, has been studied by Vincent et al [105].They found an uncalibrated
robot has a mean error of 0.195mm and a standard deviation of 0.15mm. After calibration, the
error was almost reduced by half. In more recent researches, Joubair et al [36] [106] calibrated
another 200iC robot, and they were able to reduce the mean error to 0.0132mm with a standard
deviation of 0.0102mm.
Purchased with the robot was a Fanuc R-30iB controller, as shown in Fig. 3.1-1 (b).
Communication between the controller and the PC can be established using different methods,
such as RS232 and TCP/IP protocol. More details of the robot and the controller are discussed in
Chapter 4.1
Fig. 3.1-1 The purchased Fanuc LRMate 200iD robot and R-30iB controller
(a) (b)
73
Ultrasonic probe and ultrasonic card
The ultrasonic immersion probe is a V316-SU transducer manufactured by Olympus, as shown in
Fig. 3.1-2(a). It is a point target focus (PTF) probe with a focal length of 20.32 mm. It is a single
element transducer of diameter 3.175 mm, producing 20MHz longitudinal waves with quarter
wavelength layer acoustically matched to water.
The ultrasonic card is a PCIUT3100 PCI card manufactured by USUltratek, as shown in Fig. 3.1-2(b).
The card can transmit ultrasonic pulse and receive returned ultrasonic data via a single port, which is
suitable for communicating with a single element transducer. The card is capable of sending
ultrasonic pulses with a maximum frequency of 17MHz triggered with software at a rate set by the
user. The returned ultrasonic data can be captured at a minimum rate of 100MHz, i.e. every 10ns.
Due to this high data acquisition rate, the captured data are temporarily stored in the card’s internal
memory and when the amount of data stored reaches the buffer size, which can be defined by the
user, all the data in memory are transferred to the PC via PCI port. With currently installed amount of
memory, the card can store up to 16382 data points (i.e. the maximum buffer size).
Other adjustable parameters include pulse voltage, damping, receiver gain, DC offset, low-pass
filter, high-pass filter, rectifications and adjustable trigger delay.
Fig. 3.1-2 (a) An Olympus V316-SU ultrasonic probe and (b) a USUltratek PCIUT3100 ultrasonic card
3.1.2.1. Focal zone of the Olympus V316-SU ultrasonic probe
Given the frequency and diameter of the probe, the near field length, 𝑁, of an immersion probe
can be calculated with Eq. 2.1-3 (see Chapter 2.1.3). For a probe of the same frequency and
diameter as the V136-SU, the near field length in water at 20°C (𝑉 = 1482𝑚/𝑠) is calculated as:
𝑁 =𝐷2𝑓
4𝑉=
3.1752 × 20 × 106
4 × 1482 × 103= 34.01𝑚𝑚
(a) (b)
74
Normalised focal length of V136-SU can then be calculated using Eq. 2.1-3:
𝑆𝐹 = 𝐹 𝑁⁄ =20.32
34.01= 0.60
Therefore, the normalised beginning and ending point of the focal zone are 𝑆𝐵 = 0.45 and 𝑆𝐸 = 0.9
respectively, as can be found in Fig. 2.1-4. This means the focal zone starts at 15.3mm and ends
at 30.609mm from the transducer face.
Laser sensor and analogue data acquisition
In the current marketplace, the most widely used laser sensors for distance gauging are single-
point laser sensor (also known as 1D laser sensors), and beam laser sensors (also known as 2D
laser sensors). A 2D laser sensor offers considerable superiority in measuring efficiency over a 1D
laser sensor. However, due to oscillation and heating problems, and for the same price, a 2D laser
sensor is often inferior to a 1D laser sensor in terms of accuracy and repeatability.
The accuracy of a laser sensor also varies with its measurement range. Usually the narrower the
measurement range is, the higher the accuracy. According to ELE, when the blade is held
horizontally, the difference in height between the lowest and the highest points on any cross
section is approximately 30mm.
As the budget was limited, a 1D laser sensor, Keyence IL-S065 shown in Fig. 3.1-3 (a), was
purchased. Specification of the laser sensor is shown in Table 3.1-1. The laser sensor is powered
via a compatible amplifier IL-1000 which also translates data acquired from the laser head into
distance reading presented on the imbedded screen. The amplifier also includes output cables that
transmits laser data in analogue form.
Fig. 3.1-3 (a) A Keyence IL-S065 CMOS laser sensor and (b) a Keyence IL-1000 amplifier
(a) (b)
75
Table 3.1-1 Specifications of a Keyence IL-S065
Measurement range 55mm to 75mm
Spot diameter (at 65mm) 55 x 1700µm
Repeatability 2µm
Accuracy 55mm to 65mm ±5µm
55mm to 75mm ±7.5µm
The analogue data from the amplifier output can be transmitted to a PC via a USB DAQ device, for
example a Measurement Computing USB-1208FS as shown in Fig. 3.1-4. This device receives
analogue data input and transmits the data to the PC via a USB cable at a maximum rate of
50kB/s.
Fig. 3.1-4 A USB-1208FS DAQ by Measurement Computing
76
Design of the water tank
The water tank is one of the essential components of the inspection rig. The tank must be
sufficiently large to accept the biggest blade in the production range, which, according to ELE
Advanced Technologies Ltd, can be 500 mm long and 200 mm wide. Since a large amount of water
is held in the tank, the side walls and the floor of the tank are subject to pressure. Thus, the tank
must be strong enough to avoid excessive deflection that may affect the accuracy of other
components, e.g. the rotary axis. Therefore, a finite element analysis is required to check the
deformation of the tank and ensure that the maximum stress is within the safe working limit for
the material.
To reduce the cycle time, automatically filling and draining of the tank should be completed within
a very short time, say one minute. Therefore, to automate the process, electronic equipment such
as a pump, solenoid valves and float switches are required. For completing the task of filling or
draining within a limited time, a high flow rate is expected, so calculations of flow rate are required
to select an appropriate pump, with hoses and pipes that match the output of the pump. A high
flow rate may give rise to water splashing problems, which must be avoided to prevent damage to
non-waterproof electric devices and non-stainless steels. The selection of these electronic
equipment is discussed in Chapter 3.4.
Besides, a transparent window is needed for monitoring the inspection process. The potential risks
of leaking must be handled.
The key considerations involved in the design are summarised as follows:
- Large enough to accommodate a turbine blade up to 500mm in length and 200mm in
width
- Be stiff enough to avoid excessive deflection when fully loaded with water.
- Fast filling and draining of the tank.
- A transparent window in one of the side walls of the tank.
- Complete water seal and ensure that there is no water splashing
To meet these requirements, a tank was designed.
Overview of the design
Overall, as shown in Fig. 3.2-1 (a), (b) and (c), the water tank is 1096mm in length, 600mm in
width and 403mm in height. The design of the water tank, in general, consists of four parts (as
labelled in Fig. 3.2-2): (1) a tank body, (2) a Perspex window, (3)-(5) pipe connectors and (6) an
77
inlet manifold. Parts (3-5) are the pipe connectors, (3) being the overflow2, (4) the inlet, and (5)
the outlet. The inlet manifold was designed to reduce water splashing during the filling process.
Apart from the Perspex window, all parts are made of stainless steel.
The internal dimensions of the tank, neglecting the folded structures, tubes and inlet manifold, are
1000*494*400 mm, thereby yielding a capacity of approximately 20 litres. The overflow was
designed 350mm above the bottom of the tank; therefore, the maximum operational capacity is
approximately 17.5 litre. Pipe connectors and the inlet manifold were welded onto the tank body.
The perspex window was fixed by twenty M5 bolts and nuts and the gap between the Perspex
window and the tank body was sealed with silicon glue.
2 On the parts list, the OD50 stands for 50mm outer diameter
Fig. 3.2-1 Different views of the water tank (units in mm)
(a) Front view (c) Left view
(b) Top view
(d) Isometric view
78
Fig. 3.2-2 An exploded view of the water tank
Detailed parts and dimensions
3.2.2.1. The tank body
The main tank body is made of five 3 mm thick stainless steel sheets, welded together. The sheets
that form the front and back walls are 1000*475 mm; the sheets for the two side walls are
646*400 mm; and the sheet for the bottom is 1006*500 mm.
The sheets for the front, back and two side walls are oversized to account for the ribs that run
along the length of the tanks at the top. The top two ribs were formed by folding the sheets as
shown in Fig. 3.2-3 (b), (c) and (d) whereas two 50*50*3 mm tubes were welded onto both the
front and back walls at the bottom of the tank, as can be seen in (d).
On the front wall of the tank, a 200mm*750mm cut-out was made for fitting the Perspex window.
Twenty M5 clearance holes were drilled around the cut-out for fixing the Perspex window. Four
trapezium plates were welded at the bottom in the four corners, as shown in (b) and (c). A
Ø6.6mm hole was drilled on the surface for fixing the tank onto the table.
On the right wall, there are three holes of different sizes. The bottom left one is 40mm in diameter
for the water outlet, with its centre 20mm from the bottom inner surface of the tank, such that the
hole is tangent to the base of the tank. The second outlet hole is 50mm in diameter, with its centre
Inlet manifold
79
28 mm from the outer bottom surface. The connector was designed to be inserted into the hole to
let the surface of the ring on the plane of the inside wall. The third hole in the right wall is for the
overflow. This hole is at a height of 350mm from the inner bottom surface of the tank and this
fixes the maximum water level i.e. 350mm.
(a) Front view
(b) Top view
(c) Details A
(d) Section B-B
80
Fig. 3.2-3 Detailed dimensions of the water tank body (units in mm)
On the left wall, a Ø162mm hole was machined at a height of 215mm from the outside bottom
surface. This hole was designed to fit Ø160mm protrusion the spindle-bearing housing, as shown
in Fig. 3.3-3(b) The height of the hole was determined so that even for the biggest blade, the
water level is 32mm above the top of the blade and there is 112 mm clearance from the bottom of
the tank. The 112mm clearance allows for additional items such as the inlet manifold.
3.2.2.2. The Perspex window
The Perspex window was made from an 810mm*260mm*6mm Perspex panel.
A pattern of twenty holes was drilled in the front wall of the tank. These holes are all Ø5.5mm
drilled through the material so that they can accept M5 bolts which fix the Perspex window to the
front wall of the tank. On its back surface, there is a cuboid protrusion which is 1mm high, 199mm
wide and 749mm long, as shown in Fig. 3.2-4 (b), (c) and (d).
The Perspex window was installed from the inside of the tank with one surface being in contact
with the back surface of the front wall and the other in contact with the water. The 1 mm
protrusion on the back surface, as shown in (d), was fitted into the rectangular cut-out on the
front wall of the tank; silicon glue was applied in between the stainless steel and Perspex sheets to
make the joint water-tight.
(e) Right view
(f) Left view
81
3.2.2.3. The pipe connectors
Fig. 3.2-5 shows the three pipe connectors i.e. the overflow, inlet and outlet. All the connectors
were welded onto the right wall of the tank. On each connector, two trapezium plates at an angle
of 90° were designed to be welded onto the tank to provide extra strength for welded connections
between the pipe and the tank. The internal diameters of all the connectors are 39.5mm with BSP
G 1.25 ins threads. The outer diameters of the overflow and the outlet connectors are 50mm. The
outer diameter of the inlet connector is 49mm and a 3mm protrusion was designed at the end
which can be fitted into the hole on the tank. A flat surface was cut on the bottom of the outlet to
create a 3 mm wall thickness; thus the bottom surface of the outlet is in the same plane as the
base surface of the tank.
Fig. 3.2-4 Detailed dimensions of the Perspex window (units in mm)
(a) Front view
(b) Top view
(d) Details A
(c) Side view
82
Fig. 3.2-5 Detailed dimensions of the pipe connectors (units in mm)
(a) Overflow
(b) Inlet
(c) Outlet
83
3.2.2.4. The inlet manifold
Fig. 3.2-6 Detailed dimensions of the inlet manifold (units in mm)
The inlet manifold was designed to reduce the turbulence caused by the high speed flow at the
inlet.
It is assumed that the pump must be able to raise the water level to the required height in less
than one minute. The amount of water that has to be pumped into the tank can be calculated as
follows:
𝑉 = ℎ𝑒𝑖𝑔ℎ𝑡 ∗ 𝑎𝑟𝑒𝑎 = (350 − 100) ∗ 500 ∗ 1000 ∗ 10−6 = 125 𝑙𝑖𝑡𝑟𝑒, 𝑜𝑟 0.125𝑚3
Based on the assumption that the hydraulic diameter, at the inlet, is equal to the diameter of the
pipe, the calculation of Reynolds number is shown below:
𝑄𝑖𝑛 =0.125
60= 0.00208𝑚3/𝑠
𝑣𝑖𝑛 =𝑄𝑖𝑛
𝐴𝑖𝑛
=0.00208
(0.0395
2)
2
𝜋
= 1.7000𝑚/𝑠
𝑅𝑒𝑖𝑛 =𝜌𝑣𝑖𝑛𝐷𝐻,𝑖𝑛
𝜇=
1000 ∗ 1.7 ∗ 0.0395
0.001= 67150
The calculation shows the flow forward speed is 1.7m/s at the inlet and the Reynolds number is
67150. This shows that the flow is fully turbulent. This suggests that the speed of the flow has to
be reduced.
The exit on the designed inlet manifold is a rectangle of 194mm wide and 16mm high. The
hydraulic diameter at the exit of the inlet manifold is four times the area of the rectangle divided
by the length of the perimeter and the volumetric flow rate is constant. Therefore, the Reynolds
number at the exit is given by:
84
𝐷𝐻,𝑜𝑢𝑡 =4 ∗ 𝐴
𝐶=
4 ∗ 0.194 ∗ 0.016
0.194 ∗ 2 + 0.016 ∗ 2= 0.02956𝑚
𝑣𝑜𝑢𝑡 =𝑄𝑜𝑢𝑡
𝐴𝑜𝑢𝑡
=0.00208
194 ∗ 16 ∗ 10−6= 0.67010𝑚/𝑠
𝑅𝑒𝑜𝑢𝑡 =𝜌𝑣𝑜𝑢𝑡𝐷𝐻,𝑜𝑢𝑡
𝜇=
1000 ∗ 0.67010 ∗ 0.02956
0.001= 19808.156
The calculation shows the Reynolds number at the exit of the inlet manifold is reduced by 29.5%.
Due to the limited amount of time, a CFD analysis was not performed. If the performance of the
inlet manifold is not acceptable, the flow rate can be adjusted to reduce turbulence in the
prototype machine. However, if another machine is built, and if a better solution is required, then a
CFD analysis will become necessary.
Finite element analysis of the water tank
Although the tank is not a critical component of the system, a finite element analysis of it was
performed in order to determine its deflection especially that of the left side wall, excessive
deflection of which may affect the performance of the seal between the rotary axis housing and
the water tank (see Chapter 3.3).
To assess the stiffness of the design, a finite element analysis (FEA) was carried out. It is noted
that as a first approximation, the pipe connectors were ignored.
The boundary conditions were specified as follows:
The bottom of the tank is completely constrained.
Pressure loads are added to all the vertical walls of the tank. The pressure loads are
defined by the following equation:
𝑃 = 𝜌𝑔 ∗ 𝑧𝑚𝑎𝑥 − 𝜌𝑔𝑧 = 1000 ∗ 9.81 ∗ 0.4 − 1000 ∗ 9.81 ∗ 𝑧 = 3924 − 9810𝑧
where z is the height displacement from the bottom of the tank. The model simulates the pressure
load generated by water that is filled beyond the overflow and up to the top of the tank.
As can be seen from Fig. 3.2-7, the FEA suggests that the maximum von Mises stress, 3.62MPa,
occurs at the edge of the cut-out on the front wall. Since the elastic limit for stainless steel is
approximately 200 MPa, it gives a factor of safety of well over 50. According to Fig. 3.2-8, the
maximum displacement, 0.0406mm, occurs in the middle of the Perspex window. The wall which is
in contact with the shaft housing has a maximum displacement of 0.0032mm. These displacements
are very small and will not affect the performance of the inspection machine.
85
Fig. 3.2-7 Finite element stress analysis of the water tank
Fig. 3.2-8 Deflection of the water tank
Max
86
Float switches, pump and solenoid valve
As mentioned earlier, the tank must be filled and drained automatically i.e. the water level must be
adjusted automatically during inspection. During laser scanning, the water level must be lowered
until the blade is fully exposed to air so that refraction of laser beam can be avoided. Completely
emptying the tank is unnecessary. Thus, a float switch is needed to determine the minimum water
level. On the other hand, during ultrasonic scanning, the blade must be submerged in water with
the water level at least 30 mm above the blade surface. Therefore, a second float switch is needed
to stop filling the tank when the appropriate water level is reached. Automation of the filling and
drainage further requires a pump and a solenoid valve controlled by two relays. The relays are
connected to the digital ports of the digital I/O box which are controlled by a program coded in
C#.
Two SSF212 float switches, as shown in Fig. 3.2-9 (a), were purchased from Cynergy3 and they
are installed on a rack/stand placed inside the water tank, but at different heights. Float switch A is
installed slightly below the overflow, approximately 340mm from the bottom of the tank; and float
switch B is installed at approximately 100mm from the bottom. Float switch A determines the
maximum level of water that can be pumped into the tank, while float switch B determines the
minimum water level when the solenoid valve is closed during the draining stage. It is noted that
the mentioned heights of the float switches only represent two extreme conditions and are used
for determining the specification of the pump; both values can always be adjusted to heights which
are appropriate for a particular blade size.
In order to determine the pump size, it is assumed that the pump must be able to raise the water
level to the required height in less than one minute. As calculated in Chapter 3.2.2.4, a pump with
a minimum flow rate of 125litre/min is required.
A Flotec VIP 130/6 Auto pump (see Fig. 3.2-9 (c)) has a maximum flow rate of 130 litre/min and
therefore this pump is adequate to raise the water level from 100mm to 350mm within 1 minute.
The new Reynolds number at the exit of the inlet manifold (see Chapter 3.2.2.4) can be calculated:
𝑣 =𝑄
𝐴=
0.1360
194 ∗ 16 ∗ 10−6=
0.69802𝑚
𝑠
𝑅𝑒 =𝜌𝑣𝐷𝐻
𝜇=
1000 ∗ 0.69802 ∗ 0.0395
0.001= 27571.952
The solenoid valve should match the pipe size, i.e. 1 ¼ inch, as well as the required flow rate, i.e.
130litre/min. A Series 210 solenoid valve was purchased from Asco Joucomatic (see Fig. 3.2-9 (b)).
It has a pipe diameter of 1.25” and a maximum allowable flow rate of 213 litre/min.
87
Fig. 3.2-9 The purchased Cynergy3 SSF212 float switch, Asco Joucomatic S210 valve and Flotec VIP 130/6 Auto pump
(a) Float switch
(c) Pump (b) Solenoid valve
88
Design of the shaft-bearing system
The shaft-bearing system is a part of the rotary axis, the blade being rotated about this axis.
During the inspection process, this system carries the blade and cooperates with the robot to
accurately rotate the blade by pre-determined angles. The mechanical components that need to be
designed are the shaft, housing and bearings.
Because the accuracy of positioning the blade plays a critical role in the inspection process, this
part of the machine must be designed and manufactured with appropriate tolerances. In order to
keep the deflection caused by the weight of the turbine blade to a very small value, the rigidity of
the system, especially the rigidity of the shaft, is one of the greatest concerns. Since part of the
system is submerged under water, water sealing is another important issue to be taken into
consideration.
The key considerations involved in the design are summarised as follows:
- High stiffness.
- High positioning accuracy.
- Complete water seal.
- Cost effectiveness and ease of manufacturing.
89
Overview
The shaft-bearing system, as shown in Fig. 3.3-1 consists of three machined bodies: a shaft-
bearing housing, an in-tank flange and a shaft.
The housing is a cylindrical component, which can be machined on a turning machine. It was
designed to accommodate three bearings: two front bearings and one rear bearing. The additional
bearing in the front reduces the load on the other front bearing as well as the effective distance of
bending force exerted on the shaft thereby reducing the bending moment. The arrangement of
these bearings are discussed later in this section. The shaft is also a cylindrical component
designed with several steps for fixing bearings as well as a keyway at the both end to allow the
use of keys for torque transmission. The In-tank flange is used to fix the shaft-bearing system on
the tank wall as well as seal water path ways. All components of the system can be clearly seen in
Fig. 3.3-2.
Determination of the dimensions and tolerances of the shaft and the housing were referred to
standards provided by SKF [107], a company specialised in bearing and seals manufacturing. The
recommended tolerances for shaft and housing for SKF 60142RS1 bearings under “light and
variable loads” are H7 and k6 respectively. Basic static load rating is 31kN and fatigue load limit is
1.3kN.
This design cooperates with the pedestal shown in Chapter 3.5.
Fig. 3.3-1 Different views of the shaft-bearing system (units in mm)
90
As all components may be in contact with water, the system must be made of non-rusting
material, such as aluminium alloy and stainless steel. To avoid excessive displacement caused by
bending when the blade is attached, the system must also be sufficiently stiff. Therefore, stainless
steel was chosen over aluminium alloy.
Fig. 3.3-2 An exploded view of the shaft-bearing system
91
Designed parts and detailed dimensions
The system was fixed on a supplementary pedestal (see Chapter 3.5) with four M8 tapped holes
(B1, B2, B3 and B4) designed on the shaft-bearing housing as shown in Fig. 3.3-3 (e). As the
system is one of the key components that determine the relative position of the test blade with the
robot base coordinate system, the positioning of the system must be repeatable. Therefore, in
addition to the tapped holes, two 6mm H6 dowel holes (A1 and A2 in Fig. 3.3-3 (e)) were designed
to lock the relative position between the system and the pedestal.
The system is also in contact with the water tank. A Ø160mm protrusion was designed on the front
surface of the housing, as can be seen in Fig. 3.3-3 (a) and (b). This protrusion can be loosely
fitted into the Ø162mm hole on the water tank wall as shown in Fig. 3.2-3(f). The front face of the
protrusion was designed with six M5 tapped holes evenly arranged along a pitch circle with a
radius of 70mm. These holes are coupled with six Ø5.2mm clearance holes on the flange shown in
Fig. 3.3-4, for bolting the housing and in-tank flange together. It is noted that the protrusion was
designed 0.1mm longer than the thickness of the water tank. This clearance reduces the effect of
water tank deformation on the system.
As seen in Fig. 3.3-3 (d), the interior of the housing was designed with three bores of two different
sizes. The two H6 tolerated Ø110mm bores were designed to accommodate the SKF bearings. It is
noted that although H7 is recommended by SKF [107], H6 was selected for better fitting accuracy.
The 55mm deep Ø110mm bore was also used to position the in-tank flange on the h5 Ø110
cylindrical surface, as shown in Fig. 3.3-4(b). The H6 and h5 tolerance set suggests a sliding fit.
92
The shaft is the most complicated component in this system. It has several different diameters to
fit and hold various components. As shown in Fig. 3.3-5(b) and (d), from the front face, the first
section, which is Ø65mm and h11 toleranced, was designed to position and hold the fixture, which
in turn will hold the blade. The fixture can be locked in position with the M10 tapped hole on the
front face of the shaft (see Fig. 3.3-5(a)) and the ISO standard keyway machined on the cylinder.
This diameter was also designed to fit two rotary seals; thus, the surface must be plunge ground
to 0.3µm Ra to reduce wear on the seals [108]. The two symmetric rectangular grooves, each
10mm wide, enable the use of a spanner for holding the shaft during installation of the fixture and
Fig. 3.3-3 Detailed dimensions of the shaft-bearing housing (units in mm)
(a) Front view (rotated by 90° counter-clockwise)
(b) Top view (c) Back view (rotated by 90° counter-clockwise)
(d) Section A-A
(e) Bottom view
93
test blade. The next section, which is Ø70mm and k6 tolerated [107], fits the inner rings of the
two front bearings. The M70x2 threads were designed for the lock nut.
Fig. 3.3-4 Detailed dimensions of the in-tank flange (units in mm)
(a) Front view
(b) Top view
(c) Section C-C
(d) Detailed view D
Fig. 3.3-5 Detailed dimensions of the shaft (units in mm)
(a) Front view (b) Side view (c) Back view
(d) Top view
94
From the back, the 24mm, g6 tolerated diameter with a ISO standard 8mm keyway was designed
for fitting a timing pulley, which is a part of the transmission system as shown in Chapter 3.4. The
M8 tapped hole on the back face of the shaft (see Fig. 3.3-5(c)) can be used to assist in the
installation of the pulley. The next diameter, Ø70mm and k6 tolerated, fits the rear bearing. The
2.65mm wide groove was designed for an ANSI B 27.7M circlip (see the parts list in Fig. 3.3-2).
Water sealing mechanism
The in-tank flange was designed to seal the gap between the shaft and the water tank. This is
done by blocking the water paths between (i) the shaft and the flange and (ii) the water tank and
the flange. As can be seen in Fig. 3.3-6, there are three possible paths for the water to leak
through the flange:
1. path A is the gap between the shaft and the flange;
2. path B is the gap between M5 bolts and the flange;
3. path C is the gap between the water tank and the flange.
In order to block path A, two rotary seals were fitted into the gap. The outer diameters of the
rotary seals fitted in the H8 r44.97mm bore on the flange shown in Fig. 3.3-4 (c) and the inner
diameters fitted on the h11 Ø 65mm cylindrical surface on the shaft shown in Fig. 3.3-5 (b) and
(d). Path B is blocked with washer seals and path C is blocked with an O-ring of a cross-sectional
diameter of 5.3mm. The groove for the O-ring, as shown in Fig. 3.3-4 (d), follows the standard
described in Parker O-Ring Handbook [109] and provides a 16.6% compression ratio.
Fig. 3.3-6 Seals and possible water paths
Path A
Path B
Path C
Bearings
Water tank
In-tank
Lock nut
Seals
95
Bearing arrangement
The bearings must be arranged properly to avoid axial movement at the front of the shaft and
allow changes in shaft length caused by thermal expansion. This requires that the front bearings to
be fixed on both the shaft and housing, i.e. namely fixed bearings, while the bearings at the other
end must enable axial displacement, i.e. namely floating bearings.
In this design, the front two bearings were fixed by using the shoulders on the shaft and housing,
the lock nut and the inserted part of the in-tank flange, which can be clearly seen in Fig. 3.3-7.
The rear bearing was arranged as the floating bearing with an open end on the outer ring and a
slot with 0.1mm clearance for its inner ring.
It is noted that in the housing, the depth of the bore for fitting the two front seals is 55.00mm−0.05+0.00
(see Fig. 3.3-3 (d)). The width of one bearing is 20.00mm+0.05+0.025. Therefore, deducting the width for
two bearings, the depth of the bore left for the insertion of the in-tank flange has a worst-case
maximum of 15mm and a worst-case minimum of 14.85mm. The length of the inserted part of the
in-tank flange is 15.12mm+0.00+0.01, which suggests an extra length in worst-case minimum 0.12mm
and worst-case maximum 0.28mm. This ensures sufficient pressure is applied on the outer ring of
the front bearing.
FEA of the shaft
Due to the weight of the blade (maximum of 25kg according to ELE), the shaft will bend but the
amount by which it does depends on the design of the shaft, the overhang distance and the weight
of the blade. However, even if the shaft is bent slightly, due to its length of the blade, the
displacement at the tip of a blade can be significant. To determine the extent by which the shaft
deflects, a FEA was performed. Fig. 3.3-8, shows the components of the system that have
modelled.
They include a section of the shaft with two front bearings, a simplified fixture for the blade and a
turbine blade with its fir-tree root. The two bearings were modelled as a solid cylinder with a
Bearings
Water tank
Seals
In-tank flange
Fig. 3.3-7 A sectional view of the shaft-bearing system
Lock nut
Floating bearing Fixed bearings
96
central hole fit to the shaft. The turbine blade was constructed as a solid body with no subsurface
features, such as cooling channels. The total weight of the blade and the fixture was 51.65kg.
Fig. 3.3-8 Model of the blade, fixture and the shaft for analysis (units in mm)
Several assumptions were made in this finite element analysis. They are listed below.
1. The joint between the bearings and the shaft was assumed to be rigid. Thus, any relative
displacement between the bearing and the shaft was ignored.
2. The fixture was rigidly connected to the shaft and so was the blade to the fixture.
3. The effect which the cooling channels have on the position of the centre of gravity of the
blade was neglected.
4. The effect of water pressure was ignored.
The setup for this FEA is described as follows:
The bearings were fully constrained on the back surface and the side surface.
97
The only load applied was the body force.
The material of the turbine blade was Inconel 718 and the material of the fixture, the shaft
and bearings were stainless steel. Mechanical properties of the materials are shown in
Table 3.3-1.
Table 3.3-1 Mechanical properties of the materials used in FEA
Material Density
(kg/m3)
Young’s
modulus
(x103MPa)
Shear
modulus
(x103MPa)
Poisson’s
ratio
Yield
strength
(MPa)
Tensile
strength
(MPa)
Inconel 718 [110]
[111] 7445.894 199.948 77.221 0.29 1034.214 1241.056
Stainless steel 7999.492 192.984 85.978 0.30 250.000 540.000
Fig. 3.3-9 Finite element stress analysis of the blade, fixture and the shaft
Fig. 3.3-10 Deflection of the blade, fixture and the shaft
98
As shown in Fig. 3.3-9, the maximum von Mises stress of 10.9MPa occurs in the vicinity of the
shoulder on the shaft and the locknut and the resulting stress causes a displacement of 0.002 mm.
From Fig. 3.3-10, the maximum displacement, 0.035mm, occurs at the tip of the blade, which is
acceptable.
99
Transmission system for the shaft
The transmission system was designed to accurately rotate the shaft through a specific angle as
required by the inspection process. Since the blade is to be rotated at a very low speed, the
maximum available torque of the motor can be utilised.
The key considerations involved in the design are summarised as follows:
- Capable of providing enough torque to drive the shaft and the heaviest blade
- The resolution of the angle of rotation to be less than 0.1°.
As can be seen in Fig. 3.4-1, the unit consists of four components: a stepper motor with a gearbox
(○1 ), a 60-teeth timing pulley (○2 ), a 12-teeth timing pulley (○3 ) and a 270-teeth timing belt (○4 ).
The stepper motor was purchased from Zapp Automation, model number SYS57STH56-3008B. This
motor is capable of producing a maximum torque of 1 Nm at 300 PPS. Each step rotates the shaft
by 1.8° and this angle can be reduced by one sixteenth with micro stepping offered by its
controller. The gearbox is from Siboni, model number RE55 NEMA23. It delivers an input-to-output
ratio of 1:6. Therefore, the combination of the gearbox and the motor produces 6 Nm at 50 PPS
and each step results in a 0.3° rotation of the gearbox output shaft. It is noted that this gearbox
Fig. 3.4-1 Transmission system assembled on the shaft (units in mm)
100
has a 5 arcmin, i.e. approximately 0.083°, of backlash which should be compensated when the
direction of the shaft is reversed.
The 60-teeth and 12-teeth pulleys were attached to the motor shaft and gearbox output shaft,
respectively. This pulley set introduces a 1:5 output-input ratio, which further increases the torque
available to 30 Nm at 10 PPS. The step resolution is also reduced to 0.06°. Furthermore, with
micro stepping, the minimum achievable angle per step is 0.00375°. However, it was found
experimentally that the micro stepping introduces inaccuracy and should be avoided when
possible.
The specifications of the pulleys and the belt are listed in Table 3.4-1 and the dimensions of the
motor and gearbox are shown in Fig. 3.4-2.
Table 3.4-1 Specifications of timing pulleys and belt (all units in mm)
Part number No. of teeth Width across teeth Outer diameter Length
12L075 timing pulley 12 25.4 36.38 N/A
60L075 timing pulley 60 25.4 181.91 N/A
270L075 timing belt 270 19.05 N/A 685.8
(a) An SYS57STH56-3008B motor by Zapp Automation
(b) A RE55 gearbox by Siboni
Fig. 3.4-2 Detailed dimensions of the motor and the gearbox (units in mm)
101
The labelled dimensions in the figure are shown below (units in mm):
L1 L2 L3 L4 D1 D2 D3 D4
52 25 3 60 6.35 38.1 66.67 5.5
102
Design of the rotary axis pedestal
The rotary axis pedestal which carries the shaft-bearing and transmission systems plays two
important roles. The first is to raise the height of the shaft thereby allowing the shaft to pass
through the hole in one of the walls of the water tank. The second is to provide a platform so that
the shaft-housing system can be repeatedly positioned accurately.
The key considerations involved in the design are summarised as follows:
- High rigidity.
- High positioning accuracy and repeatability.
- Cost effectiveness and ease of manufacturing.
Overview
The pedestal is made of mild steel and has an overall length of 340mm, a width of 198mm and a
height of 140mm, as can be seen in Fig. 3.5-1. The pedestal consists of two distinct parts: a 30mm
thick plate on the top used for mounting the rotary axis, i.e. the shaft-bearing system, as well as
the transmission unit, and a base block underneath for raising the rotary axis to the required
height and fixing the pedestal onto the table.
As can be seen in Fig. 3.5-3, the shaft-bearing housing was bolted onto the pedestal top plate
from the bottom of the plate with four M8 bolts through holes C1, C2, C3 and C4 (see Fig. 3.5-7).
These holes were countersunk so that the bolt heads are below the surface of the pedestal top
plate which can then be placed over the base block. Two locating pins were used to ensure that
the housing and top plate are always assembled in the same position.
Fig. 3.5-1 Different views of the rotary axis pedestal (units in mm)
103
The top plate of the pedestal was bolted onto the base only after the shaft-bearing housing was
fixed. Five M8 bolts were arranged closely around the area where the housing was fixed, as can be
seen in Fig. 3.5-4. It is noted that one of the bolts was placed in line with the rotary axis to reduce
displacement caused by bending. Repeatable positioning between the top plate and the base block
is ensured by two 6mm dowel pins inserted in holes A1 and A2 on the top plate (see Fig. 3.5-7)
and holes C1 and C2 on the base block (see Fig. 3.5-8 ).
Fig. 3.5-2 Different views of the rotary axis pedestal with shaft-bearing system and transmission system assembled
Fig. 3.5-3 Assembling the shaft-bearing system onto the rotary axis pedestal
104
Apart from the shaft-bearing system, the transmission system was also attached to the top plate.
This was done with the help of a mounting plate, as shown in Fig. 3.5-5 (a). The motor and gear
box was first fixed on to the mounting plate without the 12-teeth timing pulley installed, as shown
in Fig. 3.5-5 (b) and (c); then the mounting plate was bolted to the top plate through the slot at
the bottom. The tension of the belt can be varied by adjusting the position of the plate sideways in
the slot. Details of this mounting plate are discussed later in this section.
Fixing the pedestal onto the table was done with four M10 bolts and two locating dowel pins, as
can be seen in Fig. 3.5-6.
Fig. 3.5-4 An exploded view of the rotary axis pedestal
Fig. 3.5-5 Assembling the motor and gearbox onto the rotary axis pedestal
(a) (b) (c)
106
Detailed dimensions
Fig. 3.5-7 Detailed dimensions of the top plate (units in mm)
(a) Back view
(c) Side view (b) Bottom view
107
Fig. 3.5-8 Detailed dimensions of the base (units in mm)
(a) Front view (b) Side view
(c) Top view (d) Isometric view
108
As shown in Fig. 3.5-7, the top plate is 290mm*180mm*30mm. The distance between the two
mounting holes drilled for fixing the mounting plate, as seen in Fig. 3.5-7 (a), is 20mm, which
leaves a distance of 24.5mm for tensioning the belt in the 44.5 mm slot (see Fig. 3.5-9 (d)). The
head length for a M8 pocket head bolt (ISO 4762) is 8mm−0.36+0.00; therefore, the countersunk depths
of holes C1, C2, C3 and C4 in the top plate were determined to be 8.50mm.
The base block, as shown in Fig. 3.5-8, is a rectangular block with steps around it on three sides.
On the one of the steps, there are two 52mm wide cut-outs. These two cut-outs were designed for
locating blocks (see Fig. 3.7-7) which can be fitted in the slots and used as a backup positioning
method in case any of the two locating pins shifts.
The mounting plate is 10mm thick with four chamfered corners. A Ø22mm hole with a Ø32mm
+0.05/+0.02, 2.6mm countersink was designed to fit the 32mm boss on the gearbox, as shown in
Fig. 3.4-2 (b).
(a) Front view
(b) Side view
(c) Top view
(e) Isometric view
(d) Back view
Fig. 3.5-9 Detailed dimensions of the mounting plate (units in mm)
109
Design of a tool change system
Since there are two tools (ultrasonic probe and laser sensor) and since only one of them is
attached to the face plate at any one time, an automatic tool change system is required.
Fig. 3.6-1 Robot face plate
The robot face plate is a standard robotic mounting plate, as shown in Fig. 3.6-1, which has a
4mm dowel hole and four M5 mounting holes. There are a variety of pneumatic tool grippers that
adapt to the face plate available in the marketplace. Fig. 3.6-2 shows one of the pneumatic tool
change systems, SWS005, from a German tool gripper manufacturer, Schunk. It has a maximum
payload of 8kg and a repeat accuracy of 0.01mm.
Fig. 3.6-2 An exploded view of a Schunk SWS005 pneumatic tool change system
The system mainly consists of two parts, a “male” part fixed on the robot and a “female” part fixed
on the tool. The “male” part is complete with a robot face plate adaptor and a SWK005 quick-
change head; the “female” part is complete with a SWA005 quick-change adaptor and three
110
supporting bolts. The automation of tool change process is done by pneumatically
attaching/detaching the “female” part to/from the “male” part. Multiple sets of “female” parts can
be purchased to match the number of tools involved in the automatic tool change process, two in
our case.
Tool holders are not included in the SWS005 package and thus must be designed and
manufactured by the end user accordingly for different tools. It is noted that any weight added on
the robot face plate potentially affects the accuracy of the robot, and therefore the tool holders
should be as light as possible. To reduce the effort in post-calibration of the tool axis3, these tool
holders must also be designed such that the axis of the laser beam and ultrasonic beam is known
to the robot axis, ideally co-linear with the axis of the faceplate.
The dimensions for the quick-change tool adaptor, SWA005, are shown in Fig. 3.6-3.
Fig. 3.6-3 Detailed dimensions of a Schunk SWK005 and SWA005 (units in mm)
3 Tool axis is the axis of the ultrasonic beam or laser beam represented in the robot base coordinate system
111
Fig. 3.6-4 A Schunk quick-change adaptor SWA005 stored in a SWM-TSS storage plate
For each quick-change adaptor, SWA005, there are three supporting bolts fixed on the side
surface. These supporting bolts rest on the V-shaped indentations on the Schunk SWM-TSS
storage plate, as shown in Fig. 3.6-4.
Design of the tool holder for the Keyence laser sensor
As discussed above, in order to couple with the Schunk SWA005 adaptor, a tool holder needs to be
designed for each tool, including the laser sensor and the ultrasonic probe.
Fig. 3.6-5 Detailed dimensions of a Keyence ILS065 laser sensor (units in mm)
112
The laser sensor weighs only 75 grams and is approximately 52.5mm*24.1mm*42.8mm in size, as
shown in Fig. 3.6-5. Therefore, the design of the holder is not focused on the structural rigidity or
weight. The axis of the laser beam is approximately 10.50 mm and 10.20 mm from the sides of the
laser sensor. Unfortunately, because there are no tolerances placed on the dimensions and there is
no dowel hole on the laser sensor body, there is no reference point on the laser body which can
act as the datum. The two Ø3.5mm mounting holes on the side surfaces only loosely fit two M3
bolts. This suggests that the positioning of the laser sensor is unrepeatable and the axis of the
laser beam cannot be accurately aligned with the robot face plate axis, and therefore, the laser
tool axis must be calibrated.
3.6.1.1. Overview
The design of the laser sensor holder consists of two parts, a main body and an adaptor, as shown
in Fig. 3.6-6 and Fig. 3.6-7. The main body is an L plate and the adaptor is cylindrical in shape.
The two parts were bolted together with one M6 bolt and located by two dowel pins. The overall
weight of the holder is approximately 210g, when made of aluminium alloy.
Fig. 3.6-6 Different views of the laser sensor holder (units in mm)
(a) Top view
(c) Front view (b) Left view (d) Right view
(e) Bottom view (f) Isometric view
113
3.6.1.2. Detailed dimensions
Two M3 threaded holes were drilled on the side of the L plate as shown in Fig. 3.6-8 (a), which are
used for mounting the laser sensor. A head room of 10.8mm is left between the top of the laser
sensor and the L plate surface, which is sufficient for the laser cable to be bent and pass through
the Ø10mm hole designed on the top of the L plate. As discussed, the adaptor was bolted on the L
plate with a M6 bolt. The bolt was passed through the Ø6.6mm hole with Ø11.2mm countersink
(see Fig. 3.6-8 (d)) from the bottom and a Ø14mm H7 recession was designed on the other end of
the hole (see Fig. 3.6-8 (c)) which couples with the Ø14mm h6 protrusion on the bottom of the
adaptor, as shown in Fig. 3.6-9 (e). The tolerances specified for the recession and protrusion
create a high-precision sliding fit, which is used to locate the adaptor. For the same purpose, two
Ø3mm dowel holes were additionally designed. To avoid over-determining the position, only two
dowels should be used at a time.
The adaptor was designed with four Ø5.5mm clearance holes and one Ø3mm H7 dowel hole that
couple with the adapting surface of the SWA005. The Ø25mm protrusion (see Fig. 3.6-9 (b)) fits
into the Ø25mm H8 recession on the SWA005.
Fig. 3.6-7 An exploded view of the laser sensor holder
114
Fig. 3.6-8 Detailed dimensions of the L plate (units in mm)
(c) Top view
(a) Front view
(b) Side view (e) A-A section
(d) Bottom view (e) Isometric view
(g) Detail B
115
Design of the tool holder for the Olympus ultrasonic probe
Just as for the laser sensor, a tool holder has been designed for the ultrasonic probe to hold the
Schunk SWA005 adaptor.
The Olympus V316-SU ultrasonic probe is cylindrical in shape. The overall length of the probe is
124mm and the biggest diameter is 19.18mm. The first 71mm, as shown in Fig. 3.6-10 (a), is
made of metal and the rest is rubber. There is no mounting hole designed in the body or any
feature for precise location; however, the different sections of the probe are utilised for this
purpose. The first 30mm, which is a ground surface of Ø15.79mm (see Fig. 3.1-2 (a)), can be used
for locating. The step right after this diameter and the step at the end of the first 71mm can be
used for locating and holding the probe in its holder. Because the probe must be immersed in
Fig. 3.6-9 Detailed dimensions of the adaptor (units in mm)
(c) Top view
(a) Front view
(b) Side view
(d) Bottom view
(e) Isometric view
116
water, although the two-part connection is already sealed with a supplied O-ring, it is still
necessary to seal the tool holder to eliminate any risk of short circuit.
3.6.2.1. Overview
The design consists of two parts, a lower and an upper part. Its overall length is 175.9mm and the
biggest diameter is 58mm and weighs approximately 360g. The two parts were bolted together
with three M5 bolts and located by the recess on the lower part and protrusion on the upper part.
Fig. 3.6-10 Dimensions of an Olympus V316-SU ultrasonic probe (units in mm)
(a) Side view (b) Front view (c) Back view
(d) Iso view
Fig. 3.6-11 The ultrasonic probe holder (units in mm)
117
The axis of the tool holder is collinear with the axis of the ultrasonic beam, making it unnecessary
to have one additional dowel to fix the rotational degree of freedom.
As shown in Fig. 3.6-14, the probe (shown in red) was pressed against the shoulder in the lower
part (shown in orange) by a M5 bolt screwed into the threaded hole in the upper part. An O-ring
was fitted into the interior of the lower part and another was applied at the interface of the two
parts.
Fig. 3.6-12 An exploded view of the ultrasonic probe holder
Fig. 3.6-13 Sectional view of the ultrasonic probe holder with the probe and O-rings assembled
The O-rings
118
3.6.2.2. Detailed dimensions
The axis of the ultrasonic beam was located by the Ø15.79mm H7 bore (see Fig. 3.6-14(c)) in the
lower part, which couples with the Ø15.79mm cylindrical part on the probe. A 14.6x2.4 O-ring was
fitted into the O-ring groove designed on the surface of the bore to prevent water from entering
the tool holder from the bottom opening. With a groove depth of 1.8mm, the O-ring is compressed
by 25%. A Ø26mm H7 recession was cut from the top of the lower part to couple with the Ø26mm
h6 protrusion designed on the upper part (see Fig. 3.6-15 (e)). A 29.6x2.4 O-ring was fitted in the
O-ring groove designed on the top surface. This O-ring is compressed by approximately 20.8%
with the designed groove depth of 1.9mm.
The design of the adaptor for the SWA005 on the upper part is similar to the design deployed for
the laser sensor holder. A Ø5.8mm hole was designed on the body to pass the probe cable.
Fig. 3.6-14 Detailed dimensions of the probe holder lower part (units in mm)
(a) Front view (c) A-A section
(d) Detail B (b) Top view
119
Design of the tool magazine
As discussed earlier, the tools can be stored on the Schunk SWM-TSS storage plate. This first
requires, as shown in Fig. 3.6-19, installing three support bolts, which are cylinders with M5
Fig. 3.6-15 Detailed dimensions of the probe holder upper part (units in mm)
(b) Bottom view
(a) Front view (d) C-C section
(c) Top view (e) Isometric view
120
threads at one end purchased from Schunk, on the SWA005 quick-change adaptor. With these
supporting bolts, SWA005 can be rested on the V-shaped indentations on the storage plate.
The storage plate was designed with two Ø9mm countersunk holes and two Ø8mm cylindrical pins
standardised as Ø8mm dowels as shown in Fig. 3.6-17. With these features, the storage plate can
be fixed on, for example, a beam. A proximity sensor, shown in Fig. 3.6-18 (b), can be passed
through the Ø9mm hole drilled in the mid-indentation to detect the existence of stored tool. Each
proximity sensor is also supplied with a bracket as shown in Fig. 3.6-18 (a).
Fig. 3.6-17 Detailed dimensions of a Schunk SWM-TSS storage plate
Fig. 3.6-16 An SWA005 quick-change adaptor and support bolts by Schunk (units in mm)
Assembly
Mounting holes on SWA005
Support bolt
121
As there are in total two tools, two storage plates are required. The height at which these storage
plates should be fixed at, is dependent on the length of the tools and the reachability of the robot.
The longest tool is the ultrasonic probe and its tool holder is 175.9mm long.
3.6.3.1. Overview
Fig. 3.6-19 Model of the tool magazine
Fig. 3.6-18 Detailed dimensions of a Schunk proximity sensor and a sensor bracket (units in mm)
Sensor bracket
(b) Proximity sensor
122
The tool magazine consists of a stand profile, two proximity sensors, an L-shaped mounting plate,
a storage plate adaptor and two storage plates as shown in Fig. 3.6-20. The tool magazine was
designed for only two tools and the height of the tools is 443.54mm. The tool magazine should be
fixed on the table at a location that is easily accessible by the robot.
Fig. 3.6-20 An exploded view of the tool magazine
3.6.3.2. Detailed dimensions
As shown in Fig. 3.6-21, Fig. 3.6-22 and Fig. 3.6-23, in addition to the Ø9mm clearance holes for
the M8 bolts, there are several Ø8mm or Ø7mm (undersized) holes in all the three components for
dowel pins. It is not absolutely necessary to dowel these components, however, because the robot
programs which are used to instruct the robot to pick and store tools can always be easily modified
to cater for different positions for coupling and uncoupling.
The storage plate adaptor, apart from the four mounting holes designed near the centre line, is a
symmetric component. As shown in Fig. 3.6-23 (d), on either end, two Ø8.1mm H6 holes were
designed for fitting the cylindrical pins on the storage plate. Instead of having two Ø9mm
clearance holes, two M8 threaded holes were designed to fix the storage plate with M8 bolts. A
rectangular cut-out of 30mm wide and 12mm deep was designed to fit the proximity sensor
bracket.
123
The L-shaped mounting plate is 12mm thick which is thick enough to accommodate the Ø8mm
dowels. The inner corner is rounded for ease of manufacturing.
Fig. 3.6-21 Detailed dimensions of the stand profile
Fig. 3.6-22 Detailed dimensions of the mounting plate for tool magazine (units in mm)
(a) Top view
(c) Front view
(b) Side view
(d) Iso view
124
Fig. 3.6-23 Detail dimensions of the storage plate adapter (units in mm)
(a) Top view
(b) Front view
(d) Bottom view
(c) Side view
125
Design of the base structure
The base structure provides a rigid platform for fixing all the other components. The structure
must be stiff enough to support a weight of approximately 317kg without any appreciable
deformation. The structure must also ensure repeatability of assembly for both the rotary axis and
robot. Relative displacement between the rotary axis and the robot must be avoided.
The key considerations involved in the design are summarised as follows:
- High stiffness.
- Repeatable positioning of the rotary axis and the robot.
Three initial designs are considered before the final design is made.
The conceptual designs
3.7.1.1. Conceptual design 1
This structure, as can be seen from Fig. 3.7-1 (a), consists of a stainless steel sheet placed on top
of a tube-channel structure. It is 1500mm in length, 620mm in width and 305mm in height. This
structure was designed to support the shaft-bearing system, the drive system, and a mains water
tank as shown in Fig. 3.7-1 (b). A secondary tank is to be placed underneath the table. A separate
(a) The exploded view (b) The structure assembled with a water tank, shaft-bearing system and driving system assembled
Fig. 3.7-1 The first design of base structure
126
pedestal was planned for placing the robot. However, before the design of the robot pedestal was
started, a FEA showed that this design was not stiff enough.
The finite element analysis determined the deformation of the structure caused by a pressure4 of
4365.7 Pa acting on the bottom surface of the water tank. This load results in a maximum
deflection of 0.667mm at the centre of the table and 0.092mm at the rotary axis.
3.7.1.2. Conceptual design 2
This design also uses metal sheets and a tube-channel structure. In general, this design is
1277mm in length, 880mm in width and 402mm in height. This design uses two separate tables,
one for water tank and the other for the robot and rotary axis. This eliminates the deformation on
the rotary axis or the robot caused by the weight of water and water tank. However, the robot and
rotary axis table is not stiff enough especially the parts connecting the robot and the rotary axis
pedestal, which is a single tube. Any displacement occurring directly below the robot or the rotary
axis could cause relative displacement between the two. The table also tends to tilt towards the
water tank if a heavy blade is loaded on the shaft while the robot arm is fully extended.
4 P = P_𝑤𝑎𝑡𝑒𝑟 + P_𝑡𝑎𝑛𝑘 = ρgh + mg/A = 1000 ∗ 9.81 ∗ 0.4 + 23 ∗ 9.8/0.506 = 4365.7Pa
(a) The overview of the CAD model
Fig. 3.7-2 The second design of base structure
(b) The exploded view of the robot and rotary axis table
127
3.7.1.3. Conceptual design 3
The third design still employs a tube-channel structure, but it is greatly strengthened by using
heavy tubes and channels. The combined dimensions of the water tank table and the robot and
rotary axis table are 1290mm* 850mm*524mm and the dimensions of the base are
2100mm*1660mm*210mm. The robot and rotary axis table sit on three adjustable legs and the
table itself is a hollow tube structure with doors fixed at both ends. This enables the table to be
filled with sand to reduce vibration caused by mechanical movements. The legs can be fixed on the
designed base so that tilting can be avoided. The base is a 5mm thick cast iron sheet which is
heavily ribbed underneath. The gap between the ribs allows the use of a fork lift to lift the entire
rig. The base also provides extra room for placing other equipment such as a table and a PC.
Fig. 3.7-3 The third design of base structure
(b) The exploded view of the base
(c) The exploded view of the robot and rotary axis table
(a) The overview of the CAD model
128
However, the entire base is approximately 570kg and the area is 2100mm*1660mm, which is
difficult to be transported in a regular van.
3.7.1.4. Summary of the conceptual designs
Table 3.7-1 Conceptual design marking in scale of 1-5
Stability Rigidity
Accuracy of positioning
Cost of making
Ease of transportation
Overall
Design 1 3 2 1 5 4 15/25
Design 2 1 3 3 4 4 15/25
Design 3 5 5 5 1 1 17/25
All three conceptual designs are evaluated on a scale of 1 to 5 (1 being the lowest and 5 being the
highest) using five different design criteria: stability, rigidity, accuracy of positioning, cost of
making and ease of transportation. The values were arrived at by consultation with fellow
colleagues in the design office at ELE. It is found that Design three scores the highest although its
scores in cost of making and ease of transportation are the lowest.
The final design
While it is an option to reduce the weight
and area in Conceptual design 3 by
removing the extra room reserved for a
table and a PC, it is still costly, in terms of
both time and budget, to manufacture this
structure. The next approach takes a look at
some existing products, such as a cast iron
table, available in the market. The
merits of this are that by avoiding all the
design and manufacturing stages, time is
saved and a surface table is usually well
engineered and should be stable and stiff.
The table finally used is a second-hand cast iron table as shown in Fig. 3.7-4. This table has two
separate parts: the upper part and the lower part. The upper part is a 101.6mm*76.2mm*28mm
cast iron surface, heavily ribbed underneath. The surface is supported on three adjustable legs
sitting on the lower part, which is a rigid structure to raise the height of the top surface.
Fig. 3.7-4 The 101.6mm*76.2mm cast iron surface table
129
It was decided not to perform a finite element analysis of the structure because it was thought
that this steel table is much stronger than conceptual design 1 which resulted in a deflection of
0.667 mm.
In order to fix the water tank, robot pedestal, rotary axis pedestal and the tool storage stand, the
surface of the table was drilled with threaded holes as seen in Fig. 3.7-5. The robot pedestal was
bolted with four M10 bolts and located by two 8mm locating pins. The water tank, however, has
insufficient wall thickness (3mm) to be doweled. Instead, three locating blocks were designed and
fixed against two walls of the water tank.
Fig. 3.7-5 Assembling components onto the cast iron surface
130
Fig. 3.7-6 Components installed on the cast iron table
3.7.2.1. Locating blocks
The locating blocks are made from steel and are of size 50mm*20mm*20mm. They were bolted
onto the table with M8 bolts and doweled as shown in Fig. 3.7-7 and Fig. 3.7-8. The locating
blocks prevent any movement of the tank in the horizontal plane and they were screwed on to the
surface table after the water tank is firmly fixed on the table.
Fig. 3.7-7 Detailed dimensions of the locating block (units in mm)
131
3.7.2.2. The robot pedestal
As the water tank is approximately 400mm in height, it blocks the area directly in front of the
FANUC LR Mate 200iD robot, making it impossible for the robot to reach into the water tank.
Therefore, a robot pedestal had to be introduced to raise the robot to an appropriate height.
Fig. 3.7-9 Dimensions of (a) the base [112] and (b) the operating space of [113] of FANUC LR Mate 200iD
Robot
Fig. 3.7-8 Arrangement of the locating blocks on the cast iron table
(a) (b)
132
As shown in Fig. 3.7-9 (b), the 2nd axis of the robot, which leans the robot forwards and
backwards, is 330mm from the bottom. The area directly in front of this axis must be clear so that
the robot is free to lean forward. Therefore, the minimum height of the pedestal should be 70mm.
The robot height could be raised by 277mm so that it can reach the lower bound of its operating
space. However, this may not be necessary since the robot only needs to reach areas that are
relatively close to it.
(b) Left view (c) Right view (a) Front view
(d) Bottom view
(e) Top view (f) Iso view
Fig. 3.7-10 Detailed dimensions of the robot pedestal (units in mm)
133
Since the robot is only 27kg, aluminium alloy is used as the material for the robot pedestal. The
base of the robot was designed with four Ø11mm
mounting holes, suitable for M10 bolts, as shown in
Fig. 3.7-9 (a). However, the base does not have any
dowel holes, and lacks the ability to fix it at the
same position repeatedly.
The robot pedestal is 250mm in height, as can be
seen from Fig. 3.7-10. This height ensures that the
robot is free to lean forward and able to reach into
the water tank. It requires three other parts: a
20mm thick top plate, a 200 *200 *210 mm mid-
block and a 20mm base plate. Both top plate and
base plate were bolted onto the mid-block with four
M8 bolts each. The robot was, as shown in Fig.
3.7-11, bolted onto the pedestal with another four
M10 bolts through holes C1, C2, C3 and C4 (see Fig.
3.7-10 (e)). No locating features were designed for positioning the robot, which means the
inspection cell must be recalibrated once the robot is re-installed on the pedestal.
As shown in Fig. 3.7-12, the pedestal was bolted onto the cast iron surface with four M10 bolts
through holes A1, A2, A3 and A4 (see Fig. 3.7-10 (d)). Two 10mm dowel pins, which were fitted
into B1 and B2 (see Fig. 3.7-10 (d)), are used to position the pedestal.
Fig. 3.7-12 Assembling the robot pedestal onto the cast iron table
Fig. 3.7-11 Assembling the robot onto the robot pedestal
134
Fixture
Even if two turbine blades were manufactured as per the CAD drawing, it would not be possible to
use the same probe path for ultrasonic scanning if the fixturing introduces an error that results in a
probe being out-of-normal to the blade surface by more than 1° or 2° (see Chapter 6.3). Therefore,
it is necessary to design a fixture that minimises the introduction of errors introduced in the fixturing
process and can locate the turbine blade repeatedly and reliably. It is noted that, as the target area
of inspection, the aerofoil section of a turbine blade has to be accessible which means that the fir-
tree root is the only part of a turbine that can be utilised for fixturing.
Fir-tree roots are typically machined and ground for high-precision locating purposes and therefore are
perfect references for locating turbine blades. However, the blades that were supplied by ELE (Model
number PSM104, see Fig. 6.7-1) had the fir-tree roots already ground. This greatly simplified the fixture
design. Design a fixture without a ground fir-tree root is beyond the scope of this thesis.
Apart from locating and holding the turbine blade rigidly and with high accuracy and repeatability, the
fixture itself has to be located on the shaft and held in position rigidly; it will be subject to a bending
moment caused by the weight of the blade and therefore its connection to the shaft must be
sufficiently rigid. Also therefore must be no slip between the shaft and the fixture when the former is
rotated by the stepping motor. The rotation of the turbine blade will be measured by the rotation of the
shaft and therefore there is need for non-slip torque transfer to the fixture, which is possible by making
use of the keyway on the shaft.
Fig. 3.8-1 The fir-tree root of the test blade
The fir-tree roots of the test blades are ground to an
accuracy of ±10 µm. As seen in Fig. 3.8-1 (b), on each side
of the fir-tree root, there are four indentations that can be
used for locating. The counterpart of these indentations can
be adopted for the design of the jaw, if the inserts are of
larger radii (see Fig. 3.8-2); this makes, in total, sixteen line
contacts between the jaw and the fir-tree root. It can be
argued that this design over-determines the locating and due
to manufacturing tolerances, it is very possible that only three of the surfaces are utilised. On the
(a) (b)
Fig. 3.8-2 A jaw with four inserts on each side clamped on the fir-tree root
Fir-tree root of the test blade
Jaw with inserts of
larger radii
135
other hand, if fewer line contacts, say three, not enough rigidity may be obtained; also the
stainless steel (the fixture is made of this material) is a softer material than Inconel5 and therefore
by having more line contacts, it will reduce the long-term wear of the jaws.
The side faces of the fir-tree root have several grounded surfaces which are utilised for locating
the blade in the transverse direction.
Design overview
Fig. 3.8-3 Different views of the fixture
Fig. 3.8-4 An exploded view of the fixture
5 Rockwell B hardness of stainless steel (AISI 304) is 70 and Inconel 718 is 109.
136
The fixture design separates the shaft adaptor and the jaws, which enables different jaws to be
fitted to the fixture so that different blades can be held by the same fixture. The shaft adaptor was
designed with a Ø65mm H7 bore which loosely fits the Ø65mm h11 shaft. The interface was
designed for a loose fit because the adaptor will not be removed from the shaft until the jaws
designed for the upcoming test blades cannot be fitted in the adaptor. A standard key slot was
designed on the bore to enable use of a key to transfer the torque positively, thereby avoiding any
slip between the shaft and the fixture. A clearance hole was designed coaxially with the shaft for
M10 bolts which are used to fasten the adaptor.
Clamping of the blade is achieved by having one fixed jaw and one sliding jaw. The former is fixed
to the adaptor with two M6 bolts and the sliding jaw is pushed towards the fixed jaw by four M6
bolts. The M6 bolts are fed through threaded holes on the top plate. Two slider guides are fixed on
the adaptor to restrict the sliding jaw from any transverse movement.
FEA of the fixture design
A finite element analysis was performed to ascertain the stiffness of the design. The fixture does
not experience any other external forces other than the weight of the blade and the resistance
from water as the shaft is rotated. However, due to the fact that the rotation is only completed at
a very low speed, the resistance only poses a small load upon the fixture and was therefore
ignored in the analysis.
Fig. 3.8-5 Definition of the load and contacts for the analysis
Because a complete solid model of the blade is unavailable, only the fir-tree root is modelled for
this analysis. This section of the fir-tree root is approximately 20.7mm from the bottom. A remote
force of 250N, which is approximately the weight of the blade, is applied at a distance of 100mm
100mm
250N
Sliding
contacts
137
away from the top face of the fir-tree root, as shown in Fig. 3.8-5. The worst case scenario is when
only the bottom locators are in contact with the root. This situation was simulated by having
0.1mm deep and 2mm wide slots on the lines of contact for the other four locators. As shown in
the inset diagram in Fig. 3.8-5, only four sliding contacts are defined in the analysis.
The results from FEA are shown in Fig. 3.8-6. The stress is below 20MPa on the surfaces of the
fixture in contact with the blade. The maximum stress is 100.4MPa which is well below the elastic
limit for stainless steel. The load causes a maximum displacement of 0.002414 mm at the top of
the fir-tree root. Assuming that the blade itself is rigid, the displacement at the tip of the blade can
be determined using similar triangles:
0.002414 ∗252.2
20.7= 0.029411𝑚𝑚
This displacement is acceptable, which proves that the design is stiff enough.
Fig. 3.8-6 (a) Von Mises Stress distribution and (b) Displacement distribution
(a) (b)
138
The final assembly
Procedure for assembling the inspection machine
1) Place the cast iron table on a flat surface and level the table using the three adjusting
bolts.
2) Place the water tank on the table and move the water tank to the correct position.
3) Place the three locating blocks on the table; position these blocks using two dowels for
each; then bolt them onto the table.
4) Push the water tank against the locating blocks, and then bolt the water tank onto the
table. (for a first time installation, fix the water than first and then fix and dowel the
locating blocks.)
5) Place and fix the robot pedestal on the table.
6) Place and bolt the robot onto the pedestal.
7) Place the base of the rotary axis pedestal onto the table; position the base using two
dowels and then bolt the base onto the table.
8) Place the shaft housing on the top of the top plate of the rotary axis; position the housing
using two dowels from underneath; bolt the shaft housing from underneath.
9) Slide the first front bearings onto the shaft till the back of the bearing hits the wall on the
shaft; slide the front second bearing onto the shaft till the bearing sits against the first
bearing.
10) Fasten the lock nut on the shaft till the bearings are firmly locked and then fasten the grab
screw on the lock nut to fix the position of the lock nut.
11) Slide the shaft into the housing from the front face till the bearing hits the wall on the
housing.
12) Slide the rear bearing onto the shaft till it hits the wall on the housing.
13) Clip the circlip into the groove on the shaft; push it towards the bearing till it is against the
bearing. Then fasten the circlip.
14) Place the top plate of the rotary axis pedestal onto its base; slide the plate until the
protrusion on the housing passes through the hole on the water tank; position the top
plate using two dowels and then bolt it onto the base.
139
15) Install the O-ring (ID170) into the groove on the in-tank flange; then bolt the flange onto
the housing.
16) Slide the two lip seals on to the shaft respectively till they all fit inside the in-tank flange.
17) Install the gearbox onto the motor; then bolt the driving unit mounting plate onto the gear
box.
18) Loosely bolt the mounting plate onto the rotary axis pedestal.
19) Install the key and the 12-teeth timing pulley onto the gearbox shaft; install the key and
the 60-teeth timing pulley onto the end of the rotary axis shaft; install the timing belt.
20) Tension the timing belt and then fasten the two M5 bolts on the mounting plate.
21) Bolt the mounting plate for tool change system onto the robot pedestal.
22) Install the Schunk tool storage plates and proximity sensors onto the tool storage plate
adaptor; then bolt the adaptor onto the mounting plate.
23) Install the SWK005 onto the robot mounting plate.
24) Install one of the SWA005s onto the mounting plate of the laser sensor holder and Install
the mounting plate onto the L plate using two dowels and a M6 bolt.
25) Install the laser sensor in the L plate.
26) For the ultrasonic probe holder, firstly, slide the O-ring (ID14.6) into the groove inside the
bore; secondly, pass the cable of the probe through the hole on the upper part of the
probe holder; thirdly, slide the probe into the holder; fourthly, place the other O-ring
(ID29.6) in the groove on the mounting surface of the lower part; finally, bolt the lower
part and the upper part using three M5 bolts and fasten the bolt on the inclined surface.
27) Install the other SWA005 onto the mounting plate of the ultrasonic tool holder.
28) Install three Schunk support bolts on the side of each SWA005 and place the assembled
components on the storage plates.
29) Install the guards onto the table.
140
The assembled inspection machine
The different components in the inspection machine are shown in the following figures.
Fig. 3.9-1 Guards
Fig. 3.9-2 The water tank, rotary axis and robot
141
Fig. 3.9-3 Rotary axis consisting of the stepper motor, timing pulleys and belt, and spindle housing
Fig. 3.9-4 The in-tank flange
Fig. 3.9-5 The water tank
142
Fig. 3.9-6 Pipe connectors
Fig. 3.9-7 The tool magazine
Fig. 3.9-8 Rear view of the table showing the cabinet and the robot control
143
Fig. 3.9-9 The Keyence laser sensor mounted in the laser sensor holder
Fig. 3.9-10 The Olympus ultrasonic probe mounted in the ultrasonic probe holder
144
Robot Control
The Fanuc LRMate 200iD can be either controlled manually using a device called “Teach Pendant”
or a PC with a licensed dynamic-link library. The former method of controlling the robot is rather
simple and intuitive and works very well for tasks with little user input involving repetitive
movements. However, when the robot is required to visit hundreds of points in one task, which is
our case, manual control becomes impractical and automatic control of the robot using a PC is
useful here. In this chapter, a brief introduction to the robot is given at the beginning, regarding
the motion and communication with PCs. At the end of this chapter, the core algorithms for
controlling the robot to complete the task of measuring a turbine blade are presented in form of
block diagrams.
145
Robot control
As mentioned in Chapter 3.1, the robot used in this project is a Fanuc LRMate 200iD robot. This
robot has six axes, as labelled in Fig. 4.1-2. This means moving from one position to another, in
most cases, require the cooperation among many axes and there are many possible ways to
complete the motion. This would involve enormous amount of calculation without the Fanuc R-30iB
robot controller.
Fig. 4.1-2 Six axes of the Fanuc robot [112]
With the controller, users can control the robot easily using a device
called “Teach Pendant” from Fanuc, as shown in Fig. 4.1-1. A user can
use this device to monitor, configure, jog as well as program the robot.
However, as the name suggests, programming of the robot using this
device is literally jogging the robot to visit various places and “teach”
the robot to remember these places and the paths from one to the
next. This is ideal for repetitive tasks with a small number of path
points, but in our case the number of points are in the hundreds for a
single blade. And, worse still, these points will change if another blade
with a different geometry is used. Therefore, a computer is needed to
control the robot automatically with minimum human interaction. Fig. 4.1-1 Fanuc teach
pendant
146
Robot motion and variables
4.1.1.1. Motion type and Motion commands
There are four different motion types: linear, circular, joint and arc. In the linear mode, the robot
moves from one position to another in a straight line, whereas in the circular/arc mode, the robot
moves in a circular path. Joint motion is particularly useful when one or more robot arms are in
singularity when other motion types can no longer function.
Since the turbine blade surface is not circular or spherical, it is not possible to use circular or arc
motion. Joint motion requires accurate interpolation from xyz position to joint angles, which is a
very difficult task. In this context, only linear motion is used.
Due to the fact that the surface of the blade is non-linear, it is also not possible to smoothly trace
the surface of the blade in linear mode. In this project, performing a non-linear path is achieved
with a number of short linear moves. The length of each move is typically between 0.1mm and
0.2mm depending on the application.
The command for linear motion contains four
elements: motion code, position, speed and CNT.
Motion code defines the type of motion of this move;
for linear motion, it is L. Position is the coordinate of
the robot at the end of the motion. Speed determines
the velocity at which the robot travels. CNT defines
the amount of rounding off at a corner (see Fig.
4.1-3). CNT has very limited use in this project, as
most of the motions must be carried out accurately
and CNT has to be set to zero.
4.1.1.2. Robot variables
There are different types of variables regarding this robot. The most commonly used variables are
called registers.
There are two types of registers, position registers and number registers. Position registers are
used to define robot positions that are used in motion commands. Number registers are more like
float- or integer-type variables in traditional programming languages that can be used for various
purposes, such as specifying the values for speed and CNT in motion commands.
System variables are also useful for monitoring the status of the robot, such as CPU usage and
current task number. It also enables modification to some parameters to suit a user’s use.
CNT100 CNT0
P1
P3 P2
Fig. 4.1-3 Effects of using CNT0 and CNT100 at P2 and P3
P4
147
Robot IO are special variables. They only have two values, on or off. Robot IO are used specifically
for controlling pneumatic systems installed on the robot, such as Schunk’s tool change system.
Vibrations
During the experiments, it was noticed that the robot vibrated when carrying out a linear motion.
Fig. 4.1-4 shows the distance measured using the laser sensor when the robot was instructed to
move from one end of a slip gauge to the other with linear motion at a speed of 10 mm/s. The
surface of the slip gauge is at an angle to the robot movement, because the slip gauge was not
levelled, whereas the robot was travelling in a horizontal direction. In spite that in an ideal
situation the robot should move linearly along the dash line indicated in orange, the laser
measurement shows the mean deviation of the robot motion from the orange line is approximately
0.048mm with a standard deviation of 0.08mm. This deviation is more significant when the robot
moves at a higher speed. This suggests that it is not possible to take an accurate measurement
when the robot is moving.
Fig. 4.1-4 Vibration of the robot during a linear motion
Fig. 4.1-5 Vibration at the end of the motion
148
It was also noticed that at the end of each robot motion, the robot needs a small amount of time
to recover from the inertia forces which caused a small vibration. The amount of time as well as
the intensity of the vibration increases with increasing speed. At 10mm/s, it is approximately
140ms and causes a 0.005mm oscillation in distance. Although at this speed, the influence is
negligible, it is still reasonable to delay data acquisition for at least 150ms to avoid capturing this
oscillation.
Communication and dynamic-link library
Two-way data transmission can be established between the controller and a PC in various ways
such as RS232-C and TCP/IP protocol. In this project, the TCP/IP protocol is used for data
transmission because it is relatively more friendly for programming.
Communication via the TCP/IP protocol can be established by connecting the controller and the PC
using an Ethernet cable. The controller is assigned with an IP address which becomes accessible
using a web browser after the communication is established, as shown in Fig. 4.1-6.
Fig. 4.1-6 Accessing the robot controller using a web browser
However, this web address only allows the user to monitor the status of the robot or browse files
that are already there in the controller’s hard drive. Controlling the robot or uploading files
149
requires a software interface which was available as part of the dynamic-link library (DLL)
purchased from Fanuc.
This DLL can be used in multiple programming languages, such as C# and C++. This allows the
user to build applications and software on PCs to control the robot. There are a number of
methods included in this DLL library. In this chapter, variable types used in these methods are
explained first, core methods used in the current control software are then introduced and finally
the algorithms of communication and data transmission are explained.
4.1.3.1. Core methods
There are two major types of methods: connect methods and data table methods.
Connect methods are used for connecting to the robot or disconnecting from the robot. The
methods are rather simple:
bool Connect(string IPAddress)
bool Disconnect()
Both methods return a Boolean type true if the action succeeds, otherwise, false.
Data table methods are used for transmitting data, such as retrieving current robot position and
uploading position registers.
There are 12 methods in total of which 6 have been used.
FRRJIf.DataTable get_DataTable()
FRRJIf.DataCurPos AddCurPos(FRRJIf.FRIF_DATA_TYPE DataType, int Group)
FRRJIf.DataCurPos AddCurPosUF(FRRJIf.FRIF_DATA_TYPE DataType, int Group, int UF)
FRRJIf.DataNumReg AddNumReg(FRRJIf.FRIF_DATA_TYPE DataType, int StartIndex, int EndIndex)
FRRJIf.DataPosReg AddPosReg(FRRJIf.FRIF_DATA_TYPE DataType, int Group, int StartIndex, int EndIndex)
FRRJIf.DataSysVar AddSysVar(FRRJIf.FRIF_DATA_TYPE DataType, string SysVarName)
bool Refresh()
Before the data table can be used, a data table must be first created using get_Datatable()
method. After the data table is created, variables of different types can be inserted into the table.
The latest data can be transmitted between the PC and the robot controller using Refresh()
method.
150
The data types listed above are current position (for AddCurPos and AddCurPosUF), number
register (for AddNumReg), position register (for AddPosReg) and system variable of integer, string
or float type (for AddSysVar).
With data type current position, it is possible to acquire the current position of the robot in
different coordinate systems, such as world coordinate system and a user coordinate system.
Position register type and number register type are more frequently used in uploading coordinates
and speed values for robot motion. System variable type is useful for obtaining various information
of the robot and instructing the robot to run a specific robot program that is stored in the
controller hard drive.
With position registers and system variables, the motion of the robot can be controlled by a PC by
updating the coordinates of a position register that is contained in a robot program and then
instructing the robot to run that program.
4.1.3.2. Examples
An example to instruct the robot to move to a coordinate of [230, 330, 123] is shown below:
In the robot controller:
Program name: MoveToPR1.TD
Line 1: L PR(1) 100 CNT0
On a PC:
Line 1: string programName = “MoveToP1.TD”;
Line 2: int index = 1;
Line 3: Float[] position = {230,330,123,0,0,0};
Line 4: PosRegister_PR1.SetValueXyzwpr(index, position, ~);
Line 5: SysVar_selectProg.SetValue(programName);
Line 6: SysVar_runProg.SetValue(1);
In the robot controller, a robot program called “MoveToPR1.TD” is created and saved. The
program contains only one line, which specifies the motion type (linear motion), a position register
(PR(1)) where the number 1 in parenthesis is the index of the position register, motion speed
(100mm/s) and a CNT value of 0.
151
On the PC, three variables were first defined. The string “programName” specifies the name of the
program that needs to run in the robot controller, which in this example is “MoveToPR1”. The
integer “index” specifies the index of the position register that is referred to in the robot program,
i.e. 1. The float array “position” contains the specified coordinates. These three variables are next
uploaded into the robot controller via the data table and finally, the system variable
“SysVar_runProg” is given a value of 1 which in turn executes the program in the robot controller.
The speed of the motion can also be controlled from the PC. In this case, a number register is
used:
In the robot controller:
Program name: MoveToPR1.TD
Line 1: L PR(1) R(3) CNT0
On a PC:
Line 1: int index = 3;
Line 2: int speed = 100;
Line 3: NumRegister_R1.SetValue (index, value);
In this example, a value of 100 is assigned to number register R(3) in the robot controller. Since
R(3) is in the position of the speed value in the motion command, it reflects a speed of 100mm/s
when this line is executed.
152
Control software block diagrams
There are two core procedures in a complete measurement of a turbine blade, laser digitizing and
ultrasonic measurement. In this section, the algorithms for these two procedures are presented in
the form of block diagrams.
For laser digitizing, there are three block diagrams describing the whole procedure. In the first
diagram, laser digitizing is initialised. The second and third diagrams together describe the main
digitizing process.
For ultrasonic measurement, there are two block diagrams. The first diagram shows the algorithm
for controlling the robot. The second diagram shows the procedures of acquiring ultrasonic data.
The blocks used in the diagrams are explained in Fig. 4.2-1.
Fig. 4.2-1 Block diagrams legend
A decision to be made
A variable to be modified or assigned with a value
A process to be carried out
The beginning or ending of a program
An input operation or output operation
A program in a separate flowchart
153
Laser digitizing algorithm
4.2.1.1. Initialisation
Fig. 4.2-2 A general laser digitizing procedure – initialisation
Step 1: Read input parameters: Zsafe, imax, jmax and laser path; meanwhile initialise variables, such
as i =0 and j =0.
Step 2: Move to the home position.
Step 3: Check if the lower float switch is triggered:
- If true:
This means the water level is above the lower float switch and is not suitable for
laser scanning. Drain water and go to Step 3.
- Otherwise, go to Step 4.
Step 4: Check if the laser sensor is already attached to the robot:
- If true, go to Step 5
- Otherwise, attach the laser sensor and go to Step 5.
Drain water
Move to home
position
Attach laser
sensor
Laser sensor
attached?
Move to [X0,0, Y0,0, Z0,0+200]
Y
N
N
N
Z0,0 >= Zsafe?
Water level
low?
Y
Y
P0 = [X0,0, Y0,0, Zsafe]
Motion loop 1
Read input
parameters
Start
Initialize
variables
154
Step 5: Move to the initial position, i.e. the first path point with Z offset by +200mm.
Step 6: Check if the Z coordinate in the first path point is greater than Zsafe.
- If true:
This means it is safe to lower the laser sensor to the defined Z coordinate. Thus,
proceed to Step 7
- Otherwise, replace the Z coordinate with Zsafe and proceed to Step 7.
Step 7: Start Motion loop 1.
4.2.1.2. Motion loop 1
Fig. 4.2-3 A general laser digitizing procedure – motion loop 1
Step 1: Check if i is greater than imax, the total number of sections that is required to be measured:
Lr > 19?
Acquire laser
reading Lr
Zcur = Zsafe?
Pi,j = [Xi,j, Yi,j, Zcur - 3]
j = j+1
N
Skipsection = false
Pi,j = [Xi,j, Yi,j, Zsafe] Zcur - 3 ≥ Zsafe?
Y Y
N
Y
Move to Pi,j
i > imax? Y
Start
End
Motion loop 2
N
Get Pcur = [Xcur, Ycur, Zcur]
N
155
- If true, terminate the algorithm as the last path point is visited.
- Otherwise, go to Step 2.
Step 2: Move to path point Pi,j.
Step 3: Acquire robot current position, Pcur.
Step 4: Acquire a laser reading, Lr.
Step 5: Check if Lr is greater than 19:
- If true:
This implies the surface is outside laser measurement range6. Go to Step 8.
- Otherwise, go to Step 6.
Step 6: Let j = j + 1.
Step 7: Start motion loop 2.
Step 8: Check if the Z coordinates, Zcur, of Pcur is equal to Zsafe.
- If true:
This means the point is unmeasurable. It is possibly outside the surface of the
turbine blade. Set Skipsection = false and go to step 7.
- Otherwise, go to Step 9.
Step 9: Check if the Zcur – 3 is greater than Zsafe:
- If true:
This means it is safe to descend the laser sensor by 3mm. Set P i,j = [Xi,j, Yi,j, Zcur -
3] and go to Step 2.
- Otherwise,
Descend the laser sensor to the minimum height. Set Pi,j = [Xi,j, Yi,j, Zsafe] and go to
Step 2.
6 A proper laser reading is within the criterion [-2,18]. If the acquired value is outside this criterion,
it means the laser sensor is unable to measure the object. Here, it is also assumed that the user
defines a start point that is at a great distance above the surface which is beyond the upper limit of the measuring range.
156
4.2.1.3. Motion loop 2
Fig. 4.2-4 A general laser digitizing procedure – motion loop 2
N
Acquire laser
reading Lr
Skipsection
true?
Skipsection = true
Y
Y
Y Lr > 19?
N
Move to Pi,j
Lr ≥ 4?
Start
Pause 500ms
Acquire laser
reading Lr
Lr ≤ 10?
Zcur+Lr ≥
Zsafe? Pi,j
' = [Xi,j, Yi,j, Zcur+LR]
Pi,j' = [Xi,j, Yi,j, Zsafe]
Get Pcur = [Xcur, Ycur, Zcur]
Move to Pi,j' Get Pcur = [Xcur, Ycur, Zcur]
Output Pcur and Lr
Y
N
N
Y
i = i+1
Pi,j = [Xi,j, Yi,j, Zi,j+10]
Motion loop 1
Y
N
j > jmax?
N
j = j+1
j = j+1
157
Step 1: Move to path point Pi,j.
Step 2: Acquire robot current position, Pcur.
Step 3: Acquire a laser reading, Lr.
Step 4: Check if Lr is greater than 20:
- If true:
Further check if Skipsection is true:
If true:
This means the current path point is probably outside the
turbine blade or has a great curvature that the laser sensor
cannot measure. In this case, the remaining path points are
this section are likely unmeasurable too. Therefore, this section
is skipped. Go to Step 12.
If not true:
This means the starting path point in this section is outside the
turbine blade or has an unmeasurable curvature. In this case
the starting path point is replaced by the next point in
sequence. Thus, set j = j + 1 and go to Step 13.
- Otherwise, go to Step 5.
Step 5: Set Skipsection = true.
Step 6: Check if Lr is greater than or equal to 47:
- If true, terminate the algorithm as the last path point is visited.
- Otherwise, go to Step 7.
Step 7: Pause the thread for 500ms.
Step 8: Re-acquire a laser reading, Lr, after robot reaches a full stop.
Step 9: Check if Lr is smaller than or equal to 10.
- If true:
The laser reading is valid. Output current robot position Pcur and the latest laser
reading Lr, and go to Step 10.
- Otherwise, go to Step 10.
7 For a laser sensor based on the principle of triangulation, the accuracy is the highest near the lower limit of its measurement range. The laser reading zero of our laser sensor is set to -8, which
is +2mm from the lower limit of the measurement range. For any reading greater than 4mm, i.e.
6mm away from the lower limit, the distance between the laser sensor and the surface is reduced and the measurement is repeated.
158
Step 10: Set j = j + 1.
Step 11: Check if j is greater than jmax, the total number of path points in this section:
- If true:
This means the last point in this scanning section has been visited. The next stripe
can be scanned. Go to Step 12.
- Otherwise,
There are still path points unvisited in this section. Go to Step 1.
Step 12: Set i = i + 1 and offset the Z coordinate of the next point Pi,j by +10mm.
Step 13: Start Motion loop 1.
Step 14: Check if Zcur + Lr is greater than Zsafe:
- If true:
This means the height of the laser sensor is safe to be lowered. Set Pi,j' = [Xi,j, Yi,j,
Zcur+Lr] and go to Step 15.
- Otherwise, lower the height of the laser sensor to the lowest limit. Set P i,j' = [Xi,j, Yi,j,
Zsafe] and go to Step 15.
Step 15: Move to Pi,j’.
Step 16: Acquire robot current position, Pcur and go to Step 7.
159
Ultrasonic measurement algorithm
4.2.2.1. Initialisation and Robot motion
Fig. 4.2-5 A general procedure of ultrasonic data acquisition – initialisation and robot motion
Start
Fill in water Water level
high?
Read input Initialize
variables
Probe
attached? Attach probe
Move to Pi
Rotation
required? Get Pcur
Pause 500ms
DAQdone =
true? Pause 50ms
i > imax?
Zcur >
Zsafe?
Rotate blade
Move to P =
[Xcur, Ycur, Zsafe]
End
N
Y
Y
Y
Y
N
Y
N
N
Y Y N
Start ultrasonic
data acquisition
i = i + 1
DAQdone =
false
160
Step 1: Read input parameters, such as gain settings and safe height etc., and probe path.
Step 2: Initialise variables, such as i=0.
Step 3: Check if the upper float switch is triggered:
- If true:
This means water level is upper the lower float switch. Go to Step 4.
- Otherwise
The water level is too low for ultrasonic testing. Fill in water, then go to Step 3.
Step 4: Check if the ultrasonic probe has already been attached to the robot:
- If true, there is no need to attach the probe. Thus proceed to Step 5.
- Otherwise, attach the ultrasonic probe and go to Step 5.
Step 5: Set Boolean DAQdone to false.
Step 6: Check if rotation is required:
- If true, Go to Step 13.
- Otherwise, go to Step 7
Step 7: Move to path point Pi and pause the thread for 500ms.
Step 8: Start a parallel thread for ultrasonic data acquisition (see the next section).
Step 9: Constantly check if DAQdone is true or false:
- If true, go to step 11
- Otherwise, pause 50ms and go to Step 10
Step 10: Set i = i + 1.
Step 11: Check if i is greater than imax:
- If true:
The last point in the probe path has been visited and the algorithm is terminated.
- Otherwise, go to Step 5.
Step 12: Acquire the current robot position, Pcur.
Step 13: Check if Zcur > Zsafe:
- If true:
It means the it is safe to rotate the blade. Go to Step 16.
- Otherwise, the ultrasonic probe needs to be lifted from the surface before the blade
can be rotated. Go to step 15.
Step 14: Move to P= [Xcur, Ycur, Zsafe].
Step 15: Rotate the blade and go to Step 7.
161
4.2.2.2. Ultrasonic data acquisition
Fig. 4.2-6 A general procedure of ultrasonic data acquisition - Ultrasonic data acquisition
Step 1: Read input parameters, such as gain settings and sampling sizes.
Step 2: Initialise variables, such as flag8=1, m=0 and n=0.
Step 3: Reset memory in the ultrasonic card so new data can be loaded in.
Step 4: Set gain to a high value specified in the input parameter.
Step 5: Excite an ultrasonic wave.
Step 6: Check the returned value from the ultrasonic card whether indicates the excitation is
successful or not:
- If successful, go to Step 7.
8 When flag is equal to 1, the high gain defined by user is used; otherwise, the low gain is used.
Start
Ultrasound
excitation
Successful?
Reset ultrasonic
card memory
Read input Initialize
variables
Set gain (high)
Retrieve and
output data
m = m + 1
m > mmax?
Read data
status
Retrieve and
output data
n = n + 1
n > nmax?
Set gain (low)
flag = 0
Y
N
Y
N
N
N
N
Y
Y
Y
DAQdone =
true
Data ready?
End
Bit = 1?
162
- Otherwise, go back to Step 5 and re-excite an ultrasonic wave.
Step 7: Read data acquisition status from the ultrasonic card.
Step 8: Check if ultrasonic data is ready to be collected from the ultrasonic card memory:
- If the data is ready to be collected, proceed to Step 9.
- Otherwise, re-check data acquisition status, i.e. go to Step 7.
Step 9: Check if the flag value is 1:
- If true, the receiver is set to use a high gain. Go to Step 10.
- Otherwise, the receiver is set to use a low gain. Go to Step 14.
Step 10: Retrieve data from ultrasonic card memory and output to a text file.
Step 11: Set m = m + 1.
Step 12: Check if m equals mmax, which is the maximum number of ultrasonic data samples
required at one path point acquired with the high gain:
- If true, data acquisition with high gain is completed, now acquire data with low gain.
Go to Step 13.
- Otherwise, go to Step 5.
Step 13: Set flat = 0 and receiver gain to the low value and go to Step 5.
Step 14: Retrieve data from ultrasonic card memory and output to a text file.
Step 15: Set n = n + 1.
Step 16: Check if n equals nmax, which is the maximum number of ultrasonic data samples required
at one path point acquired with the low gain:
- If true, data acquisition is completed. Go to Step 17.
- Otherwise, go to Step 5.
Step 17: Set DAQdone = true.
Step 18: Terminate thread.
163
Theory
Ultrasonic testing involves many uncertainties that affect the accuracy of the result, such as
determination of time of flight, noise and angle of incidence. It was also found during experiment
that bubbles are also contributors to distortion of the shape of echoes and inaccurate testing
results. In this Chapter, related theories and methods to overcome these problems are first
discussed.
Apart from these uncertainties, the accuracy of ultrasonic testing is also highly dependent on the
accuracy of the probe path which has to be determined prior to ultrasonic testing. In the current
progress of this project, the probe path is calculated based on a B-spline surface representation of
the testing blade. In order to ensure the accuracy of the B-spline surface thereby the accuracy of
the probe path, the blade has to be digitized on a CMM. In turn, the probe path is computed in the
CMM coordinate system. A localisation method is therefore used to transform the probe path into
the coordinate system of the inspection machine. The accuracy of the localisation is crucial. In this
chapter, the theories and methods to solve these mathematical problems are also discussed.
164
Ultrasonics
Determination of thickness
Unlike a ruler or a caliper, which determines the dimensions of an object using a physical scale,
ultrasonic measurement is based on a velocity-time equation. In contact ultrasonic testing, a pulse
of ultrasound is generated from an ultrasonic probe. When the pulse reaches a reflector, it
bounces back and returns to the probe. The time interval, t, between when the pulse was emitted
and received is recorded. The distance, d, travelled from the ultrasonic probe to the reflector can
then be determined based on the velocity of sound v:
𝑑 = 𝑣 ∗ 𝑡/2 Eq. 5.1-1
This enables measurement of a subsurface feature which is impossible to measure with a physical
scale without destroying the material or obtaining an image inside the material. In ultrasonic
testing, the time interval is usually referred as the time of flight.
Fig. 5.1-1 A schematic drawing of the path of ultrasound for immersion ultrasonic testing
In our case, i.e. in immersion ultrasonic testing, the time of flight is determined in a slightly different
way. As the ultrasonic probe must be immersed in water during testing, the excited ultrasonic pulse
first travels through water before it reaches the test piece, as shown in Fig. 5.1-1 (a). The distance
between the lens of the ultrasonic probe and the test piece is called water path. On reaching the
interface between the water and test piece, part of the pulse is reflected back and received by the
probe, as shown in Fig. 5.1-1 (b) and (c). The received pulse is known as an interface echo. The rest
of the ultrasound continues to travel into the test piece and finally bounces off at the reflector, which
Ultrasonic Probe
Water path
Test piece
(a) Excitation (b) On reaching the interface
Red: reflected Purple: transmitted
(c) On receiving the interface echo
(d) On receiving the backwall echo
Excitation pulse
Interface echo
Backwall echo
Am
plit
ud
e
Time Time of flight
(e)
165
is the interface between the surface of the blade and the hole, and is received by the probe, known
as the backwall echo, as shown in Fig. 5.1-1 (b) and (d). In this case, the time of flight is the time
difference between the reception of the interface echo and backwall echo, as shown in Fig. 5.1-1 (e).
An accurate determination of the time of flight requires an analysis of the received ultrasonic pulse in
the time domain, where variations of the amplitude of received pulse are plotted against time, as
shown in Fig. 5.1-2.
As can be seen, there are three signals plotted in this time domain. They are the interface echo, first
backwall echo and the second backwall echo. For the interface echo, its pulse duration is
approximately 450 ns and across its entire wave lengths, there are two strong peaks (PI1 and PI2) and
three strong valleys (VI1, VI2 and VI3). The pulse duration of the backwall echo is approximately 300ns
and one strong peak (PB1) and two strong valleys (VB1 and VB2) can be found. Due to phase change
at the interface of water and metal, the actual time of flight is calculated between VI2 and PB1. In this
case, the distance can be evaluated with the velocity-time equation (Eq. 5.1-1) provided an accurate
value of velocity is determined with technique such as Laue X-ray diffraction [24]. The time of flight
can also be taken between any one of the peaks or valleys from each echo, for example PI1 and PB1.
In this case, Eq. 5.1-1 cannot be used and instead, a relationship between thicknesses and the time
of flight must be found. The establishment of this relationship is referred as calibration.
Calibration is a relatively more convenient method and therefore thickness calculations in this
project are all completed using calibration equations.
Fig. 5.1-2 Ultrasonic signals in time domain
VI1 VI2
VB1
Interface echo Backwall echo
VB2
PB1 PI1 PI2
VI3
166
Calibration
The purpose of calibration is to establish an accurate relationship between the calculated time of
flight and the actual wall thickness. As the time of flight can be calculated in many ways, a simple
linear velocity-time equation (Eq. 5.1-1) becomes inadequate for an accurate thickness
interpretation. Also, there are many other reasons that suggest the velocity-time equation
inapplicable, such as the variations in the acoustic velocity due to lack of uniformity in the test
material and lack of compensation for “the propagation time of electrical pulses through a long
cable” [8].
Calibration is usually defined by a linear equation [11]:
𝑑 = 𝑚𝐶𝑇 + 𝑐 Eq. 5.1-2
where 𝑑 is the distance, 𝑚𝐶 a multiplier, 𝑇 the time of flight and c a constant.
A calibration equation is established between a pair of points, one point on the interface echo and
the other on the backwall echo. The same equation can be used for another pair of points that are
positioned similarly. For example, if the calibration is performed between 𝑃𝐼2 and 𝑃𝐵1 , the
calibration can also be used between 𝑉𝐼2 and 𝑉𝐵1 or 𝑉𝐼3 and 𝑉𝐵2 . This provides alternative
calculation of ToF in the case that the echoes were distorted at one of the original pair of points.
To begin with, however, it is always suggested to select two strongest spikes for calibration. In our
system, from repeated experiments, it was found that PI1 and PB1 were in general the strongest
spikes. Therefore, calibration for this ultrasonic system should be established between 𝑃𝐼1 and 𝑃𝐵1.
As mentioned in the literature chapter, calibration should be performed for different thickness
ranges because one calibration is only accurate to a degree in the thickness range the calibration is
performed.
Resolution
The resolution of an ultrasonic system usually refers to the near surface resolution, i.e. the
minimum thickness that can be measured by an ultrasonic system. As mentioned earlier, the
interpretation of distance or thickness using an ultrasonic probe involves calculation of time of
flight which is evaluated from the interface echo and the backwall echo. When measuring a small
wall thickness, it is possible that the backwall echo overlaps the interface echo and the resultant
signal is usually distorted and makes determining time of flight very complex. This resolution is
greatly related to the frequency of the ultrasonic probe and the minimum pulse duration that can
be sent by the ultrasonic card.
With our system, it was found the minimum thickness that could be comfortably measured was
approximately 0.65mm. By upgrading the card with a lower minimum pulse duration, the near
surface resolution can be improved.
167
Despite the near surface resolution, it is also necessary to mention the resolution of thickness
measurement restricted by the sampling rate of the ultrasonic data acquisition/logging equipment,
in our case, the ultrasonic PCI card. This resolution ultimately leads to the sampling error ΔR𝜙 as
discussed in Chapter 2.1.4.3. The highest sampling rate is dependent on the time interval between
ticks of the internal clock in the ultrasonic card. The highest sampling rate available on our
ultrasonic card is 100MHz, which means the time difference Δ𝑇 between each data point, or
amplitude value, is 10ns. Substituting Δ𝑇 into Eq. 5.1-2, the distance is equal to Δ𝑇 times the
multiplier, i.e. Δ𝑇𝑚𝑐. This means any distance variation below Δ𝑇𝑚𝑐, or 10𝑚𝑐 in our case, cannot
be measured.
Noise
As discussed in the literature review chapter, some common sources of noise are [17]:
(e) probe noise
(f) weak echo due to material grain, texture and composite
(g) electronic noise due to amplifier, pulser reverberations and reflection in cable [8]
(h) interferences due to electro-magnetic
An important measure of noise level is signal-to-noise ratio. This ratio compares the power of a
signal with the power of background noise. A high ratio is usually desired. The signal-to-noise ratio
can be increased/decreased by adjusting the receiver gain, which is available in the ultrasonic card.
With a higher receiver gain, the strength of the ultrasonic signals is greatly increased at a cost of a
much smaller increase in the strength of background noise. However, a higher gain is not always
appreciated. An over amplified signal may exceed the detection threshold of signal strength and
thereby result in phase angle error. Thus, the required receiver gain should be obtained
experimentally by trial and error.
A very effective method of suppressing noise found during testing the ultrasonic probe was to
capture multiple sets of ultrasonic signals at the same place and take the average amplitudes. This
method works especially well against periodic noise.
However, one obvious drawback of this method is that the time cost for data acquisition is
increased. The average time for capturing 1000 data points is 2.24ms. Taking 100 sets of data
containing 1000 data points would require 224ms.
168
Bubbles
Air bubbles are known to affect ultrasonic testing
detrimentally in terms of accuracy of measurement [114].
There are two types of bubbles in this context, (a)
bubbles trapped on the lens of an ultrasonic probe and (b)
bubbles attached to the surface of inspection of the
specimen, as shown in Fig. 5.1-3.
The first type of bubbles is generated due to air trapped
on the concave-shaped focused lens at the instant when
the ultrasonic probe is immersed. These bubbles
significantly attenuate the ultrasonic signal and greatly
distort echoes. Bubbles that are big as the one shown in
the picture can have a devastating effect to the testing.
An example of a signal captured in the presence of these
bubbles is shown in Fig. 5.1-4 (c), where the interface
echo cannot be detected, compared with Fig. 5.1-4 (a),
captured after the bubbles were removed. However, this
type of bubbles can be easily removed by wiping across
the lens with one’s finger after the probe is immersed
[115].
The second type of bubbles is formed by air dissolved in water on surfaces that have temperature
differences with water. This type of bubbles has less influence on ultrasonic testing results, but still
attenuate the ultrasound as well as add bubble echoes and noise [115]. An example signal affected
by these bubbles is shown in Fig. 5.1-4 (b). Compared with Fig. 5.1-4 (a), as can be seen, a
bubble echo is captured before the interface echo and generally, the amplitude of the backwall
echoes is reduced. However, in this example, the backwall echoes are strong enough and even
with reduced amplitude, they are still detectable. Fig. 5.1-5 (a) shows a weak backwall echo
captured at a surface without bubbles and the backwall echo was captured again at the same
place after bubbles were gathered on the surface (see Fig. 5.1-5 (b)). It can be seen the amplitude
of the backwall echo was reduced to near noise level. At a receiver gain of 70db, the bubble echo
was as strong as the interface echo which may cause incorrect detection of the interface echo and
the added noise became significant which could be mistakenly detected as a backwall echo.
Fig. 5.1-3 Two types of bubbles that affect ultrasonic testing
Surface of
specimen with
small bubbles
Surface of
specimen
without bubbles
(b)
A bubble got
trapped on the
lens
(a)
169
Fig. 5.1-4 Effect of having bubbles on surface of inspection and probe lens
Bubbles attached to the surface of the specimen are difficult to avoid as they grow gradually
temporally as long as there is a temperature difference. Nakanishi et al. [114] developed a device
that sprays high-pressure water onto the surface of inspection to remove these bubbles. Lumsden
[115] suggests adding chemical solutions such as surfactants to reduce the surface tension of
water. However, as both techniques are not available here, the surface bubbles are removed
periodically, typically every 5 minutes, with hands. These bubbles usually stop growing after
several hours.
It is noted that as the probe lens has an anti-bubble coating, this type of bubble cannot
accumulate on the probe lens.
170
Fig. 5.1-5 Nose caused by surface bubbles at receiver gain = 70
Angle of incidence
When an ultrasonic wave acts on the interface of two different media at an oblique angle 𝜃1, i.e.
when the tested surface is not normal to the sound wave, both refracted and reflected waves are
produced. The extent of refraction and reflection are each correlated to the velocity of sound
within the medium through which the signal passes [6] [116] [117].
As shown in Fig. 5.1-6, when a sound wave is incident at an angle 𝜃1 to the interface, a portion of
this wave is reflected back into the medium at the same angle, because the two waves are
travelling in the same medium and therefore have the same sound velocity. The remaining part of
the incident wave penetrates the tested surface and is refracted at a different angle, 𝜃2. The value
of this refraction angle depends upon the different sound velocities within the two media [116] or
their mutual wave resistance [6]. Moreover, the greater the sound velocity in the tested material,
171
the greater will be the refraction angle. Snell’s Law, reproduced below, is a well-known way to
describe this phenomenon [6] [116]:
𝑠𝑖𝑛𝜃1
𝑠𝑖𝑛𝜃2
=𝐶1
𝐶2
Eq. 5.1-3
The refraction of ultrasonic wave should be
avoided because any refraction would affect the
accuracy of measurement. As shown in Fig. 5.1-6
(a), when the angle of incidence (𝜃1) is equal to
0° the wall thickness is given by half the time
taken to travel from A to B and back. However,
when 𝜃1 ≠ 0, the ultrasound is diffracted at the
interface and the material path of the ultrasound,
i.e. CDE, is increased (Fig. 5.1-6 (b)). The
increased thickness can be evaluated by Eq.
5.1-4, where 𝜃2 can be obtained with Eq. 5.1-5
based on Snell’s law.
It should be noted that although the central axis
of the ultrasonic signal seems to pass beyond the width of the ultrasonic probe at a certain angle,
the probe can still acquire a proportion of the echo, because the returned ultrasonic wave is
already defocused and the width of the wave is dependent on the distance travelled beyond the
focal point, acoustic velocity, angle of incidence, etc. Depending on the proportion captured and
overall strength of the echo, the signal may be still sufficiently strong to determine the wall
thickness.
𝐶𝐷 = 𝐷𝐸 =𝐴𝐵
cos(𝜃2) Eq. 5.1-4
sin 𝜃2 =𝑉𝑖 . sin 𝜃1
𝑉𝑤 Eq. 5.1-5
where Vi and Vw are the velocities of sound in Inconel (6130 m/s) and water (1480 m/s)
respectively at ambient temperature.
Fig. 5.1-6 Refraction and reflection of ultrasonic signal
172
Reverse engineering
Generation of the path for an ultrasonic probe when it is required to measure the wall thicknesses in
turbine blade, is similar to generating an NC tool path to mill a free-form surface. This requires the
surface to be modelled mathematically and surface normals to be calculated. As discussed in Chapter
2.2, reverse engineering involves digitizing, registration, triangulation, segmentation and surface
fitting.
The following reverse engineering procedures have been implemented in this project.
1. A CMM with a touch-trigger probe is used for digitizing.
2. Triangulation is done with 2D Delaunay triangulation and some pre-processing and post-
processing procedures.
3. Surface fitting is achieved with shape preservation parameterisation and B-spline surfaces
which model the low pressure and high pressure surfaces separately.
It is noted that the use of a touch-trigger probe is because this is the only type of probe available in
the current CMM. Also noted that registration is avoided because turbine blades are fixed during
digitizing and the coordinate system of the CMM is kept constant. Given that the surface of a turbine
blade can be modelled as one smooth and continuous surface, segmentation is also not needed.
In this section, procedures and methodology of digitizing turbine blades are introduced first, then
methods and algorithms for surface fitting tested in the early stage of this project are discussed, and
finally procedures and mathematics of triangulation, parameterisation and surface fitting are
presented.
Digitizing turbine blades
The decision to digitizing turbine blades on a CMM was made based on two concerns. The first
concern is due to accuracy of the robot. It is not suitable to use the laser sensor for an accurate
digitization because the accuracy of the result is significantly limited by the accuracy of the robot,
which is typically around 50 to 200 µm. The second concern is time requirement for the measuring
process. If digitization of a turbine blade is performed on a CMM, it is possible to digitize a second
blade and prepare the probe path whilst the first blade is still being measured on the inspection
machine. This approach then requires a localisation i.e. an (ICP) algorithm to transform the B-spline
representation and probe path from the CMM to the inspection machine, which is discussed later in
this chapter.
Due to aerodynamic requirements, the surface of a turbine blade is always a smooth and continuous
surface without corners or flat faces. The surface of the turbine blade must be divided into several
173
regions depending on the curvatures of the cross sections to allow a
correct angle for the touch probe to make contact with the surface of
the blade. An example of the division of the blade into regions is
shown in Fig. 5.2-1. Manually digitizing such surfaces accurately with
a CMM and a touch-trigger probe can be very time-consuming
depending on the size and variation in the curvature of the blade.
Therefore, a two-stage scanning strategy is adopted where in the
first stage a coarse scan is obtained with manual operation for
automating a more detailed scan in the second stage.
In the first stage, only a few cross-sectional profiles of the turbine
blade are scanned with a reasonable amount of detail. The acquired
data are collected and fitted with a B-spline surface (see Chapter
5.2.5) individually for each scan region. With these B-spline surfaces, it is possible to compute a large
number of points and generate a mesh to represent the surface of the turbine blade. Undoubtedly
the precision of this mesh is lacking and cannot be used for probe path calculation. Therefore, based
on this mesh, a CMM program is generated for a second-stage scan. This CMM program enables
automatic surface data acquisition by visiting all points on the mesh. The number of data points to be
collected can be easily adjust by increasing or decreasing the density of the mesh.
(a) 47 surface points acquired on one region in the first stage
(b) 1404 points calculated on the B-spline surface
Fig. 5.2-2 Acquired surface points and calculated points on the B-spline surface
Fig. 5.2-2 (a) shows 47 surface points acquired manually in one region of the blade in the first-stage
scan using the CMM and the touch-trigger probe. Fig. 5.2-2 (b) shows 1404 points calculated on the
B-spline surface which is fitted to the 47 surface points. Fig. 5.2-3 shows the CMM probe path
calculated for the second-stage scan based on the calculated 1404 points. One scan of these points
Fig. 5.2-1 The five regions
defined on the surface of the blade
174
takes approximately one and a half hour and this is only one quarter of the surface area of the blade.
In the context of testing and experimenting, this time may not be crucial but on the factory floor,
where this inspection rig will be eventually installed, the scanning time could add to the production
costs.
When the blade is scanned, it is positioned such that its longitudinal axis is vertical. This vertical
position is ideal for locating all the sections of the blade to be inspected.
Fig. 5.2-3 Generated CMM path based on the calculated 1404 points
Fitting methods tested in the early stages.
Before surface fitting methods are tested, it is useful to investigate curve fitting methods, where
cross sections of turbine blades are reverse engineered.
175
The Bezier curve is a good method for curve fitting problems and it is relatively easy to be program
and differentiate, although in the literature reviewed [118] [119] it was not employed in representing
cross sections of turbine blades. It was soon found that the Bezier curve is not ideal for modelling
cross sections of turbine blades due to oscillations found in high degree curve and difficulties in
maintaining continuity between segments. Next a B-spline curve was tested and it was found that the
goodness of fitting was much better than the Bezier curve. Therefore, it was decided to extend the
B-spline curve to surface fitting, i.e. B-spline surface was adopted for modelling the surfaces of the
blade.
Before a B-spline surface representation can be calculated, the surface has to be parameterized. The
most convenient parameterisation method, i.e. chord length method, was tested first. The virtue of
this method is that a triangulated surface mesh is not needed and algorithms for implementation of
this method required very little effort. However, due to the linearity of the formula, the
parameterisation was inaccurate and in turn modelled surfaces were of poor accuracy.
Shape-preserving parameterization developed by Floater [100] was tested next. This method
requires a triangulation mesh of the surface and the Delaunay triangulation was therefore used. In
Matlab, 3D Delaunay triangulation can be easily implemented with a built-in function t =
Delaunay(x,y,z). However, the triangulation generated with this built-in function includes
tetrahedrons through the thickness of the blade, which have to be removed. Crust method [120] was
adopted in this case to extract the surface triangulation. Although the theory introduced in the
literature seems to work, the practical implementation of the theory sometimes failed. Fig. 5.2-4
shows a failed extraction result where some triangular elements are deleted mistakenly.
Fig. 5.2-4 Failed surface triangulation extraction result
176
In order to obtain a correct surface triangulation, 3D Delaunay triangulation was replaced by 2D
Delaunay triangulation, which is supposed to generate surface triangulation only and thus the
extraction algorithm is not needed. This strategy worked well and the surface fitting results were
promising. Therefore, this method is adopted for the remainder of the project.
Triangulation
5.2.3.1. 2D Delaunay triangulation
A brief description of the steps of generating a 3D triangulation mesh using 2D Delaunay
triangulation is described below.
1. Map 3D points into a 2D coordinate system, for example, u and w coordinate system.
2. Compute a 2D Delaunay triangulation for the 2D point set. Once the 2D Delaunay
triangulation is computed, the connections among points are obtained.
3. Map these connections to 3D points and a 3D triangulation mesh can be obtained.
2D triangulation requires the point set defined in a 2D space. Mapping 3D points into 2D can be
achieved with various parameterisation methods. In this context, accuracy is not important and
because surfaces are scanned on a CMM, data are always ordered by the z coordinates. In this
case, the chord length method9 is the most convenient and thus is selected. As shown in Fig. 5.2-5,
a sphere surface model (Fig. 5.2-5 (a)) is parameterised into u and w coordinates (Fig. 5.2-5 (b)).
By now, each xyz point has a unique point in u-w coordinate system. Next, 2D Delaunay
triangulation is generated using the Matlab built-in function t = delaunay(u, w) [121]. Output t is a
matrix that contains the connectivity information of each points10. This matrix is then mapped onto
the 3D surface and finally a triangulation of the surface is produced (Fig. 5.2-5 (d)).
The example shown in Fig. 5.2-5 (a)-(d) presents a good result when this triangulation method is
applied to a set of uniformly distributed surface points. However, for a set of non-uniformly
distributed surface points, direct application of this method may generate ill triangles when 2D
triangulation mesh is mapped to 3D space. An example of an ill triangle found in the 3D mesh is
shown in Fig. 5.2-5 (f), although in 2D (Fig. 5.2-5 (e)) the triangle is good. This is because, when 3D
points are mapped onto a 2D surface, the u coordinates of the end points of the cross sections are
always set to 0 or 1 as shown in Fig. 5.2-6 (a), which means the cross sections are perfectly aligned
in the w direction. In cases where the points in 3D are non-uniformly distributed, although the start
or the end of the cross sections do not necessarily line up in 3D, as shown in Fig. 5.2-6 (b), they are
9 More details of the chord length method can be found in Chapter 5.2.4.1 10 More detailed explanation of the Matlab function t=delaunay(u,w) can be found in Chapter 5.2.3.3.
177
Fig. 5.2-5 Triangulation of a sphere surface
(a) a sphere surface model (b) parameterised points
(c) 2D Delaunay triangulation (d) 2D Delaunay triangulation mapped onto 3D surface
(e) 2D Delaunay triangulation for non-uniformly distributed points (f) an ill triangle
178
Fig. 5.2-6 Starting points of each cross section in 2D and 3D
lined up in 2D. Therefore, when the mesh calculated in 2D is mapped onto 3D, the two boundaries
of the mesh, where u=0 and u=1, are greatly distorted and so are the triangles in the mesh.
Therefore, pre-processing is required to trim the point set and line up the start and end of the
cross sections.
Because points are non-uniformly distributed, it is not possible to line up the cross sections by
deleting points or shifting the end points. One possible solution is to fit a B-spline curve to each
cross section and generate large numbers of points along each section. With enough point density,
it is possible to trim the cross sections without greatly shortening the length of the curve. If the
shape is closed, the end points can be shifted along the cross section without trimming. The
mathematics and algorithm employed for B-spline curve fitting are introduced in the next section.
The result of the spherical surface and the end points of each section after B-spline curve fitting
are shown in Fig. 5.2-7 and Fig. 5.2-8. An example of a triangulated turbine blade surface is shown
in Fig. 5.2-9. Procedures for this Delaunay triangulation algorithm are shown in Fig. 5.2-10.
(a) (b)
179
Fig. 5.2-7 Spherical surface after B-spline curve fitting and the line connecting the end points of the cross sections
182
Fig. 5.2-10 Calculation procedures in the triangulation algorithm
5.2.3.2. B-spline curve
The general equation
The general equation of B-spline curve is defined as [87][18]:
𝑷(𝑢) = ∑�̅�𝑖𝑁𝑖,𝑘(𝑢)
𝑛
𝑖=0
, 𝑡𝑘−1 < 𝑢 ≤ 𝑡𝑛+1 Eq. 5.2-1
where {�̅�𝑖} is a set of control points, 𝑘 is the order of the curve and 𝑘 − 1 gives the degree of the
curve, 𝑛 + 1 is the total number of control points and 𝑁𝑖,𝑘(𝑢) are the basis equations or blending
functions given in Eq. 5.2-2.
𝐹𝑜𝑟 𝑘 = 1
𝑁𝑖,1(𝑢) = {1, 𝑡𝑖 < 𝑢 < 𝑡𝑖+1
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Eq. 5.2-2 𝐹𝑜𝑟 𝑘 ≠ 1
𝑁𝑖,𝑘(𝑢) =(𝑢 − 𝑡𝑖)𝑁𝑖,𝑘−1(𝑢)
𝑡𝑖+𝑘−1 − 𝑡𝑖+
(𝑡𝑖+𝑘 − 𝑢)𝑁𝑖+1,𝑘−1(𝑢)
𝑡𝑖+𝑘 − 𝑡𝑖+1
where 𝑖 = 0,1, … , 𝑛 + 𝑘 − 1
{𝑡𝑖} are values of the knots which join the segments, their values can be obtained
from Eq. 5.2-3:
𝑡𝑖 = {0, 0 ≤ 𝑖 < 𝑘
𝑖 − 𝑘 + 1, 𝑘 ≤ 𝑖 ≤ 𝑛𝑛 − 𝑘 + 2, 𝑛 < 𝑖 ≤ 𝑛 + 𝑘
Eq. 5.2-3
CMM point data B-spline curve
fitting uniformly
distributed points
2D Delaunay
triangulation
2D Triangulation
mesh
Input Output
Input Output Uniform
parameterisation
u and w
coordinates
Input Output
Remap 2D mesh
to 3D
3D Triangulation
mesh Input Input Output
183
The implementation of a B-spline curve is done in three general steps: (i) determination of the
curve parameters, such as 𝑘 and 𝑛, (ii) calculation of the control points �̅� and (iii) generation of
the fitted points. Usually, there is another step in which the fitted curve is examined in various
ways, such as deviations from the measured points and rate of change in slope. If the result is not
of the required accuracy, the curve parameters should be adjusted and steps (ii) and (iii) repeated.
Determination of the curve parameters
Parameters need to be determined are the order of the curve (𝑘) and the number of control points
(𝑛 + 1).
The number of control points must satisfy the follow condition:
𝑘 ≤ 𝑛 + 1 ≤ 𝑟, 𝑜𝑟 𝑘 − 1 ≤ 𝑛 ≤ 𝑟 − 1
where 𝑟 is the total number of points in 𝑷𝐶 , which is a collection of the point data acquired in
digitizing process sorted in form of a column vector (𝑷𝐶,1, 𝑷𝐶,2, … , 𝑷𝐶,𝑟)𝑇.
According to Eq. 5.2-3, when 𝑛 = 𝑘 − 2, all knot vectors are equal to zero and when 𝑛 is even
smaller, the knot vectors (𝑡0, 𝑡1, … , 𝑡𝑘−1) are zeros and the rest become negative. This means that
all terms, except for the first term, in the blending functions are zero and the fitted points will have
only two different coordinates, the first being the coordinates of the control point and the second
being the origin 𝑥 = 0, 𝑦 = 0, 𝑧 = 0. When 𝑛 > 𝑚 − 1, i.e. the number of control points is greater
than the number of measured data points, the control points cannot be calculated accurately. This
will be discussed in the next section.
Depending on the fluctuation of the curve and point density of the measured point set, the optimal
values of 𝑘 and 𝑛 vary. Normally, with high point density, a 4th order curve is accurate enough to
define complex shapes, and the value of 𝑛 should be adjusted carefully. A higher value of 𝑛 often
gives a closer approximation to the measured points. However, excessive number of control points
as well as an unnecessarily high definition of the order of the curve introduce undesirable
oscillations, especially at the two ends of the curve.
In addition, it is not always true to obtain the best approximation to the CMM measured points.
Because of various factors, such as roughness of the blade surface and inaccuracy of the CMM, the
points do not lie on a smooth curve. Fig. 5.2-11 shows parts of two B-spline curves fitted to the
same set of CMM points. As shown, the point in the centre of the CMM curve tends to be away
from the overall tendency of the points. The B-spline curve shown in Fig. 5.2-11 (b), because it
was defined by more control points and a much higher order curve than the one in Fig. 5.2-11 (a),
presents a better approximation to the CMM points but replicates the departure and causes an
oscillation in its vicinity.
184
Fig. 5.2-11 (a) number of control points = 50, degree of curve = 10; (b) number of control points = 65, degree of curve = 45
Calculation of the control points
Coordinates of the control point �̅�𝑖 can be obtained by solving the set of equations defined by
solving Eq. 5.2-1. First we substitute the left part of the equation, i.e. 𝑷(𝑢), by 𝑷𝐶(𝑢), which is the
point data acquired during the digitizing process:
𝑷𝐶(𝑢) = ∑ �̅�𝑖𝑁𝑖,𝑘(𝑢)
𝑛
𝑖=0
Eq. 5.2-4
The next step is to solve the blending functions, i.e. Eq. 5.2-2. Each point in 𝑷𝐶 needs a
corresponding 𝑢 ∈ {𝑢𝑗}, which can be obtained conveniently using chord length method11:
𝑢𝑗 = {
0 , 𝑗 = 1
𝐷(𝑷𝐶,𝑗)
𝐷(𝑷𝐶,𝑟) , 1 < 𝑗 ≤ 𝑚
Eq. 5.2-5
where 𝑟 is the total number of points in 𝑷𝐶 and 𝐷(𝑷𝐶,𝑗) is the summation of the lengths of all
chords up to 𝑷𝐶,𝑗:
𝐷(𝑷𝐶,𝑗) = ∑|𝑷𝐶,𝑖 − 𝑷𝐶,𝑖−1|
𝑗
𝑖=1
11 More details of the chord length method can be found in Chapter 5.2.4.1
185
Once the u coordinates are obtained, the blending functions for each u coordinate can be
determined.
It is now convenient to re-write Eq. 5.2-4 in a matrix form:
[
𝑷𝑐,1
𝑷𝑐,2
⋮𝑷𝑐,𝑟
] =
[ 𝑁1,𝑘(𝑢1) 𝑁2,𝑘(𝑢1) ⋯ 𝑁𝑛,𝑘(𝑢1)
𝑁1,𝑘(𝑢2) 𝑁2,𝑘(𝑢2) ⋯ 𝑁𝑛,𝑘(𝑢2)
⋮𝑁1,𝑘(𝑢𝑟) 𝑁2,𝑘(𝑢𝑟) ⋯ 𝑁𝑛,𝑘(𝑢𝑟)]
[ �̅�0
�̅�1
⋮�̅�𝑛]
or
𝑷𝐶 = [𝑁] ∙ [�̅�]
Eq. 5.2-6
where [𝑁] is an 𝑟 × 𝑛 matrix of all the blending functions and [�̅�] = (�̅�0, �̅�1 … , �̅�𝑛)𝑇
The final step is to solve the above overdetermined system, which can be easily achieved in Matlab
[122]:
[�̅�] = [𝑁]\𝑷𝐶
An example of the calculated control points is shown in Fig. 5.2-12, where the sphere with non-
uniformly distributed data points are used as the input model for calculation.
(a) Cross section at z = -0.2588 (b) 3D space Fig. 5.2-12 Measured points and control points
Generation of the fitted points
Fitted points can be generated by multiplying the control points, which are calculated in the
previous step, with blending functions calculated from a set of u coordinates. This set of u
coordinates can be obtained from the coordinates of any number of points. The density of the
fitted points is determined by the density of the u coordinates. Obviously, it is always wiser to
choose a set of u coordinates of higher density, which is the purpose of curve fitting.
186
Firstly, we define a uniform set of 𝑢 coordinates of 𝑚 number of points. It is also possible to use
non-uniformed u coordinates, only if necessary.
𝑢𝑓 = (0,1
𝑚 − 1,… ,
𝑚 − 2
𝑚 − 1, 1 )
Recalling Eq. 5.2-2 and Eq. 5.2-6, the new matrix of blending functions can be calculated from 𝑢𝑓:
𝑁𝑓 =
[
𝑁1,𝑘(𝑢𝑓,0) 𝑁2,𝑘(𝑢𝑓,0) ⋯ 𝑁𝑛+𝑘,𝑘(𝑢𝑓,0)
𝑁1,𝑘(𝑢𝑓,1) 𝑁2,𝑘(𝑢𝑓,1) ⋯ 𝑁𝑛+𝑘,𝑘(𝑢𝑓,1)
⋮𝑁1,𝑘(𝑢𝑓,𝑚−1) 𝑁2,𝑘(𝑢𝑓,𝑚−1) ⋯ 𝑁𝑛+𝑘,𝑘(𝑢𝑓,𝑚−1)]
Eq. 5.2-7
Finally, fitted points 𝑷𝑓 can be generated:
𝑷𝑓 = 𝑁𝑓 ∙ [�̅�]
An example of the fitted results is shown in Fig. 5.2-13, where the non-uniformly distributed data
points for the sphere are used as the input model for calculation.
(a) Cross section at z = -0.2588 (b) 3D space
Fig. 5.2-13 Cross-sections of the sphere fitted B-spline curves
5.2.3.3. Miscellaneous mathematics and algorithms
Input and output data structure of t=Delaunay(u,w) in Matlab
The output t is a nx3 matrix containing the index of the vertices of n number of triangles that
structure the triangulation mesh. As shown in Table 5.2-1, the input data are two variables
consisting of u and w coordinates of the points respectively and the output is a matrix of 9x3. Each
B-spline curves Measured points Control points
187
row of the output represents the node numbers of the vertices of a triangle in the mesh. For
example, row 1 is 1, 4, 2 and this means, P1, P4 and P4 make up one triangle.
Table 5.2-1 Example input and output of t=Delaunay(u,w) [121] in Matlab Index Input data (u, w) Output data (t)
- u w P1 index P2 index P3 index
P1 0 0 1 4 2
P2 0 1 4 5 2
P3 0 2 2 5 3
P4 1 0 5 8 6
P5 1 1 3 5 6
P6 1 2 4 7 5
P7 2 0 6 8 9
P8 2 1 5 7 8
P9 2 2 1 4 2
Fig. 5.2-14 Triangulation results with above input and output
Parameterisation
Two parameterisation methods are implemented in this project. The first method is the chord
length method and the second method is Floater’s [100] shape preserving method.
The chord length method is simple, efficient and easy to program. It works well for a point set with
high point density and relatively flat surface or linear curve and has some use in this project, such
P7
P8
P9
P4
P3
P2
P1
P5
P6
188
as pre-processing CMM data points for 2D Delaunay triangulation, as mentioned in the previous
chapters. The problem with this method, however, is that its accuracy is not guaranteed. Therefore,
the second method, i.e. shape preserving parameterisation, is adopted when calculating B-spline
surfaces.
5.2.4.1. Chord length method for parameterisation
A simple parameterisation of a point 𝑢(𝑝) on a linear curve can be obtained by calculating the
proportion of the length of the segment from the start point 𝑝0 up to 𝑝 in the entire curve length 𝐿,
i.e. 𝑢(𝑝) = |𝑝 − 𝑝0|/𝐿 . If we do the same for each point 𝑝𝑖 on this curve, we then obtain a
parameterisation of this linear curve:
𝑢(𝑝𝑖) =|𝑝𝑖 − 𝑝0|
𝐿 , 𝑖 = 0,1,2,3, … , 𝑛
Eq. 5.2-8
where 𝑛 is the total number of points, and 𝐿 = |𝑝𝑛 − 𝑝0|.
It is noticed that at the boundaries, i.e. when 𝑖 = 0, 𝑢(𝑝0) = 0 and when 𝑖 = 𝑛, 𝑢(𝑝𝑖) = 1.
If Eq. 5.2-5 were adopted for parameterising a non-linear curve, the results would be rather
inaccurate and problematic. When the curve is linear, Eq. 5.2-5 presents a simplified calculation for
the chord length method, but in the case of a non-linear curve, the actual chord lengths can only
be estimated by adding all small chord lengths between two near points from the start point up to
the point being parameterised [123]:
𝑢(𝑝𝑖) = {
0 , 𝑖 = 0𝐿(𝑝𝑖)
𝐿(𝑝𝑛) , 0 < 𝑖 < 𝑛
Eq. 5.2-9
where 𝐿(𝑝𝑖) is the summation of the lengths of all previous chords in sequence up to 𝑝𝑖:
𝐿(𝑝𝑖) = ∑|𝑝𝑗 − 𝑝𝑗−1|
𝑖
𝑗=1
The same boundary conditions are obtained here: 𝑢(𝑝0) = 0 and 𝑢(𝑝𝑖) = 1.
Due to the fact that the chord length calculation is dependent on the sequence of the points, the
results of the chord length parameterisation will be different if the point sequence is altered. This
also presents a huge problem if the points along the curve are not sorted in the correct order and
in this case, pre-processing to re-arrange the points is necessary.
Another problem with this method is when the points are sparsely arranged and the surface or the
curve has a great variation in curvatures, approximation of the chord lengths become less accurate
and consequently the accuracy of parameterisation results is reduced.
189
5.2.4.2. Shape preserving parameterisation
Floater [100] suggested a much better method, known as shape preserving parameterisation. This
method assumes that the surface of the object has been triangulated. Floater’s method preserves
the shape (curvature) by calculating the solid angle subtended at each node. There are three
major steps to achieve the parameterisation:
1. Map 3D points onto a 2D plane
2. Calculate barycentric coordinates
3. Calculate coordinates of the parameters
3D to 2D mapping
Floater incorporated a method due to Welch and Witkin [124] for local parameterisation to
preserve the arc length adopting the construction of the geodesic polar map. For a complete
surface triangulation of a point set, take one point 𝒙𝑖 and extract all its neighbouring triangles from
the triangulation as shown in Fig. 5.2-15 (a). For this extracted sub-triangulation S, there are six
boundary vertices, 𝒙𝑗1 … 𝒙𝑗6. The local parameterisation of S is denoted by P and 𝒙𝑖, 𝒙𝑗1 … 𝒙𝑗6 ∈ ℝ3
are transformed into 𝒑𝒊, 𝒑1 … 𝒑6 ∈ ℝ2. 𝒑𝑖 is defined as the centre of mass of this polygon, referred
as the barycentre, and 𝒑1 …𝒑6 are boundary points in P in an anticlockwise sequence.
Fig. 5.2-15 Local parameterisation of a sub-triangulation. Reproduced from Floater (1997) [100]
This transformation satisfies the equations in Eq. 5.2-10 and Eq. 5.2-11 proposed by Floater [100].
‖𝒑𝑘 − 𝒑𝒊‖ = ‖𝒙𝑗𝑘 − 𝒙𝑖‖ Eq. 5.2-10
∠(𝒑𝑘 , 𝒑, 𝒑𝑘+1) = 2𝜋∠(𝒙𝑗𝑘, 𝒙𝑖 , 𝒙𝑗𝑘+1) ∕ 𝜃𝑖 Eq. 5.2-11
where 𝜃𝑖 = ∑ ∠(𝒙𝑗𝑘 , 𝒙𝑖 , 𝒙𝑗𝑘+1)𝑑𝑖𝑘=1 , 𝒙𝑗𝑑𝑖+1 = 𝒙𝑗1, 𝑘 = 1,… , 𝑑𝑖 and 𝑑𝑖 = total number of boundary
points.
(a)
xj5 xj
4
xj
3
xj
2 x
j
1
xj
6
x
i p
p
4 p
3
P
2
p
1
p
6
pi
(b)
190
In practice, by letting 𝑝 be the origin, i.e. 𝑝 = 0 , Eq. 5.2-10 can be simplified into ‖𝒑𝑘‖ =
‖𝒙𝑗𝑘 − 𝒙𝑖‖, and 𝒑1, 𝒑2, 𝒑3 … 𝒑𝑑𝑖 can then be computed in sequence.
Calculation of barycentric coordinates
Barycentric coordinates 𝜆𝑖,𝑗 > 0 must satisfy Eq. 5.2-12, which defines an affine combination
between neighbouring points [100].
𝒑𝒊 = ∑ 𝜆𝑖,𝑗𝑘𝒑𝑘
𝑑𝑖
𝑘=1
, ∑ 𝜆𝑖,𝑗𝑘
𝑑𝑖
𝑘=1
= 1 Eq. 5.2-12
For 𝑑𝑖 = 3 , there is only one unique triangle subtended at each 𝒑𝑘 . Therefore, 𝜆𝑖,𝑗𝑘 can be
obtained easily by dividing the area of the triangle subtended at 𝒑𝑘 by the area of the polygon:
𝜆𝑖,𝑗1 =𝐴(𝒑𝑖, 𝒑2, 𝒑3)
𝐴(𝒑1, 𝒑2, 𝒑3), 𝜆𝑖,𝑗2 =
𝐴(𝒑𝑖 , 𝒑1, 𝒑3)
𝐴(𝒑1, 𝒑2, 𝒑3), 𝜆𝑖,𝑗3 =
𝐴(𝒑𝑖, 𝒑1, 𝒑2)
𝐴(𝒑1, 𝒑2, 𝒑3)
For 𝑑𝑖 > 3, it is not possible to easily select the triangle subtended at each 𝒑𝑘 . A method for
selecting the unique triangle is suggested by Floater [100]. For each 𝒑𝑙 ∶= 𝒑𝑘, 𝑙 ∈ {1, … , 𝑑𝑖}, plot a
straight line passing through 𝒑𝑙 and 𝒑 as is done in Fig. 5.2-16. There is a unique second point
where this straight line intersects the polygon. This point can either be a vertex 𝒑𝑟(𝑙) or lie on the
chord connecting 𝒑𝑟(𝑙) and 𝒑𝑟(𝑙)+1, where 𝑟(𝑙) ∈ {1, … , 𝑑𝑖} and 𝑟(𝑑𝑖) + 1 = 𝑟(1).
Fig. 5.2-16 The straight line 𝑙 passing through 𝑝𝑙 and 𝑝𝑖 and intersects the polygon at a second point.
In the case that the point lies on the chord, a unique triangle is found subtended at 𝒑𝑙 which is
defined by 𝒑, 𝒑𝑟(𝑙) and 𝒑𝑟(𝑙)+1 and the relationship between 𝒑𝑖, 𝒑𝑟(𝑙) and 𝒑𝑟(𝑙)+1 can be defined by:
𝒑𝑖 = 𝜇𝑙,𝑙𝒑𝑙 + 𝜇𝑟(𝑙),𝑙𝒑𝑟(𝑙) + 𝜇𝑟(𝑙)+1,𝑙𝒑𝑟(𝑙)+1 Eq. 5.2-13
where
𝜇𝑙,𝑙 =𝐴(𝒑𝑖 , 𝒑𝑟(𝑙), 𝒑𝑟(𝑙)+1)
𝐴(𝒑𝑙 , 𝒑𝑟(𝑙), 𝒑𝑟(𝑙)+1), 𝜇𝑟(𝑙),𝑙 =
𝐴(𝒑𝑖 , 𝒑𝑙, 𝒑𝑟(𝑙)+1)
𝐴(𝒑𝑙, 𝒑𝑟(𝑙), 𝒑𝑟(𝑙)+1), 𝜇𝑟(𝑙)+1,𝑙 =
𝐴(𝒑𝑖, 𝒑𝑙 , 𝒑𝑟(𝑙))
𝐴(𝒑𝑙 , 𝒑𝑟(𝑙), 𝒑𝑟(𝑙)+1)
In case the point is a vertex 𝒑𝑟(𝑙), Eq. 5.2-13 is still valid.
pr(l)+1
p
p
i
pr(l)
l
191
𝜇𝑙,𝑙 =‖𝒑𝑖 − 𝒑𝑟(𝑙)‖
‖𝒑𝑙 − 𝒑𝑟(𝑙)‖, 𝜇𝑟(𝑙),𝑙 =
‖𝒑𝑖 − 𝒑𝑙‖
‖𝒑𝑙 − 𝒑𝑟(𝑙)‖, 𝜇𝑟(𝑙)+1,𝑙 = 0
Thus, for each 𝑙, an equation for 𝒑 is given by:
𝒑𝑖 = ∑ 𝜇𝑘,𝑙𝒑𝑘
𝑑𝑖
𝑘=1
Eq. 5.2-14
where 𝑘 = 1,… , 𝑑𝑖 and for 𝑘 ∉ {𝑙, 𝑟(𝑙), 𝑟(𝑙) + 1}, 𝜇𝑘,𝑙 = 0
Taking the average of the summation of all the 𝒑𝑖 calculated for each individual 𝑙 using Eq. 5.2-14
gives 𝒑𝑖 weighted over the entire polygon:
𝒑𝑖 =1
𝑑𝑖
∑ ∑ 𝜇𝑘,𝑙𝒑𝑘
𝑑𝑖
𝑘=1
𝑑𝑖
𝑙=1
Eq. 5.2-15
Thus, the barycentric coordinates 𝜆𝑖,𝑗𝑘 are defined by:
𝜆𝑖,𝑗𝑘 =1
𝑑𝑖
∑𝜇𝑘,𝑙
𝑑𝑖
𝑙=1
, 𝑘 = 1,… , 𝑑𝑖
for 𝑘 ∉ {𝑙, 𝑟(𝑙), 𝑟(𝑙) + 1}, 𝜇𝑘,𝑙 = 0
Eq. 5.2-16
Calculation of the parameter coordinates
The third step is to solve Eq. 5.2-12. The method of solving the parameterisation equation based
on affine combination is well described by Kai et al. [101]. First, the internal points 𝐼 of the entire
triangulation mesh are separated from boundary points 𝐵. Therefore, in 𝑃, define {𝒑1, 𝒑2, … , 𝒑𝑛𝑖} ∈
𝐼 and {𝒑𝑛𝑖+1, 𝒑𝑛𝑖+2, … , 𝒑𝑁𝑖} ∈ 𝐵. Eq. 5.2-12 can be re-written as:
𝒑𝑖 − ∑ 𝜆𝑖,𝑗𝑘𝒑𝑘
𝑛𝑖
𝑘=1
= ∑ 𝜆𝑖,𝑗𝑘𝒑𝑘
𝑁𝑖
𝑘=𝑛𝑖+1
Eq. 5.2-17
Representing 𝒑𝑖 with two components 𝑢𝑖 and 𝑤𝑖 , the above equation is equivalent to two linear
systems:
𝐴𝑢 = �̅�, 𝐴𝑤 = �̅� Eq. 5.2-18
where 𝑢 = (𝑢1, 𝑢2, … , 𝑢𝑛𝑖)𝑇, 𝑣 = (𝑣1, 𝑣2, … , 𝑣𝑛𝑖
)𝑇 and 𝐴 is a 𝑛𝑖 × 𝑛𝑖 matrix with elements:
𝑎𝑖,𝑗 = 1, 𝑎𝑖,𝑗 = −𝜆𝑖,𝑗 , 𝑗 ≠ 𝑖
�̅� = (�̅�1, �̅�2, … , �̅�𝑛𝑖)𝑇 and �̅� = (�̅�1, �̅�2, … , �̅�𝑛𝑖
)𝑇 are coefficients:
192
�̅�𝑖 = ∑ 𝜆𝑖,𝑗𝑘𝑢𝑘
𝑁𝑖
𝑘=𝑛𝑖+1
, �̅�𝑖 = ∑ 𝜆𝑖,𝑗𝑘𝑤𝑘
𝑁𝑖
𝑘=𝑛𝑖+1
Eq. 5.2-19
Now the boundary points need to be fixed, so that �̅� and �̅� can be calculated. Here an artificial
boundary is defined by chord length method as suggested by Floater [100].
Some examples of parameterisation results are shown here:
Fig. 5.2-17 shows the mapping of a polyhedron from a spherical surface to a 2D plane.
Fig. 5.2-18 shows the parameterisation results for the spherical surface using the same
triangular mesh.
Fig. 5.2-19 shows the parameterisation results for the spherical surface using a refined
triangular mesh.
Fig. 5.2-20 shows a parameterised turbine blade surface whose triangulation result is
shown in Fig. 5.2-9.
(a) (b)
Fig. 5.2-17 Mapping a Polyhedron onto a 2D plane
194
Fig. 5.2-19 Parameterised spherical surface based on a refined triangular mesh
Fig. 5.2-20 Parameterised turbine blade surface (see Fig. 5.2-9 for the triangular mesh)
195
B-spline surface fitting
The B-spline surface shares a similar general equation with the B-spline curve but extends it in a
second orthogonal direction:
𝑷(𝑢, 𝑤) = ∑∑�̅�𝑖𝑗𝑁𝑖,𝑘(𝑢)𝑁𝑗,𝑙(𝑤)
𝑚
𝑗=0
𝑛
𝑖=0
, 𝑡𝑘−1 < 𝑢 ≤ 𝑡𝑛+1, 𝑠𝑙−1 < 𝑤 ≤ 𝑠𝑚+1 Eq. 5.2-20
where 𝑘 and 𝑙 are the order of the surface in the 𝑢 and 𝑤 directions respectively and the knot
vectors, 𝑡 and 𝑠 are constant in both 𝑢 and 𝑤 directions, but not necessarily equal.
The calculation of B-spline surface also follows the major steps used in calculating the B-spline
curve: (i) determination of the surface parameters, (ii)calculation of the control points �̅� and (iii)
generation of the fitted points.
Determination of the surface parameters
The number of control points and the order of the surface can be defined separately in 𝑢 and 𝑤
directions. The logic of determining these parameters is the same as that of for the B-spline curve
described in Chapter 5.2.3.2.
For a turbine blade surface usually there are more points scanned in the 𝑢 direction, which is the
direction of the cross section, and there is a greater variation in the curvature in this direction than
that in the longitudinal direction (i.e. w direction). Therefore, in most situations the values of both
parameters in the 𝑢 direction are higher than their values in the 𝑤 direction.
Calculation of the control points
The control points of a B-spline surface are calculated in a similar way as they are calculated in a
B-spline curve.
First we substitute the left part of Eq. 5.2-20, i.e. 𝑷(𝑢, 𝑤), by 𝑷𝐶(𝑢, 𝑤), the point data acquired in
digitizing process sorted:
𝑷𝐶(𝑢, 𝑤) = ∑∑ �̅�𝑖𝑗𝑁𝑖,𝑘(𝑢)𝑁𝑗,𝑙(𝑤)
𝑚
𝑗=0
𝑛
𝑖=0
Eq. 5.2-21
Then we can calculate the blending function for 𝑢 and 𝑤 separately with Eq. 5.2-2. The 𝑢 and 𝑤
used here are obtained from shape preserving parameterisation (see Chapter 5.2.4.2).
Re-write Eq. 5.2-4 in a matrix form:
[𝑷𝐶] = [𝑁𝑢] ∙ [�̅�] ∙ [𝑁𝑤] Eq. 5.2-22
where
196
[𝑷𝐶] =
[ 𝑃𝐶(𝑢1, 𝑤1) 𝑃𝐶(𝑢1, 𝑤2) ⋯ 𝑃𝐶(𝑢1, 𝑤𝑞)
𝑃𝐶(𝑢2, 𝑤1) 𝑃𝐶(𝑢2, 𝑤2) ⋯ 𝑃𝐶(𝑢2, 𝑤𝑞)
⋮𝑃𝐶(𝑢𝑟 , 𝑤1) 𝑃𝐶(𝑢𝑟 , 𝑤2) ⋯ 𝑃𝐶(𝑢𝑟 , 𝑤𝑞)]
𝑟 is the number of points in 𝑃𝐶 whose 𝑤 are the same and 𝑞 is the number of points in 𝑃𝐶 whose 𝑢
coordinates are the same. [𝑁𝑢] is an 𝑟 × (𝑛 + 1) matrix of all blending functions in the 𝑢 direction,
[𝑁𝑤] is an (𝑚 + 1) × 𝑞 matrix of all the blending functions in the 𝑤 direction and [�̅�] is an (𝑛 +
1) × (𝑚 + 1) matrix of all control points that are currently unknown.
In order to solve Eq. 5.2-6, we need to re-write the matrix in form of 𝐴 = 𝐵𝑥 so that 𝑥 can be
solved in Matlab by 𝑥 = 𝐵\𝐴.
Given
[𝑁𝑢] = [
𝑎1,1 ⋯ 𝑎1,𝑛+1
⋮ ⋱ ⋮𝑎𝑟,1 ⋯ 𝑎𝑟,𝑛+1
] , [𝑁𝑤] = (
𝑏1,1 ⋯ 𝑏1,𝑚+1
⋮ ⋱ ⋮𝑏𝑞,1 ⋯ 𝑏𝑞,𝑚+1
)
Define
𝒩 =
[ 𝑎1,1𝑏1,1 𝑎1,1𝑏1,2 ⋯ 𝑎1,1𝑏1,𝑚+1 𝑎1,2𝑏1,1 ⋯ 𝑎1,2𝑏1,𝑚+1 ⋯ 𝑎1,𝑛+1𝑏1,𝑚+1
𝑎2,1𝑏2,1 𝑎2,1𝑏2,2 ⋯ 𝑎2,1𝑏2,𝑚+1 𝑎2,2𝑏2,1 ⋯ 𝑎2,2𝑏2,𝑚+1 ⋯ 𝑎2,𝑛+1𝑏1,𝑚+1
⋮𝑎𝑟,1𝑏𝑞,1 𝑎𝑟,1𝑏𝑞,2 ⋯ 𝑎𝑟,1𝑏𝑞,𝑚+1 𝑎𝑟,2𝑏𝑞,1 ⋯ 𝑎𝑟,2𝑏𝑞,𝑚+1 ⋯ 𝑎𝑟,𝑛+1𝑏𝑞,𝑚+1]
Eq. 5.2-23
Also we arrange all points in 𝑷𝐶 as a column vector:
𝒫 = [𝑃𝐶(𝑢1, 𝑤1) 𝑃𝐶(𝑢1, 𝑤2) ⋯ 𝑃𝐶(𝑢1, 𝑤𝑞) 𝑃𝐶(𝑢2, 𝑤1) ⋯ 𝑃𝐶(𝑢2, 𝑤𝑞) ⋯ 𝑃𝐶(𝑢𝑟 , 𝑤𝑞)]𝑇
Eq. 5.2-24
Now we have
𝒫 = 𝒩 ∙ �̅�
Finally, control points can now be computed in Matlab:
�̅� = 𝒩\𝒫
The output is in the form of a column vector:
�̅� = [𝑷0,0 𝑷0,1 ⋯ 𝑷0,𝑚 𝑷1,0 ⋯ 𝑷1,𝑚 ⋯ 𝑷𝑛,𝑚]𝑇
Two examples of calculated control points are shown in Fig. 5.2-21. The control points calculated
for the spherical surface were based on the parameterisation results shown in Fig. 5.2-19. The
197
control points calculated for the blade surface were based on the parameterisation result shown in
Fig. 5.2-20.
Fig. 5.2-21 Control points calculated for (a) the spherical surface and (b) the surface of the blade
Generation of fitted points
The 𝑢 and 𝑤 used in the previous step can now be discarded. Here, we generate a new set of 𝑢
and 𝑤 with uniform spacing:
𝑢′ = (0,1
𝑐 − 1,… ,
𝑐 − 2
𝑐 − 1, 1 ) , 𝑤′ = (0,
1
𝑐′ − 1,… ,
𝑐′ − 2
𝑐′ − 1, 1 )
where 𝑐 and 𝑐′ are the numbers of points in 𝑢′ and 𝑤′ respectively.
Repeating 𝑢′ for 𝑐′ number of rows and 𝑤′ for 𝑐 number of rows give and 𝑢𝑓 which is a 𝑐′ × 𝑐
matrix and 𝑤𝑓 which is a 𝑐 × 𝑐′ matrix:
𝑢𝑓 = [𝑢1′
𝑢2′⋮
] , 𝑤𝑓 = [𝑤1′
𝑤2′⋮
]
(a)
(b)
198
Recalling Eq. 5.2-2 and Eq. 5.2-6, the new blending functions 𝑁(𝑢𝑓) and 𝑁(𝑤𝑓) can be calculated.
𝑁(𝑢𝑓) and 𝑁(𝑤𝑓) can also be rearranged to the form of Eq. 5.2-23, 𝒩𝑓, so that fitted points can be
generated in form of a column vector 𝒫𝑓 with 𝑐 × 𝑐′ number of elements:
𝒫𝑓 = 𝒩𝑓 ∙ �̅�
Otherwise, �̅� should be re-ordered to a (𝑛 + 1) × (𝑚 + 1) matrix [�̅�]. In this case, fitted points are
generated in form of a 𝑐′ × 𝑐 matrix 𝑷𝑓:
𝑷𝑓 = [𝑁𝑢𝑓] ∙ �̅� ∙ [𝑁𝑤𝑓
]
Fig. 5.2-22 shows two surfaces calculated with the control points shown in Fig. 5.2-21.
Fig. 5.2-22 Surfaces calculated with B-spline surface for (a) the sphere and (b) the turbine blade
(a)
(b)
199
Localisation
Localisation is very similar to registration. Both problems are aimed at obtaining a transformation
matrix that transforms the coordinates of one set of data into the coordinate system used in
another set of data, based on the common points or meshes shared between the two data sets.
Localisation has two uses in this project. The first application is to compare geometric deviations
between turbine blades. The second application is to transform the probe path calculated based on
CMM coordinate system into the coordinate system of the inspection machine.
The localisation algorithm chosen in this project is the iterative closest point (ICP) algorithm. The
reason for this is that it is well established and documented. Because of time constraints in this
investigation, orientation independent algorithms were not considered.
The ICP algorithm starts with finding the point on the target surface which is closest to a given
measured point. After the closest point is found for each point contained in the measured point set,
the distances between each pair of the closest points are calculated. The next step is to solve for
the transformation matrix that minimises the summed squared error of the distances.
In this chapter, the closest point problem will be first discussed, followed by the theory of solving
the minimisation problem.
Closest point problem
For the closest point problem, three methods were tested in this project.
The first method is referred as brute force. In this method, the whole measured point set is taken
and compared with the target surface. The distance between each two of the points in both set is
calculated and the minima can then be found. The weakness of this method is that the points
representing a surface are finite, which means that there are spaces between the points on the
target surface, which cannot be used as a closest point, even though a measured point could lie
there. To minimise this error, the number of points used for the surface representation should be
maximised but this obviously increases the calculations. In the second method, the surface is a
parametric description of a B-spline surface, which is virtually an infinite point set. However, this
complicates the problem with finding the parametric transformation. The last method is k-
dimensional binary search tree (k-d tree) algorithm, which is included in Matlab already as a Matlab
function.
All three methods were tested in Matlab. The accuracy of all methods were found to be equally
good. However, in terms of computing time, it is found that the k-d tree algorithm is significantly
faster for a large point set, for example a point set containing 25,000,000 points.
200
The implementation of k-d tree algorithm in Matlab is documented in [125]. The output of the k-d
tree algorithm consists of two components. The first component is the indices of the closest points
and the second component is the distances between the enquiry points and the corresponding
closest points.
Least square transformation
After the corresponding closest points are found on the target surface 𝑃 for all points on the
measured surface 𝑆, they are used as a target for a transformation of the measured points. The
goal is to find the transformation matrix 𝑇 which satisfies Eq. 5.3-1:
min (𝑒) = min(∑‖𝑇𝒑𝑖 − 𝒔𝑖‖2
𝑛
𝑖=1
) Eq. 5.3-1
where 𝑘 = 1,2,3… representing the number of iteration, 𝒑 ∈ 𝑃 = {𝒑𝑖}, 𝒔 ∈ 𝑆 = {𝒔𝑗}, and 𝑛 is the
total number of points in 𝑆. The transformation matrix 𝑇 includes both rotation and translation in a
3D space, which means the matrix consists of six unknowns 𝑡𝑥, 𝑡𝑦 , 𝑡𝑧, 𝛼, 𝛽, 𝛾.
5.3.2.1. Pseudoinverse method
In the papers presented in the literature review (see Chapter 2.2.1.2), the pseudoinverse approach
[59] [60] [126] is one of the simplest and fastest one. However, during the testing of this
approach, the quality of the localisation results is found highly dependent of the initial alignment
error between the two surfaces. When the angular alignment error is greater than 5° and linear
alignment error is over 1/10 of the length scale of the model, the localisation result is likely to be
inaccurate.
5.3.2.2. Quaternion method
Quaternion representation
In the second approach [62] [63] tested, the transformation matrix is represented by quaternions,
where the rotation component and the translational component are separated. Therefore, the
objective function, which is shown in Eq. 5.3-2, is slightly different from the objective function of
Eq. 5.3-1.
𝑓(�̅�) =1
𝑛∑‖𝑅(�̅�𝑅)𝒑𝑖 − �̅�𝑇 − 𝒔𝑖‖
2
𝑛
𝑖=1
Eq. 5.3-2
where 𝑅(�̅�𝑅) , given in Eq. 5.3-3, is the rotation matrix based on the unit quaternion:
201
�̅�𝑅 = [𝑞0, 𝑞1, 𝑞2, 𝑞3]𝑇
𝑞0 ≥ 0, 𝑞02 + 𝑞1
2 + 𝑞22 + 𝑞3
2 = 1
and �̅�𝑇 = [𝑞4, 𝑞5, 𝑞6]𝑇 is the translation vector.
𝑹(�̅�𝑅) = [
𝑞02 + 𝑞1
2 − 𝑞22 − 𝑞3
2 2(𝑞1𝑞2 − 𝑞0𝑞3) 2(𝑞1𝑞3 + 𝑞0𝑞2)
2(𝑞1𝑞2 + 𝑞0𝑞3) 𝑞02 + 𝑞2
2 − 𝑞12 − 𝑞3
2 2(𝑞2𝑞3 − 𝑞0𝑞1)
2(𝑞1𝑞3 − 𝑞0𝑞2) 2(𝑞2𝑞3 + 𝑞0𝑞1) 𝑞02 + 𝑞3
2 − 𝑞12 − 𝑞2
2
] Eq. 5.3-3
Calculation of an optimal transformation
The unit quaternion �̅�𝑅 that represents the optimal rotation can be found by selecting the
eigenvector that corresponds to the maximum eigenvalue of the 4 × 4 matrix 𝑀(Σ𝑝𝑠):
𝑀(Σ𝑝𝑠) = [𝑡𝑟(Σ𝑝𝑠) Δ𝑇
Δ Σ𝑝𝑠 + Σ𝑝𝑠𝑇 − 𝑡𝑟(Σ𝑝𝑠)𝐼3
] Eq. 5.3-4
where 𝐼3 is a 3x3 identity matrix, Σ𝑝𝑠 is the cross-covariance matrix obtained with Eq. 5.3-6,
𝑡𝑟(Σ𝑝𝑠) is the trace of Σ𝑝𝑠, and Δ = [𝐴23 𝐴31 𝐴12]𝑇 in which 𝐴 is the cyclic component of the anti-
symmetric matrix Σ𝑝𝑠 − Σ𝑝𝑠𝑇 :
𝐴𝑖𝑗 = (Σ𝑝𝑠 − Σ𝑝𝑠𝑇 )
𝑖𝑗, 𝑖 = 1,2,3, 𝑗 = 1,2,3 Eq. 5.3-5
Σ𝑝𝑠 =1
𝑛∑(𝒑𝑖 − 𝜇𝑝)(𝒔𝑖 − 𝜇𝑠)
𝑡
𝑛
𝑖=1
Eq. 5.3-6
𝜇𝑝 and 𝜇𝑠 are centres of mass of point set 𝑃 and 𝑆 respectively, given by:
𝜇𝑝 =1
𝑛∑𝒑𝑖
𝑛
𝑖=1
, 𝜇𝑠 =1
𝑛∑ 𝒔𝑖
𝑛
𝑖=1
Eq. 5.3-7
The optimal translation vector �̅�𝑇 can be calculated with:
�̅�𝑇 = 𝜇𝑠 − 𝑹(�̅�𝑅)𝜇𝑝 Eq. 5.3-8
Implementation
The implementation of the theory starts with Eq. 5.3-7, where the centres of mass of both point
sets are calculated. Next, the cross-covariance matrix Σ𝑝𝑠 can be obtained using Eq. 5.3-6,
followed by the anti-symmetric matrix Σ𝑝𝑠 − Σ𝑝𝑠𝑇 . Now the cyclic components of the anti-symmetric
matrix 𝐴𝑖𝑗 can be extracted and thereby vector Δ can be constructed. With all elements calculated,
the matrix 𝑀(Σ𝑝𝑠) can be formed.
The eigenvectors, 𝑣, and the corresponding eigenvalues, 𝜆, of 𝑀(Σ𝑝𝑠) is related as:
202
(𝑀(Σ𝑝𝑠) − 𝜆𝐼4) ∙ 𝑣 = 0 Eq. 5.3-9
where 𝐼4 is a 4 × 4 identity matrix.
Horn [62] demonstrated a non-iterative solution for 𝜆 and 𝑣. Here in Matlab, the equation can be
easily solved with a built-in solver [𝑣, 𝜆] = 𝑒𝑖𝑔(𝑀).
The maximum eigenvalue can be then found as well as the corresponding eigenvector which gives
the unit quaternion vector �̅�𝑅 . With 𝑞0, … , 𝑞3 determined, the rotation matrix 𝑹(�̅�𝑅) can be
constructed. Finally, the translation vector, �̅�𝑇, can be calculated using Eq. 5.3-8. emphasis
5.3.2.3. Single value decomposition method
The rotation matrix 𝑹(�̅�𝑅) in Eq. 5.3-3 can also be solved with single value decomposition (SVD) of
the cross-covariance matrix Σ𝑝𝑠 [66]:
𝑈Λ𝑉𝑇 = SVD(Σ𝑝𝑠)
𝑹(�̅�𝑅) = 𝑉 ∗ 𝑈𝑇 Eq. 5.3-10
In Matlab, 𝑈 and 𝑉 can be easily solved with the built-in method [𝑈, Λ, 𝑉] = 𝑠𝑣𝑑(Σ𝑝𝑠)
The rotation matrices calculated using either quaternion or SVD method are identical. However, a
series tests show that the time cost of SVD method varies extensively and Freeman and Herbert
[66] mentioned that SVD method may generate noise points and reflection when det(𝑹(�̅�𝑅)) =
−1. Therefore, quaternion method is used in this project.
ICP with initial alignment error correction
A common problem found in most of the ICP algorithms is the mean square error converges to a
local minimum instead of a global minimum. This problem is illustrated in Fig. 5.3-1, where the
blue curve is the localisation target of the orange curve. The localisation scenario shown at the top
is when the mean square error converges at a local minimum as well as a global minimum.
However, in the scenario when the measured curve is introduced with an initial rotation of 180°, as
shown in the bottom of the figure, the convergence is due to a local minimum and the algorithm
will never figure out that the correct transformation requires a further rotation about the centre of
gravity by 180°.
ICP algorithms are essentially minimisation algorithms that searches for the local minimum. For
minor alignment errors, the local minimum is usually the same as the global minimum, which
makes ICP algorithms very useful for minor initial alignment errors. For major initial alignment
203
errors, such as a rotation between 90° and 270°, the global minimum cannot be solved directly
without an initial correction for such errors.
Fig. 5.3-1 Two conditions of convergence
In our ICP algorithm, a routine is incorporated to loop the entire ICP algorithm several times.
Before each time the ICP algorithm starts, a unique initial rotation is applied to the measured
points. We call each application of an initial rotation as one approach. For the first approach, the
initial rotation is zero. In this way, the initial rotational alignment error is changed systematically
from the second approach and onwards.
Obviously, running an ICP algorithm for multiple times multiplies the time cost. It is important to
select a combination of the initial rotations wisely. Ideally, for each approach, the initial rotation
should enable the ICP algorithm to reach a convergence in different conditions, i.e. the orientation
of the measured point set should be unique. With the quaternion method, we found experimentally
that 180° is a good increment value for the initial rotations. This means, for example, the
measured point set is rotated by 180° about the x axis for the second approach, by 180° about the
y axis for the third approach and by 180° about the z axis for the fourth approach which is the last
approach. For all the tests we have conducted, especially for turbine blades, a global convergence
is always reached within these four approaches.
In our case, we can also escape the problem caused by the initial alignment error easily by
introducing a fixed initial transformation to the measured point set, or specifically, the surface
where probe paths are calculated. Knowing that neither the axis of the CMM nor the axis of the
robot change, we can use a fixed initial transformation to correct any substantial alignment errors,
provided that the poses of the blades are maintained well for each scan in the CMM, for example
always have the low pressure surface roughly parallel to the XZ plane of the CMM, and for each
measurement on the inspection machine.
The final ICP algorithm is shown in Fig. 5.3-2
(a) 1st iteration (b) 2nd iteration (c) Convergence
204
Performance test
The performance of the ICP algorithm is checked with two surfaces. The first surface is produced
with a peak function, as shown in Fig. 5.3-3. The target surface was represented by 250,000
points and the measured surface was represented by 484 points. The deviations between the two
Fig. 5.3-2 Flowchart of the ICP algorithm
Start
Solve transformation matrix 𝑇
Transform 𝑃 with 𝑇
Calculate the sum of mean
squared deviation
Transform 𝑃 with initial
transformation matrix
Find closest points for 𝒑𝑖 in 𝑆
End
Y
N
Y
Min. mean
squared error
reached?
Initial
transformation?
Converged?
Max. number of
iterations reached?
Max. number of
approaches
reached?
Transform 𝑃 with an artifitial
transformation matrix
Output the latest
transformation matrix
Output the optimal
transformation matrix
N
N
N
N
Y Y
Y
205
sample surfaces was approximately 0.00589. In order to simulate the situation where a substantial
initial alignment error exists, the measured surface was rotated by 45° about the x-axis and -110°
about the y axis. The surface was further transformed by a translation vector [2,3, −4]𝑇. The final
pose of the measured surface is shown in Fig. 5.3-4.
Fig. 5.3-3 The surface created with a peak function used for testing the ICP algorithm
The turbine blade surface, which is shown in Fig. 5.2-22 (b), was also used for testing the
algorithm. The target surface contains 30,000 points. 340 points were extracted from the target
surface to represent the measured surface. This means the deviation between the two surfaces is
zero. The measured surface was then introduced with a 126° rotation about the x-axis and -35°
about the y-axis, as well as a translation vector [33,77, −44]𝑇.
Table 5.3-1 ICP configurations and results
N.O.P.12(𝑆) N.O.P.12(𝑃)
Sample
Deviation
Residual
Deviation
Time per
iteration
Convergence
condition
Peak 250,000 484 0.00589 0.00590 0.39878 s Global minimum
Blade 30,000 340 0 0.2198 0.0393 s Local minimum
The results of the localisations are shown in Table 5.3-1, Fig. 5.3-5 and Fig. 5.3-8. As can be seen,
global minimum was found for the B-spline surface. According to the convergence plot (see Fig.
5.3-6), it was found in the third approach where the measured surface was rotated by 180° about
the y-axis. For the turbine blade surfaces, local minimum was found with a residual deviation of
0.2198mm. According to Fig. 5.3-9, the error converged at the local minimum in the second
approach, in which the surface was rotated by 180° about the x-axis. As can be seen from Fig.
5.3-8, the error was mainly caused by the misalignment in the z direction. The surface of the
turbine blade varied slowly in the vertical direction, which caused difficulty to accurately locate the
12 N.O.P. stands for number of points. N.O.P.(S) means number of points in S.
206
surface patch. A possible solution is to scan a few points on the fir-tree root and force matching
surfaces in the z direction.
It can be seen that the iteration time was increased by ten times when the number of points on
the target surface was increased by approximately 8.33 times. Even though, the total iteration time
was 93.95s, which was acceptable.
Fig. 5.3-4 B-spline surfaces for localisation
207
Fig. 5.3-5 B-spline surfaces matched using the ICP algorithm
Fig. 5.3-6 Convergence plot for matching the B-spline surfaces
208
Fig. 5.3-7 Turbine blade surfaces for localisation
Fig. 5.3-8 Blade surfaces matched using the ICP algorithm
210
Probe path
Definition of a probe path
In immersion ultrasonic testing, one of the most important factors that contributes to the accuracy
of the testing is the normality of the ultrasonic probe to the surface of inspection, which ensures
ultrasound is transmitted through the surface with minimum refraction. In our case, the ultrasonic
probe is carried by a Fanuc robot during inspection and the alignment of the probe is determined
by the motion of the robot.
The inspection process is similar to 5-axis machining, where a tool is carried by the spindle of a 5-
axis machined and moved to various places according a list of commands, which consists of such
as feed, motion mode and more importantly the coordinates and orientations of the tip of the tool.
For a 6-axis robot, moving an end effector, e.g. the ultrasonic probe, also requires a series of
commands, the most important components of which are the coordinates and orientations. The
coordinates defined in the command herein are referred to as path points and the orientations are
referred to as path orientations. Each path point must be defined together with a path orientation
and a probe path is a collection of one or more path point(s) and the corresponding path
orientation(s) organised in sequence.
5.4.1.1. Coordinate system
Path points and path orientations are defined with respect to a certain coordinate system, such as
the robot base coordinate system (RBCS) or a user defined coordinate system that is related to the
Y
X
Fig. 5.4-1 Coordinate systems and axes in the inspection machine
X
Z
Y
Axis of rotation
Robot base coordinate system
User coordinate system / coordinate system of the inspection machine
Z
211
RBCS. In this project, a user coordinate system is used which is almost identical to the RBCS but
has a slight orientation so that the y-axis is parallel to the rotary axis, i.e. the axis of the shaft
which carries the turbine blade. The three coordinate systems or axis are shown in Fig. 5.4-1. The
user coordinate system is also referred as the coordinate system of the inspection machine.
5.4.1.2. Path points and path orientations
A path point 𝑃 consists of three parameters (𝑥, 𝑦, 𝑧), which define the 𝑥, 𝑦 and 𝑧 coordinates of the
tip of the end effector respectively. A path orientation 𝐴 also consists of three parameters (𝜔, 𝜌, 𝛾),
which define the angles of rotations about the X-, Y- and Z-axes in degrees respectively. Note that
the required path orientation at a particular point must be achieved by performing the rotations in
a definite sequence, i.e. rotation about the X-axis first, followed by that about the Y-axis and finally
about the Z-axis. Note that the initial path orientation, i.e. 𝐴(𝜔, 𝜌, 𝛾) = (0,0,0), is defined by a unit
vector �⃑� co-axial with the Z-axis, i.e. �⃑�(0,0,1), and a torsion of zero.
Calculation of a probe path
5.4.2.1. Path points and tool length
Once the matrix equation for a B-spline surface is determined, it is possible to generate a point
cloud of any density. In our case, the path points do not lie on the surface of the B-spline surface.
In 5-axis machining, the coordinates in a tool path are associated with the tool’s length and
diameter. In our case, the diameter of the probe has no significance, as the transmitter and
receiver are located at the centre of the probe; the tool length can also be simply defined by the
physical length of the ultrasonic probe plus the length of the probe holder and the length of
Schunck’s tool change adaptor. Considering that the probe makes no contact with the surface of
inspection, points generated on a B-spline surface cannot be directly used as path points. They
must be offset by the offset distance of the probe from the surface, i.e. the water path.
In order to reduce complexity, the preferred definition of the tool length is the sum of water path
and the total length added on to the face plate of the robot. In this way, there is no need for
offsetting the surface points and path points can be defined directly on the surface.
5.4.2.2. Path orientations and surface normals
Path orientations are defined with three rotations. In 3-D space, two rotations are adequate to
define the orientation of a vector, a third rotation is only employed for the purpose of defining the
torsion about the axis of the tool, which is not needed in our case. To simplify the problem, we
212
assume the third rotation 𝛾, i.e. rotation about the Z-axis, is equal to 0. Now a path orientation can
be represented by a unit vector. Because the ultrasonic probe must be kept normal to the surface,
normal vectors of the B-spline surface are used to represent path orientations.
The normal vector at a point on a B-spline surface can be obtained by taking the cross product of
the two tangent vectors in both parametric directions, i.e. 𝑢 and 𝑤 directions:
𝒗𝑛⃑⃑ ⃑⃑ ⃑(𝑢, 𝑤) = �⃑⃑⃑�(𝑢) × �⃑⃑⃑�(𝑤) Eq. 5.4-1
By differentiating the B-spline surface with respect to 𝑢 and 𝑤 directions separately, tangent
vectors in both directions can be calculated:
�⃑⃑⃑�(𝑢) =𝜕𝑃(𝑢, 𝑤)
𝜕𝑢= ∑
𝑑
𝑑𝑢[∑�̅�𝑖𝑗𝑁𝑖,𝑘(𝑢)
𝑛
𝑖=0
]𝑁𝑗,𝑙(𝑤)
𝑚
𝑗=0
Eq. 5.4-2
�⃑⃑⃑�(𝑤)𝜕𝑃(𝑢, 𝑤)
𝜕𝑤= ∑
𝑑
𝑑𝑤[∑ �̅�𝑖𝑗𝑁𝑗,𝑙(𝑤)
𝑚
𝑗=0
]𝑁𝑖,𝑘(𝑢)
𝑛
𝑖=0
Eq. 5.4-3
Fig. 5.4-2 shows an example of the surface normals evaluated on a B-spline surface where 600
points are generated.
Fig. 5.4-2 B-spline surface representation of a blade and evaluated surface normals
213
Note that the values of 𝜔 and 𝜌 are the angles of rotation about the X- and Y-axis, respectively,
surface normals, which are defined by �⃑�(𝑥, 𝑦, 𝑧), cannot be directly input as path orientations. The
conversion from �⃑�(𝑥, 𝑦, 𝑧) to 𝐴(𝜔, 𝜌, 0) can be achieved with the aid of rotation matrices.
Knowing that the corresponding path orientation for �⃑�0 = (0,0,1) is 𝐴0 = (0,0,0), and the rotations
have to follow the sequence of X, Y and Z, for any arbitrary unit vector, �⃑�(𝑥, 𝑦, 𝑧), the conversion
to 𝐴(𝜔, 𝜌, 0) can be achieved by:
(i) rotating �⃑�0 by 𝜔° about the X-axis
(ii) rotating �⃑�0 further by 𝜌° about the Y-axis.
Mathematically, these two steps can be represented as:
�⃑�(𝑥, 𝑦, 𝑧) = �⃑�0 ∙ 𝑅𝑥(𝜔°) ∙ 𝑅𝑦(𝜌°) Eq. 5.4-4
where 𝑅𝑥(𝛼) is the rotation matrix about the X-axis:
𝑅𝑥(𝛼) = [
1 0 00 cos(𝛼) sin(𝛼)
0 − sin(𝛼) cos(𝛼)] Eq. 5.4-5
and 𝑅𝑦(𝛼) is the rotation matrix about the Y-axis:
𝑅𝑥(𝛼) = [cos(𝛼) 0 − sin(𝛼)
0 1 0sin(𝛼) 0 cos(𝛼)
] Eq. 5.4-6
Expanding and simplifying Eq. 5.4-4 gives:
�⃑�(𝑥, 𝑦, 𝑧) = [cos(𝜔°) sin(𝜌°) , − sin(𝜔°), cos(𝜔°) cos(𝜌°)] Eq. 5.4-7
Obviously, there is no unique solution to Eq. 5.4-7. Nevertheless, any of the solutions can be
accepted by the robot.
It is also possible to specify a torsion for the probe, i.e. a value for 𝛾. This can be done with a
slight modification Eq. 5.4-4:
�⃑�(𝑥, 𝑦, 𝑧)
𝑅𝑧(𝛾°)= �⃑�0 ∙ 𝑅𝑥(𝜔°) ∙ 𝑅𝑦(𝜌°) Eq. 5.4-8
where 𝑅𝑧(𝛼) is the rotation matrix about the Z-axis:
𝑅𝑧(𝛼) = [cos(𝛼) sin (𝛼) 0−sin (𝛼) cos (𝛼) 0
0 0 1
] Eq. 5.4-9
214
Regions of inspection
Inspecting a complete cross section curve in a point-to-point manner can take enormous amount
of time and inspecting regions where holes are non-existent, only adds unnecessary time for both
inspection and data processing. Therefore, inspection should only take place in the vicinity of a
hole, herein referred as region of inspection, and fast travel can be enabled between each region
of inspection.
However, as it is impossible to acquire the positions of the holes with a CMM and a touch probe, at
this stage, this information is absent from the B-spline surface model. There are some methods for
obtaining the hole positions, such as CT scanning [46]. At this stage, the only feasible method was
to obtain the position of the holes from the CAD model of the turbine blade.
Fig. 5.4-3 Acquiring points from a CAD model
Fig. 5.4-3 shows a sectional view of a CAD model of a turbine blade. 24 points are taken from the
convex side of the cross section as well as the centres of the holes. In the example shown in Fig.
5.4-4 (a), points are obtained on five different cross sections of the CAD model and the centres of
the holes are only taken on the section where ultrasonic inspection is required. These points are
then localised into the coordinate system of the B-spline surface using the ICP algorithm shown in
Chapter 5.3.3. The result of the localisation is shown in Fig. 5.4-4 (b).
215
(a) CAD points and hole positions (b) CAD points and hole positions localised on the B-spline surface
Fig. 5.4-4 Positions of holes
The next step is to find an appropriate “window” located on either side of the hole to be inspected.
Wall thicknesses are defined by the shortest distances between the hole centre and surface of the
blade. In most situations, there is one unique point on the section curve that is closest to a hole,
as indicated by the squares in Fig. 5.4-5 (a). Regions of inspection or ‘windows” are defined by
with making the centre of the window coincide with the blue squares i.e. points on the surface
closest to the hole centres as shown in Fig. 5.4-5 (a). The width of the window has to take into
account the possible differences between the CAD model and the actual manufactured blade. One
must ensure that the hole is inspected. It was found a span of 2mm on both sides of the closest
point was sufficient tolerance to ensure that the holes were detected by the probe (see Fig. 5.4-5
(b). Finally, the path points and path orientations for the windows are shown in Fig. 5.4-5 and
Fig. 5.4-6.
216
Fig. 5.4-5 Regions of inspection
(a) The points closest to the centres of holes on a section curve
(b) Regions of inspection defined near the closest points
(c) Extracted surface normals
217
Fig. 5.4-6 A complete probe path for the convex side of a cross section
Dividing and grouping of a probe path
A complete probe path has to be divided into
several sections and grouped according to the
curvature and size of the cross section. The
reason for this is because the movement of the
robot arm is bounded by the water tank, as
can be seen in Fig. 5.4-8, and it is not possible
for the robot to complete the entire probe path
without having to rotate the turbine blade. The
required number and angles of rotations can
be identified and calculated from the probe
path but only after knowing the maximum
angle of swing 𝜙 (see Fig. 5.4-7), the
coordinates of the turbine blade in the inspection machine and localising the probe path in the
coordinate system of the inspection machine.
The localisation can be achieved using the ICP algorithm. This requires digitization of the surface of
the turbine blade with respect to the coordinate system of the inspection machine, which can be
done with the laser sensor. Fig. 5.4-9 (a) shows the localised probe path.
ϕ
Fig. 5.4-7 Maximum angle of swing
Blade section curve
Water tank wall
218
Fig. 5.4-8 Robot arm is restricted by the water tank
After the probe path is localised, the probe path can now be divided into groups. The positive
angle 𝜃 between the Y-Z plane and each extracted surface normal is calculated and compared with
𝜙. This comparison is conducted in a sequence starting from the first path point in the probe path.
If there is a surface normal at which 𝜃 > 𝜙/2, this means a rotation is needed for the inspection
region that this surface normal is affiliated to. The angle of rotation 𝛼 is calculated by either
positive or negative 𝜃𝑚𝑎𝑥 + 𝜙/2 , where 𝜃𝑚𝑎𝑥 is the maximum positive angle in this inspection
region. From this region and onwards, the surface normals are transformed by 𝛼 with respect to
the rotary axis and the positive angles of the transformed normals are calculated and compared.
The probe path in the above example is divided into three groups and therefore, requires three
rotations of the turbine blade. The path groups in the probe path are shown in Fig. 5.4-9 (b) – (c).
219
Fig. 5.4-9 probe path grouping
(a) Localisation of the probe path in the coordinate system of the inspection machine
(a) First path group of the probe path
(a) Second path group of the probe path (a) Third path group of the probe path
220
Experiments, Results and Discussions
The results have been obtained on two rigs, an OKK 4-axis milling machine (see Fig. 6-1) and the
prototype inspection machine. The earlier tests were obtained on this 4-axis machine and a few of
these tests were repeated on the prototype inspection machine. Repeating the results on the
inspection machine only serves to confirm the accuracy and reliability of the results.
The specimens that have been tested include a stepped component, a “curved” component, a
“disc” blade (i.e. a blade with no fir tree and the aerofoil section is welded on to a circular disc)
and three full size blades from the same batch. The main aim of the tests on the stepped and
curved components was to assess the capabilities of the Olympus V316-SU ultrasonic probe,
calibrate the probe, investigate the effect of varying the length of the water path, and angle of
incidence.
As mentioned earlier, the wall thicknesses of three presumably identical turbine blades from one
batch were measured and compared. The aim of these experiments was to determine the accuracy
of the prototype cell, establish the geometric differences amongst blades from the same batch, and
ascertain whether the same probe path could be used for them.
222
Effect of varying water paths
Background, aim and methodology
As the ultrasonic probe is a focused-lens probe, its performance may be affected by different water
paths. Theoretically, the water path should be adjusted so that the reflector is placed at the focal
point of the ultrasound where the intensity of the ultrasound is at its maximum and so is the power
or amplitude of the echo. This water path can be calculated using Eq. 2.1-4. However, this
equation requires the knowledge of material paths, i.e. wall thicknesses. In our case, these values
are the subject of measurement and thus are unknown. Also, depending on the curvature of the
surface of inspection, ultrasonic waves may be further refracted, which may either accelerate or
decelerate the focusing effect. The amplitude of an echo is also related to the value of the receiver
gain, which amplifies the signals as well as the noise.
The aim of this experiment was to analyse the effect of the water paths on the signal strength and
to determine an optimal setting for the receiver gain.
The test specimen, shown in Fig. 6.1-1 (a), was used for calibration; it is made of Inconel, the
same material as the turbine blades. The specimen consists of several steps and the thicknesses of
the steps are 0.65mm, 0.95mm, 1.99mm, 2.98mm, 3.98mm, 5.87mm, 8.01mm and 10mm. These
thicknesses were measured with a vernier caliper.
Fig. 6.1-1 (a) The Inconel stepped specimen and (b) the clamping of the stepped component
Experiment setup and procedures
The specimen was clamped on the shaft with the flat surface facing upwards, as shown in Fig.
6.1-1 (b). The surface was made to lie in the X-Y plane (of the robot axes, see Fig. 5.4-1) using
the laser sensor and the stepper motor.
Ultrasonic probe attached to the robot
Stepped component
223
Firstly, laser readings were taken at 20 different points on the surface along the length of the
specimen. The inclination of the specimen was then evaluated by taking the slope, s, of the linear
curve that best fits these points. Next the stepper motor was rotated by tan-1(s) degrees. Finally,
the surface was measured again by the laser sensor to verify whether the required level had been
achieved.
Once the specimen was levelled, the tank was filled with water to submerge the specimen to a
depth of at least 30mm. The robot was moved until the ultrasonic probe was at the centre of each
step of the test component. Next, for each step, the water path was varied in non-uniform
increments from 4 mm to 32 mm (see Table I1 – Table I32). For each water path length, the robot
was paused and one hundred ultrasonic data points were collected at receiver gains varying from
30 to 80, in steps of 5.
It was observed that once the ultrasonic probe is immersed, bubbles accumulated on the probe
lens and they had to be removed; therefore, the inspection process was paused approximately
every 5 minutes to remove all the bubbles. This was done for all the following experiments
presented in this chapter.
The program routine used for instructing the robot and acquiring ultrasonic data is described in
Chapter 4.2.
The collected data were processed with Matlab. The water paths were determined by calculating
the product of the acoustic velocity in water at 20°C, i.e. 1482m/s, and half the time of flight
between the first interface echoes and the second bounce of the interface echoes. The values are
rounded to the nearest integers for easier comparison between different sets of results.
224
Results and discussions
The complete results of this experiment are shown in Appendix I.
Varying the water paths, in theory, has no effect on the accuracy of the thickness measurements,
because the TOF or acoustic velocity does not vary with the water path. This was also confirmed
experimentally here. As shown in Table 6.1-1, the standard deviations of the TOF was less than
6ns and this is much less than the sampling rate of the ultrasonic card, i.e. 10ns.
Table 6.1-1 Standard deviations of the evaluated time of flight at each step
Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8
S.D. (10ns) 0.53 0.45 0.51 0.49 0.46 0.53 0.60 0.60
In spite of the theory suggesting that the signal strength is related to the water path, it was found
experimentally that varying water paths had minimum impact on signal strength as long as it is
kept above 15mm, which is approximately the starting point of the focal zone of the ultrasonic
probe. Table 6.1-2 shows the theoretical optimal water path calculated with Eq. 2.1-4. The speeds
of sound in water and Inconel used in the equation were 1482m/s and 5700m/s respectively. For
steps 6, 7 and 8, the values are negative, thus they are not shown in the table.
Table 6.1-2 Theoretical optimal water path for each steps
Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8
Water path (mm) 17.82 16.67 12.67 8.89 5.01 - - -
The experiments are presented in Fig. 6.1-2, where the variations of the amplitudes of backwall
echoes are plotted in colour contours with respect to different gains and water paths. The colour
scale used is shown at the bottom of the figure. As can be seen, the amplitudes of the backwall
echoes increase with water path below approximately 15mm for the same gain. This was more
obvious at low gains. The theoretical increases in amplitudes at the water paths specified in Table
6.1-2 cannot be observed from the experimental results. For example, at Step 5 (Thickness =
4.161mm), at a water path near 5.01mm, the amplitudes of backwall echoes are obviously lower
than the amplitudes found at greater water paths. In general, as the water path was increased,
the amplitudes gradually stabilised.
226
Also shown in these figures are the variations
in the amplitudes at different receiver gain
values. It appears that above a gain of 70db,
the amplitude of a backwall echo usually reach
the maximum value, i.e. 255. However, as the
gain is increased, the noise also increases at
the same time. As shown in Fig. 6.1-4 (a), the
difference between high and low limits (see
Fig. 6.1-3) of noise increased exponentially
with receiver gain until 75db, after which the
increase in the difference slows down. The
purpose of increasing the receiver gain is
usually to increase signal-to-noise ratio (S/N). As shown in Fig. 6.1-4 (b), for second backwall
echoes, which are weaker signals, the S/N ratio always increases with gain values, but for strong
signals, i.e. first backwall echoes, as the amplitudes are capped at 255 at a gain of 65db, any
increase of gain beyond 65db only increases the power of noise.
Fig. 6.1-4 Effect of varying gain regarding noise
It can be argued that the receiver gain should always be set at 80db to ensure detection of any
weak echoes. However, excessive gain could introduce extra efforts when determining the location
of a strong echo, such as interface echoes. Fig. 6.1-5 shows three signals acquired with gains set
at 80db, 55db and 35db.
At a gain of 80db (see Fig. 6.1-5 (a)), it is apparent that both the interface echo and the backwall
echo are over amplified, which introduces phase angle error in wall thickness evaluation. Apart
from the amplitudes of the first peak in the interface echo and the second peak in the backwall
(a) Variations of amplitudes of noise (b) Variations of S/N
Fig. 6.1-3 Low limit and high limit of noise
227
echo being capped at 255, the power of other peaks, which are not of any interest in the thickness
evaluation, in the echoes are also increased. In this case, to locate the peaks of interest, either a
filter is needed to bypass other peaks or a more complex logic must be developed to identify the
correct peaks. In order to reduce the phase angle error, the locations of the peaks should be
assumed to be at the mid of the flattened area; otherwise, curve fitting is required for more
accurate estimations.
Fig. 6.1-5 Signals captured with different receiver gains
At a gain of 55db (see Fig. 6.1-5 (b)), the signals are clearer with less excessively amplified peaks.
The peaks of interest can be identified easily. Also the peak in the backwall echo is now a sharp
peak whose location can then be determined precisely. Further reducing the gain to 35db, causes
(a) Receiver gain = 80 db
(b) Receiver gain = 55 db
(c) Receiver gain = 35 db
228
the peak in the interface echo to become sharp and the precise location of the interface echo can
be determined.
Since the interface echo is much stronger than a backwall echo, it is recommended to acquire
signals with a relative low receiver gain for determining the interface echo and increase gain
afterwards for detecting backwall echoes. By browsing through all logged data in this experiment,
it was found signals captured at a gain of 35db were most appropriate for interface echo
interpretation and for backwall echo, a gain of 60db was the best setting overall, or use Table
6.1-3 for more detailed control.
Table 6.1-3 Optimum receiver gain found for different thickness range
Thickness range t <= 2.0mm 2.0mm < t <= 6.2mm t > 6.2mm
Optimum gain (db) 55 60 65
However, in real blade tests or experiments in other situations, since the wall thicknesses and
surface conditions such as roughness and curvature may differ and other uncontrollable variations
may exist, the above recommended gain values may have to be adjusted.
Conclusion
This experiment shows that the water path does not affect the accuracy of the measurement of
wall thicknesses and it has a limited influence on the power of signals, as long as the water path is
kept approximately greater than 15mm. Regarding the receiver gain, it is recommended to use a
low gain, around 35db, to determine interface echoes and use a high gain, typically around 60db,
to determine the backwall echoes.
229
Calibration
Background, aim and methodology
As mentioned in Chapter 4, before ultrasound data can be analysed or used for thickness
interpretation, the probe has to be calibrated. Calibration is done by establishing the relationship
between known thicknesses and the time taken for sound to travel through materials of these
dimensions. This relationship is linear in the form of 𝑡 = 𝑚𝑇 + 𝑐 , where 𝑡 is thickness, 𝑚 is a
multiplier, 𝑇 is time of flight and c is a constant or a zero offset [8] [11]. Depending on the
definition of time of flight, the multiplier and constant vary. In this calibration, the time of flight is
taken between the first peak in the interface echo and the second peak in the backwall echo in unit
of 10ns. Fig. 6.2-1 shows an example of the peaks that are used to determine the location of
either echo. Note that this is also equivalent to the TOF between the second valley in the interface
echo and the second valley in the second backwall echo.
Fig. 6.2-1 Peak-to-peak calibration was used in the experiment
Calibration of an ultrasonic probe is usually done for various thickness ranges. In this experiment,
the stepped component, used in the previous experiment as shown in Fig. 6.1-1 (a), was employed
as the calibration test piece and hence seven thickness ranges were calibrated (Calibration sets 1
to 7) in Table 6.2-1. Calibration set 8 is a general calibration, which enables an approximate
interpretation for thicknesses outside the specifically calibrated ranges.
230
Table 6.2-1 Planned calibration set
Calibration set 1 2 3 4 5 6 7 8
Thickness
range (mm)
0.65
0.95
0.95
1.99
1.99
2.98
2.98
3.98
3.98
5.87
5.97
8.01
8.01
10
All
thicknesses
Experiment setup and procedures
The experiment setup was exactly the same as the previous experiment. The procedures were,
however, slightly different.
The ultrasonic probe was carried by the robot and moved in the plane parallel to the test specimen
surface and offset from it by 20 mm, the focal length of the probe. The ultrasonic probe was
stopped at twenty random positions above each step of the specimen to acquire data. At each
position, one hundred ultrasonic data samples were captured at a receiver gain of 65 for detection
of backwall echoes and for determining interface echo, additionally, twenty ultrasonic data samples
were captured at a receiver gain of 33.9.
Fig. 6.2-2 A linear curve fitted to the ultrasonic data acquired at Step 1 and Step2
The acquired data were processed using Matlab. Thicknesses were evaluated for all twenty
positions on each step. Calibration results were obtained by fitting a linear curve to the thickness
against time of flight plot for each calibration set. One example of the best straight line fitted is
shown in Fig. 6.2-2, where the data acquired above Steps 1 and 2 were fitted using the Matlab
Curve Fitting Toolbox version 3.5. The results and goodness of fit are shown next to the plot.
Calibration set 8 was established by fitting a linear curve through data acquired for all the steps.
231
Results and discussions
Table 6.2-2 Calibration results for seven different thickness sets
Calibration
set # 1 2 3 4 5 6 7 8
Thickness
range (mm)
0.65
0.95
0.95
1.99
1.99
2.98
2.98
3.98
3.98
5.87
5.97
8.01
8.01
10 -
TOF range
(10ns)
23.3
35.8
35.8
67.4
67.4
100.9
100.9
128.1
128.1
197.6
197.6
260.8
260.8
334.9 -
Multiplier, 𝑚 0.0240 0.0329 0.0289 0.0354 0.0269 0.0341 0.0267 0.0304
Zero-offset, 𝑐 0.0889 -0.2244 0.0661 -0.5598 0.5634 -0.8885 1.0750 -0.0645
SSE 0.0055 0.0329 0.0241 0.0366 0.0845 0.0128 0.0736 2.483
Calibration results are tabulated in Table 6.2-2. The sum of squared errors (SSE) shows that the
calibration results for specified thickness ranges are quite acceptable, although the results for Set 5
and 7 are not as good as the other sets as their SSEs exceed 0.05. This may be due to the surface
roughness of the stepped component, for example the ultrasonic probe could be measuring a
valley or a hill yet the result was assumed to represent the common thickness of the step.
Calibration set 8 presents a much higher error, which suggests this calibration set can only be used
as estimation for thicknesses that are outside the specifically calibrated ranges.
Regarding the sampling resolution as discussed in Chapter 5.1.1, since the unit of TOF used in the
calibration equation is 10ns, i.e. the tick interval of the ultrasonic card, the sampling rate is directly
given by the multiplier, 𝑚.
232
Effect of varying angle of incidence
Background, aim and methodology
As mentioned in literature review, one of the factors which affects the accuracy of the results is the
angle of incidence of sound waves, 𝜃1, on an oblique planar surface; in other words, the angle of
incidence of an inclined sound signal on a planar surface. Snell’s law for refraction and reflection of
sound waves has to be understood very carefully in this situation. One of the concepts to be
understood is that the sound signal will be reflected at an angle equal to the angle of incidence,
with respect to a line perpendicular to the surface of the material, while when it penetrates the
material it will be refracted. The refraction will depend upon the velocity ratio between the
couplant, e.g. water in our case, and the tested material. The greater the sound velocity in the
tested material, the greater will be the refraction angle.
The aim of this experiment was to determine the extent to which the wall thickness is affected by
the angle of incidence of the ultrasonic signal.
Fig. 6.3-1 (a) The curved component and (b) dimensions of the component (units in mm)
The specimen used in this experiment was a curved component, made from Inconel, the same
material as the turbine blades used herein. A picture of the test workpiece is shown in Fig. 6.3-1
(a). The component has twenty-four holes with diameters of 3mm, 1.5mm, and 1mm, at different
distances from the curved face. The wall thickness variations are shown in Fig. 6.3-1 (b). The
accurate measurement of the actual wall thicknesses is not critical, as the aim of this experiment is
to compare the deviation in thicknesses measured at different angles of incidence. Therefore, the
wall thicknesses were measured with a height gauge and cylindrical measuring pins. This was done
by, firstly, testing the diameter with the measuring pins and once the diameter was found, placing
the specimen on a flat cast iron surface with the pin inserted in the hole; then the height of the pin
was measured with the height gauge and finally the wall thickness was calculated by subtracting
the diameter from the height.
To reduce the complexity, the wall thicknesses were measured from the flat surface side. With the
specimen attached to the shaft, the specimen was rotated through various angles using the
stepper motor. However, because of the resolution of the stepper motor and the gearing, it was
233
not possible to rotate the stepper motor by exactly 0.5° but 0.495° was possible. Therefore,
fourteen different angles of incidence, varying from 0.495° to 6.435°, in increments of 0.495°,
were used for this experiment.
Experimental setup and procedures
As shown in Fig. 6.3-2, the component was clamped on the shaft and levelled in the same way as
the stepped component in Chapter 6.2.2.
Fig. 6.3-2 Clamp of the curved component
Once the component was levelled, the tank was filled with water sufficient to submerge the top
surface of the component by approximately 50mm. The robot was programmed to move the
ultrasonic probe from one end of the specimen to the other along a line parallel to the surface and
at an offset distance of 20.3 mm from it. The probe was also moved as close as possible to the
edge, where the wall thicknesses were measured with the height gauge. The movement was
paused every 0.2 mm along the line to acquire the ultrasonic data. At each point, 100 ultrasonic
signals were captured at a receiver gain of 70 for intercepting the backwall echoes and for
interpreting the interface echoes, 20 ultrasonic signals were captured at a receiver gain of 33.9.
Once the robot reached the other end of the specimen, the specimen was rotated clockwise by
0.495°. Then, the robot returned to the starting position and the measurements were repeated.
The results obtained at all the above-mentioned tilt angles were processed in Matlab. Thicknesses
were evaluated based on the TOF and compared. If multiple consecutive thicknesses were
captured, the minimum was taken.
234
Results and discussions
The wall thicknesses measured by the ultrasonic probe at different angles of incidence (𝜃1) are
compared with the thicknesses measured by a height gauge. Fig. 6.3-3 shows an image of
interpreted wall thicknesses at 𝜃1 = 0° and the reference locations of the holes (measured by the
height gauge). Images of other angles of incidence are included in Appendix II.
Fig. 6.3-3 Ultrasonic inspection image interpreted from experiment results obtained at 𝜃1 = 0°
It can be seen that the wall thickness measured at Hole 2 overlaps the wall thickness measured at
Hole 1 and it is difficult to accurately determine a value for Hole 2. It is because the wall thickness
at Hole 2 is slightly greater than that at Hole 1 by 0.27mm, and Hole 1 is a relatively big hole. Due
to the diameter of the ultrasonic beam, even the probe as it leaves Hole 1 and measures at a
location above the space between Hole 1 and Hole 2, it is still able to detect the circumference of
Hole 1, but it is a slightly increased wall thickness because of the curvature. When the probe
detects Hole 2, the wall thickness measured is almost identical to the wall thickness measured at
the circumference of Hole 1. Thus, there is no significant edge to separate the two wall
thicknesses. Therefore, in the following discussion, this hole is omitted. The rest of the holes are
detected. The absolute deviations are plotted against wall thickness in Fig. 6.3-4.
Fig. 6.3-4 Errors of measured wall thickness at 𝜃1 = 0
235
The results are good for wall thicknesses below 10mm, with the error mostly being less than
0.1mm. The sources of error can be
(i) the resolution of the acquired ultrasonic data, and
(ii) the error in thicknesses measured with the height gauge and calibration equation.
Above 10mm, the absolute errors show a big deviation between the two sets of measured
thicknesses. For thicknesses greater than 10mm, the general calibration coefficients are used.
Therefore, the results should not be considered as accurate interpretations and this suggests that
calibration maybe one of the biggest source for errors for thicknesses above 10mm.
The wall thicknesses measured by the ultrasonic probe at different angles of incidence were
compared with the thicknesses measured at 𝜃1 = 0°. Fig. 6.3-5 shows the deviation, 𝛥𝑇, at each
angle of incidence for each wall thickness, 𝑇𝑖,𝜃1,𝑗. ΔT, i.e. the y coordinates, are evaluated from:
𝛥𝑇 = 𝑇𝑖,𝜃1,𝑗− 𝑇𝑖,𝜃1,1
Eq. 6.3-1
where 𝑖 = 1, 2, … , 𝑛, 𝑗 = 1, 2,… ,𝑚, 𝑛 is the total number of measured wall thicknesses (23) and 𝑛 is
the total number of angles of incidence (12), and 𝜃1,1 = 0.
Fig. 6.3-5 ΔT against angle of incidence for each wall thickness
It is noted that the experiment results obtained at 𝜃1 = 6.435° are not included in the discussion as
the wall thicknesses were almost impossible to be evaluated with reasonable accuracy. Explanation
is given later in this section.
236
As the angle of incidence increases the average deviation ΔT varies non-linearly. Below 2.5° there
is a slight decrease in the measured wall thicknesses, as can be seen from the mean ΔT curve,
which is calculated by averaging the deviations at each angle of incidence. While the mean ΔT is
not significant below 2.5°, i.e. it is less than 0.06mm, at 1.485° the maximum ΔT is over 0.1mm
with a standard deviation of 0.043, as clearly shown in Table 6.3-1, which is considered as
noticeable error. Beyond an angle of incidence of 2.5°, the tendency to increase becomes very
obvious as indicated by the positive slope of the mean deviation curve. At and beyond 5.445°,
deviations greater than 1mm are shown.
Table 6.3-1 Maximum ΔT and standard deviations of ΔT
𝜃1 (°) 0.495 0.99 1.485 1.98 2.475 2.97 3.465
ΔTmax (mm) 0.034 0.068 0.102 0.171 0.205 0.396 0.746
S.D. (mm) 0.017 0.028 0.043 0.058 0.089 0.118 0.187
𝜃1 (°) 3.96 4.455 4.95 5.445 5.94
ΔTmax (mm) 0.640 0.960 0.991 1.957 1.626
S.D. (mm) 0.159 0.227 0.231 0.515 0.573
It was also noticed that with an increase in the angle of incidence, automatic detection of the
thicknesses using Matlab scripts became increasingly difficult. At 𝜃1= 5.445° and beyond, Matlab
scripts either calculated incorrectly or missed the feature completely; therefore, in such situations,
the ultrasonic data had to be analysed manually.
One reason for this problem can be traced back to the attenuation of the backwall echo. As shown
in Fig. 6.3-6, in general, the mean S/N of the backwall echoes decreases gradually with an increase
in the angle of incidence. The variations of S/N are also plotted in separate figures for each wall
thicknesses in Fig. IV-1 and Fig. IV-2 in Appendix IV. Note that the maximum achievable S/N in
these experiments was approximately 1.56. At several angles of incidence, e.g. from 𝜃1 = 3.465°
to 5.94°, the attenuation of some backwall echoes was extreme that these backwall echoes were
completely buried in noise, shown as S/N = 1 in the figure.
In Table 6.3-2, the holes that were undetected are listed, where T is the reference wall
thicknesses, ∅ is the diameter of the hole, Tm is the interpreted wall thicknesses from ultrasonic
measurement and “-“ indicates the wall thickness was not measureable. It can be seen that for T
= 6.89mm and 13.79mm, although the wall thicknesses were measured after it was missed at a
smaller angle of incidence, either these measured values are incorrect or the S/N of the backwall
echo is rather low. For T = 7.54mm, the S/N of the backwall echoes are generally low which may
suggest that the surface of backwall is rough and thereby causes noticeable amount of diffusion at
the backwall which in turn reduces the amplitude of the backwall echo.
237
Fig. 6.3-6 Variation of signal-to-noise ratio of the backwall echoes with angle of incidence
Table 6.3-2 Wall thicknesses and signal-to-noise ratio of the backwall echoes measured at different angles of incidence at five holes (units in mm otherwise specified)
T 6.86mm 7.54mm 13.79mm 10.66mm 9.09mm
∅ 0.99mm 1.48mm 1.48mm 1.48mm 2.97mm
𝜃1(°) Tm S/N Tm S/N Tm S/N Tm S/N Tm S/N
0 6.754 1.46 7.471 1.13 13.264 1.49 10.343 1.42 8.963 1.22
0.495 6.754 1.37 7.505 1.05 13.294 1.32 10.343 1.38 8.963 1.27
0.990 6.720 1.17 - - 13.264 1.22 10.343 1.41 8.937 1.42
1.485 6.720 1.06 7.505 1.06 13.264 1.19 10.373 1.27 8.963 1.27
1.980 6.720 1.16 7.505 1.18 13.294 1.18 10.373 1.19 8.937 1.24
2.475 6.754 1.08 7.539 1.01 13.355 1.13 10.373 1.13 8.963 1.27
2.970 6.789 1.08 7.573 1.05 13.659 1.05 10.434 1.11 9.017 1.33
3.465 6.891 1.17 8.217 1.02 - - 10.556 1.13 9.097 1.30
3.960 7.061 1.08 7.949 1.02 - - 10.586 1.09 9.230 1.24
4.455 7.198 1.03 8.404 1.02 - - 10.890 1.02 9.177 1.16
4.950 7.573 1.03 - - - - 11.286 1.01 9.470 1.17
5.445 - - 9.177 1.03 12.716 1.18 11.164 1.01 10.921 1.15
5.940 5.558 1.27 9.097 1.07 14.207 1.00 - - - - -
238
However, it is difficult to conclude whether a deeper or a shallower, bigger or smaller hole is more
prone to such attenuation in backwall echo. Apart from the depth and size of the subsurface
feature, attenuation of the ultrasonic wave can also be affected by many other factors, such as
previously mentioned surface finish as well as uniformity of the alloy and proximity of other
subsurface feature.
Fig. 6.3-7 Distorted interface echoes
The attenuation of the backwall echo is not the only cause of incorrect measurement or inability to
detect a feature. Starting at 4.455°, the first interface echo gets progressively distorted. As shown
in Fig. 6.3-7 (a), starting from 𝜃1= 4.455°, occasionally there is a small peak in the strongest valley
of the first interface echo. However, this does not affect determining the correct time of the
interface echo by Matlab script as valleys are ignored by the script and the small peak in the valley
is probably filtered because of its low amplitude. Starting from 𝜃1= 4.95°, as shown in Fig. 6.3-7
(b), a valley of low amplitude is present in the first peak of the interface echo. This can hinder the
correct detection of the interface echo using the current Matlab script, as the first peak in the
(a) 𝜃1= 4.455°, gain = 70 (b) 𝜃1= 4.95°, gain = 70
(c) 𝜃1= 6.435°, gain = 70
239
interface echo is then defined by two peaks and a valley. A way around can be developed by
filtering out the small valley between two strong peaks that are very close to each other in terms
of time and similar amplitudes. However, this might bring other unseen problems. As the angle of
incidence is increased, the amplitudes of the valley and peak also increase. At 𝜃1= 6.395°, as
shown in Fig. 6.3-7 (c), the first peak and the valley in the interface echo are significantly distorted
by the two valleys and peak that were previously quite small. This makes automatic as well as
manual determination of the location of the interface echo very difficult. One hypothesis is that the
distorted interface echo is possibly caused by the interference during reflection of the ultrasonic
wave. When an ultrasonic wave is reflected from an inclined surface, the entire width of the wave
is not reflected at the same instant; the portion of the wave that is reflected first travels across the
proportion that has not yet reached the interface and hence the interference.
Apart from having difficulty to correctly detect echoes, at high angle of incidence, it also brings
problems regarding extracting the correct thickness values for each hole. As can be seen in Fig.
6.3-8, the wall thicknesses plotted are significantly inclined and shifted. This makes determination
of correct wall thicknesses challenging. For example, for Holes from 7 to 10, as there are multiple
continuous wall thicknesses detected in vicinity, it is difficult to justify as to which wall thickness
corresponds to each one of these holes.
Fig. 6.3-8 Ultrasonic inspection image interpreted from experiment results obtained at 𝜃1 = 5.94°
Moreover, it was also observed that the width of the interface echo grew gradually with an increase
in the angle of incidence, as shown in Fig. 6.3-9. The time difference between the two peaks in an
interface echo at 𝜃1 = 0° is, as shown in Table 6.3-3, 90ns and this figure increases gradually with an
increase in the angle of incidence. At 𝜃1=5.445°, the time difference is increased by almost threefold.
Beyond this angle, as the interface echoes are substantially distorted, it was difficult to accurately
locate the peaks in the interface echoes and the time differences are only rough estimations.
Table 6.3-3 Comparison of time differences between peaks in interface echoes at various angles of incidence
𝜃1 (°) 0 0.495 0.99 1.485 1.98 2.475 2.97
Δt (10ns) 9 9.5 9.5 10 10 11 12
𝜃1 (°) 3.465 3.96 4.455 4.95 5.445 5.94 6.435
Δt (10ns) 14 16 19 22 26 27 29
240
Fig. 6.3-9 Time differences between peaks in interface echoes increase with angles of incidence
All the evaluated thicknesses and amplitudes are given in Table III-1, Table III-2 and Table III-3 in
Appendix III.
Conclusion
The results from these experiments suggest that the Olympus V316-SU ultrasonic probe is very
sensitive to the angle of incidence which should be kept within 3.465° to avoid excessively
attenuated backwall echo that may result in failure of feature recognition. For angles greater than
3.465°, in addition to the attenuation of the backwall echo, the interface and backwall echo get
distorted and in some cases, recognition of the appropriate peaks/valleys become difficult. The
analysis shows that it is preferable to keep the angle within 1° to ensure that the angle of
incidence has a minimum effect on the measured wall thicknesses.
Regarding the accuracy of the measured wall thicknesses at 𝜃1 = 1°, the average error is 0.159mm
with a standard deviation of 0.174mm. The cause of this big error is the inaccuracy of the general
calibration equation. Excluding the wall thicknesses evaluated using the general calibration
equations, i.e. thickness > 10mm, the mean error is 0.081mm with a standard deviation of
0.078mm. These errors are well within the accuracy requirement, which is 0.3mm.
241
Measuring a curved component from curved surface
Background, aim and methodology
The aim of this experiment was to test the capability of the ultrasonic probe when measuring wall
thicknesses from curved surfaces.
The test was carried out on the OKK 4-axis milling machine, which is shown in Fig. 6-1. The
specimen used in this experiment is the curved component as shown in Fig. 6.4-1, slightly different
from the previously introduced one. This curved component is also made of Inconel but the
number of holes was reduced to 16 to simplify the analysis. The geometry of the specimen was
measured on a CMM at ELE. The acquired surface points were fitted with a B-spline curve which
was then differentiated to calculate the probe path. The probe path was determined such that the
ultrasonic probe was positioned always perpendicular to the surface and 20mm above the blade.
Fig. 6.4-2 Experimental setup for measuring the curved component on the OKK milling machine
y
z
x
1 2
3 4
5 6
7 8
9 10
11
12 13
14
15 16
Fig. 6.4-1 The curved component
Data cable
Water tank
Ultrasonic probe
Fixture and rubber seal
Specimen
Machine table
Spindle
Computer Rotary axis
242
An underwater environment was provided by a Perspex water tank, which had a hole in one of its
side walls to allow the fixture to be fixed on the rotary axis. The gap between the hole and fixture
was sealed with a rubber seal.
Experimental setup and procedures
The water tank was placed and clamped on the machine table and a fixture with jaws was bolted
onto the rotary axis. The specimen was then clamped in the fixture, with the curved surface facing
upwards and the workpiece aligned along the machine Y axis. The two side faces were made
vertical and this was checked by a dial gauge. The specimen datum was set at the centre of one of
the edges of the component as shown in Fig. 6.4-1.
Next, the calculated probe path was loaded into the milling machine’s controller and the ultrasonic
probe was connected to the computer. Once the probe was initialised and started to acquire data,
the milling machine was started.
The collected ultrasonic data were processed with Matlab script and wall thicknesses were
evaluated. The results were also checked manually to ensure the evaluation was accurate.
Results and discussions
Table 6.4-1 shows the reference wall thicknesses as measured by the CMM machine, the ultrasonic
measured results and the calculated deviations between the two sets of wall thicknesses.
Table 6.4-1 Comparison between CMM results and Ultrasonic results
Hole # 1 2 3 4 5 6 7 8
CMM (mm) 1.193 1.179 5.715 5.689 1.146 1.158 5.674 5.660
Ultrasonics (mm) 1.201 1.186 5.982 5.890 1.125 1.186 5.692 5.493
Deviation (mm) 0.008 0.006 0.267 0.201 0.021 0.027 0.017 0.167
Hole # 9 10 11 12 13 14 15 16
CMM (mm) 1.191 1.206 5.653 5.656 1.192 1.115 5.679 5.687
Ultrasonics (mm) 1.186 1.201 5.738 5.553 1.125 1.155 - 5.738
Deviation (mm) 0.006 0.005 0.084 0.104 0.068 0.040 - 0.050
The timestamp of each ultrasonic signal was processed and combined with the interpreted
thickness values to create a 2D image, as shown in Fig. 6.4-3, which shows the surface of the test
component and the detected subsurface features. Also shown in this figure is the position and size
of the holes measured by the CMM. It is noted that starting from hole 9, the thicknesses indicating
holes were displaced from the position measured by CMM. This was possibly because the actual
machine feedrate was slower than the feedrate specified in the NC program and therefore, the
calculated distance was greater. This was reasonable because the spindle had to wait for the 4th
243
axis of the machine to finish its rotation and at hole 9 and beyond the angle of rotation was much
greater and the wait time was increased.
Fig. 6.4-3 Processed ultrasonic thickness data
Generally, the wall thicknesses measured by the ultrasonic probe are very similar to those
measured on the CMM, especially for holes that are close to the surface, i.e. wall thicknesses
around 1.2mm such as at holes 1 and 2 The maximum deviation of 0.267mm occurs at hole 3
where the wall thickness is 5.714 mm. It is not the magnitude of the wall thickness because at
hole 7 with a similar wall thickness the error is 0.0017 mm. One probable cause of this was that
the ultrasonic probe was not exactly normal to the surface, leading to refraction of the ultrasonic
waves at the interface and resulting in increased value for the wall thickness. At Hole 15, the
ultrasonic probe failed to detect the correct wall thickness. From Fig. 6.4-3, it can be seen that the
thicknesses measured near X = 90 was approximately the thickness of the block, which means the
hole was not detected.
Also, it was noticed during the experiment that the milling machine jerked heavily which could
cause the ultrasonic probe being positioned at a wrong direction.
Conclusion
The wall thicknesses as measured by the ultrasonic probe were close to the actual wall
thicknesses, with the average error for 12 of the holes being 0.036mm, whilst for remaining three
holes, except for Hole 15, (Hole 3, 4 and 8) the average error was substantially more (0.212mm),
probably due to jerking of the machine or the inaccurate probe direction.
244
Measuring the disc blade on a 4-axis milling machine
Background, aim and methodology
Previous experiments conducted with the stepped and curved components13 have shown that the
ultrasonic probe is capable of measuring wall thicknesses accurately, even if the component has
curved surfaces. However, before the prototype machine could be designed, it was still important
to test the capability of the probe on measuring a real turbine blade.
The aim of this experiment was to examine the accuracy of the probe when measuring wall
thicknesses of holes in a turbine blade.
Tests on the disc blade were carried out on the OKK 4-axis milling machine, as shown previously in
Fig. 6-1. The disc blade, as mentioned earlier, has no fir tree roots. Instead the blade is welded on
to a circular disc, as shown in Fig. 6.5-1 (a). There is a step machined on the disc which is useful
for program datum setup. The aerofoil surfaces of this blade were measured on a CMM at ELE. The
acquired surface points were fitted with Bezier curves and differentiated to calculate the probe
path. The probe path allowed the ultrasonic probe to be positioned perpendicular to the cross
section and 20mm above the blade. The machined step on the disc was chosen as a datum for the
CMM points. A 10mm hole was drilled in the centre of the disc so that the specimen could be
mounted on the rotary axis.
(a) (b)
Fig. 6.5-1 The long blade and wall thicknesses from both convex and concave surfaces (units in mm)
13 These experiments were also conducted on the OKK 4-axis milling machine before they
were repeated in the prototype machine.
x
y Step for datum setup
245
The cross section tested in this experiment was the section at the top of the blade, where the wall
thicknesses could be measured with a vernier caliper. The measured thicknesses are shown in Fig.
6.5-1 (b).
Experimental setup and procedures
The experimental setup was similar to the one shown in Fig. 6.4-2. The water tank was placed and
clamped on the machine table and the fixture was bolted onto the rotary axis. The long blade was
then bolted on the fixture. The rotary axis was adjusted so that the surface of the step on the
circular disc was vertical and facing outwards. The position was checked by running a dial gauge
which was held in the spindle of the milling machine; the dial gauge was moved up and down and
across the entire length of the step. The specimen datum was set to the surface of the step as
shown in Fig. 6.5-1 (a). In this way, the part program zero was synchronised with that on the
CMM.
Next, the calculated probe path was loaded into the milling machine’s controller and the ultrasonic
probe was connected to the computer. Once the probe was initialised and started to acquire data,
the milling machine was started. The collected ultrasonic data were processed with Matlab scripts
and wall thicknesses were evaluated.
Results and discussions
Table 6.5-1 Wall thicknesses measured with ultrasonic probe compared with CMM results
Convex Concave
Hole #
Vernier
Caliper
(mm)
Ultrasonics (mm)
dt (mm)
α1
(°)
Vernier
Caliper
(mm)
Ultrasonics (mm)
dt (mm)
α1
(°)
1 0.870 - - -5.82 1.960 - - 9.88
2 1.020 1.139 0.119 -3.00 2.270 - - 7.58
3 1.490 1.500 0.010 -1.20 2.350 - - 5.60
4 1.550 1.566 0.016 -0.12 2.100 2.256 0.156 4.00
5 1.380 1.402 0.022 0.33 1.930 2.092 0.162 2.86
6 1.200 1.188 -0.012 0.71 1.820 1.927 0.107 1.20
7 1.400 1.402 0.002 1.11 1.610 1.697 0.087 0.03
8 1.680 1.796 0.116 1.51 1.420 1.517 0.097 0.12
9 1.500 1.566 0.066 1.93 1.370 1.320 -0.050 0.30
10 1.680 1.697 0.017 2.41 1.150 1.122 -0.028 0.55
11 1.550 - - 3.34 0.970 0.925 -0.045 0.78
12 1.370 - - 4.21 0.580 - - 1.02 1 α represents the longitudinal inclination of the surface
The evaluated wall thicknesses are compared with CMM measurements in Table 6.5-1. The twelve
holes are numbered starting from the leading edge to trailing edge.
246
The first thing to note is that the ultrasonic probe failed to detect seven wall thicknesses. For Hole
12 from the concave side, the wall thickness, which is 0.58mm is outside the measurement range
of the ultrasonic probe. For the rest of the holes, the failure of detection was likely due to the
inability to rotate the tool about the Y-axis, which meant that it was not possible to cater for the
slope of the blade in the longitudinal direction. As shown in Table 6.5-1, the longitudinal
inclinations (α) of the surfaces above these holes are substantial, these inclinations being
equivalent to the angles of incidence of ultrasound. As discussed in Chapter 6.3, at an angle of
incidence higher than 3.465°, it is possible that the backwall echo is greatly attenuated making the
signal undetectable. Significant errors have also been introduced due to the angle of incidence not
being normal to the blade surface. According to the CMM data, the longitudinal inclinations are
determined at the surface above each hole from both surfaces. Interface echoes captured above
these holes are distorted in a similar way as shown previously in Fig. 6.3-7 (c). Fig. 6.5-2 (a) and
(b) shows two examples of the distorted interface echo captured above Hole 1 from the convex
and concave surfaces respectively, compared with a healthy interface echo shown in Fig. 6.5-2 (c).
The first peak of the interface echo in Fig. 6.5-2 (a) was separated into two peaks by a valley and
both peaks in the interface echo are absent in Fig. 6.5-2 (b).
(a) (b)
(c)
Fig. 6.5-2 Distorted interface echoes captured above Hole 1 from (a) the convex surface and (b) the concave surface, gain = 60 compared with (c) a healthy interface echo
247
The absence of a wall thickness for Hole 12 from the concave surface could not be attributed to
the out-of-normality of the probe which for this hole was only 1.02°. The reason for this is the
limitation of the ultrasonic probe; because the wall thickness was only 0.6 mm, the backwall echo
overlaid the interface echo and it was difficult to detect the time difference between the two
peaks.
Apart from the undetected wall thicknesses, some of the measured wall thicknesses are not
accurate, such as those for holes 2 and 8 from the convex surface and for holes 4, 5 and 6 from
the concave surface. These surfaces, in the vicinity of the holes, have a significant inclination in the
longitudinal direction and this is possibly the biggest source of error. Other possible sources of
error include the resolution of the acquired data, accuracy of calibration and error in measuring
reference wall thicknesses.
Conclusion
The results of the experiment suggest a 4-axis machine is definitely inadequate for the job, as the
machine lacks an additional rotary axis to keep the probe normal to the blade in the longitudinal
direction. This experiment also reveals the difficulty of obtaining reference values with which the
ultrasonic measured wall thicknesses can be compared. Because of this difficulty, the wall
thicknesses were measured and compared at the top section of the disc blade.
On the other hand, these experiments show promise that when the ultrasonic probe is positioned
correctly, the results can be good. Therefore, if a 5-axis machine or a 6-axis robot is deployed as
the actuator of the probe, the test results could be improved.
248
Measuring the disc blade on the inspection machine
Background, aim and methodology
In this experiment, the disc blade, which was tested on the OKK milling machine, is re-tested on the
prototype inspection machine. The major problem found previously when testing this blade on the
milling machine was lack of an additional axis to tilt the ultrasonic probe in the longitudinal direction of
the blade. With a 6-axis robot, the ultrasonic probe can be positioned normal to the surface of the
blade.
The aim of this experiment was to test the capability of the robot and compare the results obtained
with those obtained previously with the OKK machine.
The probe path for this experiment was generated from the surface data acquired at ELE during the
previous experiment. The same section i.e. section at the top of the blade, was selected so that the
previously obtained results could be compared. The probe path generation algorithm was slightly
different from the one discussed in Chapter 5.4, which was developed after this experiment. Instead of
having a scanning window above each hole, the robot was paused at 500 different positions over the
entire cross section. The distance between each two path points was approximately 0.15mm. Four
rotations of the blade were required for a complete scan.
Experimental setup and procedures
Fig. 6.6-1 Clamp of the disc blade on the inspection machine
The blade was bolted on the shaft through the hole on the circular disc, as shown in Fig. 6.6-1.
The shaft was rotated until the majority of the convex surface of the blade was approximately
horizontal. The blade was then measured by the laser sensor, which was held in the robot, at 50
different locations on the convex surface. The point data were loaded in Matlab and the previously
calculated probe path was localised with the help of these points, thus transforming the probe path
into the robot co-ordinate system. The probe path was automatically divided into several sections
249
based on the inclination of the surface at each path point. For each section, the angles of rotations
of the shaft, which were required to bring the section inside the boundary of scan, were calculated.
The shaft was then rotated by these angles and for each rotation of the shaft, the surface was
brought within the boundary of the scan and was measured with the laser sensor. These laser
points were used to localise the corresponding section of the probe path.
After all the sections of the probe path were localised, the laser sensor was returned to the tool
magazine and the ultrasonic probe was attached. In the meantime, the tank was filled with water,
until the water was sufficient to submerge the blade by approximately 50mm. Ultrasonic testing
was then started. After all path points defined in the probe path for convex surface were visited,
the above procedures were repeated for measuring the concave surface.
Results and discussions
Fig. 6.6-2 shows the results of reverse engineered models of the blade. The convex and concave
surfaces were scanned at different times (i.e. with different set-ups) with the CMM and therefore it
was not possible to stitch them together. Therefore, the two surfaces had to be modelled separately.
Fig. 6.6-2 Fitted B-spline surfaces (units in mm)
The aerofoil section of the blade, which was measured with ultrasonics in this experiment, is
shown in Fig. 6.6-3. Also shown in this figure are the approximate hole positions and the calculated
(a) Convex (b) Concave
250
surface normals. These surface normals represent the directions of ultrasound and were used to
construct the probe path. As can be seen in Fig. 6.6-3 (c) and (d), the curves extracted from the
(a) Convex (b) Concave
(c) Convex
(d) Concave
Fig. 6.6-3 Surface normals at the top cross section (units in mm)
251
B-spline surfaces accurately fit the CMM points and the directions of the surface normals are mostly
uniform along the curvatures of the cross section. This confirms the accuracy of the B-spline fitting
procedure as well as the probe path calculations.
The results of this experiment are compared with those obtained from the experiment conducted
on the OKK machine. The comparison is shown in Table 6.6-1. In the table, 𝑑𝑡 denotes the
differences between the thickness values measured with the ultrasonic probe and the CMM. The
subscripts 𝑂𝐾𝐾 and 𝐼.𝑀. indicate the experiment in which the thickness values were obtained;
specifically, 𝑂𝐾𝐾 refers to the experiment conducted on the OKK machine and 𝐼.𝑀. refers to this
experiment. The values in column ∆𝑑𝑡 were evaluated by |𝑑𝑡𝑂𝐾𝐾| − |𝑑𝑡𝐼.𝑀.| ; literally, negative
values indicate worse results and positive values indicate improved results, all in comparison with
the OKK experiment from the perspective of this experiment. Also the thicknesses obtained from
these sources, caliper (as the reference thickness), experiment on OKK and this experiment were
plotted in Fig. 6.6-4.
Table 6.6-1 Comparison between errors of evaluated thicknesses from two experiments
Hole # Convex Concave
𝑑𝑡𝑂𝐾𝐾 (mm) 𝑑𝑡𝐼.𝑀. (mm) ∆𝑑𝑡 (mm) 𝑑𝑡𝑂𝐾𝐾 (mm) 𝑑𝑡𝐼.𝑀. (mm) ∆𝑑𝑡 (mm)
1 - -0.022 - - 0.115 -
2 0.119 0.102 0.017 - 0.068 -
3 0.01 0.092 -0.082 - 0.119 -
4 0.016 0.098 -0.082 0.156 0.074 0.082
5 0.022 0.005 0.017 0.162 0.014 0.148
6 -0.012 0.021 -0.009 0.107 -0.073 0.034
7 0.002 -0.015 -0.013 0.087 0.038 0.049
8 0.116 0.034 0.082 0.097 0.097 0
9 0.066 -0.016 0.050 -0.05 0.015 0.035
10 0.017 -0.016 0.001 -0.028 -0.060 -0.032
11 - -0.033 - -0.045 -0.045 0
12 - -0.050 - - - -
It can be seen that out of 24 holes, 23 holes were detected in this experiment. The hole that could
not be detected had a wall thickness of 0.58mm which was outside the capability range of the
probe. Six holes that were not detected in the previous experiment, possibly due to the inclination
in the longitudinal direction, were detected in this experiment and the accuracy at these holes,
except for Hole 1 and 3 from the concave side, is good. As for the other wall thicknesses, the
accuracy was, in general, improved.
However, note that significant differences were observed between the thicknesses evaluated in this
experiment and the reference thicknesses at holes closer to the leading edge, as for example in
the case of holes 1-4. It was also found that the interface echoes in this region were slightly
distorted and the echoes did not exhibit the expected – i.e. the wall thicknesses approaching a
minimum value as the probe travels towards the hole.
252
Fig. 6.6-4 Comparison between thicknesses obtained from difference sources (units in mm)
Conclusion
The mean error of the measured wall thicknesses is 0.053mm with a standard deviation of
0.037mm and the maximum error is 0.119mm. In this experiment, the probe was positioned
normal to the surface and the improvement in the wall thickness can be largely attributed to the
probe being normal.
(a) Convex (b) Concave
253
Reverse engineering of the PSM104 turbine blade
Background, aim and methodology
With a 6-axis robot, the ultrasonic probe can be positioned normal to the surface of the blade.
Therefore, when positioning the probe at the required position, one must ensure that the axis of
the probe makes the appropriate angles with the X- and Y-axes (see Fig. 5.4-1). In order to
calculate probe paths for a surface, the surface should be, firstly, reverse engineered and then
represented as a B-spline surface. The B-spline surface is, next, differentiated with respect to u
and w, to evaluate the direction of the normal vector at a point on the surface.
The aim of this experiment was to calculate a probe path based on the theory introduced in
Chapter 5.4 and measure the turbine blade with the ultrasonic probe using the probe path.
The method for reverse engineering used in this experiment was discussed in Chapter 5.2, which
involves digitization of the surface, B-spline curve fitting, Delaunay’s triangulation, shape
preserving parameterisation and B-spline surface fitting. The cross section of the aerofoil selected
for calculating the probe paths is 60mm from the top of the blade.
Fig. 6.7-1 (a) A PSM104 turbine blade with the fixture; (b) the turbine blade being measured on the CMM
In this experiment, the aerofoil surface of a PSM104 turbine blade (see Fig. 6.7-1 (a)) was digitized
with a Nikon LK G90C CMM with a 2mm ruby stylus.
(a) (b)
254
Start
End of probe path reached
Ultrasonic testing initialisation
Go to the next path point
Data acquisition
Laser measurement and localisation of probe path
Blade clamping
End
Drain water
Y
N
Fig. 6.7-3 Procedures of measuring blades in the prototype cell
Experimental setup and procedures
The turbine blade fixture which was introduced in Chapter 3.8 was
bolted on the CMM granite table and the turbine blade was clamped
in the fixture, as shown in Fig. 6.7-1. As only the aerofoil section is
of interest, the root section was not measured. During inspection,
each cross section of the aerofoil surface was divided into five
regions, which are shown in Fig. 6.7-2. The reason for doing is that
for each region, the A and B axes of the CMM, i.e. the orientation of
the stylus, could be kept stationary and roughly perpendicular to
the surface in the middle of this region. When one region was
completely scanned, the orientation of the stylus was adjusted to
suit the next region. The measurement took place between the
aerofoil section
approximately 1mm and 87.5mm from the top edge.
The CMM measurement involved a coarse
measurement and a detailed measurement. During the
coarse measurement, approximately 200 points were
measured manually with the CMM using the joystick.
Based on these 200 points, five coarse meshes, one
representing each region of the aerofoil part of the
blade, were generated and fitted with B-spline
surfaces in Matlab. Next, approximately 3500 points
were generated on the fitted surface. These 3500
points were then used to create a CMM tool path
which measured the surfaces automatically at these
3500 coordinates.
The measured data points were processed using
Matlab scripts. These data points were triangulated
using Delaunay’s rule, parameterised with shape-
preserving method, and finally fitted with B-spline
surfaces.
Next, the probe paths were calculated based on the
theory described in Chapter 5.4. The generated B-
spline surfaces were differentiated and thereby, the
tangent vectors at each data point were found. The
Fig. 6.7-2 Five regions defined on the surface of
the blade
255
positions of the holes at the section 51 mm from the top face of the blade were extracted from the
CAD model of the blade and were localised in the CMM coordinate system with the ICP algorithm.
Then, the closest points to each hole on both the concave and convex surfaces were found. A scan
window of approximately 2mm wide on each side of every closest point was created and in each
scan window, twenty tool paths points were defined.
Fig. 6.7-4 Turbine blade fixed on the shaft of the inspection machine
The fixture was then fixed on to the shaft and the turbine blade was clamped in the fixture as
shown in Fig. 6.7-4. The stepper motor was started and turned the turbine blade so that region A
was roughly in the X-Y plane. The surface was first measured with the laser sensor, which was
carried by the robot. For each rotation of the blade, point data were acquired at 40 different
locations on the aerofoil surface. At the end of each laser measurement session, the blade was
rotated clockwise by the angle specified in the probe path data file. The acquired laser points were
imported into Matlab for localising the probe path, i.e. transforming the probe path to the
coordinate system of the inspection machine.
After the path was localised, the laser sensor was returned to the tool magazine and the ultrasonic
probe was attached. In the meantime, the tank was filled with water until the water level was
approximately 50mm above the turbine blade. The localised probe path was then loaded into the
control software and the ultrasonic testing was started. At each path point defined in the probe
path, the movement of the robot was paused for ultrasonic data acquisition. For each path point,
100 ultrasonic signals were acquired at a gain of 70 for interpreting the backwall echoes and
additionally 20 ultrasonic signals were acquired at a gain of 56 for interpreting the interface
echoes.
After all the path points were visited and the data acquired, the probe was returned to the
magazine.
256
Results and discussions
6.7.3.1. Reverse engineering and probe path generation
In Fig. 6.7-5 (a), data points acquired from the CMM are plotted in 3D. Blue, orange, yellow, green
and purple points represent regions A, B, C, D and E (see Fig. 6.7-2) respectively. As can be seen,
on the concave surface, i.e. the CMM points on parts D and E are not connected to their adjacent
regions. This was because at the time of measurement, the CMM was only calibrated for four
stylus orientations and the missed area14 required an additional calibration.
Fig. 6.7-5 (a) CMM data points collected on Blade 1, (b) generated Model 1 and (c) Model 2 (units in mm)
Two aerofoil surface models, Models 1 and 2, were generated. Each model contains 500,000 points.
Model 1, as shown in Fig. 6.7-5 (b), was generated by fitting the concave and convex surfaces
separately, as a result of which, the generated surfaces are disconnected and each surface
contains 250,000 points. Model 2, as shown in Fig. 6.7-5 (c), was generated by fitting a B-spline
surface to the complete set of digitized data and this avoided the discontinuity at the leading edge
seen in the first model. Both surface models are visually smooth and both B-spline models closed
the gap on the concave surface.
Table 6.7-1 Linear errors of surface fitting of B1 (units in mm)
M1 M2
Mean Max Min S.D. Mean Max Min S.D.
Convex 0.062 0.191 0.001 0.029
0.064 0.353 0.002 0.034
Concave 0.054 0.181 0.001 0.025 0.062 0.163 0.002 0.026
Overall 0.059 0.191 0.001 0.028 0.063 0.353 0.002 0.031
The goodness of the fittings was assessed by calculating the linear deviations between the CMM
points and the corresponding closest points in the fitted point sets. Table 6.7-1 shows the mean,
14 The maximum gap distance of the missed area is 9.64mm and minimum is 5.58mm.
257
maximum and minimum errors and standard deviation, where M1 stands for Model 1 and M2
stands for Model 2. Overall, both models are accurate representations of the aerofoil surface. The
goodness of the fitting on the concave surfaces for both models is slightly better than that for the
convex surfaces. This is more obvious in Model 2, as the maximum error on the convex surface is
nearly twice as much as that on the concave surface and the standard deviation is also greater on
the convex surface. The less accurate fitting of the convex surface also makes Model 2 slightly
inferior to Model 1.
Fig. 6.7-6 Surface fitting error of (a) the convex surface and (b) the concave surface of Model 1, and (a) the convex surface and (b) the concave surface of Model 2 (units in mm)
Fig. 6.7-6 shows the deviations at each data point. The maximum errors were found near the end
of a scan. This is especially the case for Model 2, in the area close to the leading edge. One reason
behind this is likely to be the inaccuracy of the CMM calibration. It must be mentioned that each
scan required the probe on the CMM to be tilted to a different position. Fig. 6.7-7 clearly shows the
mismatch between two sets of CMM points; ideally, the two sets should overlap in the area
(a) (b)
(c) (d)
258
indicated by the green box, if the CMM had been precisely calibrated. This can also be seen in Fig.
6.7-5 (a), where there is a mismatch between the orange and blue data points. Before fitting the
B-spline curve, these points were identified, extracted and the blue points were discarded. This,
however, resulted in discontinuity in the CMM points, as seen in Fig. 6.7-7 (c). In the later B-spline
curve fitting, these discontinuities were erased, as seen in Fig. 6.7-7 (d).
Fig. 6.7-7 (a) CMM points measured at section A and B; (b) Mismatch between two sets of data points when the same surface was measured but with different CMM orientations of the probe on the CMM; (c) Unmatched points on the convex surface have been removed; (d) B-spline curve smoothed out the displacement found in CMM data after unmatched points were removed. (units in mm)
(a) (b)
(c) (d)
259
Another reason, which could apply to Model 2, is that the leading edge was not completely
digitized and the gap was filled by a curve with continuity at its ends.
Model 1 is slightly closer to the CMM data points, but Model 2 includes the leading edge. However,
for some turbine blades, such as this one, PSM104, the leading edge is of no consequence and
therefore Model 1 is sufficient for the calculation of probe paths. For blades whose leading edge is
required to be tested, the leading edge must be included in the digitization to improve the
accuracy of the B-spline surface around the leading edge.
Fig. 6.7-8 shows the calculated probe paths using Model 1. The green segments indicate the
orientation of the probe. This path was later tested on the prototype cell and the results are
presented in the next section.
Fig. 6.7-8 Probe path for measuring from the convex surface ((a) and (b)); probe path for measuring from the
concave surface ((c) and (d)) (units in mm)
(a) (b)
(d) (c)
260
6.7.3.2. Ultrasonic testing
Wall thicknesses of this turbine blade were obtained from three sources: ultrasonic data acquired
on the inspection machine, ultrasonic data acquired manually using a touch probe at ELE and a CT
scan image (see Fig. 6.7-9). However, due to the limited penetration ability of the CT scanner, the
edges of the holes are not clearly defined and thus the confidence bounds of the estimated
thicknesses shown in the image is around ±0.08mm. Also it was not possible to define the concave
edge from the CT image. Thus the section curve of the blade was extracted from the B-spline
surface and plotted on the CT image. The wall thickness values measured on the concave side may
be less accurate.
Fig. 6.7-9 Wall thicknesses obtained from a CT image of the blade cross section (units in mm)
H 1 4 2 . 2 2 9
T 1 5 - 1 . 6 3 0
T 1 6 - 1 . 5 2 8
T 1 7 - 2 . 0 2 0
T 1 8 - 3 . 7 6 2
T 1 9 - 3 . 5 8 9
T 2 0 - 3 . 8 5 0
T 2 1 - 3 . 7 2 9
T 2 2 - 3 . 2 2 2
T 2 3 - 3 . 4 0 1
T 2 4 - 1 . 3 9 6
T 1 3 - 2 . 6 5 4
T 1 - 0 . 5 0 1
T 2 - 1 . 8 7 0
T 3 - 1 . 6 1 0
T 4 - 2 . 2 5 5
T 5 - 3 . 6 2 4
T 6 - 4 . 3 3 4
T 7 - 3 . 3 6 7
T 1 0 - 4 . 6 1 6
T 8 - 3 . 5 3 4
T 9 - 5 . 0 4 0
T 1 1 - 4 . 0 7 5
T 1 2 - 4 . 4 9 1
261
Fig. 6.7-10 Wall thicknesses measured using the inspection machine and touch probe compared with the reference values
Nevertheless, values interpreted from the CT scan image are used as references for comparing the
accuracy of wall thicknesses obtained from other two sources as shown in Fig. 6.7-10. The mean
errors and standard deviations (S.D.) are compared in Table 6.7-2. It is noted that the touch probe
failed to measure wall thicknesses at T20, T21 and T22 and the inspection machine was not able
to measure wall thickness at T1 which is smaller than 0.6mm, i.e. it is outside the measurement
range of our ultrasonic probe. In addition, at T8, the error was over 3mm. It is likely that instead
of measuring T8, the inspection machine was measuring the hole which corresponds to T20 from
the convex side. Scanning windows were determined based on the hole positions in the CAD model
and when the actual position of the hole is very different from the CAD model, which was probably
the case at T8, detection of the hole may fail. This suggests the scanning windows should be wider
to tolerate such inaccuracy in hole positions. These wall thicknesses are not involved in the
calculation in Table 6.7-2.
Table 6.7-2 Mean errors and standard deviations of wall thicknesses measured on the inspection machine and using the touch probe
ΔTI.M. ΔTELE
Mean absolute error (mm) 0.1385 0.3362
S.D. (mm) 0.1821 0.3206
In general, the accuracy of wall thicknesses measured on the inspection machine is better than
they were measured using the touch probe at ELE. Mean absolute error was reduced by 58.8%.
However, wall thicknesses measured at T5 and T18 using both the inspection machine and the
touch probe are significantly deviated from the reference values negatively and it is noted that at
these two thicknesses, the same hole was measured. This is possibly due to the surface
262
roughness of the hole that the ultrasonic probes measured a depression on the surface which was
not captured by the CT scanner.
Summary
A B-spline model has been developed for the aerofoil section of the PSM104 turbine blade; two
representations were obtained one of which did not include the leading edge. The first model
which included the leading edge had sufficient information to generate the probe paths.
The probe path was tested by measuring the turbine blade. Results shows the average accuracy of
wall thicknesses measured by the inspection machine is 0.1385mm which is 58.8% more accurate
than the wall thicknesses measured using touch probes at ELE.
263
Measuring three PSM104 turbine blades with a common
probe path
Background, aim and methodology
If each and every blade in a batch has to be reverse engineered and its probe path determined,
then the automated process of inspection is likely to be equally time-consuming as the manual
process and one of the main advantages of automating the procedure will be lost.
The aim of this experiment is to investigate whether a common probe path can be used for all the
blades in a batch. This aim can be achieved by meeting two objectives: (i) quantify the geometric
differences between blades and (ii) determine the effect of these differences on measured wall
thicknesses.
To meet these objectives, three turbine blades of Model PSM104 were selected from a batch for
the experiment. Let the three blades be denoted as B1, B2 and B3. To save some effort, the blade
described in the previous sections was selected as one of the blades (i.e. blade B1).
In order to determine the geometric differences between B1, B2 and B3, all three turbine blades
must be first reverse engineered. Of course, blade B1 has already been reverse engineered and
was described in the previous section. Thus only blades B2 and B3 had to be reverse engineered.
They were measured again using the CMM and their B-spline models created; the B-spline models
of B1, B2 and B3 were then compared geometrically both for linear and slope differences.
Let the probe path calculated from blade B1 in the previous section be referred to as P1. Two more
probe paths (P2 and P3) were calculated from the B-spline models of B2 and B3 respectively. Each
probe path was used to measure the wall thicknesses of holes in the three blades; these holes lie
in a cross-section 51 mm from the top of the blade. Since the holes in one blade have three probe
paths associated with it, it meant that, Hole 1, in blade B1, has three wall thickness values
associated with it, i.e. B1-P1, B1-P2 and B1-P3. The same hole
in blade B2 has three wall thicknesses and a further three
when blade B3 is considered.
Experimental setup and procedures
The setup and procedures for measuring B2 and B3 on the
CMM were similar to the setup and procedures for measuring
B1 described in Chapter 6.7.2. The fixture was bolted on the
CMM table and the blade was then clamped in the fixture. In
this experiment, the surfaces of the blades were divided into Fig. 6.8-1 The four regions A, B, C and D defined on the surface
of the blade
264
Start
End of current probe path?
Another probe path to test?
Ultrasonic testing initialisation
Go to the next path point
Data acquisition
Laser measurement and localisation of probe path
Blade selection and clamping
End
Drain water
Remove current blade
Another blade
to test?
Y
N
N
N
Y
Y
Fig. 6.8-2 Procedures of measuring blades in the prototype cell
four regions. The four regions are shown in Fig.
6.8-1. The measurement took place between the
aerofoil sections at 1.8mm and 61mm from the top.
This was about 26.5mm shorter than the
measurement of B1.
B2 was used for coarse measurement and
approximately 250 point data were acquired. Based
on these 250 points, a refined mesh containing
approximately 2000 data points were generated
with B-spline surface fitting. The CMM was then
programed to touch and measure the aerofoil
surfaces of B2 at these 2000 points. The same
procedure was used to acquire 2000 data points on
B3.
After the blades were measured, the collected point
data were processed with Matlab scripts. Examining
the results, which are discussed later in this
chapter, the CMM point data collected on the
concave surfaces were inaccurate. Therefore, it was
decided that only the convex surfaces were to be
analysed. Two probe paths, P2 and P3, based on
the convex surfaces of B2 and B3 respectively, were
generated for measuring the convex surfaces of B1,
B2 and B3 in the prototype cell.
The fixture was removed from the CMM table and
fixed on the shaft in the prototype cell. B1, B2 and
B3 were clamped in the fixture and measured in
sequence. The clamping of the blades was similar
to the clamping shown in Fig. 6.7-4. B2 and B3
were tested with PP1 (the probe path generated
previously from the convex surface of B1), P2 and
P3 and B1 was tested with P2 and P3. The
procedure for the rest of the experiment is
described in Fig. 6.8-2.
The test blade was first measured with the laser
sensor at approximately 40 different locations on the surface of the blade for each rotation defined
265
in the selected probe path. With these laser point data, the probe path was localised to the
coordinate system of the inspection cell. The tank was next filled with water and the ultrasonic
probe was attached to the robot face plate, and the ultrasonic testing was started for this blade. At
each path point defined in the probe path, the robot was paused to allow 100 ultrasonic signals to
be acquired at a gain 70 for interpreting backwall echoes and 20 ultrasonic signals at a gain of 56
for interpreting interface echoes.
After all the path points were visited, water was drained from the tank and the blade was rotated
back to its initial state. The next probe path was selected and the surface of the blade was
measured again at 40 points with the laser sensor for each rotation defined in the path to allow
path to be localised. And the above described measurement procedures were repeated. After the
blade was tested with all probe paths, the next blade was selected and the test procedures were
repeated.
It is noted that the wall thicknesses measured on B1 with P1 in the previous experiment were
imported into this experiment, and thus B1 was measured with P2 and P3 only.
266
Results and discussions
6.8.3.1. Reverse engineering
In Fig. 6.8-3 (a), the acquired CMM point data for each scan region (A, B, C and D) of B2 are
plotted in blue, orange, yellow and violet respectively and the generated B-spline surfaces are
shown next to it, i.e. Fig. 6.8-3 (b). Similarly, the acquired data and the B-spline representations
for blade B3 are shown in Fig. 6.8-3 (c) and (d). On each surface, 250,000 points were generated.
Fig. 6.8-3 (a) CMM data points measured on B2; (b) Fitted B-spline surfaces of B2; (c) CMM data points measured on B3; (d) Fitted B-spline surfaces of B3 (units in mm)
The B-spline surfaces fitted to the data points are fairly accurate, with the errors shown in Table
6.8-1. These errors are in fact the linear differences between the CMM data points and the
corresponding closest points on the B-spline surface. Compared with Table 6.7-1, the B-spline
representations of B2 and B3 on the concave side are slightly worse. The deviation at each CMM
(a) (b)
(c) (d)
267
point is shown in Fig. 6.8-4. The maximum linear errors on both surfaces are near the junction of the
two scan regions, i.e. regions A and B, and C and D. This is more obvious on the concave surface.
The rate of change in slope, as shown in Fig. 6.8-5, indicates the there are several noticeable
depressions near the junction of regions C and D on the concave surfaces. However, these
depressions were not found on B1 (see Fig. 6.8-5 (e) and (f)).
Table 6.8-1 Linear errors of surface fittings of B2 and B3 (units in mm)
B2 B3
Mean Max S.D. Mean Max S.D.
Convex 0.056 0.149 0.023
0.056 0.127 0.022
Concave 0.053 0.387 0.036 0.055 0.437 0.042
Fig. 6.8-4 Linear deviation between the CMM points and the fitted (a) convex and (b) concave surface of B2, and the fitted (c) convex and (d) concave surface of B3 (units in mm)
(a) (b)
(c) (d)
268
Fig. 6.8-5 Rate of change in slopes of the (a) convex and (b) concave B-spline surfaces of B2, (c) convex and (d) concave B-spline surfaces of B3 and (e) convex and (f) concave B-spline surfaces of B1 (units in mm)
(a) (b)
(c) (d)
(e) (f)
269
Sections of the concave surfaces were extracted at Z ≈ -101 mm from both the fitted B-spline
surfaces and CMM points of all three blades and plotted in Fig. 6.8-6. It is clear that the depression
is caused by inaccurate data points acquired with the CMM, and this inaccuracy probably originates
from the inaccurate calibration of CMM orientations. The x coordinates of the two end points at the
junction of regions C and D were misaligned by approximately 1.6mm. The generated B-spline
surfaces for B2 and B3 modelled these misaligned points accurately. However, in the case of blade
B1, as surface data was not collected in this area, this part of the fitted surface was filled in
smoothly by the B-spline surface.
Fig. 6.8-6 Blade surface section profiles and CMM points on the concave surface, at Z ≈ -101 mm (all point data were localised to B1 CMM points and units in mm)
A hill caused by inaccurate
CMM point data
B1, B-spline section curve
B2, B-spline section curve B3, B-spline section curve
B1, CMM points B2, CMM points B3, CMM points
270
6.8.3.2. Comparison of the three blades
To facilitate the comparison, B2 and B3 were both localised to B1. The localised models were
compared with each other in terms of both linear and slope deviations. The results are shown in
Table 6.8-2, Fig. 6.8-7 and Fig. 6.8-8.
Table 6.8-2 Comparison of the three turbine blades
Linear deviation (mm) Slope deviation (°)
Mean Max S.D. Mean Max S.D. %>1° %>3.5°
B1 - B2 Convex 0.219 1.136 0.144 1.937 10.591 1.346 75.26% 8.19%
Concave 0.364 1.394 0.243 4.608 26.994 3.687 82.82% 44.66%
B1 - B3 Convex 0.226 1.135 0.143 1.932 11.727 1.364 73.80% 7.24%
Concave 0.425 1.335 0.279 4.968 23.445 3.651 84.21% 47.95%
B2 - B3 Convex 0.075 0.527 0.037 0.391 7.202 0.487 5.38% 0.50%
Concave 0.059 0.496 0.048 0.978 10.990 1.337 26.81% 0.63%
B2 and B3 are, in general, similar geometrically. The linear deviations between the two blades are
insignificant. The mean linear deviations are lower than 0.1 mm and the maximum deviations
occur along one of the edges (see Fig. 6.8-7 (e) and (f)), which is probably caused by errors in
localisation. Note that near the junction of regions C and D on the concave surface, the linear
deviations are much greater than the surrounding area. The slope deviations between the convex
surfaces of the blades are acceptable. The maximum slope deviations are at the edge (see Fig.
6.8-8 (e)) and again this is likely to be due to errors in localisation. Fig. 6.8-8 (e), as well as the
standard deviation, shows that the slope deviations are uniform on the convex surface and only
5.4% of the 250,000 data points have a slope deviation greater than 1°. For the concave surfaces,
on the other hand, the mean deviation is near the allowable limit of angle of incidence, i.e. 1°, and
26.8% of the points have slope deviation exceeding 1°. Fig. 6.8-8 (f) shows that, except for the
area at the junction of regions C and D, the slope deviations are generally acceptable.
Furthermore, slope deviations greater than 3.5° are almost non-existent.
When B1 is compared with B2 and B3, the linear deviations are acceptable for the convex surfaces.
The maximum linear deviations are near one of the bottom corner of the surfaces (see Fig. 6.8-7 (a)
and (c)). When the concave surface of B1 is compared with that of B2 (or B3), although the mean
deviations are not significant, the majority of the large deviations (indicated by green, yellow and
red) are in the middle of the surface (see Fig. 6.8-7 (b) and (d)). The slope deviations suggest
significant dissimilarity between the blades. The mean slope deviations between the convex surfaces
are nearly 2° whilst the mean deviations between the concave surfaces are more than 4.5°. The
number of slope deviations greater than 1° is over 70% for the convex surfaces and around 7-8%
of the slope deviations are greater than 3.5°. For the concave surfaces, this is worse. According to
271
Fig. 6.8-7 Linear deviations compared between each two of the three blades (units in mm)
(a) B1 and B2 convex (b) B1 and B2 concave
(c) B1 and B3 convex (d) B1 and B3 concave
(e) B2 and B3 convex (f) B2 and B3 concave
272
Fig. 6.8-8 (b) and (d), major slope deviations occur on one of the edges of the surface and at the
junction area of regions C and D as well.
By comparing the cross sections extracted at various z coordinates of the blades, it was found that
the majority of the greatest slope deviations between the concave surfaces are due to the
depressions shown in Fig. 6.8-6.
Fig. 6.8-9 (a) shows the cross sections of B1 and B3 with the surface normals at Z ≈ -118 mm; the
reason for choosing this section is because the linear and slope deviations between the concave
surfaces of these blades are near their maximum values. At x = 155 and y = -235, the depression
on B2 caused a linear deviation of approximately 1.3mm and a slope deviation of approximately
23°. There is also a depression at x = 144 and y = -237, which causes slightly smaller deviations.
Fig. 6.8-9 (b) shows the cross sections of B1 and B3 with surface normals at Z ≈ -92mm, where the
deviations are also near their maximum values. Both the hill and depression were found here. The
edge near the depression on B2 is deviated from B1 by 1.3mm. The major deviations between the
convex surfaces shown in these two figures are near the two ends of the curves.
Fig. 6.8-9 (c) and (d) shows the cross sections of B2 and B3 with surface normals at Z ≈ -105 mm,
where the slope deviations between the concave surfaces are over 9°. The deviations are clearly
shown in Fig. 6.8-9 (d). Apart from this area, there is a good match between the two cross
sections.
At this stage, because of the poorly calibrated CMM, it is difficult to conclude the true amount of
deviations caused by the geometric difference in blade. It is seen that between B2 and B3, apart
from the junction area of region C and D, both linear and slope deviations are acceptable.
However, between B1 and B2 or B1 and B3, the slope deviations were found greater than the
upper limit (1°) on over 70% of the surfaces. It is possible that B1 is geometrically different from
B2 and B3, but it is also possible that these deviations can be attributed to the different settings
and CMM programs when measuring B1.
273
Fig. 6.8-8 Slope deviations compared between each two of the three blades (units in mm)
(a) B1 and B2 convex (b) B1 and B2 concave
(c) B1 and B3 convex (d) B1 and B3 concave
(e) B2 and B3 convex (f) B2 and B3 concave
274
Fig. 6.8-9 Cross sections of the localised B-spline surfaces and surface normals (units in mm)
(a) B1 and B3 at Z ≈ -118 mm (b) B1 and B3 at Z ≈ -118 mm
(c) B2 and B3 at Z ≈ -105 mm (d) B2 and B3 at Z ≈ -105 mm
275
6.8.3.3. Ultrasonic testing
As there are significant differences between the concave surfaces of B2 and B3, it was decided not
to perform any ultrasonic tests on these surfaces. Therefore, only the convex surfaces were tested
using the ultrasonic probe. Two probe paths, P2 and P3 were generated based on the reverse
engineered models of B2 and B3. And P1, the probe path generated from B1, was imported from
the previous experiment. These probe paths are compared in Fig. 6.8-10. It can be seen in Fig.
6.8-10 (b) that the curves and normals of P2 and P3 match very closely whilst there are some
differences between the normals for P1 and P2, as can be seen from Fig. 6.8-10 (a); the two sets
of normals mostly overlap except at Hole 12 (x ≈ 141, y ≈ -222).
Fig. 6.8-10 Comparison between different probe paths (units in mm)
The results from the ultrasonic testing are compared in Table 6.8-3. The complete results of the tests
are shown in Table V-1, Table V-2 and Table V-3 in Appendix V. The values shown in row B2-P3, for
example, refer to the differences in the wall thicknesses (Δ𝑡) of the holes in blade B2 measured with
probe paths P3 and P2. Also shown in this table are the differences in the angles (Δ𝜃) between the
normals to the modelled blade surface at the path points where the thickness values were evaluated.
For B2 and B3, the wall thicknesses measured using hand-held touch probes at ELE are also included
in the table in Appendix V. As the touch probes were unable to measure wall thicknesses greater
than approximately 4 mm, 30% of the wall thicknesses are absent. Most of the remaining results do
not show much agreement with the wall thickness values obtained using the inspection machine.
In general, the slope deviations between the normals of P2 and P3 are very small and the
differences in thicknesses measured on B2 and B3 using P2 or P3 are minor (see row B2-P3 and
(a) P1 and P2 (b) P2 and P3
276
B3-P2). However, the differences in the measured thicknesses as shown in row B1-P2 and B1-P3
are substantially greater and it is also noticed that the magnitudes of these deviations are very
similar, which agrees with the fact that P2 and P3 match closely.
Table 6.8-3 Differences in measured wall thickness
Hole 1 Hole 2 Hole 3 Hole 4 Hole 5 Hole 6 Hole 7
B1-P2 Δ𝑡 (mm) 0.115 -0.017 0.082 0.101 0.158 0.094 1.502
Δ𝜃 (°) 2.256 0.359 0.933 1.643 0.898 0.999 4.638
B1-P3 Δ𝑡 (mm) 0.115 -0.017 0.082 0.087 0.158 0.081 1.515
Δ𝜃 (°) 2.294 0.414 1.081 1.539 1.065 0.865 4.640
B2-P1 Δ𝑡 (mm) 0.148 -0.099 0.082 0.043 0.105 0 -1.538
Δ𝜃 (°) 2.797 0.616 1.611 1.245 1.683 0.997 4.221
B3-P1 Δ𝑡 (mm) 0.162 -0.066 0.148 0.101 0.177 0.202 0.349
Δ𝜃 (°) 2.624 0.570 1.642 1.430 1.173 2.19 4.592
B2-P3 Δ𝑡 (mm) 0 0.016 0 0 0 0.013 -0.027
Δ𝜃 (°) 0.035 0.026 0.042 0.062 0.086 0.067 0.060
B3-P2 Δ𝑡 (mm) 0 0 0 0 0 0.035 0.013
Δ𝜃 (°) 0.035 0.026 0.042 0.062 0.086 0.067 0.060
Hole 8 Hole 9 Hole 10 Hole 11 Hole 12 Hole 13
B1-P2 Δ𝑡 (mm) 0.068 0.108 0.094 -0.027 -0.067 -0.057
Δ𝜃 (°) 0.148 2.743 0.927 1.988 6.640 1.281
B1-P3 Δ𝑡 (mm) 0.137 0.108 0.094 -0.027 -0.053 -0.057
Δ𝜃 (°) 1.228 2.201 0.631 1.677 6.290 1.301
B2-P1 Δ𝑡 (mm) 0.102 1.495 0 0.040 0.135 0
Δ𝜃 (°) 1.577 3.389 0.976 1.289 6.5 0.263
B3-P1 Δ𝑡 (mm) 0.103 -0.068 -0.015 -0.067 - -0.087
Δ𝜃 (°) 0.986 2.535 1.073 1.122 - 0.023
B2-P3 Δ𝑡 (mm) -0.051 0 0 0 0 0
Δ𝜃 (°) 0.024 0.096 0.034 0.113 0.059 0.025
B3-P2 Δ𝑡 (mm) 0 0.131 0 -0.027 -0.027 0
Δ𝜃 (°) 0.024 0.096 0.034 0.113 0.059 0.025
Although it can be argued that on B1 the differences in measured thicknesses using P2/P3 and its
own probe path were caused by the Δ𝜃, some of these differences do not agree with experimental
results discussed in Chapter 6.3. For example, at Hole 12, where the differences between the
normals of P1 and P2/P3 are maximum, the differences between the measured thicknesses are in
fact small. Comparing the thicknesses obtained using P2 and P3 with the CT scan, it was found
that the differences are only around 0.036mm, while the thickness measured using P1 differs from
the CT scan by 0.103mm. Similarly, at Hole 11 and Hole 13, results obtained using P2 and P3 are
closer to the CT scan results. This suggests P2 and P3 are more accurate in this region.
277
When blades B2 and B3 were measured using P1, the results are also very different from the
results obtained using their own probe paths and the value of Δ𝑡 do not appear to be justified by
the difference between the values of the two normals, i.e. Δ𝜃. It is noted that at Hole 12, when B3
was measured with P1, it was not possible to measure the thickness.
This problem is probably caused by inaccurate localisation result when the probe path is localised
from CMM to the inspection machine. Most likely a shift along the axis of the turbine blades. If this
were true, the probe would be measuring holes at different cross sections. In Table 6.8-3, the
calculation of Δ𝜃 is based on the assumption that the probe was measuring at the correct cross
section, i.e. 51mm from the top face. Thus Δ𝜃 was calculated between the path orientation and
the normal vectors at the supposed cross section. However, because the probe path files have
been lost, it is not possible to compute the actual Δ𝜃.
Summary
Two more PSM104 turbine blades were reverse engineered and their B-spline models suggest that
the point data acquired on the concave surfaces of both models contain significant errors which
are probably due to errors in the calibration of the CMM.
The geometric differences between the three blades are quantified with linear deviations and slope
deviations. The mean linear deviations between the convex surfaces of B1 and B2 and B1 and B3
are approximately 0.2mm whilst the mean slope deviations are about 1.9°, which is greater than
the upper allowable limit of 1°. Also note that 75.26% of the surface has slope deviations of 1°.
When the convex surfaces of B2 and B3 were compared, there was good geometric similarity
between them. The mean linear deviations are 0.075mm and the mean slope deviations are
0.391°. In addition, only 5.38% of the surface has a slope deviation greater than 1°. As the
concave surfaces were modelled from problematic CMM point data, the deviations between the
surfaces are much greater and this may not reflect the actual geometric deviations.
The ultrasonic tests also confirmed the geometric similarity between the convex surfaces of B2 and
B3. When B2 was measured with P3 and B3 was measured with P2, the results were almost
identical to the results obtained with their own probe path. However, when both surfaces were
measured with P1, the results were noticeably different. Similarly, when B1 was measured with P2
and P3, the deviations between measured thicknesses were substantial. However, this is probably
due to inaccurate localisation of probe paths.
However, with problematic CMM calibration, and considering the fact that B1 was measured at a
different location in the CMM space using a separate CMM program, it is difficult to conclude that
B1 was very different from the other two blades, geometrically. There was also insufficient proof to
conclude that the concave surfaces of the blades were dissimilar.
278
Conclusions
In this thesis, an affordable automated system has been designed and built for measuring wall
thicknesses in gas turbine blades and the following conclusions are made:
In ultrasonic testing, the water path does not appear to affect the wall thicknesses
determined. However, when the water path is lower than the starting point of the focal
zone, the amplitude of the backwall echo is reduced.
Bubbles accumulated on both surface of inspection and probe lens negatively affect the
accuracy and detection of backwall echoes.
Angle of incidence of ultrasonic wave should be maintained within ±1° to ensure the
accuracy of the results.
In order to reduce phase angle error or the effect of pulse amplitude cropping, receiver
gain should be adjusted to avoid over amplifying the returned echo. One working strategy
is to use a lower gain value to acquire signals for determining interface echoes and then
increase the gain to detect backwall echoes.
Averaging multiple signals acquired at the same location is a feasible method to improve
the signal-to-noise ratio but at a cost of increased time.
Calibration of an ultrasonic probe for a specific material should be performed separately for
different thickness ranges. A general calibration across the entire thickness range is
inaccurate.
It is possible to represent cross sectional curves of turbine blades using both Bezier curve
and B-spline curve. However, the quality of the curve approximated using the B-spline
curve is better than the curve approximated using the Bezier curve.
The quality of a 3D surface triangular mesh generated using 2D Delaunay triangulation
based on uniformly distributed data points is good. The procedure is much less
problematic than a 3D Delaunay triangulation with surface extraction algorithms.
Turbine blade surfaces can be smoothly represented by B-spline surfaces constructed
based on shape-preserving parameterisation.
A 2-step localisation is not needed for our application since with a normal ICP algorithm,
convergence can be usually reached in a very short time. However, due to limited variation
279
along the axis of a turbine blade, it is sometimes challenging for the ICP algorithm to
converge at a global minimum with surface patches of the aerofoil section solely.
The motion accuracy of the robot is not maintained during linear motion and therefore,
accuracy dependant tasks, such as distance gauging, should only be carried out when the
robot has reached its destination.
The sixth axis of a robot was of no use during measurement of a turbine blade. On the
contrary, the additional axis introduces complexity in control of the robot using software.
Even though the average motion accuracy of the robot is greater than 0.1mm, the wall
thicknesses measured by the ultrasonic probe are generally close to the reference values.
The use of a scanning window, nullifies, to some extent, the positioning error of the robot
and errors introduced by the ICP algorithm.
The mean error of the wall thicknesses measured on the curved component (excluding
when the wall thickness > 10mm), disc blade and the PSM104 turbine blade is below 0.1
mm and the maximum error is around 0.15mm.
There is considerable similarity in geometry between two blades digitized in a CMM with
the mean linear deviation 0.067mm and the mean slope deviation 0.685°.
The wall thicknesses measured on one blade using the probe path generated based on the
geometrical model of the other blade are almost identical to the wall thicknesses measured
using its own probe path. The mean deviation is 0.013mm, which shows that a common
probe path can be used. More tests need to be conducted to confirm the results from
these initial tests.
280
Suggestions for Further Work
In order to improve the performance of the inspection machine and deploy the inspection machine
in production, the following work still remains to be completed:
i. Improve the localisation algorithm for localising probe paths in the coordinate system of
the inspection machine.
ii. Improve signal/noise ratio to reduce the number of samples of ultrasonic data has to be
acquired and thus reduce the overall the time cost of the inspection process.
iii. Measure more turbine blades from one batch and confirm whether a common probe path
can be used.
iv. Calibrate the robot and investigate the feasibility of using a 2D laser scanner for local
reverse engineering turbine blades on the inspection machine.
v. If a common probe path is feasible, construct a probe path library for various turbine blade
models.
vi. Improve the feature recognition and thickness evaluation algorithm to adopt distorted
echoes.
vii. Develop a real-time feature recognition algorithm. Therefore, it is possible to identify any
detection failure and adjust the probe path intelligently according to information acquired
from interface echoes.
viii. Integrate all Matlab scripts and control software and develop a user interface for
production use.
281
References
[1] L. K. Bhagi, P. Gupta and V. Rastogi, “Fractographic investigations of the failure of L-1 low
pressure steam turbine blade,” Case Studies in Engineering Failure Analysis, vol. 1, no. 2,
pp. 72-78, 2013.
[2] J. Pattavanitch and S. Hinduja, “Machining of turbulated cooling channel holes in turbine
blades,” CIRP Annals-Manufacturing Technology, vol. 61, no. 1, pp. 199-202, 2012.
[3] Ndt-ed.org, “Automated Scanning,” unknown. [Online]. Available: https://www.nde-
ed.org/EducationResources/CommunityCollege/Ultrasonics/MeasurementTech/automatedsca
nning.htm. [Accessed 20 January 2014].
[4] S. Pilli, P. Bhunia, S. Yan, R. J. LeBlanc, R. D. Tyagi and R. Y. Surampalli, “Ultrasonic
pretreatment of sludge: A review.,” Ultrasonics Sonochemistry, vol. 18, no. 1, pp. 1-18,
2011.
[5] “Basic Principles of Ultrasonic Testing,” NDT Education, [Online]. Available: http://www.ndt-
ed.org/EducationResources/CommunityCollege/Ultrasonics/Introduction/description.htm.
[Accessed 23 9 2012].
[6] Š. Kočiš and Z. Figura, Ultrasonic Measurements and Technologies First Edition, London:
Chapman & Hall, 1996.
[7] P. Cawley, “Non-destructive testing—current capabilities and future directions,” Proceedings
of the Institution of Mechanical Engineers, Part L: Journal of Materials Design and
Applications, vol. 215, no. 4, pp. 213-223, 2001.
[8] K. A. Fowler, G. M. Elfbaum, K. A. Smith and T. J. Nelligan, “Theory and application of
precision ultrasonic thickness gaging,” Insight, vol. 2, no. 10, 1997.
[9] J. Blitz and G. Simpson, Ultrasonic Methods of Non-destructive Testing, London: Champman
& Hall, 1996.
[10] R. Thompson, “NDT Techniques: Ultrasonic,” in Encyclopedia of Materials: Science and
Technology, Oxford, Elsevier Science Ltd, 2001, pp. 6039-6043.
[11] OLYMPUS NDT, “Ultrasonic Transducers Technical Notes,” 2011.
282
[12] T. H. University, “Introduction to Non-Destructive Testing Techniques,” The Hashemite
University, Zarqa.
[13] K. Foweler, F. Hotchkiss, T. Yamartino and T. Nelligan, “Important Characteristics of Sound
Fields of Ultrasonic Transducers,” Olympus Inc., 2012.
[14] B. M. Lempriere, Ultrasound and Elastic Waves, Burlington: Academic Press, 2003.
[15] M. Berke, “Nondestructive material testing with ultrasonics - introduction to the basic
principles,” The E-Journal of Nondestructive Testing & Ultrasonics, vol. 5, no. 9, 2000.
[16] P. Hammond, “On Resolution, Accuracy and Calibration,” NDTnet, vol. 2, no. 10, 1997.
[17] R. Diederichs, “Analog Characteristics of Ultrasonic Flaw Detectors,” NDTnet, vol. 3, no. 5,
1998.
[18] T. J. Mason, “Developments in ultrasound--Non-medical,” Progress in Biophysics and
Molecular Biology, vol. 93, no. 1-3, pp. 166-175, 2007.
[19] K. R. Erikson, F. J. Fry and J. P. Jones, “Ultrasound in Medicine-A Review,” IEEE
Transactions on Sonics and Ultrasonics, vol. 21, no. 3, pp. 144 - 170, 1974.
[20] P. D. Wall, D. Tucker, F. J. Fry and W. H. M. Jr., “The Use of High Intensity Ultrasound in
experimental neurosurgery,” The Journal of the Acoustical Society of America, vol. 25, pp.
281-285, 1953.
[21] D. H. Evans, J. A. Jensen and M. B. Nielsen, “Ultrasonic colour Doppler imaging,” Interface
Focus, vol. 1, no. 4, p. 490–502, 2011.
[22] B. E. Polat, D. Hart, R. Langer and D. Blankschtein, “Ultrasound-mediated transdermal drug
delivery: Mechanisms, scope, and emerging trends,” Journal of Controlled Release, vol. 152,
no. 3, pp. 330-348, 2011.
[23] Krautkrämer GmbH Corporation, “Ultrasonic Applications Highlights - Part 1, 2 and 3,”
NDTnet, vol. 2, no. 2-4, 1997.
[24] G. M. Amulele, A. G. Every and S. C. Yates, “Acoustic Microscopy Wall Thickness
Measurements on Nickel Based Superalloy Gas Turbine Blades,” Review of Progress in
Quantitative Nondestructive Evaluation, vol. 18, pp. 2001-2007, 1999.
[25] V. Raja and K. J. Fernandes, “Introduction to reverse engineer,” in Reverse engineering - an
283
industrial perspective, London, Springer, 2008.
[26] B. V. Chowdary, A. D. Noon, F. Ali and C. A. Imbert, “An investigation for improvement of
the 3D‐digitization process: a reverse engineering approach,” Journal of Manufacturing
Technology Management, vol. 22, no. 1, pp. 131-147, 2011.
[27] S. Hinduja, “Lecture notes - Reverse engineering overview,” Manchester, 2015.
[28] P. Benkő, R. R. Martin and T. Várady, “Algorithms for reverse engineering boundary
representation models,” Computer-Aided Design, vol. 33, no. 11, p. 839–851, 2001.
[29] J. Hoschek and R. Muller, “Turbine blade design by lofted B-spline surfaces,” Journal of
Computational and Applied Mathematics, vol. 119, pp. 235-248, 2000.
[30] T. Varady, R. R. Martin and J. Cox, “Reverse engineering ofgeometric models - an
introduction,” Computer-Aided Design, vol. 29, no. 4, pp. 255-268, 1997.
[31] M. Salman and A. Mansor, “Free-Form Surface Models Generation Using Reverse
Engineering,” 04 11 2008. [Online]. Available: http://eprints.usm.my/4902/. [Accessed 22
10 2015].
[32] A. Kumar, P. K. Jain and P. M. Pathak, “Industrial Application of Point Cloud/STL Data for
Reverse Engineering,” in DAAAM International Scientific Book, Vienna, DAAAM International
Publishing, 2012, pp. 445-462.
[33] M. Bern and D. Eppstein, “Mesh Generation and Optimal Triangulation,” in Computing in
Euclidean Geometry, vol. 1, Singapore, World Scientific, 1995, pp. 47-123.
[34] Renishaw, “Renishaw,” 2005. [Online]. Available: http://www.renishaw.com. [Accessed 20
April 2013].
[35] Nikon, “LK CMM Techonology,” 2015. [Online]. Available:
http://www.nikonmetrology.com/en_EU/content/download/11063/228870/version/14/file/LK
+CMM_EN.pdf. [Accessed 22 November 2015].
[36] A. Joubair and I. A. Bonev, “Non-kinematic calibration of a six-axis serial robot using planar
constraints,” Precision Engineering, vol. 40, pp. 325-333, 2015.
[37] FARO, “FARO Gage,” 2013. [Online]. Available: http://www.faro.com/en-GB/download-
centre/search-results/search-item?document=30da3207-4dec-4dff-a02e-47335d1c281a.
[Accessed 22 November 2015].
284
[38] Fanuc, “LR Mate 200iC Series,” 2009. [Online]. Available:
http://www.fanucrobotics.com/cmsmedia/datasheets/LR%20Mate%20200iC%20Series_10.p
df. [Accessed 23 November 2015].
[39] K. Fan, “A non-contact automatic measurement for free-form surface profiles,” Computer
Integrated Manufacturing Systems, vol. 10, no. 4, pp. 277-285, 1997.
[40] V. Carbone, M. Carocci, E. Savio, G. Sansoni and L. D. Chiffre, “Combination of a Vision
System and a Coordinate Measuring Machine for the Reverse Engineering of Freeform
Surfaces,” The International Journal of Advanced Manufacturing Technology, vol. 17, no. 4,
pp. 263-271, 2001.
[41] A. Modjarrad, “Non-Contact Measurement Using A Laser Scanning Probe,” in SPIE,
Hamburg, 1989.
[42] Nikon, “K-Scan MMDx walkaround scanning,” Nikon, 2015. [Online]. Available:
http://www.nikonmetrology.com/en_EU/Products/Laser-Scanning/Handheld-scanning/K-
Scan-MMDx-walkaround-scanning/(key_features). [Accessed 23 November 2015].
[43] M. J. Milroy, D. J. Weir, C. Bradley and G. W. Vickers, “Reverse engineering employing a 3D
laser scanner: a case study,” International Journal of Advance Manufacturing Technology,
vol. 12, pp. 111-121, 1996.
[44] V. H. Chan, C. H. Bradley and G. W. Vickers, “Automating laser scanning of 3D surfaces for
reverse engineering,” in SPIE, Pittsburgh, 1997.
[45] S. Son, H. Park and K. H. Lee, “Automated laser scanning system for reverse engineering
and inspection,” International Journal of Machine Tools & Manufacture, vol. 42, pp. 889-897,
2002.
[46] A. Gameros, L. De Chiffre, H. R. Siller, J. Hiller and G. Genta, “A reverse engineering
methodology for nickel alloy turbine blades with internal features,” CIRP Journal of
Manufacturing Science and Technology, vol. 9, pp. 116-124, 2015.
[47] Keyence, “Keyence UK & Ireland,” Keyence, 2015. [Online]. Available:
http://www.keyence.co.uk/index.jsp. [Accessed 23 November 2015].
[48] L. Chen and G. Lin, “Reverse engineering in the design of turbine blades - a case study in
applying the MAMDP,” Robotics and Computer Integrated Manufacturing, vol. 16, pp. 161-
167, 2000.
285
[49] 3Shape, “3D Scanning Q700 Series,” 3Shape, 2015. [Online]. Available:
www.3shape.com/our-products/quality-control/3d-scanning.aspx. [Accessed 23 November
2015].
[50] D. Hüser-Teuchert, E. Trapet, A. Garces, F. Torres-Leza, T. Pfeifer and P. Scharsich,
“Performance Test Procedures for Optical Coordinate Measuring Probes,” European
Commission, Hannover, 1994.
[51] A. Contri, P. Bourdet and C. Lartigue, “Quality of 3D digitised points obtained with non-
contact optical sensors,” CIRP Annals - Manufacturing Technology, vol. 51, no. 1, pp. 443-
446, 2002.
[52] H. Schwenke, U. Neuschaefer-Rube, T. Pfeifer and H. Kunzmann, “Optical Methods for
Dimensional Metrology in Production Engineering,” CIRP Annals - Manufacturing Technology,
vol. 51, no. 2, pp. 685-699, 2002.
[53] N. Vukašinović, M. Korošec and J. Duhovnik, “The Influence of Surface Topology on the
Accuracy of Laser,” Strojniski Vestnik - Journal of Mechanical Engineering, vol. 56, no. 1, pp.
23-30, 2010.
[54] H. Woo, E. Kang, S. Wang and K. H. Lee, “A new segmentation method for point cloud
data,” International Journal of Machine Tools & Manufacture, vol. 42, p. 167–178, 2002.
[55] P. Fu, “Reverse Engineering in Aerospace Industry,” in Springer Series in Advanced
Manufacturing, London, Springer, 2008, pp. 157-175.
[56] J. McDonald, C. Ryall and D. Wimpenny, Rapid Prototyping Casebook, Suffolk: Professional
Engineering Publishing, 2001.
[57] J. Tao and K. Jiyong, “A 3-D point sets registration method in reverse engineering,”
Computers & Industrial Engineering, vol. 53, no. 2, pp. 270-276, 2007.
[58] C. H. Menq and K. C. Sahoo, “Localization of 3D objects using surface representation and
tactile sensing,” in Symp. Computer Aided Design Manufact. of Dies and Molds, Chicago,
1988.
[59] C. H. Menq, H. T. Yau and G. Y. Lai, “Automated precision measurement of surface profile in
CAD-directed inspection,” Transactions on Robotics and Automation, vol. 8, no. 2, pp. 268-
278, 1992.
286
[60] X. Huang, P. Gu and R. Zernicke, “Localization and comparison of two free-form surfaces,”
Computer-Aided Design, vol. 26, no. 12, pp. 1017-1022, 1996.
[61] O. Faugeras and M. Hebert, “The Representation, Recognition, and Locating of 3-D Objects,”
The International Journal of Robotics Research, vol. 5, no. 3, pp. 27-52, 1986.
[62] B. K. P. Horn, “Closed-form solution of absolute orientation using unit quaternions,” Journal
of the Optical Society of America A, vol. 4, no. 4, pp. 629-642, 1987.
[63] P. J. Besl and N. D. McKay, “A method for registration of 3-D shapes,” IEEE Transactions on
Pattern Analysis and Machine Intelligence, vol. 14, no. 2, pp. 239-256, 1992.
[64] K. S. Arun, T. S. Huang and S. D. Blostein, “Least-Squares Fitting of Two 3-D Point Sets,”
IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 9, no. 5, pp. 698-700,
1987.
[65] R. M. Haralick, H. Joo, C. N. Lee, X. Zhuang, V. G. Vaidya and M. Bae Kim, “Pose Estimation
from Corresponding Point Data,” IEEE Transactions on Systems, Man and Cybernetics, vol.
19, no. 6, pp. 1426-1446, 1989.
[66] H. Freeman, Machine Vision for Three-Dimensional Scenes, London: Academic Press Limited,
1990.
[67] Z. Li, J. Gou and Y. Chu, “Geometric algorithms for workpiece localization,” IEEE
Transactions on Robotics and Automation, vol. 14, no. 6, pp. 864-878, 1998.
[68] X. Li, M. Yeung and Z. Li, “An Algebraic Algorithm for Workpiece Localization,” in IEEE,
Minneapolis, 1998.
[69] J. Hong and X. Tan, “Method and apparatus for determining position and orientation of
mechanical objects”. US Patent US005208763A, 4 mAY 1992.
[70] Y. Xu, J. Jiang and Z. Li, “Cyclic optimisation for localisation in freeform surface inspection,”
International Journal of Production Research, vol. 49, no. 2, pp. 361-374, 2001.
[71] R. J. Campbell and P. J. Flynn, “A survey of free-form object representation and recognition
techniques,” Computer Vision and Image Understanding, vol. 81, no. 2, pp. 166-201, 2001.
[72] Y. Li and P. Gu, “Automatic localization and comparison for free-form surface inspection,”
Journal of Manufacturing Systems, vol. 25, no. 4, pp. 251-268, 2006.
287
[73] S. M. Yamany and A. A. Farag, “Surface signatures: an orientation independent free-form
surface representation scheme for the purpose of objects registration and matching,” IEEE
Transactions on Pattern and Analysis and Machine Intelligence, vol. 24, no. 8, pp. 1105-
1120, 2002.
[74] L. M. Galantucci, G. Percoco and R. Spina, “An artificial intelligence approach to registration
of free-form shapes,” CIRP Annals - Manufacturing Technology, vol. 53, no. 1, pp. 139-142,
2004.
[75] B. N. Delaunay, “Sur la sphere vide,” Bulletin of Academy of Sciences of the USSR, no. 6, pp.
793-800, 1934.
[76] D. Lee and B. Schachter, “Two algorithms for constructing a Delaunay triangulation,”
International Journal of Computer and Information Sciences, vol. 9, no. 3, pp. 219-242,
1980.
[77] L. P. Chew, “Constrained delaunay triangulations,” Algorithmica, vol. 4, no. 1, pp. 97-108,
1989.
[78] J. C. Cavendish, D. A. Field and W. H. Frey, “An apporach to automatic three-dimensional
finite element mesh generation,” International Journal for Numerical Methods in
Engineering, vol. 21, no. 2, pp. 329-347, 1985.
[79] F. Aurenhammer, “Voronoi diagrams - a survey of a fundamental geometric,” ACM
Computing Surveys, vol. 23, no. 3, pp. 345-405, 1991.
[80] C. Lawson, “Software for C1 surface interpolation,” Mathematical Software III, pp. 161-194,
1977.
[81] B. A. Lewis and J. S. Robinson, “Triangulation of planar regions with applications,” The
Computer Journal, vol. 21, no. 4, pp. 324-332, 1978.
[82] L. Guibas and J. Stolfi, “Primitives for the manipulation of general subdivisions and the
computations of Voronoi diagrams,” ACM Tmns. Graph, vol. 4, no. 2, p. 74–123, 1985.
[83] N. Golias and R. Dutton, “Delaunay triangulation and 3D adaptive mesh,” Finite elements in
analysis and design, vol. 25, no. 3-4, pp. 331-341, 1997.
[84] C. Dyken and M. S. Floater, “Preferred directions for resolving the non-uniqueness of
Delaunay triangulations,” Computational Geometry, vol. 34, no. 2, pp. 96-101, 2006.
288
[85] D. F. Watson, “Computing the n-dimensional Delaunay tessellation with application to
Voronoi polytopes,” The computer journal, vol. 24, no. 2, pp. 167-172, 1981.
[86] L. D. Angelo, P. D. Stefano and L. Giaccari, “A new mesh-growing algorithm for fast surface
reconstruction,” Computer-Aided Design, vol. 43, no. 6, pp. 639-650, 2011.
[87] K. Lee, Principles of CAD/CAM/CAE Systems, Addison-Wesley, 1999.
[88] E. Kreyszig, Advanced Engineering Mathematics, 9th ed., Hoboken: John Wiley & Sons,
2005, p. 816.
[89] I. Zeid, CAD/CAM Theory and Practice, New York: McGraw-Hill, 1991.
[90] P. E. Bezier, The Mathematical Basis of the UNIURF CAD System, London: Butterworth & Co,
1986.
[91] G. M. Sturgeon, “Surface Reconstruction from Medical Imaging for Use in a Computer-Aided
Design (CAD) Environment,” Grand Valley State University, Allendale, 2005.
[92] C. Loop, “Smooth spline surfaces over irregular meshes,” in Computer Graphics and
Interactive Techniques, New York, 1994.
[93] M. Eck and H. Hoppe, “Automatic reconstruction of B-spline Surfaces of arbitrary topological
type,” in Computer graphics and interactive techniques, New York, 1996.
[94] H. Hoppe, T. DeRose, T. Duchamp, J. McDonald and W. Stuetzle, “Surface reconstruction
from unorganized,” in Computer graphics and interactive techniques, New York, 1992.
[95] H. Hoppe, T. DeRose, T. Duchamp, M. J. and W. Stuetzle, “Mesh optimization,” in Computer
graphics and interactive techniques, New York, 1993.
[96] Y. L. a, X. Huang, C. Gong and K. Wang, “An Engineering Rules based Parameterization
Approach for Turbine Blade Reverse Engineering,” in Geometric Modeling and Processing,
Beijing, 2004.
[97] C.Y. Lin, C.S. Liou and J.Y. Lai, “A surface-lofting approach for smooth-surface
reconstruction from 3D measurement data,” Computers in Industry, vol. 34, pp. 73-85 ,
1997.
[98] H. Haron, A. Rehman, D. I. S. Adi, S. P. Lim and T. Saba, “Parameterization method on B-
spline curve,” Mathematical Problems in Engineering, vol. 2012, p. 22, 2012.
289
[99] J. Fang and C. Huang, “An improved parameterization method for B-spline curve and surface
interpolation,” Computer-aided design, vol. 45, no. 6, pp. 1005-1028, 2013.
[100] M. Floater, “Parameterization and smooth approximation of surface,” Computer Aided
Geometric Design, vol. 14, no. 3, pp. 231-250, 1997.
[101] K. Hormann, B. Levy and A. Sheffer, “Mesh Parameterization: Theory and Practice,”
Siggraph, 2007.
[102] T. Ju, “Barycentric Coordinates with Applications in Mesh Deformation,” Washington
University in St. Louis, 2007. [Online]. Available:
http://www.cs.wustl.edu/~taoju/research/bary.htm. [Accessed 22 February 2016].
[103] M. Eck, T. D. DeRose, T. Duchamp, H. Hoppe, M. Lounsbery and W. Stuetzle,
“Multiresolution analysis of arbitrary meshes,” in Computer graphics and interactive
techniques, New York, 1995.
[104] M. S. Floater, “Mean value coordinates,” Computer Aided Geometric Design, vol. 20, no. 1,
pp. 19-27, 2003.
[105] V. Paquin, X. Maldague and M. Akhloufi, “A vision-based method for improving absolute
positioning accuracy of industrial robots,” in Applied Vision and Robotics Workshop,
Montreal, 2012.
[106] A. Joubair and I. A. Bonev, “Kinematic calibration of a six-axis serial robot using distance
and sphere constraints,” Int J Adv Manuf Technol, vol. 77, no. 1, p. 515–523, 2015.
[107] SKF Group, “Recommended fits,” [Online]. Available: www.skf.com/sg/products/bearings-
units-housings/roller-bearings/principles/design-considerations/radial-location-
bearings/recommended-fits/index.html. [Accessed 24 January 2016].
[108] Parker Hannifin Corporation, “Rotatry Seal Design Guide,” 2006. [Online]. Available:
http://www.parker.com/literature/Engineered%20Polymer%20Systems/5350.pdf. [Accessed
25 January 2016].
[109] Parker Hannifin Corporation, “Parker O-Ring Handbook,” 2007. [Online]. Available:
https://www.parker.com/literature/ORD%205700%20Parker_O-Ring_Handbook.pdf.
[Accessed 25 January 2016].
[110] The International Nickel Company, Inc., “Properties of Some Metal and Alloys,” 1982.
[Online]. Available: http://www.nickelinstitute.org/~/media/files/technicalliterature/
290
propertiesofsomemetalsandalloys_297_.pdf. [Accessed 26 January 2016].
[111] Special Metals Corporation, “Inconel Alloy,” 7 September 2007. [Online]. Available:
http://www.specialmetals.com/documents/Inconel%20alloy%20718.pdf. [Accessed 26
January 2016].
[112] FANUC Corporation, “FANUC LR Mate 200iD Operator's Manual,” 2012.
[113] FANUC Corporation, “FANUC Robot LR Mate 200iD,” UK, 2012.
[114] A. Nakanishi, H. Nakazawa, K. Yamashima, T. Shiraiwa and H. Yamaguchi, “Immersion
ultrasonic inspection system of the whole surface of rolled flat bar”. Patent US3850027A, 26
November 1974.
[115] R. H. Lumsden, “Passive bubble minimization in ultrasonic testing”. Patent
WO2014153669A1, 2 October 2014.
[116] NDT Education, “Refraction and Snell's Law,” [Online]. Available: www.ndt-
ed.org/EducationResources/CommunityCollege/Ultrasonics/Physics/refractionsnells.htm.
[Accessed 18 February 2016].
[117] Columbia College, “Physical attributes of acoustic waves - Part I,” Audio Arts & Acoustics,
Columbia College Chicago, [Online]. Available:
acousticslab.org/psychoacoustics/PMFiles/Module02.htm. [Accessed 18 February 2016].
[118] J. Hoschek and R. Muller, “Turbine blade design by lofted B-spline surfaces,” Journal of
Computational and Applied Mathematics, vol. 119, pp. 235-248, 2000.
[119] Y. Liu, S. Zhao and X. Dong, “Constructing section profile curve of turbine blade,” in 2010
International Conference on Wavelet Analysis and Pattern Recognition, Qingdao, 2010.
[120] N. Amenta, S. Choi and R. Kolluri, “The power crust,” in ACM symposium on Solid modeling
and applications, New York, 2001.
[121] Mathworks, “Delaunay triangulation,” Mathworks, 2016. [Online]. Available:
http://uk.mathworks.com/help/matlab/ref/delaunay.html. [Accessed 25 February 2016].
[122] Mathworks, “Solve systems of linear equations Ax = B for x,” Mathworks, 2016. [Online].
Available: http://uk.mathworks.com/help/matlab/ref/mldivide.html. [Accessed 23 February
2016].
291
[123] W. Lü, “Curves with chord length parameterization,” Computer Aided Geometric Design, vol.
26, no. 3, pp. 342-350, 2009.
[124] W. Welch and A. Witkin, “Free-form shape design using triangulated surfaces,” in 21st
annual conference on Computer graphics and interactive techniques, Orlando, 1994.
[125] Mathworks, “k-nearest neighbors search using Kd-tree or exhaustive search,” Mathworks,
2016. [Online]. Available: http://uk.mathworks.com/help/stats/searcher.knnsearch.html.
[Accessed 22 Feb 2016].
[126] K. T. Gunnarson and P. F. B, “CAD model based localization of parts in manufacturing,”
Computer, vol. 20, no. 8, pp. 66-74, 1987.
[127]
J. Dexclaux and J. Serre, “M88-2 E4: Advanced New Generation Engine for Rafale Multirole
Fighter,” in AIAA International Air and Space Symposium and Exposition: The Next 100
Years, Dayton, 2003.
292
Ultrasonic testing results for Chapter 6.1 “Effect of varying water path” are presented here.
Thickness = 0.666mm
Table I-1 Variations of amplitudes of the first backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 144 153 162 182 208 252 255 255 255 255 255
30 147 153 163 182 209 254 249 255 255 255 255
28 147 153 164 185 213 255 255 255 255 255 255
26 146 153 163 184 210 248 255 255 255 255 255
25 147 153 163 185 214 254 255 255 255 255 255
24 147 154 164 186 214 253 255 255 255 255 255
23 147 154 163 186 215 253 255 255 255 255 255
22 147 154 165 187 217 255 255 255 255 255 255
21 147 154 164 187 215 255 255 255 255 255 255
20 147 154 164 185 213 255 255 255 255 255 255
19 147 154 164 186 215 255 255 255 255 255 255
18 147 154 164 185 214 255 255 255 255 255 255
17 147 153 163 184 212 253 255 254 255 255 255
16 145 152 161 181 205 251 255 255 255 255 255
15 145 151 160 179 205 252 255 255 255 255 255
14 145 151 159 177 200 251 255 255 255 255 255
12 144 148 155 170 192 235 255 255 255 255 255
10 143 147 153 162 182 220 255 255 255 255 255
8 144 148 154 167 188 226 255 255 255 255 255
6 143 147 154 168 188 229 255 255 255 255 255
4 141 143 146 154 165 192 234 255 255 255 255
Table I-2 Variations of amplitudes of the second backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 142 149 156 168 188 226 255 255 255 255 255
30 145 149 156 168 188 227 249 255 255 255 255
28 145 149 156 169 189 229 255 255 255 255 255
26 145 149 156 169 188 222 255 255 255 255 255
25 145 150 157 169 191 230 255 255 255 255 255
24 145 150 157 172 192 229 254 255 255 255 255
23 145 150 157 171 194 233 255 255 255 255 255
22 145 150 158 172 195 239 255 255 255 255 255
21 145 150 157 171 193 235 255 255 255 255 255
20 145 150 157 171 192 236 255 255 255 255 255
19 145 150 157 172 194 237 255 255 255 255 255
18 145 150 158 173 194 237 255 255 255 255 255
293
17 146 150 158 173 194 234 255 254 255 255 255
16 144 150 156 171 189 229 255 255 255 255 255
15 145 149 156 171 190 232 254 255 255 255 255
14 145 149 157 171 188 232 255 255 255 254 255
12 144 148 154 166 184 222 255 255 255 255 255
10 143 146 151 159 175 205 252 255 255 255 255
8 142 144 148 156 169 190 233 255 255 255 255
6 141 143 146 153 162 182 218 253 255 255 255
4 139 140 142 147 154 170 194 241 255 255 255
Table I-3 Variations of amplitudes of the interface echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 182 255 255 255 255 254 255 255 255 255 255
30 211 254 255 255 255 255 245 255 255 255 255
28 214 255 255 255 255 255 255 255 254 255 255
26 206 254 254 255 254 250 255 255 253 254 255
25 215 255 255 255 255 255 255 255 255 255 255
24 218 255 255 255 255 255 253 254 254 255 255
23 221 255 255 255 255 255 250 252 255 255 255
22 220 255 255 255 255 255 255 255 255 255 255
21 221 255 255 255 255 255 255 255 255 255 255
20 212 255 255 255 255 255 255 255 255 255 255
19 221 255 255 255 255 255 255 255 255 255 255
18 223 255 255 255 255 255 255 255 255 255 255
17 220 255 255 255 255 255 255 254 255 255 255
16 206 255 255 255 255 255 255 255 255 254 255
15 213 255 255 255 255 255 255 255 255 255 255
14 213 255 255 255 255 255 255 255 255 254 255
12 203 248 255 255 255 255 255 254 255 255 255
10 202 249 255 253 255 255 255 255 252 255 255
8 191 233 255 255 255 255 255 255 255 254 255
6 184 223 255 255 255 255 255 255 255 255 255
4 177 207 254 255 255 255 255 255 255 255 255
Table I-4 Variations of interpreted time of flight
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 24 24 24 24 24 24 24 24 24 24 24
30 23 24 24 23 23 23 24 23 23 24 24
28 23 23 23 23 23 23 23 23 24 23 24
26 23 23 23 23 23 23 23 24 23 24 23
25 23 24 23 23 23 23 23 24 24 24 24
24 23 23 23 23 23 23 23 23 24 24 24
23 23 23 23 23 23 23 23 23 23 23 23
22 24 24 24 24 24 24 24 24 24 24 24
21 23 23 23 23 23 23 23 23 23 23 24
294
20 24 24 24 23 24 23 24 24 24 24 24
19 23 23 23 23 23 23 23 23 23 23 23
18 24 24 24 24 24 24 24 24 24 24 24
17 24 24 24 24 24 24 24 24 25 24 24
16 22 23 23 23 23 23 23 23 23 23 23
15 23 24 23 23 23 23 24 24 24 24 24
14 24 24 24 24 24 24 24 24 24 25 24
12 24 24 24 24 24 24 23 24 24 24 24
10 23 23 23 23 23 23 23 23 23 23 23
8 23 23 23 23 23 23 23 23 23 24 23
6 23 23 23 23 23 23 23 24 24 23 24
4 23 23 24 24 24 24 24 23 24 23 23
Thickness = 1.024mm
Table I-5 Variations of amplitudes of the first backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 146 151 160 177 203 252 255 255 255 255 255
30 146 152 161 178 200 243 255 255 255 255 255
28 146 151 160 178 205 249 255 255 255 254 253
26 144 151 154 177 182 243 243 238 255 255 255
25 146 153 160 182 206 254 255 254 254 255 252
24 147 153 162 182 210 254 255 255 254 254 255
23 146 152 162 184 199 240 255 255 255 255 255
22 147 153 163 184 212 255 238 255 255 255 252
21 147 154 163 183 210 254 255 255 255 255 255
20 147 154 163 182 210 255 255 255 255 255 255
19 147 154 163 184 213 255 255 255 255 255 255
18 148 154 163 183 213 255 255 255 255 255 255
17 147 154 163 183 212 255 255 255 255 255 255
16 147 153 162 181 208 254 255 255 255 255 255
15 147 153 163 182 210 254 255 255 255 255 255
14 147 153 162 180 207 255 255 255 255 255 255
12 146 151 160 177 202 251 255 255 255 255 255
10 145 149 157 171 191 233 255 255 255 255 255
8 144 148 154 166 184 219 255 255 255 255 255
6 142 145 150 159 173 202 250 255 255 255 255
4 140 142 146 153 163 187 228 255 255 255 255
Table I-6 Variations of amplitudes of the second backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 145 150 158 174 197 242 255 255 255 255 255
30 145 150 157 173 192 234 255 255 255 255 255
28 145 150 158 173 198 242 255 255 255 254 250
26 143 150 152 171 178 234 249 245 255 255 255
295
25 145 150 156 173 192 238 255 255 255 255 252
24 145 150 158 174 198 243 255 255 255 255 255
23 145 149 157 174 186 224 255 255 255 253 255
22 146 151 159 174 198 245 244 255 255 255 251
21 146 151 159 175 199 247 255 255 255 255 255
20 146 151 159 175 198 246 255 255 255 255 255
19 145 151 158 175 197 243 255 255 255 255 255
18 145 150 158 174 196 242 255 255 255 255 255
17 145 151 158 174 197 245 255 255 255 253 252
16 145 151 158 174 195 241 255 255 255 255 255
15 145 150 158 173 195 241 255 255 255 254 255
14 145 150 158 173 194 237 255 255 255 255 251
12 145 149 156 170 189 228 255 255 255 255 255
10 144 148 155 167 186 221 254 255 255 255 255
8 143 146 152 164 180 211 254 255 255 255 255
6 142 145 149 158 170 198 242 255 255 255 255
4 140 142 145 150 159 179 213 254 255 255 255
Table I-7 Variations of amplitudes of the interface echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 204 249 255 255 255 255 254 255 255 253 255
30 209 254 255 255 249 248 254 255 252 251 252
28 205 245 254 255 255 255 255 255 255 249 239
26 186 244 241 253 237 243 234 232 253 255 255
25 206 255 251 255 254 255 255 254 253 254 243
24 215 255 255 255 255 255 255 255 254 253 255
23 209 244 254 255 253 247 255 255 254 255 255
22 222 255 255 255 255 255 231 255 255 255 243
21 223 255 255 255 255 255 255 255 255 255 255
20 221 255 255 255 255 255 255 255 255 255 255
19 217 255 255 255 255 255 255 255 255 255 255
18 217 255 255 255 255 255 255 255 255 255 255
17 214 255 255 255 255 255 255 255 255 255 255
16 215 255 255 255 255 255 255 255 255 255 255
15 210 255 255 255 255 255 255 255 255 255 255
14 209 254 255 255 255 255 255 255 255 255 255
12 206 253 255 255 255 255 255 255 255 255 255
10 201 247 255 255 255 255 255 255 255 255 255
8 195 236 255 255 255 255 255 255 255 255 255
6 187 224 255 255 255 255 255 255 255 255 255
4 177 205 254 255 255 255 255 255 255 255 255
Table I-8 Variations of interpreted time of flight
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 39 38 38 38 38 38 38 38 38 38 38
296
30 38 38 38 38 38 38 38 38 38 38 38
28 38 38 37 37 37 37 37 37 38 38 38
26 38 38 37 37 37 37 38 38 38 37 37
25 38 38 38 38 38 38 38 38 39 38 38
24 38 38 38 38 38 38 38 38 38 38 38
23 38 38 38 38 38 38 38 38 38 38 38
22 38 38 38 38 38 38 39 39 38 38 39
21 39 39 39 38 38 38 39 38 39 38 38
20 39 39 39 39 38 39 38 39 39 38 38
19 38 38 38 38 38 38 38 38 38 38 38
18 38 38 38 38 38 38 38 38 38 38 38
17 38 38 38 38 38 38 38 38 38 38 38
16 37 38 37 37 37 37 37 38 37 38 38
15 37 38 38 38 38 38 38 38 38 38 38
14 38 38 38 38 38 38 38 38 38 38 38
12 37 37 37 37 37 37 37 37 37 37 37
10 38 38 38 38 38 38 38 38 38 38 38
8 38 38 38 38 38 38 38 38 38 38 38
6 38 38 38 38 38 38 38 38 38 38 38
4 38 38 38 38 38 38 38 38 38 38 38
Thickness = 2.031mm
Table I-9 Variations of amplitudes of the first backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 145 150 158 174 196 242 255 255 255 255 255
30 145 151 158 174 198 244 255 255 255 255 255
28 146 151 159 175 198 247 255 255 255 255 255
26 146 152 161 178 203 253 255 255 255 255 255
25 146 152 160 177 202 250 255 255 255 255 255
24 146 152 160 177 201 251 255 255 255 255 255
23 146 152 160 177 202 252 255 255 255 255 255
22 146 152 160 178 203 251 255 255 255 255 255
21 146 152 161 179 205 254 255 255 255 255 255
20 146 152 160 178 200 252 255 255 255 255 255
19 146 153 162 180 206 254 255 255 255 255 255
18 146 152 161 179 205 253 255 255 255 255 255
17 147 153 162 179 206 253 255 255 255 255 255
16 146 152 161 178 203 252 255 255 255 255 255
15 146 152 161 179 205 253 255 255 255 255 255
14 145 151 160 176 201 248 255 255 255 255 255
12 145 150 159 175 197 244 255 255 255 255 255
10 144 149 157 172 193 232 255 255 255 255 255
8 144 148 155 168 187 226 255 255 255 255 255
6 142 145 150 160 174 204 252 255 255 255 255
4 140 142 145 152 162 184 223 255 255 255 255
297
Table I-10 Variations of amplitudes of the second backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 143 147 153 164 181 215 255 255 255 255 255
30 144 148 153 165 182 217 254 255 255 255 255
28 144 148 154 166 185 220 255 255 255 255 255
26 144 148 154 167 186 225 255 255 255 255 255
25 144 148 155 167 186 225 255 255 255 255 255
24 144 148 154 167 186 224 255 255 255 255 255
23 144 149 155 167 187 227 255 255 255 255 255
22 144 149 155 168 186 223 255 255 255 255 255
21 144 149 155 168 188 227 255 255 255 255 255
20 144 149 155 168 185 226 255 255 255 255 255
19 144 149 155 169 188 227 255 255 255 255 255
18 144 149 155 169 188 228 255 255 255 255 255
17 144 149 155 168 188 227 255 255 255 255 255
16 144 149 156 168 187 225 255 255 255 255 255
15 145 149 155 169 188 226 255 255 255 255 255
14 144 148 155 168 186 225 255 255 255 255 255
12 144 148 155 167 186 223 255 255 255 255 255
10 144 147 154 165 182 216 255 255 255 255 255
8 143 146 152 164 180 214 255 255 255 255 255
6 142 145 149 159 172 201 248 255 255 255 255
4 141 142 146 153 164 187 227 255 255 255 255
Table I-11 Variations of amplitudes of the interface echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 209 254 255 255 255 255 255 255 255 255 255
30 213 255 255 255 255 255 255 255 255 255 255
28 215 255 255 255 255 255 255 255 255 255 255
26 214 255 255 255 255 255 255 255 255 255 255
25 217 255 255 255 255 255 255 255 255 255 255
24 216 255 255 255 255 255 255 255 255 255 255
23 221 255 255 255 255 255 255 255 255 255 255
22 220 255 255 255 255 255 255 255 255 255 255
21 217 255 255 255 255 255 255 255 255 255 255
20 219 255 255 255 250 255 255 255 255 255 255
19 219 255 255 255 255 255 255 255 255 255 255
18 216 255 255 255 255 255 255 255 255 255 255
17 220 255 255 255 255 255 255 255 255 255 255
16 213 255 255 255 255 255 255 255 255 255 255
15 215 255 255 255 255 255 255 255 255 255 255
14 203 255 255 255 255 255 255 255 255 255 255
12 205 255 255 255 255 255 255 255 255 255 255
10 199 247 255 255 255 255 255 255 255 255 255
298
8 193 233 255 255 255 255 255 255 255 255 255
6 186 223 255 255 255 255 255 255 255 255 255
4 177 206 251 255 255 255 255 255 255 255 255
Table I-12 Variations of interpreted time of flight
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 68 68 68 68 68 68 67 68 68 68 68
30 68 69 69 69 68 68 69 68 69 69 69
28 67 68 68 67 68 67 67 68 68 68 68
26 68 68 68 68 68 68 68 68 68 69 69
25 68 68 68 68 68 68 67 68 68 68 68
24 68 68 68 67 67 67 67 68 68 68 68
23 67 68 68 68 68 68 68 68 68 68 68
22 67 68 68 68 68 67 67 67 68 68 68
21 68 68 68 68 68 68 68 68 68 68 68
20 67 68 68 68 68 68 67 68 68 68 68
19 67 68 68 68 68 68 68 68 68 68 68
18 67 68 68 68 68 68 67 68 68 68 68
17 68 68 68 68 68 68 68 68 68 68 68
16 68 68 68 68 68 68 67 68 68 68 68
15 68 68 68 68 68 68 68 68 69 69 69
14 68 69 68 68 68 68 68 69 69 69 68
12 69 68 69 68 68 68 68 69 69 69 69
10 68 68 68 68 68 67 67 67 68 68 68
8 67 67 67 67 67 67 67 67 67 68 67
6 68 69 68 68 68 68 68 68 69 69 69
4 68 68 68 68 68 68 68 68 68 68 68
Thickness = 2.955mm
Table I-13 Variations of amplitudes of the first backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 145 149 156 169 190 231 255 255 255 255 255
30 145 149 156 171 192 233 255 255 255 255 255
28 145 150 157 171 193 234 255 255 255 255 255
26 145 150 158 173 196 241 255 255 255 255 255
25 145 150 158 173 196 241 255 255 255 255 255
24 145 150 157 173 195 240 255 255 255 255 255
23 146 151 158 174 197 243 255 255 255 255 255
22 146 150 158 174 197 242 255 255 255 255 255
21 146 151 158 173 195 240 255 255 255 255 255
20 145 150 158 174 197 242 255 255 255 255 255
19 145 151 159 174 198 244 255 255 255 255 255
18 145 151 158 174 197 242 255 255 255 255 255
17 146 150 158 173 197 241 255 255 255 255 255
299
16 145 150 158 173 196 241 255 255 255 255 255
15 145 150 158 173 195 238 255 255 255 255 255
14 145 150 158 176 199 246 255 255 255 255 255
12 146 150 158 174 197 242 255 255 255 255 255
10 145 150 158 173 195 237 255 255 255 255 255
8 144 148 155 168 187 225 255 255 255 255 255
6 143 146 151 163 178 212 255 255 255 255 255
4 141 143 147 155 168 193 238 255 255 255 255
Table I-14 Variations of amplitudes of the second backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 143 146 151 161 177 208 253 255 255 255 255
30 143 146 151 162 177 208 254 255 255 255 255
28 143 146 152 162 179 211 255 255 255 255 255
26 143 147 152 164 179 212 254 255 255 255 255
25 143 147 152 164 180 214 254 255 255 255 255
24 143 147 152 163 180 211 255 255 255 255 255
23 143 147 152 164 181 215 255 255 255 255 255
22 142 147 152 164 179 212 254 255 255 255 255
21 143 147 152 164 181 215 254 255 255 255 255
20 143 147 152 164 181 215 255 255 255 255 255
19 144 147 153 164 181 214 254 255 255 255 255
18 143 147 152 164 180 213 255 255 255 255 255
17 143 147 152 164 180 214 255 255 255 255 255
16 143 147 152 163 179 212 254 255 255 255 255
15 143 147 152 163 179 212 254 255 255 255 255
14 143 147 153 165 182 217 255 255 255 255 255
12 144 147 153 165 181 216 255 255 255 255 255
10 143 147 153 164 181 215 255 255 255 255 255
8 143 146 151 162 178 209 254 255 255 255 255
6 142 145 149 159 172 200 248 255 255 255 255
4 141 143 146 153 164 188 227 255 255 255 255
Table I-15 Variations of amplitudes of the interface echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 204 255 255 255 255 255 255 255 255 255 255
30 209 255 255 255 255 255 255 255 255 255 255
28 209 255 255 255 255 255 255 255 255 255 255
26 203 255 255 255 255 255 255 255 255 255 255
25 210 255 255 255 255 255 255 255 255 255 255
24 214 255 255 255 255 255 255 255 255 255 255
23 217 255 255 255 255 255 255 255 255 255 255
22 217 255 255 255 255 255 255 255 255 255 255
21 218 255 255 255 255 255 255 255 255 255 255
20 215 255 255 255 255 255 255 255 255 255 255
300
19 214 255 255 255 255 255 255 255 255 255 255
18 211 255 255 255 255 255 255 255 255 255 255
17 214 255 255 255 255 255 255 255 255 255 255
16 209 255 255 255 255 255 255 255 255 255 255
15 208 255 255 255 255 255 255 255 255 255 255
14 204 254 255 255 255 255 255 255 255 255 255
12 208 254 255 255 255 255 255 255 255 255 255
10 204 251 255 255 255 255 255 255 255 255 255
8 197 240 255 255 255 255 255 255 255 255 255
6 189 227 255 255 255 255 255 255 255 255 255
4 177 210 255 255 255 255 255 255 255 255 255
Table I-16 Variations of interpreted time of flight
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 100 100 99 99 99 99 99 99 100 100 100
30 100 100 100 100 100 100 100 100 100 100 100
28 99 99 99 99 99 99 99 99 99 99 99
26 99 100 100 100 100 100 99 100 100 100 100
25 100 100 100 100 100 100 99 100 100 100 100
24 99 99 99 99 99 99 99 99 100 100 100
23 100 100 100 100 100 100 100 100 100 100 100
22 100 100 99 99 99 99 99 100 100 100 100
21 100 100 100 100 100 100 99 100 100 100 100
20 99 99 99 99 99 99 99 99 100 100 100
19 100 100 100 100 100 100 100 100 100 100 100
18 99 99 99 99 99 99 99 99 100 100 100
17 100 100 100 100 100 100 100 100 100 100 100
16 99 99 99 99 99 99 99 99 100 100 100
15 100 100 100 100 100 100 100 100 100 100 100
14 99 99 99 99 100 100 99 100 100 100 100
12 99 100 100 99 100 99 99 100 100 100 100
10 100 100 100 100 100 100 100 100 100 100 100
8 100 100 100 100 100 100 100 101 101 100 100
6 100 100 99 99 99 99 99 99 100 100 100
4 100 100 100 99 99 99 99 99 100 100 100
Thickness = 4.161mm
Table I-17 Variations of amplitudes of the first backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 144 149 156 171 192 234 255 255 255 255 255
30 145 150 157 172 194 237 255 255 255 255 255
28 145 150 157 172 194 238 255 255 255 255 255
26 145 150 157 172 194 237 255 255 255 255 255
25 145 150 157 172 195 238 255 255 255 255 255
301
24 145 150 157 173 196 240 255 255 255 255 255
23 145 150 157 172 195 239 255 255 255 255 255
22 145 150 158 174 196 241 255 255 255 255 255
21 145 150 157 173 195 239 255 255 255 255 255
20 145 151 158 173 195 239 255 255 255 255 255
19 145 150 157 172 195 238 255 255 255 255 255
18 145 151 158 173 195 238 255 255 255 255 255
17 145 151 158 174 196 242 255 255 255 255 255
16 145 151 158 174 196 242 255 255 255 255 255
15 145 150 157 172 194 235 255 255 255 255 255
14 145 150 158 173 195 238 255 255 255 255 255
12 144 150 157 172 193 234 255 255 255 255 255
10 144 149 157 171 192 232 255 255 255 255 255
8 144 148 154 167 186 223 255 255 255 255 255
6 143 147 152 164 180 212 255 255 255 255 255
4 142 144 148 157 170 197 245 255 255 255 255
Table I-18 Variations of amplitudes of the second backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 144 147 153 165 183 219 255 255 255 255 255
30 143 147 154 165 183 220 255 255 255 255 255
28 144 147 153 165 182 218 255 255 255 255 255
26 144 148 153 166 183 217 255 255 255 255 255
25 143 147 153 165 181 217 254 255 255 255 255
24 143 148 153 165 183 219 255 255 255 255 255
23 144 148 153 165 183 219 255 255 255 255 255
22 144 148 153 165 183 218 255 255 255 255 255
21 143 147 153 165 182 216 254 255 255 255 255
20 144 147 153 165 182 218 255 255 255 255 255
19 144 147 153 164 180 214 255 255 255 255 255
18 143 147 153 165 181 217 255 255 255 255 255
17 144 147 153 164 181 216 254 255 255 255 255
16 143 147 153 164 180 213 254 255 255 255 255
15 143 147 152 163 178 211 253 255 255 255 255
14 143 146 152 163 178 209 254 253 255 255 255
12 143 146 151 161 176 206 252 255 255 255 255
10 143 146 151 161 174 204 251 255 255 255 255
8 142 145 149 158 171 196 240 255 255 255 255
6 142 144 148 156 167 190 230 255 255 255 255
4 140 142 146 152 162 183 218 255 255 255 255
Table I-19 Variations of amplitudes of the interface echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 210 255 255 255 255 255 255 255 255 255 255
30 208 255 255 255 255 255 255 255 255 255 255
302
28 215 255 255 255 255 255 255 255 255 255 255
26 215 255 255 255 255 255 255 255 255 255 255
25 218 255 255 255 255 255 255 255 255 255 255
24 215 255 255 255 255 255 255 255 255 255 255
23 217 255 255 255 255 255 255 255 255 255 255
22 224 255 255 255 255 255 255 255 255 255 255
21 219 255 255 255 255 255 255 255 255 255 255
20 220 255 255 255 255 255 255 255 255 255 255
19 220 255 255 255 255 255 255 255 255 255 255
18 222 255 255 255 255 255 255 255 255 255 255
17 220 255 255 255 255 255 255 255 255 255 255
16 216 255 255 255 255 255 255 255 255 255 255
15 213 255 255 255 255 255 255 255 255 255 255
14 212 255 255 255 255 255 255 255 255 255 255
12 203 254 255 255 255 255 255 255 255 255 255
10 200 248 255 255 255 255 255 255 255 255 255
8 192 235 255 255 255 255 255 255 255 255 255
6 185 220 255 255 255 255 255 255 255 255 255
4 178 209 255 255 255 255 255 255 255 255 255
Table I-20 Variations of interpreted time of flight
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 134 134 134 134 134 134 134 134 134 134 134
30 134 134 134 134 134 134 134 134 134 134 134
28 134 134 134 134 134 134 134 134 135 134 134
26 134 134 134 134 134 134 133 134 134 134 134
25 134 134 134 134 134 134 134 134 135 134 135
24 134 134 134 134 134 134 134 134 134 134 134
23 134 134 134 134 134 134 133 134 134 134 134
22 134 134 134 134 134 134 133 134 134 134 134
21 133 134 133 133 133 133 133 133 134 134 134
20 134 134 134 134 134 134 133 134 134 134 134
19 133 133 133 133 133 133 133 133 134 134 134
18 134 134 134 134 134 134 133 134 134 134 134
17 134 134 134 134 134 134 134 134 134 134 134
16 133 133 133 133 133 133 133 133 134 133 133
15 133 134 134 134 133 133 134 133 134 134 134
14 134 134 134 134 134 134 134 134 134 135 135
12 133 133 133 133 133 133 133 133 134 134 134
10 134 134 134 134 134 134 134 134 134 134 134
8 133 134 134 134 133 133 133 133 134 134 133
6 134 134 134 134 134 134 134 134 134 134 134
4 133 133 134 133 133 133 133 133 134 134 134
303
Thickness = 6.174mm
Table I-21 Variations of amplitudes of the first backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 144 147 153 165 182 217 255 255 255 255 255
30 144 147 153 165 183 218 255 255 255 255 255
28 144 148 154 165 182 218 255 255 255 255 255
26 144 148 153 165 183 218 255 255 255 255 255
25 144 148 153 165 182 218 255 255 255 255 255
24 144 147 153 164 181 215 254 255 255 255 255
23 144 147 153 165 182 216 255 255 255 255 255
22 144 148 153 165 181 216 255 255 255 255 255
21 144 147 153 164 181 216 254 255 255 255 255
20 143 147 153 165 181 217 254 255 255 255 255
19 144 147 152 164 180 214 255 255 255 255 255
18 143 147 153 164 181 216 255 255 255 255 255
17 143 147 153 164 180 215 254 255 255 255 255
16 143 147 153 164 180 215 255 255 255 255 255
15 144 147 153 163 180 215 254 255 255 255 255
14 143 147 152 163 178 211 255 255 255 255 255
12 143 146 151 161 176 206 253 255 255 255 255
10 143 146 150 160 174 203 250 255 255 255 255
8 142 145 150 159 172 198 245 255 255 255 255
6 142 144 148 156 169 192 233 255 255 255 255
4 140 142 145 152 161 182 218 255 255 255 255
Table I-22 Variations of amplitudes of the second backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 141 143 146 153 163 183 216 254 255 255 255
30 141 144 147 154 163 185 216 253 255 255 255
28 142 144 147 154 164 185 219 254 255 255 255
26 142 144 147 154 164 184 218 254 255 255 255
25 141 144 147 154 164 184 220 253 255 255 255
24 142 144 147 153 164 183 219 255 255 255 255
23 141 144 147 154 164 185 219 254 255 255 255
22 142 144 147 153 163 184 219 254 255 255 255
21 142 144 147 153 163 185 219 253 255 255 255
20 141 144 147 153 163 182 216 253 255 255 255
19 141 144 147 153 163 184 219 254 255 255 255
18 141 144 147 153 163 184 221 254 255 255 255
17 141 143 147 153 163 183 219 255 255 255 255
16 141 144 147 153 162 182 216 253 255 255 255
15 141 144 147 153 163 183 218 252 255 255 255
14 141 143 147 152 161 180 213 252 255 255 255
12 141 143 146 152 161 179 213 253 255 255 255
304
10 141 143 146 151 160 176 206 250 255 255 255
8 140 142 145 150 158 175 201 243 254 255 255
6 139 142 144 148 155 168 193 229 255 255 255
4 139 141 143 148 155 168 193 228 254 254 254
Table I-23 Variations of amplitudes of the interface echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 206 255 255 255 255 255 255 255 255 255 255
30 211 255 255 255 255 255 255 255 255 255 255
28 211 255 255 255 255 255 255 255 255 255 255
26 214 255 255 255 255 255 255 255 255 255 255
25 219 255 255 255 255 255 255 255 255 255 255
24 215 255 255 255 255 255 255 255 255 255 255
23 218 255 255 255 255 255 255 255 255 255 255
22 219 255 255 255 255 255 255 255 255 255 255
21 220 255 255 255 255 255 255 255 255 255 255
20 221 255 255 255 255 255 255 255 255 255 255
19 221 255 255 255 255 255 255 255 255 255 255
18 217 255 255 255 255 255 255 255 255 255 255
17 216 255 255 255 255 255 255 255 255 255 255
16 221 255 255 255 255 255 255 255 255 255 255
15 214 255 255 255 255 255 255 255 255 255 255
14 215 255 255 255 255 255 255 255 255 255 255
12 206 254 255 255 255 255 255 255 255 255 255
10 201 247 255 255 255 255 255 255 255 255 255
8 196 239 255 255 255 255 255 255 255 255 255
6 188 226 255 255 255 255 255 255 255 255 255
4 179 210 255 255 255 255 255 255 255 255 255
Table I-24 Variations of interpreted time of flight
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 208 207 207 207 207 207 207 207 208 208 207
30 207 207 207 207 207 207 207 207 207 208 208
28 207 207 207 207 207 207 207 207 207 207 207
26 207 207 207 207 207 207 207 207 207 207 207
25 207 207 207 207 207 207 207 207 208 208 208
24 207 207 207 207 207 207 206 207 207 207 207
23 206 206 206 206 206 206 206 206 207 207 207
22 207 207 207 207 207 207 207 206 207 207 207
21 206 206 206 206 206 206 206 206 207 207 207
20 206 207 207 207 207 207 207 206 207 207 207
19 206 206 206 206 206 206 206 206 207 207 207
18 207 206 206 206 206 206 206 206 207 207 207
17 207 207 207 207 207 207 206 207 207 207 207
16 207 207 207 207 207 207 207 206 207 207 207
305
15 206 206 206 206 206 206 206 206 206 207 207
14 207 207 207 207 207 207 207 206 207 207 207
12 207 207 206 206 206 206 206 206 206 207 207
10 207 207 207 206 206 206 206 206 207 207 207
8 207 207 207 207 207 207 207 207 207 207 207
6 206 206 206 206 206 206 206 206 206 206 206
4 206 206 206 206 206 206 206 206 206 207 207
Thickness = 8.271mm
Table I-25 Variations of amplitudes of the first backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 141 144 147 153 164 184 222 254 255 255 255
30 141 143 147 153 164 184 220 253 255 255 255
28 141 144 147 153 164 185 222 253 255 255 255
26 141 144 147 154 164 186 222 254 255 255 255
25 141 144 147 153 163 184 220 254 255 255 255
24 141 144 147 153 163 183 218 254 255 255 255
23 141 144 147 154 163 184 219 254 255 255 255
22 141 143 146 152 162 181 215 253 255 255 255
21 141 144 146 152 161 181 211 253 255 255 255
20 141 143 146 152 161 179 212 253 255 255 255
19 141 143 146 152 161 178 211 253 255 255 255
18 141 143 146 152 161 180 212 252 255 255 255
17 141 144 146 152 161 179 211 252 255 255 255
16 141 143 146 151 160 178 209 251 255 255 255
15 141 143 146 152 161 178 210 253 255 255 255
14 141 143 146 151 160 178 207 250 255 255 255
12 141 143 145 151 158 176 205 247 255 255 255
10 141 142 145 151 159 174 201 244 255 255 255
8 140 142 144 149 157 171 197 236 255 255 255
6 140 141 143 148 155 168 193 231 255 255 255
4 139 140 142 145 151 162 182 216 255 255 255
Table I-26 Variations of amplitudes of the second backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 140 140 141 143 146 153 164 184 226 251 253
30 139 140 141 143 146 152 164 183 221 248 251
28 140 140 141 143 146 153 165 184 221 253 253
26 140 140 141 143 145 153 163 182 223 248 248
25 139 140 141 143 146 153 163 179 218 249 251
24 140 140 141 143 146 152 165 183 216 246 247
23 140 140 141 143 146 153 163 182 212 239 249
22 140 140 141 142 144 150 160 179 211 245 251
21 139 140 140 142 145 149 161 173 210 237 247
306
20 139 140 140 142 145 150 159 175 209 241 245
19 139 140 141 142 145 150 160 175 210 238 243
18 140 140 141 142 144 149 159 173 209 237 243
17 140 140 141 142 144 149 157 175 205 236 245
16 139 140 141 142 144 149 157 175 208 240 244
15 139 140 140 142 143 149 160 173 195 232 243
14 139 140 141 142 144 149 156 171 205 237 243
12 139 140 140 141 144 149 156 169 198 225 235
10 139 140 140 141 143 147 155 168 194 218 233
8 139 139 140 141 143 147 155 168 194 218 231
6 139 139 139 140 142 145 152 163 181 200 217
4 138 139 139 140 141 144 151 162 181 200 216
Table I-27 Variations of amplitudes of the interface echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 208 255 255 255 255 255 255 255 255 255 255
30 211 255 255 255 255 255 255 255 255 255 255
28 214 255 255 255 255 255 255 255 255 255 255
26 215 255 255 255 255 255 255 255 255 255 255
25 214 255 255 255 255 255 255 255 255 255 255
24 215 255 255 255 255 255 255 255 255 255 255
23 217 255 255 255 255 255 255 255 255 255 255
22 214 255 255 255 255 255 255 255 255 255 255
21 217 255 255 255 255 255 255 255 255 255 255
20 217 255 255 255 255 255 255 255 255 255 255
19 215 255 255 255 255 255 255 255 255 255 255
18 213 255 255 255 255 255 255 255 255 255 255
17 210 255 255 255 255 255 255 255 255 255 255
16 215 255 255 255 255 255 255 255 255 255 255
15 214 255 255 255 255 255 255 255 255 255 255
14 209 255 255 255 255 255 255 255 255 255 255
12 205 254 255 255 255 255 255 255 255 255 255
10 200 246 255 255 255 255 255 255 255 255 255
8 190 232 255 255 255 255 255 255 255 255 255
6 184 223 255 255 255 255 255 255 255 255 255
4 175 203 248 255 255 255 255 255 255 255 255
Table I-28 Variations of interpreted time of flight
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 271 270 270 270 270 270 270 270 270 270 270
30 270 270 270 270 270 270 270 270 270 270 270
28 269 270 269 269 269 269 269 269 269 269 269
26 271 270 270 270 270 270 270 270 270 270 270
25 269 270 270 270 270 270 270 270 270 270 270
24 269 269 269 269 269 269 269 269 269 270 270
307
23 269 269 269 269 269 269 269 270 269 269 269
22 269 269 269 269 269 269 269 269 269 269 269
21 270 270 270 270 270 270 270 270 269 270 270
20 269 270 270 270 270 270 270 270 270 270 270
19 269 269 269 269 269 269 269 269 269 269 269
18 269 269 269 269 269 269 269 269 268 269 269
17 269 269 269 269 269 269 269 269 269 269 269
16 270 270 270 270 270 269 269 269 270 270 270
15 269 269 269 269 269 269 269 269 269 269 269
14 269 270 270 270 269 269 269 270 269 270 270
12 270 270 270 270 269 269 269 269 269 269 269
10 270 270 270 269 269 269 269 269 270 270 270
8 269 269 269 269 269 269 269 269 269 268 269
6 268 269 268 268 268 268 268 268 268 268 268
4 268 269 269 269 269 269 269 269 269 269 269
Thickness = 10.16mm
Table I-29 Variations of amplitudes of the first backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 142 144 148 155 167 189 228 254 255 255 255
30 142 144 148 155 165 188 226 254 255 255 255
28 142 144 148 155 166 189 229 254 255 255 255
26 142 144 148 155 166 187 226 254 255 255 255
25 142 144 148 156 167 192 232 255 255 255 255
24 142 145 148 156 167 191 231 254 255 255 255
23 141 144 148 156 168 192 233 255 255 255 255
22 142 145 148 156 168 191 234 255 255 255 255
21 142 145 149 156 168 192 233 255 255 255 255
20 142 145 148 155 167 191 233 254 255 255 255
19 142 145 148 156 169 192 233 255 255 255 255
18 142 144 148 156 167 191 233 255 255 255 255
17 142 145 148 156 167 191 229 254 255 255 255
16 142 145 149 156 167 192 229 254 255 255 255
15 142 145 149 157 169 193 234 254 255 255 255
14 142 145 149 157 169 193 234 255 255 255 255
12 142 144 148 156 167 188 226 254 255 255 255
10 142 144 148 156 166 189 228 254 255 255 255
8 142 144 148 155 166 187 223 255 255 255 255
6 142 143 146 153 162 181 212 253 255 255 255
4 141 142 145 150 158 175 204 249 255 255 255
308
Table I-30 Variations of amplitudes of the second backwall echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 139 140 141 142 145 152 163 181 216 246 249
30 139 140 141 143 146 153 163 180 216 249 248
28 139 141 141 143 146 153 163 182 217 246 249
26 139 140 141 143 146 154 165 186 221 249 250
25 139 140 142 144 147 153 166 184 222 248 252
24 139 140 141 143 147 154 167 184 224 248 252
23 137 140 141 143 146 154 164 183 220 248 253
22 140 141 141 144 147 153 166 185 222 248 248
21 139 140 141 143 146 152 163 181 218 247 251
20 139 140 141 144 147 155 166 186 228 253 252
19 139 140 141 143 147 153 167 184 228 246 251
18 139 140 141 143 147 154 167 185 222 246 252
17 139 140 141 144 147 153 165 184 220 250 250
16 139 140 141 144 147 153 165 186 225 250 252
15 139 140 141 143 146 153 165 184 225 248 246
14 139 140 141 143 146 152 166 184 225 250 252
12 140 140 141 143 147 153 165 183 225 249 253
10 139 140 141 143 146 152 164 180 218 247 247
8 139 140 141 143 146 152 163 181 218 248 249
6 138 140 141 143 145 152 163 180 218 247 248
4 137 139 140 142 144 151 161 179 216 245 247
Table I-31 Variations of amplitudes of the interface echo
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 202 246 255 255 255 255 255 255 255 255 255
30 205 254 255 255 255 255 255 255 255 255 255
28 208 255 255 255 255 255 255 255 255 255 255
26 207 255 255 255 255 255 255 255 255 255 255
25 212 255 255 255 255 255 255 255 255 255 255
24 208 255 255 255 255 255 255 255 255 255 255
23 211 255 255 255 255 255 255 255 255 255 255
22 211 255 255 255 255 255 255 255 255 255 255
21 210 255 255 255 255 255 255 255 255 255 255
20 212 255 255 255 255 255 255 255 255 255 255
19 212 255 255 255 255 255 255 255 255 255 255
18 208 255 255 255 255 255 255 255 255 255 255
17 211 255 255 255 255 255 255 255 255 255 255
16 206 255 255 255 255 255 255 255 255 255 255
15 203 253 255 255 255 255 255 255 255 255 255
14 203 249 255 255 255 255 255 255 255 255 255
12 199 243 255 255 255 255 255 255 255 255 255
309
10 193 233 255 255 255 255 255 255 255 255 255
8 185 220 255 255 255 255 255 255 255 255 255
6 180 212 255 255 255 255 255 255 255 255 255
4 173 198 239 255 255 255 255 255 255 255 255
Table I-32 Variations of interpreted time of flight
WP Gain
30 35 40 45 50 55 60 65 70 75 80
32 337 337 337 337 337 337 337 337 337 337 337
30 336 337 337 336 336 336 336 336 336 336 336
28 337 337 337 337 337 337 337 337 337 337 337
26 337 337 337 337 337 336 337 337 336 337 337
25 337 337 337 337 337 337 337 337 337 337 337
24 336 336 336 336 336 336 336 336 336 337 336
23 337 337 337 337 337 337 337 337 337 337 337
22 336 337 336 336 336 336 336 336 336 336 337
21 337 337 337 337 337 337 337 337 337 337 337
20 337 337 337 336 336 336 336 336 336 337 337
19 336 336 336 336 336 336 336 336 336 336 336
18 336 337 337 337 336 336 336 336 336 336 337
17 337 337 337 337 336 336 336 337 336 337 337
16 337 337 336 336 337 336 336 336 336 337 337
15 336 336 336 336 336 336 336 336 335 335 335
14 335 336 336 336 336 336 336 336 336 336 336
12 336 336 336 336 336 336 337 336 336 336 337
10 335 336 335 335 335 335 335 335 335 335 335
8 336 336 336 336 336 336 336 336 336 336 336
6 336 335 336 336 336 336 336 336 336 336 335
4 336 336 336 336 336 336 336 336 336 336 336
310
Ultrasonic image interpreted from the results obtained in the experiments discussed in Chapter 6.3
Effect of varying angle of incidence.
Fig. II-1 Ultrasonic image for angle of incidence from 0° to 1.485°
313
Ultrasonic testing results for Chapter 6.3 “Effect of varying angle of incidence” are presented here.
T and A in the tables represent thickness and amplitude of backwall echoes respectively.
Table III-1 Wall thicknesses measured on the curved component with angles of incidence from 0° to 1.98°
Hole
#
θ1 = 0° θ1 = 0.495° θ1 = 0.99° θ1 = 1.485° θ1 = 1.98°
T A T A T A T A T A
1 9.603 243 9.603 245 9.576 246 9.550 249 9.576 245
2 - - - - - - - - - -
3 9.230 204 9.230 211 9.230 193 9.203 199 9.283 189
4 5.101 253 5.101 255 5.047 253 5.047 253 5.021 253
5 4.322 237 4.322 220 4.296 212 4.296 195 4.242 215
6 1.845 253 1.845 253 1.845 253 1.812 253 1.812 253
7 0.882 253 0.882 253 0.882 253 0.834 253 0.858 253
8 2.695 253 2.695 253 2.666 253 2.666 253 2.666 253
9 2.753 253 2.753 253 2.753 253 2.724 253 2.695 253
10 6.754 252 6.754 247 6.720 243 6.720 230 6.720 235
11 7.471 192 7.505 197 - - 7.505 185 7.505 197
12 7.403 253 7.403 253 7.369 253 7.369 253 7.369 253
13 10.343 252 10.343 252 10.312 250 10.312 243 10.312 246
14 13.264 252 13.294 248 13.264 238 13.264 216 13.294 203
15 14.146 212 14.146 201 14.116 204 14.146 197 14.116 192
16 10.890 250 10.921 253 10.890 253 10.860 253 10.829 250
17 10.343 251 10.343 249 10.343 245 10.373 245 10.373 234
18 7.334 235 7.334 228 7.403 233 7.437 228 7.505 229
19 3.161 253 3.161 253 3.126 253 3.091 252 3.126 253
20 4.349 253 4.349 252 4.296 251 4.296 246 4.296 243
21 4.054 253 4.027 253 4.027 252 3.977 251 3.977 252
22 6.959 250 6.925 250 6.925 247 6.891 243 6.857 249
23 7.607 253 7.573 253 7.539 253 7.505 253 7.539 253
24 8.963 246 8.963 249 8.937 236 8.963 232 8.937 234
Table III-2 Wall thicknesses measured on the curved component with angles of incidence from 2.475° to 4.455°
Hole
#
θ1 = 2.475° θ1 = 2.975° θ1 = 3.465° θ1 = 3.96° θ1 = 4.455°
T A T A T A T A T A
1 9.576 250 9.630 245 9.710 239 9.923 230 10.130 214
2 - - - - - - - - - -
3 9.337 191 9.416 196 9.763 217 9.870 214 10.190 227
4 5.021 253 5.074 251 5.155 253 5.235 251 5.343 251
5 4.296 228 4.322 239 4.403 250 4.484 248 4.645 240
6 1.878 253 1.944 253 2.088 255 2.233 255 2.406 255
314
7 0.906 253 0.991 253 1.122 255 1.320 255 1.517 255
8 2.695 253 2.782 253 2.897 255 3.055 255 3.303 255
9 2.724 253 2.753 253 2.840 255 2.868 255 2.955 255
10 6.754 224 6.789 224 6.891 222 7.061 201 7.198 185
11 7.539 203 7.573 176 8.217 185 7.949 176 8.404 168
12 7.334 253 7.369 253 7.437 255 7.573 255 7.710 255
13 10.312 238 10.373 219 10.464 219 10.556 232 10.677 247
14 13.355 194 13.659 178 - - - - - -
15 13.872 198 13.994 183 14.146 172 14.298 190 14.451 222
16 10.829 253 10.921 251 10.951 251 11.012 248 11.195 230
17 10.373 233 10.434 228 10.556 207 10.586 205 10.890 191
18 7.539 204 7.607 211 7.710 226 7.778 239 7.880 243
19 3.161 250 3.232 247 3.339 248 3.551 246 3.764 240
20 4.296 248 4.322 250 4.376 252 4.671 253 4.725 253
21 3.977 253 3.941 252 3.941 255 4.027 255 4.134 255
22 6.925 244 6.993 245 7.130 246 7.266 235 7.505 244
23 7.539 253 7.539 253 7.642 255 7.642 255 7.812 255
24 8.963 235 9.017 230 9.097 214 9.230 211 9.177 199
Table III-3 Wall thicknesses measured on the curved component with angles of incidence from 4.95° to 5.94°
Hole # θ1 = 4.95° θ1 = 5.445° θ1 = 5.94°
T A T A T A
1 10.251 196 10.343 183 10.373 172
2 - - - - - -
3 10.221 234 10.221 239 10.464 241
4 5.504 247 5.531 237 5.719 228
5 4.725 247 4.779 237 4.833 226
6 2.637 255 2.695 255 2.897 255
7 1.779 254 1.878 254 2.175 254
8 3.551 255 3.622 255 3.906 255
9 3.161 255 2.897 255 3.126 255
10 7.573 175 - - 5.558 207
11 - - 9.177 180 9.097 185
12 7.880 254 7.846 254 7.983 253
13 10.829 252 10.799 253 10.982 253
14 - - 12.716 192 14.207 174
15 14.846 226 14.816 224 14.816 232
16 11.377 201 11.864 191 12.168 170
17 11.286 181 11.164 176 - -
18 8.137 246 8.164 251 8.324 251
19 4.027 227 4.108 219 4.349 223
20 4.833 206 4.913 255 4.994 254
21 4.161 254 4.188 255 4.349 255
22 8.164 221 8.495 209 8.644 233
316
Variations of amplitude of backwall echoes at each individual holes for Chapter 6.3.3
Fig. IV-1 Variations of amplitude of backwall echoes at the first 12 holes (excluding hole 2)
318
The results for Chapter 6.8 “Measuring three PSM104 turbine blades with a common probe path”
are presented here.
Table V-1 Thicknesses measured on B1 using P1, P2, P3 and a touch probe at ELE
Hole # Probe path P1 Probe path P2 Probe path P3
ELE touch probe
Thickness Amplitude Thickness Thickness Thickness Amplitude Thickness
1 1.533 255 1.648 254 1.648 254 0.8
2 1.763 255 1.746 254 1.746 254 1.8
3 1.648 255 1.730 255 1.730 254 1.55
4 2.334 253 2.435 254 2.421 253 2.15
5 2.897 254 3.055 254 3.055 254 2.45
6 4.067 216 4.161 208 4.148 204 3.725
7 3.250 189 4.752 181 4.765 186 3.075
8 6.959 162 7.027 164 7.096 162 3.125
9 4.886 223 4.994 183 4.994 173 4.275
10 4.604 202 4.698 192 4.698 189 4.15
11 4.322 173 4.295 178 4.295 181 3.65
12 4.443 219 4.376 183 4.390 187 3.85
13 2.666 255 2.609 255 2.609 254 2.425
Table V-2 Thickness measured on B2 using P1, P2, P3 and a touch probe at ELE
Hole
#
Probe path P2 Probe path P1 Probe path P3 ELE touch
probe
Thickness Amplitude Thickness Amplitude Thickness Amplitude Thickness
1 1.402 254 1.550 255 1.402 254 1.43
2 1.862 254 1.763 250 1.878 254 1.73
3 1.599 254 1.681 254 1.599 255 1.56
4 2.421 242 2.464 251 2.421 246 2.22
5 2.912 254 3.017 238 2.912 254 2.64
6 4.296 171 4.296 223 4.309 169 no reading
7 4.806 185 3.268 178 4.779 188 no reading
8 7.966 177 8.068 173 7.915 172 no reading
9 5.208 216 6.703 190 5.208 202 no reading
10 4.865 216 4.865 190 4.865 202 4.17
11 4.524 200 4.564 217 4.524 198 3.29
12 3.906 223 4.041 182 3.906 171 2.66
13 2.869 255 2.869 255 2.869 255 2.51
Table V-3 Thickness measured on B3 using P1, P2, P3 and a touch probe at ELE
Hole Probe path P3 Probe path P1 Probe path P2 ELE touch
319
# probe
Thickness Amplitude Thickness Amplitude Thickness Amplitude Thickness
1 1.388 253 1.550 254 1.388 254 1.34
2 1.796 253 1.730 254 1.796 254 1.69
3 1.632 254 1.780 250 1.632 254 1.54
4 2.262 254 2.363 255 2.262 254 2
5 3.498 254 3.675 211 3.498 253 3.02
6 3.906 215 4.108 175 3.941 207 3.32
7 4.806 197 5.155 196 4.819 192 no reading
8 6.959 160 7.062 161 6.959 164 no reading
9 7.062 178 6.993 174 7.192 179 no reading
10 4.667 178 4.652 174 4.667 179 no reading
11 4.376 218 4.309 173 4.349 183 3.39
12 4.403 171 Difficult to be interpreted 4.376 171 3.22
13 2.840 253 2.753 245 2.840 255 2.51
DESIGN, DEVELOPMENT AND TESTING OF AN
AUTOMATED SYSTEM FOR MEASURING WALL
THICKNESSES IN TURBINE BLADES WITH COOLING
CHANNELS
A thesis submitted to the University of Manchester for the degree of
PhD
in the Faculty of Faculty of Engineering and Physical Sciences
2016
ZHENGYI JIANG
SCHOOL OF MECHANICAL, AEROSPACE AND CIVIL ENGINEERING
VOLUME II OF II
321
Contents
CONTENTS 321
CHAPTER 1 C# CODES 324
1.1 Robot control 325
1.1.1 Connect to the robot 325
1.1.2 Number register 328
1.1.3 Position register 330
1.1.4 Robot program 333
1.1.5 Robot program execution 335
1.1.6 File header fix 337
1.1.7 Variables and configurations 338
1.1.8 Advanced robot position enquiry 339
1.1.9 Advanced robot motion control 346
1.2 Ultrasonic control 352
1.3 DAQ device 363
1.3.1 Connect to the DAQ device 363
1.3.2 Data transmission 364
1.3.3 Error message handling 368
1.3.4 Special function 369
1.3.5 Variables and configurations 369
1.3.6 Advanced Digital IO control 370
322
1.3.7 Advanced analog IO control 370
1.4 Stepper motor control 372
1.4.1 Connect to the stepper motor 372
1.4.2 Stepper motor instructions 373
1.4.3 Variables and configurations 376
1.4.4 Advanced stepper motor control 376
1.5 Matlab interaction 381
1.6 Miscellaneous classes 383
1.6.1 Extended type conversions 383
1.7 Demo software 385
1.7.1 Initilisation 385
1.7.2 Connect to equipment 386
1.7.3 Private Methods 388
1.7.4 Laser digitization 391
1.7.5 Probe path localisation 395
1.7.6 Ultrasonic data acquisition 397
1.7.7 Wall thickness evaluation 405
CHAPTER 2 MATLAB CODES 407
2.1 Reverse engineering 408
2.1.1 The main Matlab function 408
2.1.2 B-spline curve 410
2.1.3 Shape-preserving parameterisation 412
2.1.4 B-spline surface 415
2.2 Probe path calculation 421
2.2.1 Data preparation 421
2.2.2 The main path calculation function 422
2.2.3 Tangent vectors in u direction 428
2.2.4 Tangent vectors in w direction 430
2.3 Localisation 434
2.3.1 Initialisation 434
2.3.2 Multi-approach algorithm 435
2.3.3 Quaternion method 438
2.3.4 Closest point 438
323
2.4 Path grouping 440
2.4.1 The main function 440
2.4.2 Path grouping sub-function 445
2.4.3 Probe path transformation sub-function 447
2.4.4 Path ordering sub-function 448
2.4.5 Robot rotation parameter calculation 449
2.5 Thickness evaluation 451
2.5.1 The main function 451
2.5.2 Interface echo detection 452
2.5.3 Backwall echo detection and thickness calculation 456
324
Chapter 1
C# Codes
It was decided to use a programming language from the C family for control software to control all
aspects of data transmission between the PC and controllers of other equipment including the robot
controller, the ultrasonic PCI card, the USB-1208FS DAQ device the RS232 controller for the stepper
motor. The dynamic-link library (DLL) of these controllers provided by their manufacture are available
in both C\C++ and C# language. Considering that C# language is an advanced language which
means it is easier to learn and to program, the control software in this project are development in
C# language.
Since all mathematical calculations are completed using Matlab scripts, it is also necessary to develop
a port or a link via which users can execute Matlab scripts using the software developed in C#
language.
In this chapter, C# classes developed for all controllers are presented. The classes are in general
categorised into two: basic classes and advanced classes. The basic classes provide the most basic
methods for transmitting data between the PC and the controllers. A lengthy block of codes is usually
needed to perform a simple action; for example, for instructing the robot to move to one point in
linear motion, a series of codes need to be written including specifying the motion type, defining the
coordinates, specifying the speed, specifying CNT, selecting the robot program for point-to-point
movement and finally instructing the robot to execute the robot program. Since linear motion as well
as many more actions are frequently used, it is not possible to write a block of codes each time. The
advanced classes make it possible to perform these actions using one line of code only; for example,
for a linear motion, it is now possible to write LMove(coordinate, speed, cnt).
At the end of this chapter, a demo software is presented which can be used for automated wall
thickness measurement on the inspection machine.
325
1.1 Robot control
1.1.1 Connect to the robot
Codes listed in this section are used for initialising a robot software interface and connecting to or
disconnecting from the robot controller.
namespace ELE_Application.Class.FANUC { public class ConnectRobot { ErrorHandling errorHandling = new ErrorHandling(); //Fanuc core instance public static FRRJIf.Core fanucCore; //Fanuc data table public static FRRJIf.DataTable fanucDataTable; public static FRRJIf.DataCurPos fanucCurPos; //current position public static FRRJIf.DataCurPos fanucCurPosUF1; //current user frame 1 position public static FRRJIf.DataCurPos fanucCurPosUF2; //current user frame 2 position public static FRRJIf.DataCurPos fanucCurPosUF3; //current user frame 3 position public static FRRJIf.DataCurPos fanucCurPosUF4; //current user frame 4 position public static FRRJIf.DataCurPos fanucCurPosUF5; //current user frame 5 position public static FRRJIf.DataCurPos fanucCurPosUF6; //current user frame 6 position public static FRRJIf.DataCurPos fanucCurPosUF7; //current user frame 7 position public static FRRJIf.DataCurPos fanucCurPosUF8; //current user frame 8 position public static FRRJIf.DataCurPos fanucCurPosUF9; //current user frame 9 position public static FRRJIf.DataSysVar fanucSysVarString_selectProg; //select program public static FRRJIf.DataSysVar fanucSysVarInt_startProg; //start program public static FRRJIf.DataSysVar fanucSysVarInt_progNum; //current program number public static FRRJIf.DataSysVar fanucSysVarInt_cyctskNum; //current cycle task number public static FRRJIf.DataSysVar fanucSysVarString_activeProg; //active program public static FRRJIf.DataSysVar fanucSysVarUAlarm; //user alarm public static FRRJIf.DataNumReg fanucNumReg100_speed; //number register 100 - speed public static FRRJIf.DataNumReg fanucNumReg120_cnt; //number register 120 - cnt public static FRRJIf.DataPosReg fanucPosReg51; //position register 51
326
public static FRRJIf.DataNumReg fanucNumReg; //unspecified number register public static FRRJIf.DataPosReg fanucPosReg; //unspecified position register public static FRRJIf.DataSysVar fanucSysVarString; public static FRRJIf.DataSysVar fanucSysVarInt; //Connect status; true for connected, otherwise disconnected. public static bool isConnected = false; #region initialization private void InitializeCommu() { //Initiate Fanuc core instance fanucCore = new FRRJIf.Core(); fanucCore.set_TimeOutValue(10000); errorHandling.catchError(); //Set Fanuc data table fanucDataTable = fanucCore.get_DataTable(); //Add item to data table fanucSysVarInt_startProg = fanucDataTable.AddSysVar(FRRJIf.FRIF_DATA_TYPE.SYSVAR_INT, "$SHELL_WRK.$CUST_START"); //Start Prog fanucSysVarString_selectProg = fanucDataTable.AddSysVar(FRRJIf.FRIF_DATA_TYPE.SYSVAR_STRING, "$SHELL_WRK.$CUST_NAME"); //Select Program fanucSysVarInt_progNum = fanucDataTable.AddSysVar(FRRJIf.FRIF_DATA_TYPE.SYSVAR_INT, "$SHELL_WRK.$TASK_NUM"); //Get current task number fanucSysVarInt_cyctskNum = fanucDataTable.AddSysVar(FRRJIf.FRIF_DATA_TYPE.SYSVAR_INT, "$SHELL_WRK.$CYCTSK_NUM"); //Get current cycle task number fanucSysVarString_activeProg = fanucDataTable.AddSysVar(FRRJIf.FRIF_DATA_TYPE.SYSVAR_STRING, "$SHELL_WRK.$ACTIVEPROG"); //Get active program fanucSysVarUAlarm = fanucDataTable.AddSysVar(FRRJIf.FRIF_DATA_TYPE.SYSVAR_STRING, "$UALRM_SEV"); fanucSysVarInt = fanucDataTable.AddSysVar(FRRJIf.FRIF_DATA_TYPE.SYSVAR_INT, "$MNUFRAMENUM");//Get user alarm fanucCurPos = fanucDataTable.AddCurPos(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1); fanucCurPosUF1 = fanucDataTable.AddCurPosUF(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1, 1); fanucCurPosUF2 = fanucDataTable.AddCurPosUF(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1, 2); fanucCurPosUF3 = fanucDataTable.AddCurPosUF(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1, 3); fanucCurPosUF4 = fanucDataTable.AddCurPosUF(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1, 4); fanucCurPosUF5 = fanucDataTable.AddCurPosUF(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1, 5); fanucCurPosUF6 = fanucDataTable.AddCurPosUF(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1, 6); fanucCurPosUF7 = fanucDataTable.AddCurPosUF(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1, 7);
327
fanucCurPosUF8 = fanucDataTable.AddCurPosUF(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1, 8); fanucCurPosUF9 = fanucDataTable.AddCurPosUF(FRRJIf.FRIF_DATA_TYPE.CURPOS, 1, 9); fanucNumReg100_speed = fanucDataTable.AddNumReg(FRRJIf.FRIF_DATA_TYPE.NUMREG_INT, 100, 100); //Set number register 100 - speed fanucNumReg120_cnt = fanucDataTable.AddNumReg(FRRJIf.FRIF_DATA_TYPE.NUMREG_INT, 120, 120); //Set number register 120 - cnt fanucPosReg51 = fanucDataTable.AddPosReg(FRRJIf.FRIF_DATA_TYPE.POSREG, 1, 51, 51); //Set position register 51 fanucNumReg = fanucDataTable.AddNumReg(FRRJIf.FRIF_DATA_TYPE.NUMREG_INT, 1, 200); //Set number register 1-200 fanucPosReg = fanucDataTable.AddPosReg(FRRJIf.FRIF_DATA_TYPE.POSREG, 1, 1, 100); //Set position register 1-100 } //Reset varibles private void InitializeVaribles() { isConnected = false; } #endregion #region Connection public bool Disconnect() { try { fanucCore.Disconnect(); InitializeCommu(); //Reset Fanuc core instance and data table InitializeVaribles(); //Reset variables } catch { errorHandling.catchError(); return true; } return false; } public bool Connect(string ipAddress) { bool isConn = false; //In case the robot has been connected already, disconnect from it and return; //otherwise, connect. if (isConnected) Disconnect(); else { InitializeCommu(); try { isConn = fanucCore.Connect(ipAddress); } catch
328
{ errorHandling.catchError(); } //In case of failure, disconnect. if (!isConn) Disconnect(); } isConnected = isConn; return isConnected; } #endregion #region Set system varibles public bool SetSysVarString(string varible, string value) { fanucSysVarString = fanucDataTable.AddSysVar(FRRJIf.FRIF_DATA_TYPE.SYSVAR_STRING, "$SHELL_WRK.$CUST_NAME"); string Str = null; fanucSysVarString.SetValue(Str); //Clear Selection bool isSet = fanucSysVarString.SetValue(value); fanucDataTable.Refresh(); return isSet; } public bool SetSysVarInt(string varible, int value) { fanucSysVarInt = fanucDataTable.AddSysVar(FRRJIf.FRIF_DATA_TYPE.SYSVAR_INT, varible); bool isSet = fanucSysVarInt.SetValue(value); fanucDataTable.Refresh(); return isSet; } #endregion } }
1.1.2 Number register
Codes listed in this section are used for specifying number registers in the robot controller.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ELE_Application.Class.FANUC.Programs { public class SetRobotNumReg { //1. index, value
329
//2. index, value, type //3. type, value //4. type, value, movetype //1. public void setNumReg(int index, int value) { ConnectRobot.fanucNumReg.SetValue(index, value); } /// <summary> /// 2. index, value, type /// </summary> /// <param name="index">index</param> /// <param name="value">value</param> /// <param name="type">speed/cnt</param> public void setNumReg(int index, float value, FanucConstants.NumRegType numRegtype) { switch (numRegtype) { case FanucConstants.NumRegType.Speed: if (value > 2000) value = 2000; else if (value < 1) value = 1; break; case FanucConstants.NumRegType.Cnt: if (value > 2000) value = 2000; else if (value < 0) value = 0; break; } ConnectRobot.fanucNumReg.SetValue(index, value); } /// <summary> /// 3. type, value /// </summary> /// <param name="value">value</param> /// <param name="type">speed/cnt/joint/linear</param> public void setNumReg(FanucConstants.NumRegType numRegtype, int value) { int index = 0; switch (numRegtype) { case FanucConstants.NumRegType.Speed: index = FanucConstants.indexNumReg_speed; break; case FanucConstants.NumRegType.Cnt: index = FanucConstants.indexNumReg_cnt; break; } setNumReg(index, value, numRegtype); } /// <summary> /// 4. type, value, moveType
330
/// </summary> /// <param name="value">value</param> /// <param name="type">speed/cnt</param> /// <param name="moveType">joint/linear</param> public void setNumReg(FanucConstants.NumRegType numRegType, int value, FanucConstants.MoveType moveType) { if (moveType == FanucConstants.MoveType.Joint) { if (value > 100) value = 100; else if (value < 1) value = 1; } setNumReg(numRegType, value); } public void setNumReg(FanucConstants.NumRegType numRegtype) { int value = 1; int index = 0; switch (numRegtype) { case FanucConstants.NumRegType.JointBit: value = FanucConstants.intNumRegBit_JMoveBit; index = FanucConstants.indexNumRegBit_moveType; break; case FanucConstants.NumRegType.LinearBit: value = FanucConstants.intNumRegBit_LMoveBit; index = FanucConstants.indexNumRegBit_moveType; break; } ConnectRobot.fanucNumReg.SetValue(index, value); } } }
1.1.3 Position register
Codes listed in this section are used for specifying position registers in the robot controller.
using System; namespace ELE_Application.Class.FANUC.Programs { public class SetRobotPosReg { public static Array intConfig = new short[7]; /// <summary> /// Index, Value, LinearMove /// </summary> /// <param name="index">index</param> /// <param name="value">posReg</param> public float[] SetPosReg(int index, float[] value, short UF, short UT) { Array sngArray = new float[6]; //Array intConfig = new short[7];
331
float[] finalPos = new float[6]; // Copy contents of Reg22 to sngArray value.CopyTo(sngArray, 0); value.CopyTo(finalPos, 0); // Config, this sets to (NUT 000) - Needs Editing to be alterable // NUT 000 - 0 1 1 0 0 0 // FUT 000 - 1 1 1 0 0 0 if (Convert.ToInt32(intConfig.GetValue(2)) != 1) { intConfig = new short[7]; intConfig.SetValue((short)1, 0); intConfig.SetValue((short)1, 2); intConfig.SetValue((short)1, 3); intConfig.SetValue((short)0, 4); intConfig.SetValue((short)0, 5); intConfig.SetValue((short)0, 6); } //UT = 2; //Validity check for UT & UF if (UT > 10 | UT < 0) return finalPos; if (UF > 9 | UF < 0) return finalPos; // Transfer the data ConnectRobot.fanucPosReg.SetValueXyzwpr(index, ref sngArray, ref intConfig, UF, UT); ConnectRobot.fanucNumReg.SetValue(FanucConstants.indexNumReg_UFSelection, UF); ConnectRobot.fanucNumReg.SetValue(FanucConstants.indexNumReg_UTSelection, UT); return finalPos; } /// <summary> /// Index, Value, Config, LinearMove /// </summary> /// <param name="index">index</param> /// <param name="value">posReg</param> /// <param name="config">intConfig</param> public float[] SetPosReg(int index, float[] value, short[] config, short UF, short UT) { Array sngArray = new float[6]; Array intConfig = new short[7]; float[] finalPos = new float[6]; // Copy contents of Reg22 to sngArray value.CopyTo(sngArray, 0); value.CopyTo(finalPos, 0); config.CopyTo(intConfig, 0); // Transfer the data ConnectRobot.fanucPosReg.SetValueXyzwpr(index, ref sngArray, ref intConfig, UF, UT); return finalPos;
332
} /// <summary> /// Index, Value, [Linear/Joint] /// </summary> /// <param name="index">index</param> /// <param name="value">posReg</param> /// <param name="moveType">linear/joint</param> public float[] SetPosReg(int index, float[] value, FanucConstants.MoveType moveType, short UF, short UT) { float[] finalPos = new float[6]; value.CopyTo(finalPos, 0); if (moveType == FanucConstants.MoveType.Joint) { ConnectRobot.fanucPosReg.SetValueJoint(index, value, UF, UT); } else { finalPos = SetPosReg(index, value, UF, UT); } return finalPos; } /// <summary> /// Index, Value, [Relative/Absolute], [Linear/Joint] /// </summary> /// <param name="index">index</param> /// <param name="value">posReg</param> /// <param name="coorType">relative/absolute</param> /// <param name="moveType">linear/joint</param> public float[] SetPosReg(int index, float[] value, FanucConstants.MoveType moveType, FanucConstants.CoorType coorType, short UF, short UT) { RobotPosition robotPosition = new RobotPosition(); float[] sngArray = new float[6] { 0, 0, 0, 0, 0, 0}; value.CopyTo(sngArray, 0); if (coorType == FanucConstants.CoorType.Relative) { float[] curPos = new float[9] { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; string posTime; robotPosition.GetPosition(out curPos, out posTime, moveType, UF); sngArray[0] = value[0] + curPos[0]; sngArray[1] = value[1] + curPos[1]; sngArray[2] = value[2] + curPos[2]; sngArray[3] = value[3] + curPos[3]; sngArray[4] = value[4] + curPos[4]; sngArray[5] = value[5] + curPos[5]; } return SetPosReg(index, sngArray, moveType, UF, UT); } } }
333
1.1.4 Robot program
Codes listed in this section are used for retrieving robot programs from the robot controller.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Net; using System.Text.RegularExpressions; using ELE_Application.Class.FANUC; namespace ELE_Application.Class.FANUC.Programs { public class GetRobotProgram { public static string CurProg = null; public List<string> ProgList = new List<string>(); public static string CurDirectory = Directory.GetCurrentDirectory(); public string PosTime = ""; public static string RobotProgramList = CurDirectory + "\\RobPrograms\\RobotProgramList"; //Get robot's current position in xyzwqr coordinates. public void getCurProgram() { CurProg = null; object vntValue = null; ConnectRobot.fanucDataTable.Refresh(); if (ConnectRobot.fanucSysVarString_selectProg.GetValue(ref vntValue) == true) { CurProg += vntValue; } else { CurProg += ConnectRobot.fanucSysVarString_selectProg.SysVarName + " : Error!!! \r\n"; } } //Get a list of programs stored in the robot. public void getPorgramList(string ipAddress) { string link = "http://" + ipAddress + "/MD/INDEX_TP.HTM"; // Get the website, save to file WebClient Client = new WebClient(); Client.DownloadFile(link, RobotProgramList); readProgramList(); } //Read the saved file public List<string> readProgramList() {
334
//clear ProgList ProgList.Clear(); string line; string segment; // Array List to store program names. int pos; FileInfo theSourceFile = new FileInfo(RobotProgramList); StreamReader reader = theSourceFile.OpenText(); // Create regular expression. Regex theReg = new Regex("/MD/.*.TP"); // Read every line in file. while ((line = reader.ReadLine()) != null) { // Check if it is a line containing a program. if (line.Contains(".TP")) { if (!line.Contains("-BCKED") & !line.Contains("GETDATA.TP") & !line.Contains("REQMENU.TP") & !line.Contains("SENDDATA.TP") & !line.Contains("SENDEVNT.TP") & !line.Contains("SENDSYSV.TP")) { // Run Reg Ex on line. Match mat = theReg.Match(line); segment = mat.ToString(); // Find position of first instance of program extension. pos = segment.IndexOf(".TP"); // strip out all characters except program name. segment = segment.Substring(4, (pos - 4)); // Add to array list. ProgList.Add(segment); } } } reader.Close(); return ProgList; } public void ReadLSFile(string ipAddress, string LSFileName) { string link = "http://" + ipAddress + "/MD/" + LSFileName + ".LS"; string filepath = CurDirectory + "\\RobPrograms\\" + LSFileName + ".html"; // Get the website, save to file WebClient ClientLS = new WebClient(); ClientLS.DownloadFile(link, filepath); System.Diagnostics.Process.Start(filepath);
335
} } }
1.1.5 Robot program execution
Codes listed in this section are used for selecting a specified robot program and instructing the robot
to execute the selected robot program.
using System; using System.Windows.Forms; namespace ELE_Application.Class.FANUC.Programs { public class SetRobotProgram { //Set seleted program to robot current selection for execution. public void SetProg(string prog) { string StrProg = null; ConnectRobot.fanucSysVarString_selectProg.SetValue(StrProg); //Clear Selection StrProg = prog; // PROGRAM NAME HERE (CUST_NAME) ConnectRobot.fanucSysVarString_selectProg.SetValue(StrProg); //(STYLE) //Com.fanucSysVarSeleProg.SetValue(1); //(PNS) ConnectRobot.fanucDataTable.Refresh(); GetRobotProgram getRobotProgram = new GetRobotProgram(); getRobotProgram.getCurProgram(); } //Execute seleted program. public void RunProg() { int startNew = 1; try { // Sets "$SHELL_WRK.$CUST_START" to run the program selected in "$SHELL_WRK.$CUST_NAME" ConnectRobot.fanucSysVarInt_startProg.SetValue(startNew); return; } catch (Exception ex) { MessageBox.Show(ex.Message); } } public void RunProg(string prog, bool doCheckRunning) { int startNew = 1;
336
try { SetProg(prog); // Sets "$SHELL_WRK.$CUST_START" to run the program selected in "$SHELL_WRK.$CUST_NAME" ConnectRobot.fanucSysVarInt_startProg.SetValue(startNew); if(doCheckRunning) { int task_num = 999; System.Threading.Thread.Sleep(1000); while (task_num!=0) { task_num = isRunning(); } } return; } catch (Exception ex) { MessageBox.Show(ex.Message); } } public int isRunning() { int task_num = 0; object vntValue = 0; ConnectRobot.fanucDataTable.Refresh(); if (ConnectRobot.fanucSysVarInt_progNum.GetValue(ref vntValue) == true) { task_num = (int)vntValue; } else { Console.WriteLine("Error getting task number"); } return task_num; } public void isRunning(out int task_num, out int cyc_num, out string active_prog) { object vntValue = 0; task_num = 999; cyc_num = 999; active_prog = "Error"; ConnectRobot.fanucDataTable.Refresh(); if (ConnectRobot.fanucSysVarInt_progNum.GetValue(ref vntValue) == true) { task_num = (int)vntValue;
337
} else { Console.WriteLine("Error getting task number"); } if (ConnectRobot.fanucSysVarInt_cyctskNum.GetValue(ref vntValue) == true) { cyc_num = (int)vntValue; } else { Console.WriteLine("Error getting task number"); } if (ConnectRobot.fanucSysVarString_activeProg.GetValue(ref vntValue) == true) { active_prog = vntValue.ToString(); } else { Console.WriteLine("Error getting task number"); } } } }
1.1.6 File header fix
Codes listed in this section are used for preparing files that are downloaded from the robot controller
to be read by the software.
using System; using System.Reflection; namespace ELE_Application.Class.FANUC.Programs { public class UnsafeHeaderParsing { // Method added to allow non-standard HTML headers to be read // http://o2platform.wordpress.com/2010/10/20/dealing-with-the-server-committed-a-protocol-violation-sectionresponsestatusline/ public static bool SetAllowUnsafeHeaderParsing20() { //Get the assembly that contains the internal class Assembly aNetAssembly = Assembly.GetAssembly(typeof(System.Net.Configuration.SettingsSection)); if (aNetAssembly != null) { //Use the assembly in order to get the internal type for the internal class Type aSettingsType = aNetAssembly.GetType("System.Net.Configuration.SettingsSectionInternal"); if (aSettingsType != null) {
338
//Use the internal static property to get an instance of the internal settings class. //If the static instance isn't created allready the property will create it for us. object anInstance = aSettingsType.InvokeMember("Section", BindingFlags.Static | BindingFlags.GetProperty | BindingFlags.NonPublic, null, null, new object[] { }); if (anInstance != null) { //Locate the private bool field that tells the framework is unsafe header parsing should be allowed or not FieldInfo aUseUnsafeHeaderParsing = aSettingsType.GetField("useUnsafeHeaderParsing", BindingFlags.NonPublic | BindingFlags.Instance); if (aUseUnsafeHeaderParsing != null) { aUseUnsafeHeaderParsing.SetValue(anInstance, true); return true; } } } } return false; } } }
1.1.7 Variables and configurations
Codes listed in this section defines variables related to robot control. These variables are constantly
used in the software and can be configured by the user.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ELE_Application.Class.FANUC { public class FanucConstants { public static int indexNumRegBit_moveType = 130; //set R(130) to intNumRegBit_LMoveBit for LMove, intNumRegBit_JMoveBit for JMove. public static int intNumRegBit_LMoveBit = 1; public static int intNumRegBit_JMoveBit = 2; public static int indexPosReg_generalL = 50; public static int indexPosReg_generalJ = 60; public static int indexPosReg_toolOffset = 70; public static int indexNumReg_speed = 100; public static int indexNumReg_cnt = 120; public static int indexNumReg_UFSelection = 110; public static int indexNumReg_UTSelection = 111;
339
public static float positionTolerance = 0.005f; public static string ipAddress = "192.168.100.5"; public static string progMoveToPosRegProgName = "MOVETOPOSREG"; public static string progAttachLaser = "AttachLaser"; public static string progDettachLaser = "DettachLaser"; public static string progAttachUltra = "AttachUltrasonic"; public static string progDettachUltra = "DettachUltrasonic"; public enum MoveType { Linear, Joint }; public enum CoorType { Relative, Absolute }; public enum NumRegType { Speed, Cnt, JointBit, LinearBit }; public enum Coordinate { X, Y, Z, W, P, R, Xy, Xz, Yz, Xyz, Xyzwpr }; public enum Tool { None, Laser, Ultrasonic } public static float[] laserOffset = { 0, 0, -117.835f, 0, 0, 0 }; public static float[] ultrasonicOffset = { 0, 0, -197.823f, 0, 0, 0 }; #region program settings public static int moveToTimeout = 60; //Timeout value in s public static int moveToMaxAttempt = 5; //Max number of attempts for a move, after which the move is aborted. #endregion } }
1.1.8 Advanced robot position enquiry
Codes listed in this section are used for enquiring the location of the end effector in a coordinate
system specified by user. Returned location type can be configured between xyzwpr location and
joint location.
using System; using System.Linq; namespace ELE_Application.Class.FANUC { public class RobotPosition { ErrorHandling errorHandling = new ErrorHandling(); #region get robot position /// <summary> /// Get current position of the robot in the form of either xyzwpr coordinates or joint positions /// </summary> /// <param name="curPos">current position (linear/joint): float[]{x,y,z,w,p,r} / float[]{j1,j2,j3,j4,j5,j6}</param> /// <param name="posTime">time in s when robot reached the position: hh:mm:ss.milisecond</param> public void GetPosition(out float[] curPos, out string posTime, FanucConstants.MoveType type, short UF) { UFNo = UF;
340
posTime = ""; Array xyzwpr = new float[9]; Array config = new short[7]; Array joint = new float[9]; short intUF = 0; short intUT = 0; short intValidC = 0; short intValidJ = 0; float[] cacheCurPos = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; DateTime PosTimeNow = new DateTime(); //Refresh Fanuc data table to update robot position information. try { ConnectRobot.fanucDataTable.Refresh(); } catch { errorHandling.catchError(); } PosTimeNow = DateTime.Now; //recording time if (ConnectRobot.fanucCurPos.Valid) { //Read position information from the table switch (UFNo) { case 1: ConnectRobot.fanucCurPosUF1.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break; case 2: ConnectRobot.fanucCurPosUF2.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break; case 3: ConnectRobot.fanucCurPosUF3.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break; case 4: ConnectRobot.fanucCurPosUF4.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break; case 5: ConnectRobot.fanucCurPosUF5.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break; case 6: ConnectRobot.fanucCurPosUF6.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break;
341
case 7: ConnectRobot.fanucCurPosUF7.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break; case 8: ConnectRobot.fanucCurPosUF8.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break; case 9: ConnectRobot.fanucCurPosUF9.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break; default: ConnectRobot.fanucCurPos.GetValue(ref xyzwpr, ref config, ref joint, ref intUF, ref intUT, ref intValidC, ref intValidJ); break; } //Format time string posTime = PosTimeNow.ToLongTimeString(); //time in the form of hh:mm:ss posTime += PosTimeNow.Millisecond.ToString(); //add milisecond if (type == FanucConstants.MoveType.Linear) xyzwpr.CopyTo(cacheCurPos, 0); else joint.CopyTo(cacheCurPos, 0); } curPos = cacheCurPos; } /// <summary> /// Get current xyzwpr position of the robot and current time /// </summary> /// <param name="curPos">current position (linear): float[]{x,y,z,w,p,r}</param> /// <param name="posTime">time in s when robot reached the position: hh:mm:ss.milisecond</param> public void GetXyzwprPosition(out float[] curPos, out string posTime, short UF) { GetPosition(out curPos, out posTime, FanucConstants.MoveType.Linear, UF); } ///// <summary> ///// Get current xyzwpr position of the robot ///// </summary> ///// <returns>current xyzwpr position</returns> //public float[] GetXyzwprPosition() //{ // float[] curPos; // string posTime; // GetXyzwprPosition(out curPos, out posTime); // return curPos; //} /// <summary> /// Get current joint position of the robot and current time /// </summary>
342
/// <param name="curPos">current position (joint): float[]{j1,j2,j3,j4,j5,j6}</param> /// <param name="posTime">time in s when robot reached the position: hh:mm:ss.milisecond</param> public void GetJointPosition(out float[] curPos, out string posTime, short UF) { GetPosition(out curPos, out posTime, FanucConstants.MoveType.Joint, UF); } ///// <summary> ///// Get current joint position of the robot ///// </summary> ///// <returns>current joint position</returns> //public float[] GetJointPosition() //{ // float[] curPos; // string posTime; // GetJointPosition(out curPos, out posTime); // return curPos; //} #endregion #region check if at position //Difference method /// <summary> /// The most basic method, with a develop option. /// This method checks whether or not the current position of robot = the target position. /// However, the two positions cannot be exactly identical due to precision. Therefore, a parameter, positionTolerance is introduced. /// positionTolerance can be sepcified by user in FanucConstants Class. /// Develop option: (output)position accuracy, which returns differences bettween the target position and the position where the method returns true. /// </summary> /// <param name="targetPos">targe position (linear): float[]{x,y,z,w,p,r}</param> /// <param name="moveType">Move type: linear / joint (joint not implemented)</param> /// <param name="coordinate">Coordinate(s) to check: {x}, {y}, {z}, {w}, {p}, {r}, {x,y}, {x,z}, {y,z}, {x,y,z}, {x,y,z,w,p,r}</param> /// <param name="positionAcc">position accuracy, for develop use</param> /// <returns>true if at the target position within tolerance; false if not</returns> public bool CheckIfAtPosition(float[] targetPos, FanucConstants.MoveType moveType, FanucConstants.Coordinate coordinate, out float[] positionAcc, short UF) { float[] curPos; int[] index; string posTime; bool[] isWithinAllowance; //Get current robot position GetPosition(out curPos, out posTime, moveType, UF); if (moveType == FanucConstants.MoveType.Linear) { //if any coordinate is negative, correct it to possitive.
343
if (curPos[3] < 0) curPos[3] = 360 + curPos[3]; if (curPos[4] < 0) curPos[4] = 360 + curPos[4]; if (curPos[5] < 0) curPos[5] = 360 + curPos[5]; if (targetPos[3] < 0) targetPos[3] = 360 + targetPos[3]; if (targetPos[4] < 0) targetPos[4] = 360 + targetPos[4]; if (targetPos[5] < 0) targetPos[5] = 360 + targetPos[5]; } switch (coordinate) { case FanucConstants.Coordinate.X: index = new int[1] { 0 }; break; case FanucConstants.Coordinate.Y: index = new int[1] { 1 }; break; case FanucConstants.Coordinate.Z: index = new int[1] { 2 }; break; case FanucConstants.Coordinate.W: index = new int[1] { 3 }; break; case FanucConstants.Coordinate.P: index = new int[1] { 4 }; break; case FanucConstants.Coordinate.R: index = new int[1] { 5 }; break; case FanucConstants.Coordinate.Xy: index = new int[2] { 0, 1 }; break; case FanucConstants.Coordinate.Xz: index = new int[2] { 0, 2 }; break; case FanucConstants.Coordinate.Yz: index = new int[2] { 1, 2 }; break; case FanucConstants.Coordinate.Xyz: index = new int[3] { 0, 1, 2 }; break; case FanucConstants.Coordinate.Xyzwpr: index = new int[6] { 0, 1, 2, 3, 4, 5 }; break; default: index = new int[6] { 0, 1, 2, 3, 4, 5 }; break; } positionAcc = new float[index.Length]; isWithinAllowance = new bool[index.Length]; for (int i = 0; i < index.Length; i++) { positionAcc[i] = Math.Abs(curPos[i] - targetPos[i]);
344
if (positionAcc[i] < FanucConstants.positionTolerance) isWithinAllowance[i] = true; } if (isWithinAllowance.All(x => x)) return true; return false; } /// <summary> /// This method checks whether or not the current position of robot = the target position. /// However, the two positions cannot be exactly identical due to precision. Therefore, a parameter, positionTolerance is introduced. /// positionTolerance can be sepcified by user in FanucConstants Class. /// </summary> /// <param name="targetPos">targe position (linear): float[]{x,y,z,w,p,r}</param> /// <param name="moveType">Move type: linear / joint (joint not implemented)</param> /// <returns>true if at the target position within tolerance; false if not</returns> public bool CheckIfAtPosition(float[] targetPos, FanucConstants.MoveType moveType, short UF) { return CheckIfAtPosition(targetPos, moveType, FanucConstants.Coordinate.Xyzwpr, UF); } /// <summary> /// This method checks whether or not the current position of robot = the target position. /// However, the two positions cannot be exactly identical due to precision. Therefore, a parameter, positionTolerance is introduced. /// positionTolerance can be sepcified by user in FanucConstants Class. /// </summary> /// <param name="targetPos">targe position (linear): float[]{x,y,z,w,p,r}</param> /// <param name="moveType">Move type: linear / joint (joint not implemented)</param> /// <param name="coordinate">Coordinate(s) to check: {x}, {y}, {z}, {w}, {p}, {r}, {x,y}, {x,z}, {y,z}, {x,y,z}, {x,y,z,w,p,r}</param> /// <returns>true if at the target position within tolerance; false if not</returns> public bool CheckIfAtPosition(float[] targetPos, FanucConstants.MoveType type, FanucConstants.Coordinate coordinate, short UF) { float[] delta; return CheckIfAtPosition(targetPos, type, coordinate, out delta, UF); } #endregion #region position properties private short UFNo = 0;
345
/// <summary> /// Set/get current user frame number for robot position check. /// </summary> public short UFNum { get { return UFNo; } set { UFNo = value; } } private float[] _curPos; private string _posTime; /// <summary> /// Get current xyz coordinates of the robot. /// <para>By default this property returns robot position in world frame. </para> /// <para>To request position in a specific user frame, the UF number must be set by calling property UFNum. </para> /// </summary> public float[] CurXYZPosition { get { GetPosition(out _curPos, out _posTime, FanucConstants.MoveType.Linear, UFNo); return _curPos; } } /// <summary> /// Get current joint coordinates of the robot. /// <para>By default this property returns robot position in world frame. </para> /// <para>To request position in a specific user frame, the UF number must be set by calling property UFNum. </para> /// </summary> public float[] CurJointPosition { get { GetPosition(out _curPos, out _posTime, FanucConstants.MoveType.Joint, UFNo); return _curPos; } } public string LastPosReportTime { get { return _posTime; } } #endregion } }
346
1.1.9 Advanced robot motion control
Codes listed in this section are used for instructing the robot to move to a certain coordinate in a
user specified coordinate system. Motion types can be configured between linear motion and joint
motion.
using System; using ELE_Application.Class.FANUC.Programs; using System.IO; namespace ELE_Application.Class.FANUC { public class MoveToPos { ErrorHandling errorHandling = new ErrorHandling(); #region developer methods //Load basic method libraries SetRobotPosReg setPosReg = new SetRobotPosReg(); SetRobotNumReg setNumReg = new SetRobotNumReg(); SetRobotProgram setProgram = new SetRobotProgram(); RobotPosition position = new RobotPosition(); /// <summary> /// The most basic MoveTo method, with develop options. /// Develop option: (output)position accuracy, which write differences bettween the target positions and the positions where the robot is considered completing the move. /// </summary> /// <param name="targetPos">target position (linear/joint): float[] = {x,y,z,w,p,r} / float[] = {j1,j2,j3,j4,j5,j6}</param> /// <param name="moveType">move type: linear / joint </param> /// <param name="coorType">coordinate type: absolute / relative</param> /// <param name="speed">speed</param> /// <param name="cnt">cnt</param> /// <param name="attemptCount">number of attempts; for general use, set 1</param> /// <param name="logAccuracy">true / false; used only for software developing; for general use, set false</param> public bool MoveTo(float[] targetPos, FanucConstants.MoveType moveType, FanucConstants.CoorType coorType, int speed, int cnt, int attemptCount, bool logAccuracy, bool doPositionCheck, FanucConstants.Tool tool, short UF, short UT) { if (targetPos == null) return false; TargetPos = targetPos; UserFrame = UF; MoveType = moveType; CoorType = coorType; int moveTypeBit = FanucConstants.intNumRegBit_LMoveBit; int posRegIndex = FanucConstants.indexPosReg_generalL; if (moveType == FanucConstants.MoveType.Joint) { moveTypeBit = FanucConstants.intNumRegBit_JMoveBit; posRegIndex = FanucConstants.indexPosReg_generalJ;
347
} //for accuracy logging only float[] positionAcc; //Move to target position float[] finalPos = setPosReg.SetPosReg(posRegIndex, targetPos, moveType, coorType, UF, UT); //Set position setNumReg.setNumReg(FanucConstants.indexNumRegBit_moveType, moveTypeBit); //Set moveType bit info (index, value) setNumReg.setNumReg(FanucConstants.NumRegType.Speed, speed, moveType); //Set speed (numRegType, value, moveType) setNumReg.setNumReg(FanucConstants.NumRegType.Cnt, cnt); //Set cnt (numRegType, value) setProgram.RunProg(FanucConstants.progMoveToPosRegProgName, doPositionCheck);//Execute if (doPositionCheck) { PositionCheck(finalPos, moveType, FanucConstants.Coordinate.Xyz, out positionAcc, coorType, speed, cnt, attemptCount, logAccuracy, tool, UF, UT); //accuracy logging, for develop use only if (logAccuracy) { try { using (StreamWriter write = File.AppendText(@"C:\PositionAcc.txt")) { write.WriteLine(string.Join(" ", positionAcc)); } } catch { errorHandling.catchError(); } } } if (IsAtTargetPos == true) return true; return false; } private void RepeatMoveTo(float[] targetPos, FanucConstants.MoveType moveType, FanucConstants.CoorType coorType, int speed, int cnt, int attemptCount, bool logAccuracy, FanucConstants.Tool tool, short UF, short UT) { attemptCount += 1; MoveTo(targetPos, moveType, coorType, speed, cnt, attemptCount, logAccuracy, true, tool, UF, UT); } private void PositionCheck(float[] targetPos, FanucConstants.MoveType moveType, FanucConstants.Coordinate coordinate, out float[] positionAcc, FanucConstants.CoorType coorType, int speed, int cnt, int attemptCount, bool logAccuracy, FanucConstants.Tool tool, short UF, short UT) { //While target position not reached:
348
//keep thread in loop unless target position is reached or time runs out, at which instance another attempt for this move will be initiated until maximum number of attempts reached. double time0 = DateTime.Now.Hour * 3600 + DateTime.Now.Minute * 60 + DateTime.Now.Second + DateTime.Now.Millisecond * 0.001; double time1; while (!position.CheckIfAtPosition(targetPos, moveType, FanucConstants.Coordinate.Xyz, out positionAcc, UF)) { time1 = DateTime.Now.Hour * 3600 + DateTime.Now.Minute * 60 + DateTime.Now.Second + DateTime.Now.Millisecond * 0.001; if (attemptCount <= FanucConstants.moveToMaxAttempt) { //If maximum number of attempts not reached if (Math.Abs(time1 - time0) > FanucConstants.moveToTimeout) //If time out RepeatMoveTo(targetPos, moveType, coorType, speed, cnt, attemptCount, logAccuracy, tool, UF, UT); else continue; } else { IsAtTargetPos = false; return; } } IsAtTargetPos = true; } #endregion #region user methods /// <summary> /// Basic MoveTo method. /// </summary> /// <param name="targetPos">target position (linear/joint): float[] = {x,y,z,w,p,r} / float[] = {j1,j2,j3,j4,j5,j6}</param> /// <param name="moveType">move type: linear / joint </param> /// <param name="coorType">coordinate type: absolute / relative</param> /// <param name="speed">speed</param> /// <param name="cnt">cnt</param> public bool MoveTo(float[] targetPos, FanucConstants.MoveType moveType, FanucConstants.CoorType coorType, int speed, int cnt, FanucConstants.Tool tool, bool doPositionCheck, short UF, short UT) { return MoveTo(targetPos, moveType, coorType, speed, cnt, 1, false, doPositionCheck, tool, UF, UT); } /// <summary> /// Linear move to an absolute position /// </summary> /// <param name="targetPos">target position (linear): float[] = {x,y,z,w,p,r}</param> /// <param name="speed">speed</param> /// <param name="cnt">cnt</param> public bool LMove(float[] targetPos, int speed, int cnt, FanucConstants.Tool tool, bool doPositionCheck, short UF, short UT) {
349
return MoveTo(targetPos, FanucConstants.MoveType.Linear, FanucConstants.CoorType.Absolute, speed, cnt, tool, doPositionCheck, UF, UT); } /// <summary> /// Linear move to a relative position /// </summary> /// <param name="targetPos">target position (linear): float[] = {x,y,z,w,p,r}</param> /// <param name="speed">speed</param> /// <param name="cnt">cnt</param> public bool LMoveRel(float[] targetPos, int speed, int cnt, FanucConstants.Tool tool, bool doPositionCheck, short UF, short UT) { return MoveTo(targetPos, FanucConstants.MoveType.Linear, FanucConstants.CoorType.Relative, speed, cnt, tool, doPositionCheck, UF, UT); } /// <summary> /// Joint move to an absolute position /// </summary> /// <param name="targetPos">target position (joint): float[] = {j1,j2,j3,j4,j5,j6}</param> /// <param name="speed">speed</param> /// <param name="cnt">cnt</param> public bool JMove(float[] targetPos, int speed, int cnt, FanucConstants.Tool tool, bool doPositionCheck, short UF, short UT) { return MoveTo(targetPos, FanucConstants.MoveType.Joint, FanucConstants.CoorType.Absolute, speed, cnt, tool, doPositionCheck, UF, UT); } /// <summary> /// Joint move to a relative position /// </summary> /// <param name="targetPos">target position (joint): float[] = {j1,j2,j3,j4,j5,j6}</param> /// <param name="speed">speed</param> /// <param name="cnt">cnt</param> public bool JMoveRel(float[] targetPos, int speed, int cnt, FanucConstants.Tool tool, bool doPositionCheck, short UF, short UT) { return MoveTo(targetPos, FanucConstants.MoveType.Joint, FanucConstants.CoorType.Relative, speed, cnt, tool, doPositionCheck, UF, UT); } #endregion #region properties private float[] _targetPos = { 0, 0, 0, 0, 0, 0 }; public float[] TargetPos { get { return _targetPos; } private set { _targetPos = value;
350
} } private short _UF = 0; public short UserFrame { get { return _UF; } private set { _UF = value; } } private bool? _isAtTargetPos = null; public bool? IsAtTargetPos { get { IsAtTargetPos = position.CheckIfAtPosition(TargetPos, MoveType, FanucConstants.Coordinate.Xyz, 0); return _isAtTargetPos; } private set { _isAtTargetPos = value; } } public bool? IsAtTargetPosUF { get { IsAtTargetPosUF = position.CheckIfAtPosition(TargetPos, MoveType, FanucConstants.Coordinate.Xyz, 1); return _isAtTargetPos; } private set { _isAtTargetPos = value; } } private FanucConstants.MoveType _moveType; public FanucConstants.MoveType MoveType { get { return _moveType; } private set { _moveType = value; } } private FanucConstants.CoorType _coorType;
351
public FanucConstants.CoorType CoorType { get { return _coorType; } private set { _coorType = value; } } #endregion } }
352
1.2 Ultrasonic control
Codes listed in this section are used for data transmission between the PC and the ultrasonic PCI
card.
using System; using System.Runtime.InteropServices; // DllImport using ELE_Application.Class.General; namespace ELE_Application.Class.Ultrasonics { public class DLink { #region core methods /// <summary> /// Get the status of the data acquisition process /// </summary> /// <returns>0 if no data in the memory yet; Otherwise there are data in the memory.</returns> public int IsDataReady() { return Class_PCIUT.PCIUTParms(1000, 0, 0, 0); } /// <summary> /// Generate a software trigger. After this method call the board will generate a pulse from the PULSE OUT /// connector, and the analogue to digital converter will start converting analogue signal to digital data with the /// user-specified parameters. /// </summary> /// <returns>1 if successful.</returns> public int SetSoftwareTrigger() { return Class_PCIUT.PCIUTParms(1001, 0, 0, 0); } /// <summary> /// Set sampling rate. /// </summary> /// <param name="wParam">Index of the settings. /// <para>0 - 100MHz</para> /// <para>1 - 50MHz</para> /// <para>2 - 25MHz</para> /// <para>3 - 12.5 MHz</para> /// <para>4 - 6.25 MHz</para> /// <para>5 - 3.125 MHz</para> /// <para>6 - 1.5725 MHz</para> /// <para>7 - External clock</para></param> /// <returns>1 if successful.</returns> public int SetSamplingRate(uint wParam) { switch (wParam) { case 0: SamplingRate = 100; break;
353
case 1: SamplingRate = 50; break; case 2: SamplingRate = 25; break; case 3: SamplingRate = 12.5; break; case 4: SamplingRate = 6.25; break; case 5: SamplingRate = 3.125; break; case 6: SamplingRate = 1.5725; break; case 7: SamplingRate = 0; break; } return Class_PCIUT.PCIUTParms(1002, 0, wParam, 0); } private double _samplingR; public double SamplingRate { get { return _samplingR; } private set { _samplingR = value; } } /// <summary> /// Set receiver low pass filter. /// </summary> /// <param name="wParam">Index of the settings. /// <para>0 - No filter</para> /// <para>1 - 148 MHz</para> /// <para>2 - 28 MHz</para> /// <para>3 - 18 MHz</para> /// <para>4 - 8.8 MHz</para> /// <para>5 - 7.5 MHz</para> /// <para>6 - 6.7 MHz</para> /// <para>7 - 5.9 MHz</para></param> /// <returns>1 if successful.</returns> public int SetLowPassFilter(uint wParam) { switch (wParam) { case 0: LowPassFilter = 0; break; case 1:
354
LowPassFilter = 148; break; case 2: LowPassFilter = 28; break; case 3: LowPassFilter = 18; break; case 4: LowPassFilter = 8.8; break; case 5: LowPassFilter = 7.5; break; case 6: LowPassFilter = 6.7; break; case 7: LowPassFilter = 5.9; break; default: LowPassFilter = 5.9; wParam = 7; break; } return Class_PCIUT.PCIUTParms(1004, 0, wParam, 0); } private double _lowPassF; public double LowPassFilter { get { return _lowPassF; } private set { _lowPassF = value; } } /// <summary> /// Set receiver high pass filter. /// </summary> /// <param name="wParam">Index of the settings. /// <para>0 - 4.8 kHz</para> /// <para>1 - 1.8 kHz</para> /// <para>2 - 0.8 kHz</para> /// <para>3 - 0.6 kHz</para></param> /// <returns>1 if successful.</returns> public int SetHighPassFilter(uint wParam) { switch (wParam) { case 0: HighPassFilter = 4.8; break; case 1: HighPassFilter = 1.8;
355
break; case 2: HighPassFilter = 0.8; break; case 3: HighPassFilter = 0.6; break; default: HighPassFilter = 4.8; wParam = 0; break; } return Class_PCIUT.PCIUTParms(1005, 0, wParam, 0); } private double _highPassF; public double HighPassFilter { get { return _highPassF; } private set { _highPassF = value; } } /// <summary> /// Set receiver signal type. /// </summary> /// <param name="wParam">Index of the settings. /// <para>0 - Full wave rectify</para> /// <para>1 - positive half rectify</para> /// <para>2 - negative half rectify</para> /// <para>3 - RF signal (no rectification)</para></param> /// <returns>1 if successful.</returns> public int SetRectifier(uint wParam) { return Class_PCIUT.PCIUTParms(1006, 0, wParam, 0); } /// <summary> /// Set the pulser damping resistor value on a single channel PCIUT3100 card. /// </summary> /// <param name="wParam">Index of the settings. /// <para>0 – 620 ohms</para> /// <para>1 – 339 ohms</para> /// <para>2 – 202 ohms</para> /// <para>3 – 159 ohms</para> /// <para>4 – 60 ohms</para> /// <para>5 – 55 ohms</para> /// <para>6 – 50 ohms</para> /// <para>7 – 47 ohms</para></param> /// <returns>1 if successful.</returns> public int SetDamping(uint wParam) { return Class_PCIUT.PCIUTParms(1007, 0, wParam, 0); }
356
/// <summary> /// Set the transducer mode, pulse/echo or through transmission on single channel PCIUT3100 card. /// </summary> /// <param name="wParam">0 – pulse/echo /// <para>1 – through transmission</para></param> /// <returns>1 if successful.</returns> public int SetTransducerMode(uint wParam) { return Class_PCIUT.PCIUTParms(1008, 0, wParam, 0); } /// <summary> /// Set the buffer length that specifies how many data samples that the next acquisition will collect data. /// </summary> /// <param name="wParam">number of samples to take. It ranges from 16 to 16382 in step of 4 samples.</param> /// <returns>1 if successful.</returns> public int SetBufferLength(uint wParam) { _bufferL = (int)wParam; return Class_PCIUT.PCIUTParms(1009, 0, wParam, 0); } private int _bufferL; public int BufferLength { get { return _bufferL; } set { _bufferL = value; SetBufferLength((uint)value); } } /// <summary> /// Set the trigger delay that specifies how many samples that the next acquisition will skip before collecting data. /// </summary> /// <param name="wParam">number of samples to skip. It ranges from 2 to 32764 samples in step of 2 samples.</param> /// <returns>1 if successful.</returns> public int SetTriggerDelay(uint wParam) { return Class_PCIUT.PCIUTParms(1010, 0, wParam, 0); } /// <summary> /// Set pulse voltage. /// </summary> /// <param name="value">Voltage of pulse in V, from 40V to 300V.</param> /// <returns>1 if successful.</returns> public int SetPulseVoltage(int value) {
357
uint wParam; double vMin = 40; double vMax = 300; wParam = Convert.ToUInt32((value - vMin)*255/(vMax-vMin)); if (wParam > 255) wParam = 255; if (wParam < 0) wParam = 0; return Class_PCIUT.PCIUTParms(1011, 0, wParam, 0); } /// <summary> /// Set pulse width. /// </summary> /// <param name="value">Width of pulse in ns, up to 80dB.</param> /// <returns>1 if successful.</returns> public int SetPulseWidth(double value) { uint wParam; double wMin = GetMinPulseWidth(); wParam = Convert.ToUInt32(161.67*(wMin - value)/(value - wMin - 760.8)); if (wParam > 255) wParam = 255; if (wParam < 0) wParam = 0; return Class_PCIUT.PCIUTParms(1012, 0, wParam, 0); } /// <summary> /// Set the receiver gain. /// </summary> /// <param name="value">Receiver gain in dB, from -20dB to 80dB with about 0.1 dB resolution</param> /// <returns>1 if successful.</returns> public int SetGain(double value) { uint wParam; wParam = Convert.ToUInt32(value/0.0978 + 204); if (wParam > 1023) wParam = 1023; if (wParam < 0) wParam = 0; return Class_PCIUT.PCIUTParms(1013, 0, wParam, 0); } /// <summary> /// Set the receiver DC offset. /// </summary> /// <param name="value">DC offset in V, from –2.5V to 2.5V with 0.005V resolution.</param> /// <returns>1 if successful.</returns> public int SetDCOffset(double value) { uint wParam; wParam = Convert.ToUInt32(value/0.005 + 511); if (wParam > 1023) wParam = 1023; if (wParam < 0) wParam = 0;
358
return Class_PCIUT.PCIUTParms(1014, 0, wParam, 0); } /// <summary> /// Set the trigger source of the analogue to digital converter. /// </summary> /// <param name="wParam">Index of the settings. /// <para>0 – +External trigger. The board will take data when a transit of 0 to 5V (rising edge) signal appears at the EXT TRIG connector.</para> /// <para>1 - Software trigger</para> /// <para>2 – -External trigger. The board will take data when a transit of 5 to 0V (falling edge) signal appears at the EXT TRIG connector.</para></param> /// <returns>1 if successful.</returns> public int SetADTriggerSource(uint wParam) { return Class_PCIUT.PCIUTParms(1016, 0, wParam, 0); } /// <summary> /// Get the encoder counter from one of the counters. /// </summary> /// <param name="wParam">Index of the counter. /// <para>0 – first encoder (X axis)</para> /// <para>1 – second encoder (Y axis)</para> /// <para>2 – third encoder (Z axis)</para> /// <para>3 – forth encoder (W axis)</para></param> /// <returns>Counter value from -8388608 to 8388607.</returns> public int GetEncoderCounter(uint wParam) { return Class_PCIUT.PCIUTParms(1017, 0, wParam, 0); } /// <summary> /// Set the value of an encoder counter. /// </summary> /// <param name="wParam">Index of the counter. /// <para>0 – first encoder (X axis)</para> /// <para>1 – second encoder (Y axis)</para> /// <para>2 – third encoder (Z axis)</para> /// <para>3 – forth encoder (W axis)</para></param> /// <param name="lParam">Counter value from -8388608 to 8388607.</param> /// <returns>1 if successful.</returns> public int SetEncoderCounter(uint wParam, int lParam) { return Class_PCIUT.PCIUTParms(1018, 0, wParam, lParam); } /// <summary> /// Get the digitized data from the memory on the board after the data acquisition. /// </summary> /// <param name="wParam">Pointer of the receiving buffer.</param> /// <param name="lParam">Number of bytes to move from the board memory to the buffer. It should be multiple of 4.</param> /// <returns>-2 if wParam is NULL or 1 if successful.</returns> public int GetData(out byte[] data, int lParam) { if (lParam/4 % 1 != 0)
359
lParam = Convert.ToInt32(lParam/4)*4; data = new byte[lParam]; return Class_PCIUT.PCIUTParms(1019, 0, data, lParam); } /// <summary> /// Reset the analogue to digital converter before acquiring data. /// </summary> /// <returns>1 if successful.</returns> public int ResetCounter() { return Class_PCIUT.PCIUTParms(1020, 0, 0, 0); } /// <summary> /// Clean up any data in the memory. It should be called before acquiring data. /// </summary> /// <returns>1 if successful.</returns> public int ResetMemory() { return Class_PCIUT.PCIUTParms(1021, 0, 0, 0); } /// <summary> /// Set DC offset adjustment which can make the signal smoother. /// </summary> /// <param name="wParam">0 - change the adjustment value and download it to the board /// <para>1 – do the task above and save the adjustment value in the Non-Volatile memory on the board.</para> /// </param> /// <param name="lParam">Adjustment value from –127 to 127.</param> /// <returns>1 if successful.</returns> public int SetOffsetAdjustment(uint wParam, int lParam) { return Class_PCIUT.PCIUTParms(1022, 0, wParam, lParam); } #endregion #region other methods /// <summary> /// Turn on or off the distance amplitude correction. /// </summary> /// <param name="wParam">0 - off /// <para>1 - on</para></param> /// <returns>1 if successful.</returns> public int SetDACEnable(uint wParam) { return Class_PCIUT.PCIUTParms(1003, 0, wParam, 0); } /* /// <summary> /// Set the gain table of the distance amplitude correction (DAC). /// </summary> /// <param name="value">DC offset in V, from –2.5V to 2.5V with 0.005V resolution.</param> /// <returns>-2 if wParam is NULL or 1 if successful.</returns> public int SetDACTable(double value) {
360
uint wParam; wParam = Convert.ToUInt32(value/0.005 + 511); if (wParam > 1023) wParam = 1023; if (wParam < 0) wParam = 0; return Class_PCIUT.PCIUTParms(1015, 0, wParam, 0); } */ /// <summary> /// Get the model number of the board. Normally it is PCIUT3100. /// </summary> /// <param name="modelNumber">Pointer of the receiving buffer: (char *). It should have enough room for at least 20 characters.</param> /// <returns>-2 if modelNumber is NULL /// <para>-3 if the specified board is not valid</para> /// <para>1 if successful</para></returns> public int GetModelNumber(out char[] modelNumber) { byte[] m = new byte[20]; int check = Class_PCIUT.PCIUTParms(1023, 0, m, 0); modelNumber = ConvertExt.ToCharArray(m); return check; } /// <summary> /// Get the serial number of the board. The serial number can be used to verify which board you are talking to. /// </summary> /// <param name="serialNumber">Pointer of the receiving buffer: (char *). It should have enough room for at least 20 characters.</param> /// <returns>-2 if serialNumber is NULL /// <para>-3 if the specified board is not valid</para> /// <para>1 if successful</para></returns> public int GetSerialNumber(out char[] serialNumber) { byte[] m = new byte[20]; int check = Class_PCIUT.PCIUTParms(1024, 0, m, 0); serialNumber = ConvertExt.ToCharArray(m); return check; } /// <summary> /// Get the size of the memory. The returned value could be 16384 or 262144. /// </summary> /// <returns>Size of the memory.</returns> public int GetMemorySize() { return Class_PCIUT.PCIUTParms(1025, 0, 0, 0); } /// <summary> /// Get the minimum pulse width in nanosecond. /// </summary> /// <remark> /// It is used to calculate the index of the pulse width. /// </remark> /// <returns>Minimum pulse width in ns</returns> public double GetMinPulseWidth()
361
{ return Class_PCIUT.PCIUTParms(1026, 0, 0, 0); } /// <summary> /// Get the option byte 1 which tells the user what kind of options are installed on the board. /// </summary> /// <remark> /// Bit7 DAC /// <para>Bit6 X encoder</para> /// <para>Bit5 Y encoder</para> /// <para>Bit4 External clock connector</para> /// <para>Bit3 Sync out connector</para> /// <para>Bit2 -350V pulse voltage</para> /// <para>Bit1 Wide pulse</para> /// <para>Bit0 Encoder line receiver</para> /// </remark> /// <param name="wParam"> Pointer of array /// <returns>1=Option was installed /// <para>0=options was not installed.</para> /// </returns> public int GetOptionByte1(uint wParam) { return Class_PCIUT.PCIUTParms(1034, 0, wParam, 0); } /// <summary> /// Get the option byte 2 which tells the user what kind of options are installed on the board. /// </summary> /// <remark> /// Bit7 1st 14-bit A/D converter /// <para>Bit6 2nd 14-bit A/D converter</para> /// <para>Bit5 Log Amplifier</para> /// <para>Bit4 Z encoder counter</para> /// <para>Bit3 W encoder counter</para> /// <para>Bit2 9-bit resolution</para> /// <para>Bit1 reserved </para> /// <para>Bit0 Tone burst pulser</para> /// </remark> /// <returns>1=Option was installed /// <para>0=options was not installed.</para> /// </returns> public int GetOptionByte2(uint wParam) { return Class_PCIUT.PCIUTParms(1035, 0, wParam, 0); } /// <summary> /// Get the revision number of the driver software. /// </summary> /// <returns>Driver software revision number.</returns> public int GetRevNumber() { return Class_PCIUT.PCIUTParms(1036, 0, 0, 0); } /// <summary>
362
/// Turn logarithmic amplifier on or off. /// </summary> /// <param name="wParam"> 1=on, or 0=off.</param> /// <returns>1 if successful.</returns> public int SetLogAMP(uint wParam) { return Class_PCIUT.PCIUTParms(1037, 0, wParam, 0); } #endregion } class Class_PCIUT { // for mode = 1019, 1023, or 1024 [DllImport("PCIUTDLL.dll", CallingConvention = CallingConvention.Cdecl)] public static extern int PCIUTParms(int mode, int card, byte[] wParam, int lParam); // for rest of the modes [DllImport("PCIUTDLL.dll", CallingConvention = CallingConvention.Cdecl)] public static extern int PCIUTParms(int mode, int card, uint wParam, int lParam); } }
363
1.3 DAQ device
1.3.1 Connect to the DAQ device
Codes listed in this section are used as root class modules for connecting to, disconnecting from and
initialising the USB1208FS DAQ device.
using System.Windows.Forms; namespace ELE_Application.Class.USB1208FS { public class ConnectUSB1208FS { #region Initialize MccBoard // Create new MccDAQ instance. public static MccDaq.MccBoard DaqBoard; public void Connect() { DaqBoard = new MccDaq.MccBoard(); DAQIO IO = new DAQIO(); IO.AnalogIn(); } #endregion #region Initialize DigitalPort private MccDaq.DigitalPortType PortNumA = MccDaq.DigitalPortType.FirstPortA; private MccDaq.DigitalPortType PortNumB = MccDaq.DigitalPortType.FirstPortB; //private int NumPorts, NumBits, FirstBit; //private int PortType, ProgAbility; //private string PortName; /// <summary> /// set digital port type as input/output according to user config. /// </summary> /// <param name="DPortA">Digital Port A type</param> /// <param name="DPortAType">Static Digital Port A type</param> public static string DPortAType = "null"; public enum DPortATypeEnum { DIn, DOut }; public void SetDigitalPortType(DPortATypeEnum DPortAInOrOut) { if (DPortAInOrOut == DPortATypeEnum.DIn) { DaqBoard.DConfigPort(PortNumA, MccDaq.DigitalPortDirection.DigitalIn); DaqBoard.DConfigPort(PortNumB, MccDaq.DigitalPortDirection.DigitalOut); DPortAType = "in"; } else if (DPortAInOrOut == DPortATypeEnum.DOut) { DaqBoard.DConfigPort(PortNumA, MccDaq.DigitalPortDirection.DigitalOut); DaqBoard.DConfigPort(PortNumB, MccDaq.DigitalPortDirection.DigitalIn); DPortAType = "out";
364
} else { MessageBox.Show("Please select a digital input port"); DPortAType = "null"; } } #endregion } }
1.3.2 Data transmission
Codes listed in this section are used as root class modules for transmitting data between the PC and
the DAQ device.
using System; using System.IO; namespace ELE_Application.Class.USB1208FS { public class DAQIO { #region Digital IO public MccDaq.DigitalPortType PortNumA = MccDaq.DigitalPortType.FirstPortA; public MccDaq.DigitalPortType PortNumB = MccDaq.DigitalPortType.FirstPortB; /// <summary> /// For every set time interval, read data from digital input ports. /// </summary> /// <param name="ULStat_Message">Error message from DAQ if any, otherwise return Null</param> /// <param name="DataValue">Received data</param> public void DigitalIn(out string ULStat_Message, out short DataValue) { MccDaq.ErrorInfo ULStat = new MccDaq.ErrorInfo(0); if (ConnectUSB1208FS.DPortAType == "in") { ULStat = ConnectUSB1208FS.DaqBoard.DIn(PortNumA, out DataValue); } else if (ConnectUSB1208FS.DPortAType == "out") { ULStat = ConnectUSB1208FS.DaqBoard.DIn(PortNumB, out DataValue); } else { ULStat_Message = "Please select a digital input port"; DataValue = 0; } if (ULStat.Value != MccDaq.ErrorInfo.ErrorCode.NoErrors) { ULStat_Message = ULStat.Message; }
365
else { ULStat_Message = "null"; } } /// <summary> /// Send bit information to digital output ports to enable/disable devices. /// </summary> /// <param name="DODataValue">Data to be sent to DAQ</param> /// <returns>Error message from DAQ if any, otherwise return Null</returns> public string DigitalOut(short DODataValue) { MccDaq.ErrorInfo ULStat = new MccDaq.ErrorInfo(0); string ULStat_Message = "null"; if (ConnectUSB1208FS.DPortAType == "out ") { ULStat = ConnectUSB1208FS.DaqBoard.DOut(PortNumA, DODataValue); } else if (ConnectUSB1208FS.DPortAType == "in") { ULStat = ConnectUSB1208FS.DaqBoard.DOut(PortNumB, DODataValue); } else { ULStat_Message = "Please select a digital output port"; return ULStat_Message; } if (ULStat.Value != MccDaq.ErrorInfo.ErrorCode.NoErrors) { ULStat_Message = ULStat.Message; } else { ULStat_Message = "null"; } return ULStat_Message; } #endregion #region Digital data processing public int[] DIchannel = new int[8]; public int[] DOchannel = new int[8]; /// <summary> /// Convert received decimal data into binary channel info. /// </summary> /// <param name="DataValue">decimal data received from DAQ</param> /// <returns>channel info</returns> public int[] DDataValue2Channel(int DataValue) { /*================================= * For USB-1208FS, there are 8 channels on each port. For each port, USB-1208FS creates a binary numeral containing 8 digits, * where each digit stands for the status of a channel: * 0 means the channel is idle and 1 means the channel is receiving data. * And the binary digits are arranged in a such order:
366
* * the 1st digit is the status of the 28th channel; * the 2nd digit ................ the 27th channel; * the 3rd digit ................ the 26th channel; * ...; * the 8th digit ................ the 21st channel. * * For example 0000101 means both channel 21 and 23 are receiving data and the rests are idle. * * However, instead of sending a binary numeral to the computer, the USB-1208FS converts the binary numeral into a decimal numeral * and sends the decimal numeral. * For example, instead of sending 0000101, it sends 5 (i.e. 101 in binary format). =================================*/ /* Input: decimal info * Output: channel info * This method will: 1 convert the Input, decimal info, into a binary number; 2 store each digit in the binary number into an array which reprecents the channel info; */ int[] channel; channel = new int[8]; string binary = Convert.ToString(DataValue, 2); //1 for (int i = 0; i < binary.Length; i++) //2 { channel[i] = binary[binary.Length - i - 1] - '0'; } return channel; } /// <summary> /// Convert binary channel info into decimal data. /// </summary> /// <param name="channel">binary channel info</param> /// <returns>decimal data for output to DAQ</returns> public short DChannel2DataValue(int[] channel) { /* Input: channel info * Output: short DataValue which can be sent to the I/O box * This method will: 1 convert the Input, channel info, into text for editting; 2 convert the text yielded in step 2 into a number in long format, decimal info; 3 convert the number into short format and Output this value, decimal info; */ short DOutDataValue = 0; string S_DOchannel = string.Join("", channel); //1 long value = Convert.ToInt32(S_DOchannel, 2); //2 DOutDataValue = (short)value; //3 return DOutDataValue; } #endregion #region Analog input
367
/// <summary> /// For every certain time interval, the code reads data from the digital input ports. /// </summary> /// <param name="ULStat_Message">Error message from DAQ if any, otherwise return Null</param> /// <param name="HighResEngUnits">Value returned from DAQ</param> /// <param name="time">time</param> public void AnalogIn(out string ULStat_Message, out double HighResEngUnits, out string time) { MccDaq.ErrorInfo ULStat = new MccDaq.ErrorInfo(0); MccDaq.Range Range = new MccDaq.Range(); DateTime timetick = new DateTime(); timetick = DateTime.Now; int Chan = 0; int Options = 0; System.UInt32 DataValue32; ULStat = ConnectUSB1208FS.DaqBoard.AIn32(Chan, Range, out DataValue32, Options); // Convert raw data to Volts by calling ToEngUnits // (member method of MccBoard class) ULStat = ConnectUSB1208FS.DaqBoard.ToEngUnits32(Range, DataValue32, out HighResEngUnits); time = timetick.ToLongTimeString(); time += timetick.Millisecond.ToString(); if (ULStat.Value != MccDaq.ErrorInfo.ErrorCode.NoErrors) { ULStat_Message = ULStat.Message; } else { ULStat_Message = "null"; } } //Preserved method for special purposes, such as establish initial communication. public void AnalogIn() { MccDaq.ErrorInfo ULStat = new MccDaq.ErrorInfo(0); MccDaq.Range Range = new MccDaq.Range(); int Chan = 0; int Options = 0; System.UInt32 DataValue32; ULStat = ConnectUSB1208FS.DaqBoard.AIn32(Chan, Range, out DataValue32, Options); } #endregion #region Analog data processing /// <summary> /// Translate received voltage signal into distance in mm.
368
/// </summary> /// <param name="curDisVol">Current voltage signal reading</param> /// <returns>Distance in mm</returns> public double AVoltageToDistance(double curDisVol) { double minDis = USB1208FSConstants.analogMinDis; double minDisVol = USB1208FSConstants.analogMinDisVol; double maxDis = USB1208FSConstants.analogMaxDis; double maxDisVol = USB1208FSConstants.analogMaxDisVol; double DisPerVol = (maxDis - minDis) / (maxDisVol - minDisVol); double curDis = (curDisVol - minDisVol) * DisPerVol + minDis; return curDis; } #endregion #region Log data //Log time + data public void LogData(string path, string time, double logData) { using (StreamWriter write = File.AppendText(@path)) { write.WriteLine(time + "\t" + logData.ToString()); } } //Log data only public void LogData(string path, double logData) { using (StreamWriter write = File.AppendText(@path)) { write.WriteLine(logData.ToString()); } } #endregion } }
1.3.3 Error message handling
Codes listed in this section are used for showing error message received from the DAQ device on
the PC screen.
using System.Windows.Forms; namespace ELE_Application.Class.USB1208FS { public class ULStatMsg { public bool ULStatMsgAna(string ULStat_Message) { bool isError = true; switch (ULStat_Message) { case "null": isError = false;
369
break; default: MessageBox.Show(ULStat_Message); isError = true; break; } return isError; } } }
1.3.4 Special function
Codes listed in this section are used for utilising useful but not frequently used functions provided
with the DAQ device. Currently, only one function is available, i.e. flash the LED light, which is useful
for checking whether the PC is connected to the DAQ device.
namespace ELE_Application.Class.USB1208FS { public class Functions { /// <summary> /// flash LED /// </summary> public void flashLED() { ConnectUSB1208FS.DaqBoard.FlashLED(); } } }
1.3.5 Variables and configurations
Codes listed in this section are used for defining variables related to the DAQ device. These variables
are constantly used in the software and can be configured by the user.
namespace ELE_Application.Class.USB1208FS { public class USB1208FSConstants { //Analog voltage-distance correction public static double analogMinDis = -10; public static double analogMinDisVol = -3.9266021; public static double analogMaxDis = 10; public static double analogMaxDisVol = 1.0747929; //Digital channel public static int valveChannel = 6; public static int pumpChannel = 7; public static int lowerFloatSWChannel = 1; public static int upperFloatSWChannel = 0; } }
370
1.3.6 Advanced Digital IO control
Codes listed in this section are used for digital data transmission between the PC and the DAQ device.
namespace ELE_Application.Class.USB1208FS { public class DigitalAdv { public int[] GetChannelInfo() { DAQIO daqIO = new DAQIO(); ULStatMsg ulStatMsg = new ULStatMsg(); int[] channel = {9,9,9,9,9,9,9,9}; string message; short value; bool isError = false; daqIO.DigitalIn(out message, out value); isError = ulStatMsg.ULStatMsgAna(message); if (!isError) channel = daqIO.DDataValue2Channel(value); return channel; } public void SendChannelInfo(int[] channel) { DAQIO daqIO = new DAQIO(); DigitalSignal_NotInUse digitalSignal = new DigitalSignal_NotInUse(); ULStatMsg ulStatMsg = new ULStatMsg(); string message; short value; bool isError = false; value = daqIO.DChannel2DataValue(channel); message = daqIO.DigitalOut(value); isError = ulStatMsg.ULStatMsgAna(message); } } }
1.3.7 Advanced analog IO control
Codes listed in this section are used for analogue data transmission between the PC and the DAQ
device.
using System.Linq; using System.Threading; namespace ELE_Application.Class.USB1208FS { public class AnalogAdv {
371
DAQIO daqIO = new DAQIO(); ULStatMsg ulStatMsg = new ULStatMsg(); public double GetLaserReading(int sampleSize, int waitTimer) { string msg = ""; double[] voltage = new double[sampleSize]; double distance = 0; string time = ""; bool isError = false; for (int i = 0; i < sampleSize; i++) { daqIO.AnalogIn(out msg, out voltage[i], out time); isError = isError & ulStatMsg.ULStatMsgAna(msg); if(waitTimer>0) Thread.Sleep(waitTimer); } double mode = voltage.GroupBy(i => i) //Grouping same items .OrderByDescending(g => g.Count()) //now getting frequency of a value .First() .Key; if (!isError) distance = daqIO.AVoltageToDistance(mode); return distance; } public double GetLaserReading() { double distance = GetLaserReading(1, 0); return distance; } public double GetLaserReading(int sampleSize) { double distance = GetLaserReading(sampleSize, 5); return distance; } public void LogData(string path, double data) { daqIO.LogData(path, data); } } }
372
1.4 Stepper motor control
1.4.1 Connect to the stepper motor
Codes listed in this section are used for connecting to, disconnecting from and initialising the stepper
motor.
using System; using System.IO.Ports; using System.Windows.Forms; namespace ELE_Application.Class.STPMotor { public class ConnectSTPMotor { public static SerialPort STPMotorComport = new SerialPort(); public bool Connect(string port, bool doInitialization) { // When data is recieved through the port, call this method //STPMotorComport.DataReceived += new SerialDataReceivedEventHandler(ReceiveData); STPMotorComport.BaudRate = RS232Constants.stpMotorBaud; STPMotorComport.DataBits = RS232Constants.stpMotorBits; STPMotorComport.StopBits = (StopBits)Enum.Parse(typeof(StopBits), RS232Constants.stpMotorStopBits); STPMotorComport.Parity = (Parity)Enum.Parse(typeof(Parity), RS232Constants.stpMotorParity); try { STPMotorComport.PortName = port; STPMotorComport.Open(); } catch { MessageBox.Show("An error occurs. Cannot open COM port. Most likely this port has already been in use, or is not avaiable.", "COM Port Unavalible", MessageBoxButtons.OK, MessageBoxIcon.Stop); return false; } if (doInitialization) { STPMotorInstruction motorIns = new STPMotorInstruction(); motorIns.SetACR(RS232Constants.defaultACR); motorIns.SetDirection(RS232Constants.defaultDir); motorIns.SetCurrent(RS232Constants.defaultCur); } return true; } public bool Connect(string port) { return Connect(port, false);
373
} public void Disconnect() { STPMotorComport.Close(); } public string[] COMList() { string[] ports = SerialPort.GetPortNames(); return ports; } } }
1.4.2 Stepper motor instructions
Codes listed in this section are used for sending stepper motor instructions.
using System.Windows.Forms; namespace ELE_Application.Class.STPMotor { public class STPMotorInstruction { #region base method public void SendData(string instruction) { if (ConnectSTPMotor.STPMotorComport.IsOpen == true) { try { ConnectSTPMotor.STPMotorComport.Write(instruction); } catch { MessageBox.Show("An error has occured. Please check the connection between the PC and the device.", "Communication error", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } } else { MessageBox.Show("An error has occured. COM port is closed; Please check the connection between the PC and the device.", "Communication error", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } } #endregion /// <summary>
374
/// Discard buffer already received from the device. /// </summary> public void DiscardInBuffer() { try { ConnectSTPMotor.STPMotorComport.DiscardInBuffer(); } catch { } } /// <summary> /// Discard buffer waiting to be sent to the device. /// </summary> public void DiscardOutBuffer() { try { ConnectSTPMotor.STPMotorComport.DiscardOutBuffer(); } catch { } } /// <summary> /// Read all existing buffer received from the device. /// </summary> public byte[] ReadBuffer() { int bytes= ConnectSTPMotor.STPMotorComport.BytesToRead; byte[] buffer = new byte[bytes]; try { ConnectSTPMotor.STPMotorComport.Read(buffer, 0, bytes); } catch { buffer = null; } return buffer; } #region configration public void HandShaking() { SendData("ABC;"); } public void SetBaudRate(int bdr) { if(bdr<=57600 & bdr>=9600) SendData(string.Format("BDR{0};", bdr)); } #endregion #region basic control public void SetEnable() { SendData("ENA;"); }
375
public void SetOffline() { SendData("OFF;"); } public void SetCurrent(int cur) { SendData(string.Format("CUR{0};", cur)); } public void SetACR(bool active) { if (active) SendData("ACR1;"); else SendData("ACR0;"); } public void SetMicroStepping(int mcs) { SendData(string.Format("MCS{0};", mcs)); } public void SetSpeed(int spd) { SendData(string.Format("SPD{0};",spd)); } public void SetStep(int stp) { SendData(string.Format("STP{0};", stp)); } public void SetDirection(int dir) { SendData(string.Format("DIR{0};", dir)); } public void SetOrigin() { SendData("ORG;"); } public void GetFeedback() { SendData("FBK;"); } public void GetPosition() { SendData("POS;"); } #endregion } }
376
1.4.3 Variables and configurations
Codes listed in this section are used for defining variables related to the stepper motor and the RS232
ports. These variables are constantly used in the software and can be configured by user.
namespace ELE_Application.Class.STPMotor { public class RS232Constants { public const int stpMotorBaud = 9600; public const int stpMotorBits = 8; public const string stpMotorParity = "None"; public const string stpMotorStopBits = "1"; public const double anglePerFullStep = 1.8; public const int pulleyTeethMotor = 12; public const int pulleyTeethShaft = 60; public const double gearboxRatio = 1.0 / 6.0; public const double eeOutRatio = gearboxRatio * pulleyTeethMotor / pulleyTeethShaft; public const int defaultSpeed = 100; public const int criticalSpeed = 250; public const int minimumMCS = 16; public static int[] availableMCSList = { 1, 2, 4, 16 }; public const int defaultCur = 20; public const int defaultDir = 1; public const bool defaultACR = true; } }
1.4.4 Advanced stepper motor control
Codes listed in this section are used for controlling the stepper motor and translating messages
received from the RS232 port.
using System; using System.Linq; using System.Collections.Generic; using ELE_Application.Class.General; namespace ELE_Application.Class.STPMotor { public class STPMotorAdv { STPMotorInstruction motorIns = new STPMotorInstruction(); private const double eeOutRatio = RS232Constants.eeOutRatio; #region calculations //Motor output public double CalculateRPM(int spd, int mcs) { double rpm = 1.8 * spd / mcs;
377
return rpm; } //End effect public double CalculateRPMEE(int spd, int mcs) { double _rpm = CalculateRPM(spd, mcs); double rpm = _rpm * eeOutRatio; return rpm; } //Motor output public double CalculateDegree(int stp, int mcs) { double degree = 1.8 * stp / mcs; return degree; } //End effect public double CalculateDegreeEE(int stp, int mcs) { double _degree = CalculateDegree(stp, mcs); double degree = _degree * eeOutRatio; return degree; } public int CalculateStep(double degree, int mcs) { int stp = (int)(degree / eeOutRatio / 1.8 * mcs); return stp; } /// <summary> /// Calculate the number of steps required for a certain angle, but instead of rounding it to the nearest integer, this method rounds it down. /// </summary> /// <param name="degree"></param> /// <param name="mcs"></param> /// <returns></returns> public int CalculateStepRoundD(double degree, int mcs) { int stp = (int)Math.Floor(degree / eeOutRatio / 1.8 * mcs); ExecutedAngleofRotation += CalculateDegreeEE(stp, mcs); return stp; } private List<int[]> AutoStepping(double degree) { List<int[]> stpList = new List<int[]>(); int stp, mcs; double remainingAngle, accuracyCheck, sign; double degree_=Math.Abs(degree); int[] listItem = new int[2]; sign = degree / Math.Abs(degree); mcs = RS232Constants.availableMCSList[0]; stp = CalculateStepRoundD(degree_, mcs); listItem[0] = stp * (int)sign; listItem[1] = mcs; stpList.Add(listItem);
378
for (int i = 1; i < RS232Constants.availableMCSList.Length; i++) { listItem = new int[2]; mcs = RS232Constants.availableMCSList[i]; remainingAngle = degree_ - ExecutedAngleofRotation; accuracyCheck = CalculateDegreeEE(1, mcs); if (remainingAngle >= accuracyCheck) { stp = CalculateStepRoundD(remainingAngle, mcs); listItem[0] = stp * (int)sign; listItem[1] = mcs; stpList.Add(listItem); } } return stpList; } double _executedAngleofRotation = 0; private double ExecutedAngleofRotation { get { return _executedAngleofRotation; } set { _executedAngleofRotation = value; } } public double CalculateTimeCost(int spd, int stp, int mcs) { double rpm = CalculateRPM(spd, mcs); double degree = CalculateDegree(stp, mcs); double time = degree / (rpm * 6); return time; } #endregion #region motor instructions public void RotateD(double degree, int mcs, int spd = RS232Constants.defaultSpeed) { spd *= mcs; int stp = CalculateStep(degree, mcs); motorIns.SendData(string.Format("STP{0};SPD{1};MCS{2};ENA;",stp,spd,mcs)); } public double RotateDAutoMCS(double degree, int baseSpeed = RS232Constants.defaultSpeed) { //Reset rotated angle check; ExecutedAngleofRotation = 0; List<int[]> stpList = AutoStepping(degree); int stp, spd, mcs; for (int i = 0; i < stpList.Count; i++) { stp = stpList[i][0]; mcs = stpList[i][1]; spd = mcs * baseSpeed; if (stp == 0) return ExecutedAngleofRotation; if (Math.Abs(mcs) != 1)
379
spd = 1; motorIns.SendData(string.Format("STP{0};SPD{1};MCS{2};ENA;", stp, spd, mcs)); while (isRunning()) System.Threading.Thread.Sleep(50); } return ExecutedAngleofRotation; } #endregion #region motor feedback message public bool isRunning() { motorIns.DiscardInBuffer(); motorIns.SendData("POS;"); System.Threading.Thread.Sleep(50); byte[] pos1 = motorIns.ReadBuffer(); System.Threading.Thread.Sleep(100); motorIns.DiscardInBuffer(); motorIns.SendData("POS;"); System.Threading.Thread.Sleep(50); byte[] pos2 = motorIns.ReadBuffer(); if (!pos1.SequenceEqual((pos2))) { return true; } return false; } //message returned with FBK, starts with CC, ends with FF //Examples: CC 00 7F 14 00 0C 40 00 00 01 38 45 FF public bool FbkAnalyser(string message, out int acrFBK, out int enaFBK, out int dirFBK, out int mcsFBK, out int curFBK, out int spdFBK, out int stpFBK) { acrFBK = 0; enaFBK = 0; dirFBK = 0; mcsFBK = 0; curFBK = 0; spdFBK = 0; stpFBK = 0; //Return if message does not start with CC or is incomplete (less than 38 chars) if (!message.StartsWith("CC") | message.Length < 38) { return false; } //trim message to 38 chars message = message.Substring(0, 38); //return if message does not end with FF. if (!message.EndsWith("FF")) { return false; } //take ASM part
380
string asm = message.Substring(6, 2); //take cur part string cur = message.Substring(9, 2); //take spd part string spd2 = message.Substring(12, 2); string spd1 = message.Substring(15, 2); string spd0 = message.Substring(18, 2); //take stp part string stp4 = message.Substring(21, 2); string stp3 = message.Substring(24, 2); string stp2 = message.Substring(27, 2); string stp1 = message.Substring(30, 2); string stp0 = message.Substring(33, 2); //Translate ASM asm = ConvertExt.Hex2Binary(asm); acrFBK = Convert.ToInt32(asm.Substring(0, 1)); enaFBK = Convert.ToInt32(asm.Substring(1, 1)); dirFBK = Convert.ToInt32(asm.Substring(2, 1)); mcsFBK = Convert.ToInt32(ConvertExt.ReverseString(asm.Substring(3, 4)), 2) + 1; //Translate current cur = ConvertExt.Hex2Binary(cur); curFBK = Convert.ToInt32(cur, 2); //Translate speed string spd = ConvertExt.Hex2Binary(spd2).PadLeft(2, '0') + ConvertExt.Hex2Binary(spd1).PadLeft(7, '0') + ConvertExt.Hex2Binary(spd0).PadLeft(7, '0'); spdFBK = Convert.ToInt32(spd, 2); //Translate stp string stp = ConvertExt.Hex2Binary(stp4).PadLeft(4, '0') + ConvertExt.Hex2Binary(stp3).PadLeft(7, '0') + ConvertExt.Hex2Binary(stp2).PadLeft(7, '0') + ConvertExt.Hex2Binary(stp1).PadLeft(7, '0') + ConvertExt.Hex2Binary(stp0).PadLeft(7, '0'); stpFBK = Convert.ToInt32(stp, 2); return true; } #endregion } }
381
1.5 Matlab interaction
Codes listed in this section are used to interact with Matlab using the control software.
using System.Diagnostics; namespace ELE_Application.Class.Matlab { public class Matlab { public MLApp.MLApp matlab; private Stopwatch stopwatch; /// <summary> /// Initialize Matlab instance without setting tool path or showing cmd window. /// </summary> public void Initialize() { matlab = new MLApp.MLApp(); matlab.Visible = 0; stopwatch = new Stopwatch(); } /// <summary> /// Prepare Matlab instance. /// </summary> /// <param name="matlabPath">path of *.m files</param> /// <param name="isVisible">set true to show matlab cmd window, vice versa. </param> public void Initialize(string matlabPath, bool isVisible) { matlab = new MLApp.MLApp(); if (!isVisible) matlab.Visible = 0; else matlab.Visible = 1; SetPath(matlabPath); SendCmd("clc;clear all;"); System.Threading.Thread.Sleep(2000); stopwatch = new Stopwatch(); } /// <summary> /// Send command to matlab /// </summary> /// <param name="cmd">cmd line</param> public void SendCmd(string cmd) { matlab.Execute(cmd); } /// <summary> /// Set Matlab cmd window invisibility. /// </summary> /// <param name="isVisible">set true to show Matlab cmd window, vice versa. </param> public void StVisible(bool isVisible) {
382
if (isVisible) matlab.Visible = 1; else matlab.Visible = 0; } /// <summary> /// Quite Matlab instance /// </summary> /// <param name="doCloseAll">set true to close all active Matlab windows including figures.</param> public void Quit(bool doCloseAll) { if (doCloseAll) SendCmd("close all"); matlab.Quit(); } /// <summary> /// Add Matlab current path. /// </summary> /// <param name="path"></param> public void SetPath(string path) { //example of cmd: "cd 'X:\\Dropbox\\Ultrasonic KTP\\ELE-Laptop Documents'" string cmd = "cd '" + path + "'"; matlab.Execute(@cmd); } /// <summary> /// Run Matlab function script /// </summary> /// <param name="scriptName"></param> public void RunScript(string scriptName) { matlab.Execute(string.Format("run('{0}')", scriptName)); } /// <summary> /// Send Matlab cmd advanced /// </summary> /// <param name="cmd">Matlab command</param> /// <param name="ans">results of the command</param> /// <param name="time">time of execution</param> public void SendCmd(string cmd, out string ans, out string time) { stopwatch.Start(); //Execute command ans = matlab.Execute(cmd); stopwatch.Stop(); stopwatch.Reset(); //Get time time = stopwatch.ElapsedMilliseconds.ToString(); } } }
383
1.6 Miscellaneous classes
1.6.1 Extended type conversions
The following codes are extensions to the built-in C# type conversions.
using System; using System.Text; namespace ELE_Application.Class.General { public static class ConvertExt { public static double[] ToDoubleArray(float[] array) { int l = array.Length; double[] a = new double[l]; for (int i = 0; i < l; i++) a[i] = (double)array[i]; return a; } public static float[] ToFloatArray(double[] array) { int l = array.Length; float[] a = new float[l]; for (int i = 0; i < l; i++) a[i] = (float)array[i]; return a; } public static char[] ToCharArray(byte[] array) { int l = array.Length; char[] a = new char[l]; for (int i = 0; i < l; i++) a[i] = Convert.ToChar(array[i]); return a; } public static string Hex2Binary(string hexValue) { string binaryVal = ""; binaryVal = Convert.ToString(Convert.ToInt32(hexValue, 16), 2); return binaryVal; } public static string ByteArrayToHexString(byte[] data) { StringBuilder sb = new StringBuilder(data.Length * 3); foreach (byte b in data) { sb.Append(Convert.ToString(b, 16).PadLeft(2, '0').PadRight(3, ' ')); } return sb.ToString().ToUpper(); }
384
public static string ReverseString(string s) { char[] charArray = s.ToCharArray(); Array.Reverse(charArray); return new string(charArray);
385
1.7 Demo software
1.7.1 Initilisation
The codes presented here are used for defining variables and initialize user interface.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; using System.Threading; using System.IO; using ELE_Application.Class.FANUC.Programs; using ELE_Application.Class.FANUC; using ELE_Application.Class.USB1208FS; using ELE_Application.Class.STPMotor; using ELE_Application.Class.Ultrasonics; using System.Text.RegularExpressions; using System.Globalization; namespace ELE_Application.Test.Demo { public partial class Sep2015 : Form { #region starting up //Communication public static ConnectRobot connectRobot = new ConnectRobot(); public static ConnectUSB1208FS connectDAQ = new ConnectUSB1208FS(); public static ConnectSTPMotor stpMotor = new ConnectSTPMotor(); //Robot public static SetRobotProgram fanucProg = new SetRobotProgram(); public static MoveToPos fanucMove = new MoveToPos(); public static RobotPosition fanucPos = new RobotPosition(); public static AnalogAdv daqAna = new AnalogAdv(); public static DigitalAdv daqDigi = new DigitalAdv(); //DAQ private int lowerFloatSWChannel = USB1208FSConstants.lowerFloatSWChannel; private int upperFloatSWChannel = USB1208FSConstants.upperFloatSWChannel; private int pumpChannel = USB1208FSConstants.pumpChannel; private int valveChannel = USB1208FSConstants.valveChannel; private ConnectUSB1208FS.DPortATypeEnum DPortAtype = ConnectUSB1208FS.DPortATypeEnum.DIn; private CurrentTool tool; //Ultrasonic private static DLink ultra = new DLink(); //Stepper motor private static STPMotorAdv stpMotorAdv = new STPMotorAdv(); //Logs
386
private enum LogMsgType { Incoming, Outgoing, Normal, Warning, Error }; private enum CurrentTool { Laser, Ultrasonic }; private Color[] LogMsgTypeColor = { Color.Blue, Color.Green, Color.Black, Color.Orange, Color.Red }; //Variables public static string mainDirectory = @"C:\Users\MACE-USER\OneDrive\Ultrasonic KTP\ELE-Laptop Documents\01. Experiments\18. Gain and water path\"; public static string matlabDire = mainDirectory + @"Matlab\"; public static string resultsFileDire = matlabDire;// + @"Results\"; private string laserPath = ""; private string ultrasonicToolPath = ""; private string ultrasonicPath = ""; private int ultrasonicBufferSize = 2000; public static bool isBGWorkerRunning = false; private bool overwriteUSToolPathFile = true; private string overwriteUSToolPathFileLoc = mainDirectory + @"Toolpath_19022016_1446.txt"; public Sep2015() { InitializeComponent(); grpb_ctrl.Enabled = false; grpb_inspection.Enabled = false; } #endregion
1.7.2 Connect to equipment
In this section, the PC is trying to establish communication with different devices including the robot
controller, the DAQ device and the stepper motor. It is noted that there is no need to connect to the
ultrasonic PCI card because it has been inserted on the PC motherboard and can be used directly by
creating an DLL instance.
#region Connect bool isRobConn = false; bool isDAQConn = false; private void btn_connectRob_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; if (!isRobConn) { try { isRobConn = connectRobot.Connect(FanucConstants.ipAddress); } catch { } } else if (isRobConn) { try { isRobConn = connectRobot.Disconnect(); }
387
catch { } } updateConnectionStatus(); } private void btn_connectDAQ_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; if (!isDAQConn) { try { //DAQ connectDAQ.Connect(); connectDAQ.SetDigitalPortType(DPortAtype); //Stepper motor isDAQConn = stpMotor.Connect("COM10"); } catch { } } else if (isDAQConn) { try { stpMotor.Disconnect(); } catch { } } updateConnectionStatus(); } private void updateConnectionStatus() { if (isRobConn) { btn_connectRob.Text = "Disconnect Robot"; lbl_robotStats.Text = "Robot Connected"; lbl_robotStats.ForeColor = Color.ForestGreen; } else { btn_connectRob.Text = "Connect Robot"; lbl_robotStats.Text = "Robot Disconnected"; lbl_robotStats.ForeColor = Color.Crimson; } if (isDAQConn) { btn_connectDAQ.Text = "Disconnect DAQ"; lbl_daqStats.Text = "DAQ Connected"; lbl_daqStats.ForeColor = Color.ForestGreen; } else { btn_connectDAQ.Text = "Connect DAQ"; lbl_daqStats.Text = "DAQ Disconnected"; lbl_daqStats.ForeColor = Color.Crimson; } if (isDAQConn && isRobConn)
388
{ grpb_ctrl.Enabled = true; grpb_inspection.Enabled = true; } else { grpb_ctrl.Enabled = false; grpb_inspection.Enabled = false; } } #endregion
1.7.3 Private Methods
This section of codes presents methods that are used multiple times during the inspection processes.
This includes:
1. instructing the robot to park at Home position (RobHomePos),
2. checking water level (CheckWaterLevel),
3. update event status in the UI (Log) and
4. save acquired data in text file (LogToFile).
#region Robot Routine private void RobHomePos(short UF, short UT, float elevation = 0, int spd = 300) { elevation = 0; if (elevation != 0) { float[] pos = { 0, 0, elevation, 0, 0, 0 }; fanucMove.LMoveRel(pos, spd, 0, FanucConstants.Tool.Laser, true, UF, UT); } fanucProg.RunProg("TOOLDOWN", true); } //Self-looping method for checking water level according float switch status private bool isFixingWaterLevel = false; //set true for pumping/draining water in progress; false for fixed water level. private string CheckWaterLevel() { Thread.Sleep(500); DigitalAdv daqAdvanced = new DigitalAdv(); string time; int[] channel; int floatSWChn = 9; //channel in DAQ for the lower/upper float switches; lowerFloatSWChannel - lower float switch; upperFloatSWChannel - upper float switch; 9 - reset int desiredValue = 9; //1 - channel open; 0 - channel closed; 9 - reset string msg = "";
389
int[] bothOff = { 0, 0, 0, 0, 0, 0, 0, 0 }; //bit info to be sent to DAQ for turning off both the pump and the valve int[] valveOn = { 0, 0, 0, 0, 0, 0, 0, 0 }; //bit info to be sent to DAQ for turning on the valve int[] pumpOn = { 0, 0, 0, 0, 0, 0, 0, 0 }; //bit info to be sent to DAQ for turning on the pump valveOn[valveChannel] = 1; //set bit info for turning valve on by setting the corresponding channel bit to 1 pumpOn[pumpChannel] = 1; //set bit info for turning pump on by setting the corresponding channel bit to 1 //Read bit info of all channels from DAQ channel = daqAdvanced.GetChannelInfo(); time = HrMinS(); //set rule for water level checking according to the current tool type if (tool == CurrentTool.Laser) //safety water level for laser: lower float switch - open { floatSWChn = lowerFloatSWChannel; //Open desiredValue = 1; } else if (tool == CurrentTool.Ultrasonic) //safety water level for ultrasonic: upper float switch - close { floatSWChn = upperFloatSWChannel; //Close desiredValue = 0; } else //if current tool is none { Log(LogMsgType.Error, time, "Error! Tool [" + tool + "] not recognised!"); return msg = "Error! Tool not recognised"; } //In case channel info returned from DAQ is invalid if (channel[1] == 9) { Log(LogMsgType.Error, time, "Error occurred when checking water level."); isFixingWaterLevel = false; } else if (channel[floatSWChn] == desiredValue) //if float switch is at desired status { daqAdvanced.SendChannelInfo(bothOff); //turn off the pump or/and the valve Log(LogMsgType.Outgoing, time, "Water level is safe for the next operation."); isFixingWaterLevel = false; } else //if float switch is at incorrect status { if (tool == CurrentTool.Laser) //for laser { if (!isFixingWaterLevel) { Log(LogMsgType.Error, time, "Current water level is above safety level for laser scanning."); Log(LogMsgType.Outgoing, time, "Draining water."); daqAdvanced.SendChannelInfo(valveOn); //drain water out of the tank isFixingWaterLevel = true;
390
} CheckWaterLevel(); } if (tool == CurrentTool.Ultrasonic) //for ultrasonic { if (!isFixingWaterLevel) { Log(LogMsgType.Error, time, "Current water level is below required level for ultrasonic scanning."); Log(LogMsgType.Outgoing, time, "Pumping water."); daqAdvanced.SendChannelInfo(pumpOn); //pump water into the tank isFixingWaterLevel = true; } CheckWaterLevel(); } } return msg = "current water level is safe for the next operation"; } //Return current Hour:Minute:Second. private string HrMinS() { return DateTime.Now.ToLongTimeString(); } //Log message with time into log window private void Log(LogMsgType msgtype, string time, string msg) { rtb_log.Invoke(new EventHandler(delegate { rtb_log.AppendText(time + ", ", LogMsgTypeColor[(int)msgtype]); rtb_log.AppendText(msg + "\n", LogMsgTypeColor[(int)msgtype]); rtb_log.ScrollToCaret(); })); } //Log message without time into log window private void Log(LogMsgType msgtype, string msg) { rtb_log.Invoke(new EventHandler(delegate { rtb_log.AppendText(msg, LogMsgTypeColor[(int)msgtype]); rtb_log.ScrollToCaret(); })); } //Log data to file public static void logToFile(string path, float[] curPos, double laser) { string str = ""; float[] pos = new float[6]; pos[0] = curPos[0]; pos[1] = curPos[1]; pos[2] = curPos[2]; pos[3] = curPos[3]; pos[4] = curPos[4]; pos[5] = curPos[5]; foreach (float i in pos)
391
{ str += string.Format("{0}\t", i); } str += string.Format("{0}", laser.ToString()); using (StreamWriter write = File.AppendText(@path)) { write.WriteLine(str); } } private void logToFile(string path, string str) { using (StreamWriter write = File.AppendText(@path)) { write.WriteLine(str); } } #endregion
1.7.4 Laser digitization
In this section, the laser probe is used for digitizing the turbine blade which has been fixed on the
rotary axis.
private bool _isLaserAttached = false; private bool IsLaserAttached { set { _isLaserAttached = value; if (_isLaserAttached) btn_attachLaser.Text = "Dettach laser"; else btn_attachLaser.Text = "Attach laser"; } get { return _isLaserAttached; } } private int rot = 0; private void btn_laserScan_Click(object sender, EventArgs e) { SetRobotPosReg.intConfig.SetValue((short)0, 0); SetRobotPosReg.intConfig.SetValue((short)1, 2); SetRobotPosReg.intConfig.SetValue((short)1, 3); SetRobotPosReg.intConfig.SetValue((short)0, 4); SetRobotPosReg.intConfig.SetValue((short)0, 5); SetRobotPosReg.intConfig.SetValue((short)0, 6); #region variables rot++; string saveFileName = "laserData";
392
DateTime now = DateTime.Now; laserPath = resultsFileDire + saveFileName + "_" + now.ToString("dd-MM-yy-hhmmss") + ".txt"; short UF = 3; short UT = 7; int descendingSpd = 30; int slowSpd = 100; int fastSpd = 300; float maxX, minX, maxY, minY, z, safeZ; float ix;//increment in x float iy;//increment in y int nx, ny; //number of points in x and y respectively double laserReading; int waitTimer = 500; //time to wait before taking laser reading float[] safeMove = { 0, 0, 300, 0, 0, 0 }; bool startPointIsNextPoint = false; bool startMinX = true; bool startMinY = true; #endregion Log(LogMsgType.Outgoing, HrMinS(), "System: Initiating laser scan."); #region initiallization Log(LogMsgType.Outgoing, HrMinS(), "Robot: Moving to home position."); RobHomePos(0, 0); tool = CurrentTool.Laser; Log(LogMsgType.Outgoing, HrMinS(), "Tank: Checking water level."); CheckWaterLevel(); Log(LogMsgType.Outgoing, HrMinS(), "Tank: Water level is safe for laser scanning."); //confirm tool DialogResult ans = MessageBox.Show("Is it safe to attach laser sensor?", "Confirmation required", MessageBoxButtons.YesNo); if (ans == DialogResult.No) return; Log(LogMsgType.Outgoing, HrMinS(), "Robot: Grabbing laser sensor."); if (!IsLaserAttached) { fanucProg.RunProg(FanucConstants.progAttachLaser, true); IsLaserAttached = true; } #endregion #region start laser scanning //PSM104 - R1 maxX = 442.975f; minX = 396.895f; maxY = -120.997f; minY = -161.317f; z = -372f; nx = 15; ny = 6; ix = (maxX - 0.01f - minX) / nx; iy = (maxY - 0.01f - minY) / ny; rot = 1; startMinY = true;
393
//PSM104 - R2 maxX = 452.736f; minX = 434.889f; maxY = -120.997f; minY = -161.317f; z = -347f; nx = 11; ny = 6; ix = (maxX - 0.01f - minX) / nx; iy = (maxY - 0.01f - minY) / ny; rot = 2; startMinY = true; bool istesting = true; float safeHeightRise = 10; switch (rot) { case 1: safeZ = -388f; break; case 2: safeZ = -360f; break; default: safeZ = 0; break; } Log(LogMsgType.Outgoing, HrMinS(), "System: Initiation completed. Start laser scan."); float xEnd, yEnd, xStart, yStart; int ixSign, iySign; if (startMinY) { yStart = minY; yEnd = maxY; iySign = 1; } else { yStart = maxY; yEnd = minY; iySign = -1; } if (startMinX) { xStart = minX; xEnd = maxX; ixSign = 1; } else { xStart = maxX; xEnd = minX; ixSign = -1; } float[] nextPos = { xStart, yStart, z, 180, 0, 180 };
394
//Move to start position, minimum x, maximum y and the actual starting z+200. float[] startPos = { xStart, yStart, z + 200, 180, 0, 180 }; fanucMove.LMove(startPos, fastSpd, 0, FanucConstants.Tool.Laser, true, UF, UT); //Make sure it won't collide after adjusting the z. if (startPos[2] - 200 <= safeZ) startPos[2] = safeZ; else startPos[2] -= 200; do { fanucMove.LMove(startPos, fastSpd, 0, FanucConstants.Tool.Laser, true, UF, UT); laserReading = daqAna.GetLaserReading(10); //Re-adjust the height to allow laser measuring. while (Math.Abs(laserReading) > 10) { if (startPos[2] == safeZ) { if (Math.Abs(laserReading) > 12) break; startPointIsNextPoint = true; break; } if (startPos[2] - 3 <= safeZ) { startPos[2] = safeZ; } else { startPos[2] -= 3; } fanucMove.LMove(startPos, slowSpd, 0, FanucConstants.Tool.Laser, true, UF, UT); laserReading = daqAna.GetLaserReading(10); } startPos.CopyTo(nextPos, 0); do { fanucMove.LMove(nextPos, slowSpd, 0, FanucConstants.Tool.Laser, true, UF, UT); laserReading = daqAna.GetLaserReading(10); //If the reading is around 21(in +/-5V analog range), it reflects that either the position being measured is outside //the blade or the surface of the blade blocks the laser capture camera //It is noted that instead of using 21 as the critical reading, use 12 in case something wierd may happen. //The actual measuring range of the laser sensor is +/-10mm anyway, so 12 should be safe. if (Math.Abs(laserReading) > 12) { if (!startPointIsNextPoint) break; } startPointIsNextPoint = false; //The accurate measuring range of the laser is +/-5mm, so if the distance exceeds 4mm (just to be safe),
395
//readjust the height. if (Math.Abs(laserReading) > 4) { if (nextPos[2] + (float)laserReading >= safeZ) nextPos[2] += (float)laserReading; else nextPos[2] = safeZ; } fanucMove.LMove(nextPos, descendingSpd, 0, FanucConstants.Tool.Laser, true, UF, UT); Thread.Sleep(waitTimer); laserReading = daqAna.GetLaserReading(10); if (laserReading < 10) logToFile(laserPath, nextPos, laserReading); nextPos[1] += iySign * iy; } while (iySign * nextPos[1] < iySign * yEnd); startPos[0] += ixSign * ix; //Go to somewhere safe: [safeHeightReset] above the starting point. startPos[2] = nextPos[2] + safeHeightRise; } while (ixSign * startPos[0] <= ixSign * xEnd); #endregion //Return laser sensor if (!istesting) { RobHomePos(UF, UT, 0, 300); fanucProg.RunProg(FanucConstants.progDettachLaser, true); } IsLaserAttached = false; Log(LogMsgType.Outgoing, HrMinS(), "System: Laser scan has completed."); }
1.7.5 Probe path localisation
In this section, a Matlab instance is created and the pre-determined probe path is selected and
localised in the coordinate system of the inspection machine. The path is then grouped and saved in
a text file which is then opened in the C# software and the path information is parsed and stored in
a list type variable. The Matlab script for localisation is presented in Chapter 2.3.
List<object> toolPathList = new List<object>(); private void btn_toolPath_Click(object sender, EventArgs e) { toolPathList = new List<object>(); MLApp.MLApp mLab = new MLApp.MLApp(); Log(LogMsgType.Outgoing, HrMinS(), "Matlab: A Matlab instance has been initialized."); //Create save file path DateTime now = DateTime.Now; ultrasonicToolPath = resultsFileDire + "toolPath" + "_" + now.ToString("dd-MM-yy-hhmmss") + ".txt"; //Set Matlab path
396
string cmd = "cd '" + matlabDire + "'"; mLab.Execute(@cmd); if (matlabDire != resultsFileDire) { cmd = "addpath('" + resultsFileDire + "')"; mLab.Execute(@cmd); } //Set Matlab window invisible. mLab.Visible = 1; //Send the command for calculating toolpath. laserPath = resultsFileDire + @"laserData_09-12-15-054947.txt"; cmd = string.Format("CalculateUSToolPath('{0}','{1}')", laserPath, ultrasonicToolPath); try { //mLab.Execute(@cmd); } catch { Log(LogMsgType.Error, HrMinS(), "Error: tool path for ultrasonic probe not generated."); return; } if (overwriteUSToolPathFile) ultrasonicToolPath = overwriteUSToolPathFileLoc; string[] coordS; float[] coords; int lineCount = -1; int rotationCount = -1; int coordsCount = -1; int paraPerLine = 11; DialogResult dialogResult = DialogResult.Cancel; if (File.Exists(ultrasonicToolPath)) { do { try { using (StreamReader sr = new StreamReader(ultrasonicToolPath)) { string line; while ((line = sr.ReadLine()) != null) { lineCount++; if (line.StartsWith("R")) { rotationCount++; Regex regex = new Regex(@"-*\d+.\d+"); Match match = regex.Match(line); if (match.Success) { double a = double.Parse(match.Value, CultureInfo.InvariantCulture); toolPathList.Add(a); } } else { coordsCount++; coordS = line.Split('\t');
397
coords = new float[paraPerLine]; for (int i = 0; i < paraPerLine; i++) { if (i == 6) continue; coords[i] = float.Parse(coordS[i]); } coords[6] = float.Parse(Regex.Match(coordS[6], @"\d+").Value); toolPathList.Add(coords); } } } Log(LogMsgType.Outgoing, HrMinS(), "Matlab: Tool path has been successfully loaded."); Log(LogMsgType.Outgoing, HrMinS(), String.Format("Matlab: Number of spindle rotation requied:{0}.", rotationCount)); Log(LogMsgType.Outgoing, HrMinS(), String.Format("Matlab: Number of points to be inspected:{0}.", coordsCount + 1)); dialogResult = DialogResult.Cancel; } catch { dialogResult = MessageBox.Show(String.Format("Invalid data format at line {0}!", lineCount + 1), "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error); if (dialogResult == DialogResult.Cancel) Log(LogMsgType.Error, HrMinS(), String.Format("Error: An error occured during reading tool path file. Invalid data format at line {0}!", lineCount + 1)); } } while (dialogResult == DialogResult.Retry); } else Log(LogMsgType.Error, HrMinS(), "Error: tool path for ultrasonic probe not generated."); mLab.Execute("clear all;"); mLab.Quit(); Log(LogMsgType.Warning, HrMinS(), "Matlab: The Matlab instance has been closed."); }
1.7.6 Ultrasonic data acquisition
This section of code is divided into two parts. The first part is initialisation, where ultrasonic PCI card
is configured and the robot is instructed to prepare for ultrasonic inspection. In the second part, the
robot is instructed to move the ultrasonic probe according to the calculated probe path and the
ultrasonic PCI card is instructed to excite ultrasonic pulses and collect ultrasonic data when needed.
The execution of the robot task and the ultrasonic task are separated in two threads. Although multi-
threading may not be required at this stage, it is ultimately needed for more an intelligent process.
398
Initialisation
public static double usGainHigh = 70; public static double usGainLow = 50; private static double _curGain = 0; public static double CurGain { get { return _curGain; } set { ultra.SetGain(value); _curGain = value; } } private void btn_ultrasonicScan_Click(object sender, EventArgs e) { #region variables string saveFileName = "ultrasonicData"; DateTime now = DateTime.Now; ultrasonicPath = resultsFileDire + saveFileName + "_" + now.ToString("dd-MM-yy-hhmmss") + ".txt"; short UF = 3; short UT = 5; int slowSpd = 50; int fastSpd = 100; float[] safeMove = { 0, 0, 150, 0, 0, 0 }; #endregion Log(LogMsgType.Outgoing, HrMinS(), "System: Initiating ultrasonic scan."); #region initiallization Log(LogMsgType.Outgoing, HrMinS(), "System: Communicating with ultrasonic components."); UltrasonicScan us = new UltrasonicScan(); UltraScanRobot rm = new UltraScanRobot(); int check = ultra.SetTransducerMode(0); if (check != 1) { MessageBox.Show("Error: An error occured during establishing communication!"); return; } check += ultra.SetPulseVoltage(300); check += ultra.SetPulseWidth(18); check += ultra.SetDamping(0); check += ultra.SetRectifier(3); check += ultra.SetGain(usGainHigh); check += ultra.SetDCOffset(0.02); check += ultra.SetLowPassFilter(7); check += ultra.SetHighPassFilter(0);
399
check += ultra.SetSamplingRate(0); check += ultra.SetADTriggerSource(1); check += ultra.SetTriggerDelay(2000); check += ultra.SetBufferLength(1000); check += ultra.SetLogAMP(0); if (check != 14) { Log(LogMsgType.Error, HrMinS(), "Error: Please check the settings for ultrasonic probes!"); return; } tool = CurrentTool.Ultrasonic; Log(LogMsgType.Outgoing, HrMinS(), "Tank: Checking water level."); CheckWaterLevel(); Log(LogMsgType.Outgoing, HrMinS(), "Tank: Water level is suitable for ultrasonic scanning."); Log(LogMsgType.Outgoing, HrMinS(), "Robot: Grabbing ultrasonic sensor."); fanucProg.RunProg(FanucConstants.progAttachUltra, true); //Set FUP SetRobotPosReg.intConfig.SetValue((short)1, 0); SetRobotPosReg.intConfig.SetValue((short)1, 2); SetRobotPosReg.intConfig.SetValue((short)1, 3); SetRobotPosReg.intConfig.SetValue((short)0, 4); SetRobotPosReg.intConfig.SetValue((short)0, 5); SetRobotPosReg.intConfig.SetValue((short)0, 6); //Move to a FUP position float[] fupPos = new float[6] { -11.7f, 1.4f, -50.2f, 0, 10, 0 }; fanucMove.JMove(fupPos, 10, 0, FanucConstants.Tool.Ultrasonic, true, UF, UT); //Add arguments to background worker which handles robot movements. List<object> arguments = new List<object>(); arguments.Add(rm); arguments.Add(slowSpd); arguments.Add(fastSpd); arguments.Add(FanucConstants.Tool.Ultrasonic); arguments.Add(true); //checkPos arguments.Add(safeMove); arguments.Add(toolPathList); arguments.Add(UF); arguments.Add(UT); arguments.Add(false); //laserVerifyProbePath //Start ultrasonic data logging. bgworker_ultraDataAcq.RunWorkerAsync(us); //Start robot. bgworker_ultraScanRobot.RunWorkerAsync(arguments); #endregion }
Multi-threading
#region background workers public static bool triggerUltrasonics = true; public static bool isNewHole = false; public static bool ultrasonicDataCollected = true;
400
The ultrasonic thread
#region ultrasonic data acquisition private void bgworker_ultraDataAcq_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker; worker = (BackgroundWorker)sender; UltrasonicScan us = (UltrasonicScan)e.Argument; us.scan(worker, e, ultra.BufferLength, ultrasonicPath, 50); } private void bgworker_ultraDataAcq_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { bgworker_ultraDataAcq.CancelAsync(); Thread.Sleep(100); Application.DoEvents(); } public static bool usSelfStop = false; public static int curHoleNum = 0; public static int curSecNum = 0; private class UltrasonicScan { /// <summary> /// /// </summary> /// <param name="worker"></param> /// <param name="e"></param> /// <param name="bufferSize"></param> /// <param name="filePath">file name and path for saving result. MUST use double forword slash!</param> public void scan(BackgroundWorker worker, DoWorkEventArgs e, int bufferSize, string filePath, int triggerFrequency) { List<byte[]> dataList = new List<byte[]>(); List<string> dataInfo = new List<string>(); DateTime d = new DateTime(); byte[] data = new byte[bufferSize]; byte[] emptydata = new byte[1]; #region gain stepping double gainMin = 30; double gainMax = 80; double gainCache = gainMin; double gainStep = 5; bool gainStepping = true; if (gainStepping) CurGain = gainCache; #endregion #region general settings int noOfBackwall = 100; int noOfInterface = 0; bool scanningInterface = false; int count = 0; #endregion double[][] dataCollection = new double[noOfBackwall][];
401
double[] averagedUSData = new double[noOfBackwall]; while (!worker.CancellationPending & !usSelfStop) { ultra.ResetMemory(); ultra.ResetCounter(); // send a pulse out int isSent = 0; while (isSent != 1) { isSent = ultra.SetSoftwareTrigger(); } // read data from memory when ready int isReady = 0; while (isReady != 1) { isReady = ultra.IsDataReady(); } d = DateTime.UtcNow; ultra.GetData(out data, bufferSize); if (triggerUltrasonics) { dataCollection[count] = Array.ConvertAll(data, Convert.ToDouble); count++; } else { count = 0; } if (count == noOfBackwall) { averagedUSData = Average(dataCollection); bool fileLogged = LogUSData(filePath, averagedUSData); if (gainStepping) { dataCollection = new double[noOfBackwall][]; gainCache += gainStep; if (gainCache <= gainMax) { CurGain = gainCache; } else { gainCache = gainMin; CurGain = gainCache; triggerUltrasonics = false; ultrasonicDataCollected = true; } } else { if (noOfInterface != 0) { dataCollection = new double[noOfInterface][];
402
CurGain = usGainLow; Thread.Sleep(50); } scanningInterface = true; } count = 0; } else if ((scanningInterface & count == noOfInterface) || (scanningInterface & noOfInterface == 0)) { scanningInterface = false; triggerUltrasonics = false; ultrasonicDataCollected = true; count = 0; if (noOfInterface != 0) { CurGain = usGainHigh; averagedUSData = Average(dataCollection); LogUSData(filePath, averagedUSData); } dataCollection = new double[noOfBackwall][]; } } e.Cancel = true; } private bool LogUSData(string filePath, double[] usdata) { try { using (StreamWriter sw = File.AppendText(@filePath)) { string s = string.Format("{0} {1} {2} {3} {4} ", CurGain, curSecNum, curHoleNum, ultra.SamplingRate, ultra.BufferLength); sw.Write(s); for (int row = 0; row < usdata.Length; row++) sw.Write(usdata[row].ToString() + " "); sw.WriteLine(); } } catch (Exception e) { Console.WriteLine("{0} Exception caught.", e); return false; } return true; } private double[] Average(double[][] m) { double[] d = new double[m[1].Length]; for (int col = 0; col < m[1].Length; col++) { for (int row = 0; row < m.Length; row++) { d[col] += m[row][col]; } d[col] /= m.Length;
403
} return d; } } #endregion
The robot thread
#region ultraScanRobot public static int ultraScanL = 0; private void bgworker_ultraScanRobot_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker; worker = (BackgroundWorker)sender; List<object> genericlist = e.Argument as List<object>; UltraScanRobot robot = (UltraScanRobot)genericlist[0]; int slowSpd = (int)genericlist[1]; int fastSpd = (int)genericlist[2]; FanucConstants.Tool tool = (FanucConstants.Tool)genericlist[3]; bool checkPos = (bool)genericlist[4]; float[] safeMove = (float[])genericlist[5]; List<object> toolpath = (List<object>)genericlist[6]; short UF = (short)genericlist[7]; short UT = (short)genericlist[8]; bool laserVerifyProbePath = (bool)genericlist[9]; int cnt = 0; robot.move(worker, e, safeMove, toolpath, slowSpd, fastSpd, cnt, tool, checkPos, UF, UT, laserVerifyProbePath); } private void bgworker_ultraScanRobot_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { Log(LogMsgType.Outgoing, HrMinS(), "Ultrasonic Scanning has been finished"); bgworker_ultraScanRobot.CancelAsync(); bgworker_ultraDataAcq.CancelAsync(); Thread.Sleep(100); Application.DoEvents(); } private class UltraScanRobot { public void move(BackgroundWorker worker, DoWorkEventArgs e, float[] safeMove, List<object> toolpath, int slowSpd, int fastSpd, int cnt, FanucConstants.Tool tool, bool checkPos, short UF, short UT, bool laserVerifyProbePath) { double oldAngle = 0; double angle; float[] coords; int spdbit; int spd = slowSpd; int curHole; int curSec; string check = ""; DateTime now = DateTime.Now; string laserPath = resultsFileDire + "PathVerification" + "_" + now.ToString("dd-MM-yy-hhmmss") + ".txt";
404
for (int i = 0; i < toolpath.Count; i++) { //Current line is an integer => spindle rotation if (toolpath[i] is double) { //stop recording ultrasonic data triggerUltrasonics = false; //safe move if not the first rotation if (i != 0) { if (!laserVerifyProbePath) { usSelfStop = true; fanucMove.LMoveRel(safeMove, fastSpd, 0, tool, true, UF, UT); ReturnUSProbe(UF, UT); } } angle = (double)toolpath[i] - oldAngle; oldAngle = (double)toolpath[i]; if (angle != 0) { if (!laserVerifyProbePath) { double executedAngleOfRotation; executedAngleOfRotation = stpMotorAdv.RotateDAutoMCS(angle); } } usSelfStop = false; } //Current line is not an interger => xyzwprSpd else { coords = new float[6]; for (int n = 0; n < 6; n++) coords[n] = ((float[])toolpath[i])[n]; spdbit = (int)((float[])toolpath[i])[6]; curSec = (int)((float[])toolpath[i])[7]; curHole = (int)((float[])toolpath[i])[8]; if (spdbit == 1) spd = slowSpd; else spd = fastSpd; if (curSec != 0) { // Move to the next point when data is collected while (!ultrasonicDataCollected) { Thread.Sleep(50); } fanucMove.LMove(coords, spd, cnt, tool, true, UF, UT); // Use laser to verify probe path or collect ultrasonic data if (laserVerifyProbePath & tool == FanucConstants.Tool.Laser) { double laserReading = daqAna.GetLaserReading(10); if (laserReading < 10) logToFile(laserPath, coords, laserReading); }
405
else { Thread.Sleep(500); triggerUltrasonics = true; ultrasonicDataCollected = false; } check = string.Format("{0} {1}", curSec, curHole); } } } return; } private void ReturnUSProbe(short UF, short UT) { float[] curJoint; float[] jointPos = new float[6]; string posTime; fanucPos.GetJointPosition(out curJoint, out posTime, 5); jointPos[0] = curJoint[0]; jointPos[1] = 0; jointPos[2] = curJoint[2]; jointPos[3] = curJoint[3]; jointPos[4] = curJoint[4]; jointPos[5] = 0; fanucMove.JMove(jointPos, 10, 0, FanucConstants.Tool.Ultrasonic, true, UF, UT); if (jointPos[3] < 0) jointPos[3] = -90; else jointPos[3] = 90; fanucMove.JMove(jointPos, 10, 0, FanucConstants.Tool.Ultrasonic, true, UF, UT); jointPos[4] = 0; fanucMove.JMove(jointPos, 10, 0, FanucConstants.Tool.Ultrasonic, true, UF, UT); jointPos[3] = 0; fanucMove.JMove(jointPos, 10, 0, FanucConstants.Tool.Ultrasonic, true, UF, UT); fanucProg.RunProg("TOOLDOWN", true); fanucProg.RunProg(FanucConstants.progDettachUltra, true); } } #endregion #endregion
1.7.7 Wall thickness evaluation
Finally, after all required ultrasonic data are collected, the wall thickness evaluation script is called.
The Matlab script for thickness evaluation is presented in Chapter 2.5.
private void btn_results_Click(object sender, EventArgs e) { MLApp.MLApp mLab = new MLApp.MLApp(); Log(LogMsgType.Outgoing, HrMinS(), "Matlab: A Matlab instance is initialized."); //Set Matlab path
406
string dir = @"C:\Users\MACE-USER\OneDrive\Ultrasonic KTP\ELE-Laptop Documents\04. Matlab Coding\MATLAB\LAST EXPERIMET FOR BLOCK WITH HOLES FROM FLAT"; string cmd = "cd '" + dir + "'"; mLab.Execute(@cmd); //Set Matlab window invisible. mLab.Visible = 1; mLab.Execute("UI_Develop_Integ_v2"); }
407
Chapter 2
Matlab Codes
Matlab is a convenient tool for solving complex mathematical equations and matrix evaluations.
Therefore, all calculations including ultrasonic data processing are completed in Matlab.
These calculations include B-spline curve, 2D Delaunay triangulation, shape-preserving
parameterisation, B-spline surface, probe path calculation, localisation, probe path grouping and wall
thickness evaluation. In this chapter, codes of the Matlab scripts for realising these calculations are
presented.
408
2.1 Reverse engineering
2.1.1 The main Matlab function
This section presents the main Matlab function that collects user input, executes calculation in sub-
functions and generates output. It is noted that 2D Delaunay triangulation is calculated in this
function.
function [ P_surf, ctrlPCell, uCell, knotV] = FuncBspline_Main( nos,nc_u,nc_w,ku,kw,nnu,nnw,sectionData) % SectionData, a cell wherein each set is one complete section % nos, number of sections for measured blade data % nc_u, number of control points for fitted Bspline curves in u direction % nc_w, number of control points for fitted Bspline curves in w direction % ku, number of control points for each segment in u dorection ,ku-1 is the degree of each segment % kw, number of control points for each segment in w dorection ,kw-1 is the degree of each segment % nnu, number of generated points in each section in u directoin % nnw, number of generated points in each section in w directoin %% Sort out input data and 2D parameterization % For each section, generate equal number of points that are uniformly % spaced. This is done by fitting a B-spline curve to each section. % figure; k=1;c=1; for i=1:nos pread=sectionData{1,i}; [ps,nop,us,C_sec,knotV]= FuncBspline_curve(pread,nc_u,ku,nnu); p(k:k+nop-1,:)=ps; uCell{c}=us; ctrlPCell{c}=C_sec; %Calculate the u value x=ps(:,1); y=ps(:,2); z=ps(:,3); l_sumxy=0; l_uweight=0; for j= 1:nop-1 l_pxy=((x(j+1)-x(j)).^2+(y(j+1)-y(j)).^2+(z(j+1)-z(j)).^2).^1/2; l_sumxy=l_sumxy+l_pxy; l_uweight(j+1,:)=l_sumxy; end u(k:k+nop-1,:)=l_uweight/l_sumxy; k=k+nop; c=c+1; end %% Define boundary points, reorder data points and apply Delaunay triangulation % construct w w = 0:1/(nos-1):1;
409
w = repmat(w,nnu,1); w =w(:); % combine u and w uw = [u, w]; uw_inside = uw; p_inside = p; % find boundary bu1i = find(uw_inside(:,2)==0); bu1_ = uw_inside(bu1i,:); uw_inside(bu1i,:) = []; pu1_ = p_inside(bu1i,:); p_inside(bu1i,:) = []; bu2i = find(uw_inside(:,2)==1); bu2_ = uw_inside(bu2i,:); uw_inside(bu2i,:) = []; pu2_ = p_inside(bu2i,:); p_inside(bu2i,:) = []; bw1i = find(uw_inside(:,1)==0); bw1_ = uw_inside(bw1i,:); uw_inside(bw1i,:) = []; pw1_ = p_inside(bw1i,:); p_inside(bw1i,:) = []; bw2i = find(uw_inside(:,1)==1); bw2_ = uw_inside(bw2i,:); uw_inside(bw2i,:) = []; pw2_ = p_inside(bw2i,:); p_inside(bw2i,:) = []; boundary=[bu1_;bw1_;bu2_;bw2_]; uw_c = [uw_inside;boundary]; t=delaunay(uw_c); p_c = [p_inside;pu1_;pw1_;pu2_;pw2_]; x = p_c(:,1); y = p_c(:,2); z = p_c(:,3); %% Shape-preserving paramerization n=size(boundary,1); [tp,td]=FuncBspline_SPP_edge(t,x,y,z,n); % compute barycentric coordinates of data points pu=tp\(td*boundary(:,1)); % compute the u and w value for each point pw=tp\(td*boundary(:,2)); puw=[pu,pw boundary(:,1),boundary(:,2)]; uu=puw(:,1); ww=puw(:,2);
410
%% B-spline surface Fitting [P_surf]=FuncBspline_surface(x,y,z,uu,ww,nc_u,nc_w,ku,kw,nnu,nnw); end
2.1.2 B-spline curve
The following code calculates the B-spline curve.
function [fitP,nop,uvalue,ctrlP,knotV]=FuncBspline_curve(inputPoints,noOfCtrlPoints,degreeOfSeg,noOfFittedPoints) npoints= length(inputPoints); totalulength=zeros(npoints,1); QX=inputPoints(:,1); QY=inputPoints(:,2); QZ=inputPoints(:,3); %% Calculate u values k=degreeOfSeg+1; n=noOfCtrlPoints-1; knotV=[]; no_of_segments=n-k+2; uvalue(2:npoints) = sqrt((QX(2:npoints)-QX(1:npoints-1)).^2 +(QY(2:npoints)-QY(1:npoints-1)).^2+(QZ(2:npoints)-QZ(1:npoints-1)).^2); for i=2:npoints totalulength(i)=totalulength(i-1)+uvalue(i); %Adding small curve lengths together end uvalue(1:npoints)=totalulength(1:npoints)/totalulength(npoints)*no_of_segments; u(1:npoints)=uvalue(1:npoints); for i=1:1:(n+k+1) if i<k+1 knotV(i)=0; else if i>=k+1 if i<=n+1 knotV(i)=i-k; else knotV(i)=n-k+2; end else end end end NA=[];N=[]; for j=1:npoints for i=1:n+2 if i<k NA(i,1)=0; else if u(j)>=knotV(i) && u(j)<knotV(i+1) NA(i,1)=1; else if u(j)==knotV(i) && u(j)==knotV(i+1) NA(i-1,1)=1;NA(i,1)=0;
411
else NA(i,1)=0; end end end end N(1:n+1,1)=NA(1:n+1,1); for m=2:k for i=1:n+1 if knotV(i+m-1)-knotV(i)==0 p1=0; else p1=(u(j)-knotV(i))/[knotV(i+m-1)-knotV(i)]*N(i,m-1); end if knotV(i+m)-knotV(i+1)==0 p2=0; else p2=[knotV(i+m)-u(j)]/[knotV(i+m)-knotV(i+1)]*N(i+1,m-1); end N(i,m)=p1+p2; end end U(j,1:n+1)=N(1:n+1,k); end CX=U\QX; CY=U\QY; CZ=U\QZ; ctrlP=[CX,CY,CZ];%%C are control points %% Redivide the curve and fit a B-spline curve to it span=no_of_segments/(noOfFittedPoints-1); u1=0:span:no_of_segments; npoints=length(u1); for j=1:npoints for i=1:n+2 if i<k NA(i,1)=0; else if u1(j)>=knotV(i) && u1(j)<knotV(i+1) NA(i,1)=1; else if u1(j)==knotV(i) && u1(j)==knotV(i+1) NA(i-1,1)=1;NA(i,1)=0; else NA(i,1)=0; end end end end
412
N(1:n+1,1)=NA(1:n+1,1); for m=2:k for i=1:n+1 if knotV(i+m-1)-knotV(i)==0 p1=0; else p1=(u1(j)-knotV(i))/[knotV(i+m-1)-knotV(i)]*N(i,m-1); end if knotV(i+m)-knotV(i+1)==0 p2=0; else p2=[knotV(i+m)-u1(j)]/[knotV(i+m)-knotV(i+1)]*N(i+1,m-1); end N(i,m)=p1+p2; end end U1(j,1:n+1)=N(1:n+1,k); end fitP=U1*ctrlP; nop=length(fitP); for i=1:length(u1) uvalue(i,1)=u1(1,i); end
2.1.3 Shape-preserving parameterisation
The following codes calculate shape-preserving parameterisation.
function[tp,td]=FuncBspline_SPP_edge(t,x,y,z,np1) % compute the barycentric coordinate of data points %% Sorting the edges of each polygon np=size(x,1); N=np-np1; v=ones(1,N); tp=diag(v); td=zeros(N,np1); %% Initialize the variables n=1; for id=1:N % Check every point in sequence clear e e2 e3 checkt tri edge ve angle angleplane lin newve x1 y1 z1 ppx ppy % b=size(bound_points_order); % if ~isempty(find(id==bound_points_order(1:b))) % continue; % end %% STEP 1. Define the polygon
413
ppx(1)=0; ppy(1)=0; angleplane(1)=0; % Initialize variables at start of each loop checkt=any(t==id,2); %% extracting the polygon of which the center is "id" tri=t(checkt,:); nt=size(tri,1); if isempty(tri)%% In case of any noisy points, skip the noisy points continue end % figure(8) % trimesh(tri,x,y,z) checkt=true(nt,1); for j=1:nt %% position the center point of the polygon in the first column if tri(j,2)==id; tri(j,2)=tri(j,1); elseif tri(j,3)==id; tri(j,3)=tri(j,1); end tri(j,1)=id; end l=1:nt; %% extracting all edges from a polygon e=[tri(:,[1,2]); tri(:,[1,3])]; [e,j,j] = unique(sort(e,2),'rows'); %% Remove duplicated edges e2 = [j(l), j(l+nt)]; % e2 stores the relationship between the triangle and its edges ne=size(e,1); e3 = zeros(ne,2); count= ones(ne,1); % e3 defines the two triangles owned by one edge for l=1:nt for j=1:2 ce = e2(l,j); e3(ce,count(ce))=l; count(ce)=count(ce)+1; end end % position center point in the first column for j=1:ne if e(j,2)==id e(j,2)=e(j,1); end e(j,1)=id; end k=1; m=1; % m is the ID of the triangle that will be extracted n=1; edge(k,:)=e(e2(m,1),:); % define the first edge that is selected idp(k)=edge(k,2); % take all boundary points of the polygon
414
k=k+1; while any(checkt==1) tri1=e3(e2(m,n),1); % Select two adjacent triangles which share a common edge tri2=e3(e2(m,n),2); tri2=e3(e2(m,n),2); checkt(m)=false; if tri1==m % If tri1 is the last triangle ed1=e(e2(tri2,1),:); ed2=e(e2(tri2,2),:); % one edge of tri2 is the next edge in sequence if ed1(2)==edge(k-1,2) edge(k,:)=ed2; idp(k)=ed2(2); k=k+1; m=tri2; n=2; elseif ed2(2)==edge(k-1,2) edge(k,:)=ed1; idp(k)=ed1(2); k=k+1; m=tri2; n=1; end else % If tri2 is the last triangle ed1=e(e2(tri1,1),:); ed2=e(e2(tri1,2),:); % one edge of tri2 is the next edge in sequence if ed1(2)==edge(k-1,2) edge(k,:)=ed2; idp(k)=ed2(2); k=k+1; m=tri1; n=2; elseif ed2(2)==edge(k-1,2) edge(k,:)=ed1; idp(k)=ed1(2); k=k+1; m=tri1; n=1; end end end k=k-1; %% STEP 2. Mapping the space polygon into plane % Extract the coordinates of the end points of each edge for j=1:k x1(j,:)=x(edge(j,:)); y1(j,:)=y(edge(j,:)); z1(j,:)=z(edge(j,:)); end % Calculate the length of each edge for j=1:k ve(j,:)=[x1(j,2)-x1(j,1),y1(j,2)-y1(j,1),z1(j,2)-z1(j,1)];
415
lin(j)=norm(ve(j,:)); end % Calculate the sum of the solid angles of two adjacent edges sumangle=0; for j=1:k-1 result = dot(ve(j+1,:),ve(j,:))/(norm(ve(j+1,:))*norm(ve(j,:))); if result>1 result = 1; end angle(j)=acos(result); sumangle=angle(j)+sumangle; end % Solve Eq.1 of shape-preserving parameterization for j=1:k-1 angleplane(j+1)=angle(j)/sumangle*2*pi; end newve(1,:)=[1,0]; % reference vector nor=1; % Calculate the transformation matrix for j=1:k cs=cos(angleplane(j)); si=sin(angleplane(j)); ro=[cs,si;-si, cs]; newve(j+1,:)= newve(j,:)/nor*ro.*lin(j); % map the polygon onto plane nor=lin(j); end % Store the coordinate of vertices of polygon for j=2:k ppx(j,:)=newve(j,1)+ppx(1); ppy(j,:)=newve(j,2)+ppy(1); pp=[ppx,ppy]; end %% STEP 3. Get final stuff done % Calculate the Barycentric Coordinates [tarea]=FuncBspline_SPP_area(ppx,ppy); for l=1:k-1 % save λ in tp and td if idp(l)<=N tp(id,idp(l))=tp(id,idp(l))-tarea(l+1); else idp(l)=idp(l)-N; td(id,idp(l))=tarea(l+1); end end end
2.1.4 B-spline surface
Matlab codes for calculation of a B-spline surface are presented below.
416
function [P_surf]=FuncBspline_surface(PX,PY,PZ,u,w,ncp,ncpw,k,kw,npoints2,npoints3) %% STEP 1. Generate control points using given u and w coordinates %% U direction - parameters n=ncp-1; % number of control points -1 t=[];% the knot vector no_of_segments=n-k+2; % number of segments QX=PX;QY=PY;QZ=PZ; u=no_of_segments*u; npoints=size(QX,1); % Calculate Knot value t(i) for u direction % see page 150 mortenson for i=1:1:(n+k+1) if i<k+1 t(i)=0; else if i>=k+1 if i<=n+1 t(i)=i-k; else t(i)=n-k+2; end else end end end %% Calculate basis function for each u NA=[];N=[]; for j=1:npoints %u(j):from u(1) to u(npoints) % Calculate basis function N(i,1), for i=1:n+2 if i<k NA(i,1)=0; else if u(j)>=t(i) && u(j)<t(i+1) NA(i,1)=1; else if u(j)==t(i) && u(j)==t(i+1) NA(i-1,1)=1;NA(i,1)=0; else NA(i,1)=0; end end end end N(1:n+1,1)=NA(1:n+1,1); % Calculate basis function N(i,m) m=2:k for m=2:k for i=1:n+1 if t(i+m-1)-t(i)==0
417
p1=0; else p1=(u(j)-t(i))/[t(i+m-1)-t(i)]*N(i,m-1); end if t(i+m)-t(i+1)==0 p2=0; else p2=[t(i+m)-u(j)]/[t(i+m)-t(i+1)]*N(i+1,m-1); end N(i,m)=p1+p2; end end
U(j,1:n+1)=N(1:n+1,k); % relocate the computed basis functions N(i,k) in U end %% W direction - parameters npoints_w=length(QX); % number of data points. nw=ncpw-1; % n=number of control points -1; tw=[]; no_of_segments_w=nw-kw+2; % number of segments % w coordinates w=no_of_segments_w*w; %%%%%%% Calculate Knot value t(i) in w direction for i=1:1:(nw+kw+1) if i<kw+1 tw(i)=0; else if i>=kw+1 if i<=nw+1 tw(i)=i-kw; else tw(i)=nw-kw+2; end else end end end NAw=[];Nw=[];UW=[]; %% Calculate basis functions for each w for e=1:npoints_w %w(e) from w(1) to w(npoints) % Calculate basis function Nw(i,1) for i=1:nw+2 if i<kw NAw(i,1)=0; else if w(e)>=tw(i) && w(e)<tw(i+1) NAw(i,1)=1; else if w(e)==tw(i) && w(e)==tw(i+1) NAw(i-1,1)=1;NAw(i,1)=0; else NAw(i,1)=0; end
418
end end end Nw(1:nw+1,1)=NAw(1:nw+1,1); % Calculate basis functions Nw(i,m),m=2:k; for m=2:kw for i=1:nw+1 if tw(i+m-1)-tw(i)==0 p1w=0; else p1w=(w(e)-tw(i))/[tw(i+m-1)-tw(i)]*Nw(i,m-1); end if tw(i+m)-tw(i+1)==0 p2w=0; else p2w=[tw(i+m)-w(e)]/[tw(i+m)-tw(i+1)]*Nw(i+1,m-1); end Nw(i,m)=p1w+p2w; end end
W(1:nw+1,e)=Nw(1:nw+1,kw); % relocate the computed basis functions in W end % Calculate U*W matrix UW = zeros(npoints, ncp); for i=1:npoints % npoints: number of data points for j=1:ncp % ncp: number of control points UW(i,1+(j-1)*ncpw:ncpw+(j-1)*ncpw)=U(i,j)*W(1:ncpw,i); % U*W end end % Calculate the control points CX=UW\QX; CY=UW\QY; CZ=UW\QZ; % Rearrange the control points into matrix form for i=1:ncp CXX(i,1:ncpw)=CX(1+(i-1)*ncpw:ncpw+(i-1)*ncpw,1); CYY(i,1:ncpw)=CY(1+(i-1)*ncpw:ncpw+(i-1)*ncpw,1); CZZ(i,1:ncpw)=CZ(1+(i-1)*ncpw:ncpw+(i-1)*ncpw,1); end %% STEP 2. Generate surface points %% U matrix for j=1:npoints2; u_generated(j)=(j-1)/(npoints2-1)*no_of_segments; end
419
u2=u_generated; % Creat new w coordinates for j=1:npoints3; w_generated(j)=(j-1)/(npoints3-1)*no_of_segments_w; end w2=w_generated; % Reset matrices NA2_matrix=[];N2_matrix=[];NAw2_matrix=[];Nw2_matrix=[];UW2_matrix=[]; U2_matrix=[];W2_matrix=[]; for j=1:npoints2 % new u(j) from u(i) to u(npoints2) % Calculate basis fucntion N(i,1) for each u for i=1:n+2 if i<k NA2_matrix(i,1)=0; else if u2(j)>=t(i) && u2(j)<t(i+1) NA2_matrix(i,1)=1; else if u2(j)==t(i) && u2(j)==t(i+1) NA2_matrix(i-1,1)=1;NA2_matrix(i,1)=0; else NA2_matrix(i,1)=0; end end end end N2_matrix(1:n+1,1)=NA2_matrix(1:n+1,1); % Calculate basis fucntion N(i,k) for each u; i is from 2 to k; for m=2:k for i=1:n+1 if t(i+m-1)-t(i)==0 p1=0; else p1=(u2(j)-t(i))/[t(i+m-1)-t(i)]*N2_matrix(i,m-1); end if t(i+m)-t(i+1)==0 p2=0; else p2=[t(i+m)-u2(j)]/[t(i+m)-t(i+1)]*N2_matrix(i+1,m-1); end N2_matrix(i,m)=p1+p2; end end U2_matrix(j,1:n+1)=N2_matrix(1:n+1,k); end %% W matrix % Calculate basis functions for each w. w(1) to w(npoints3) for e=1:npoints3 %w(e) % Calculate basis functions N(i,1) for each w for i=1:nw+2
420
if i<kw NAw2_matrix(i,1)=0; else if w2(e)>=tw(i) && w2(e)<tw(i+1) NAw2_matrix(i,1)=1; else if w2(e)==tw(i) && w2(e)==tw(i+1) NAw2_matrix(i-1,1)=1;NAw2_matrix(i,1)=0; else NAw2_matrix(i,1)=0; end end end end Nw2_matrix(1:nw+1,1)=NAw2_matrix(1:nw+1,1); % Calcutlate N(i,k) for each w;
for m=2:kw % k is from 2 to k;
% Calcutlate N(i,k) for each w with k fixed;i is from 1 to n+1; for i=1:nw+1 if tw(i+m-1)-tw(i)==0 p1w=0; else p1w=(w2(e)-tw(i))/[tw(i+m-1)-tw(i)]*Nw2_matrix(i,m-1); end if tw(i+m)-tw(i+1)==0 p2w=0; else p2w=[tw(i+m)-w2(e)]/[tw(i+m)-tw(i+1)]*Nw2_matrix(i+1,m-1); end Nw2_matrix(i,m)=p1w+p2w; end end W2_matrix(1:nw+1,e)=Nw2_matrix(1:nw+1,kw); end %% Surface points k_1=0; P_surf=zeros(npoints3*npoints2,3); for j=1:npoints3 for i=1:npoints2 k_1=k_1+1; FX=U2_matrix(i,:)*CXX*W2_matrix(:,j); FY=U2_matrix(i,:)*CYY*W2_matrix(:,j); FZ=U2_matrix(i,:)*CZZ*W2_matrix(:,j); P_surf(k_1,:)=[FX FY FZ]; end end
421
2.2 Probe path calculation
2.2.1 Data preparation
The main Matlab function gathers user inputs and prepares data for calculation in the sub-function.
function CalculateUSToolPath_generalToolPath2(sectionInfo,holeInfo,laserInfo,toolPathSaveFile) % Load section data deltaZ = 2; axisNo = 3; if ischar(sectionInfo) sectionCell = cell(1,nos); [~,~,ext] = fileparts(sectFile); if strcmp(ext, '.mat') load(sectFile); else sectionCell=xlsread(sectFile,1); sectionCell = FuncUSToolPath_matrix2Cell(sectionCell, axisNo, deltaZ); end else sectionCell = sectionInfo; end % read hole center position if ischar(holeInfo) [~,~,ext] = fileparts(holePosFile); if strcmp(ext,'.mat') load(holePosFile); holePosCell = holeCentre; else holePosCell = xlsread(holePosFile); end else holePosCell = holeInfo; end if ~iscell(holePosCell) holePosCell = FuncUSToolPath_matrix2Cell(holePosCell, axisNo, deltaZ); end % read laser scan result if ischar(laserInfo) [~,~,ext] = fileparts(laserInfo); if strcmp(ext, '.mat') load(laserInfo); else [a,b,c,d] = FuncUSToolPath_readLaserScan(laserInfo); P_scan=[a,b,c+d]; end else P_scan = laserInfo; end % read toolPathSaveFile [~,fName,ext] = fileparts(toolPathSaveFile);
422
if ~strcmp(ext, '.mat') toolPathSaveFile = fName+'.mat'; end doCalculation(sectionCell,holePosCell,P_scan,toolPathSaveFile);
2.2.2 The main path calculation function
This Matlab function gathers data and uses sub-functions for specific calculations. Results from the
sub-functions are collected and progressively generates an ordered probe path for the entire cross
section.
function doCalculation(sectionCell,holeCell,P_scan,toolPathSaveFile) %Inputs % sectionCell is an excel file with the section data. % holeCell is an excel file with the hole positions % P_scan is a txt file with the laser scans from the robot %% Customer setting – predefined transformation matrix trans_predefined = [-0.164255972665765,0.00250922612179932,0.986414557489855,582.408679234385;0.985830874054514,0.0349074325108971,0.164069981765176,-588.319614736541;-0.0340215109092956,0.999387399830407,-0.00820742686119589,49.5114250365749;0,0,0,1]; % Bspline parameters nc_u=25; % number of control points for fitted Bspline curves in u direction nc_w=10; ku=4; % degree of each segment in Bspine curves in u direction % Toolpath d_w=3; % degree of each segment in Bezier curves in w direction ac=0.2; % pitch used to find the blade point which has shortest distance with hole gb=10; % number of point go back when setting the inspection region gf=10; % number of point go foward when setting the inspection region wRange = 20; % extract points that are within wRange surrounding a path point. % Localisation kw=3; % Degree of B-spline surface in the w direction nnu=500; % Number of genorated points in the u direction nnw=500; % Number of genorated points in the w direction % ICP parameters tou=0.000001; d_min=0.005; k_max=100; n_o_app=1; % Evaluate data sizes nos = size(sectionCell,2); % number of sections noh = size(holeCell{1},1); % number of cooling channels nosM = size(holeCell, 2); % number of sections to be measured %% Fit a B-spline surface to measured points
423
[ P_surf, ~, ~, ~ ] = FuncBspline_Main(nos,nc_u,nc_w,ku,kw,nnu,nnw,sectionCell); for i = 1:nnw P_surfCell{i} = P_surf((i-1)*nnu+1:i*nnu,:); listOfZ(i) = mean(P_surfCell{i}(:,3)); end %% Define inspection region for each cooling hole centre % Find the closest points on Bspline curve in u direction for each hole centre % and take its foward and back points, the number of points could be set by % changing gb and gf in customer setting n=1; po=zeros(nosM,noh); for isec=1:nosM hole = holeCell{isec}; s = size(hole); if s(2) == 4 radius{isec} = hole(:,4); hole(:,4) = []; end curZ = mean(hole(:,3)); zM(isec) = curZ; diffZ = abs(listOfZ - curZ*ones(1, nnw)); secList(isec) = find(min(diffZ)==diffZ,1); curP = P_surfCell{secList(isec)}; curNop = size(curP,1); x=curP(:,1); y=curP(:,2); z=curP(:,3); % Fit a B-spline curve to these curP, so that this curve can be % differentiated to find tangent vectors [fitP,~,u,ctrlP,knotV]=FuncBspline_curve(curP,nc_u,ku,nnu); uCell{isec} = u; ctrlPCell{isec} = ctrlP; knotVCell{isec} = knotV; pMCell{isec} = fitP; x=fitP(:,1); y=fitP(:,2); z=fitP(:,3); for ihole=1:noh d = zeros(curNop,1); for k=1:curNop % Find the distance between the hole position and all points % in this section d(k,:)=sqrt((hole(ihole,1)-x(k))^2+(hole(ihole,2)-y(k))^2 +(hole(ihole,3)-z(k))^2); end % Find the point po on the Bspline curve which is closest to the % hole centre if isec==1 [d_min(n),po(isec,ihole)]=min(d); %po(isec,ihole)=po(isec,ihole)+(isec-1)*nop; else d_dummy=d;
424
[d_min(n),po(isec,ihole)]=min(d_dummy); %po(isec,ihole)=po(isec,ihole)+(isec-1)*nop; while po(isec,ihole)<(po(isec-1,ihole)-8+curNop) || po(isec,ihole)>(po(isec-1,ihole)+8+curNop) [d_min(n),po(isec,ihole)]=min(d_dummy); d_dummy=[d_dummy(1:(po(isec,ihole)-1),:); d_dummy((po(isec,ihole)+1):end,:)]; po(isec,ihole)=find(d==d_min(n)); po(isec,ihole)=po(isec,ihole)+(isec-1)*curNop; end end po1=po(isec,ihole)-gb; % po1 is the foward point po2=po(isec,ihole)+gf; % pow is the back point if po1 < 1 po1 = 1; end if po2 > nnu po2 = nnu; end pc(n,:)=[po1,po2]; % the curve between po1 and po2 is the inspection region n=n+1; end end %% Re-divide the inspection region for each hole according to required pitch and calculate tangent vectors % Change the order of pc from section-by-section to channel-by-channel n=1; for ihole=1:noh for isec=1:nosM rpc{isec}(n,:)=pc(ihole,:); d_dist{isec}(n)=d_min(ihole); n=n+1; end end if (s(2)==4) for isec = 1:nosM d_dist{isec} = d_dist{isec} - radius{isec}; end end g=1; l_s=1; ihole_independant=1; % Acquire the differential equation of Bspline regarding u in Matlab Symbolic form [D]=FuncBspline_curveDiff(ku,knotV,nc_u); for ihole=1:noh pg_hole =[]; ug_hole =[]; u_vector =[]; w_vector =[];
425
dis = zeros(nos,1); % Calculate the size of the inspection region for one wall thickness in each section for isec=1:nosM p1=pMCell{isec}(rpc{isec}(ihole,1),:); p2=pMCell{isec}(rpc{isec}(ihole,2),:); dis(isec,:)=norm(p1-p2); end % Select the longest inspection region and generate new points inbetween the two points for each hole n_np=ceil(max(dis)/ac); % Calculate tangent vectors in u direction for isec=1:nosM u1=uCell{isec}(rpc{isec}(ihole,1)); u2=uCell{isec}(rpc{isec}(ihole,2)); % Reorder u1 and u2, so that u1 is smaller than u2 if u1>u2 a=u1; u1=u2; u2=a; end span=(u2-u1)/n_np; [pn,un,u_n,ln]=FuncUSToolPath_redivide(ku,ctrlPCell{isec},knotVCell{isec},span,u1,u2); % Substitute u values to evaluate the differential equation acquired eariler. [u_v]=FuncBspline_curveDiffPart2(ku,knotVCell{isec},u_n,ctrlPCell{isec},D); pg_hole((isec-1)*ln+1:isec*ln,:)=pn; ug_hole((isec-1)*ln+1:isec*ln,:)=un; u_vector((isec-1)*ln+1:isec*ln,:)=u_v/norm(u_v); end % Calculate tangent vectors in w direction [w_vector, Q] = FuncUSToolPath_tangentVw(P_surf, pg_hole, wRange, u_vector); QCell{ihole_independant} = Q{ceil(size(Q,2)/2)}; pg(g:ln*nosM+g-1,:)=pg_hole; ug(g:ln*nosM+g-1,:)=ug_hole; ug_vector(g:ln*nosM+g-1,:)=u_vector; wg_vector(g:ln*nosM+g-1,:)=w_vector; span_rec{l_s}=g:(ln*nosM+g-1); g=g+ln*nosM; l_s=l_s+1; ihole_independant=ihole_independant+1; end %% Calculate the normal vectors and probe path for j=1:length(pg); v_normol=cross(ug_vector(j,:),wg_vector(j,:)); % Calculate the verticle vecter in both of u and w directon unit_v(j,:)=v_normol/norm(v_normol); % Unit is the verticle vecter with unit length Prob_path(j,1)=pg(j,1);
426
Prob_path(j,2)=pg(j,2); Prob_path(j,3)=pg(j,3); end %% Sort tool paths n=0; for ihole=1:noh for isec=1:nosM n=n+1; span=span_rec{1,ihole}; [~,b]=size(span); b_p_h=b/nosM; span_sec=span(((isec-1)*b_p_h+1):(isec*b_p_h)); id_m=[ones(b_p_h,1)*isec ones(b_p_h,1)*ihole]; holes_tool_path{:,:,ihole,isec}=[Prob_path(span_sec,:) id_m unit_v(span_sec,:) ones(b_p_h,1)*d_dist{isec}(ihole)]; end end k=0; for isec=1:nosM for ihole=1:noh k=k+1; tool_path_ord{k}=holes_tool_path{:,:,ihole,isec}; end end % Reverse vectors if necessary i=1;j=1; for ihole = 1:k xyz = tool_path_ord{ihole}(:,1:3); normalV = tool_path_ord{ihole}(:,6:8); try hole = holeCell{i}(j,:); j=j+1; catch i=i+1;j=1; hole = holeCell{i}(j,:); end v1 = xyz + normalV; dist1 = sqrt((hole(1)-v1(:,1)).^2+(hole(2)-v1(:,2)).^2+(hole(3)-v1(:,3)).^2); dist2 = sqrt((hole(1)-xyz(:,1)).^2+(hole(2)-xyz(:,2)).^2+(hole(3)-xyz(:,3)).^2); check = dist2 - dist1; % check = check./abs(check); % if check was negative, now -1, otherwise 1. normalV = normalV.*[check check check]; tool_path_ord{ihole}(:,6:8)=normalV; end %% Plot toolpath % figure(3) figure; hold on; for i=1:nosM
427
plot3(pMCell{i}(:,1),pMCell{i}(:,2),pMCell{i}(:,3)) plot3(holeCell{i}(:,1),holeCell{i}(:,2),holeCell{i}(:,3),'or') curSec = secList(i); colorcode = '-y'; inc = 2; X = zeros(length(P_surfCell{curSec}(:,1)),1); Y = zeros(length(P_surfCell{curSec}(:,1)),1); Z = zeros(length(P_surfCell{curSec}(:,1)),1); if curSec + inc*2 < length(P_surfCell) X(:,end+1) = P_surfCell{curSec+inc*2}(:,1); Y(:,end+1) = P_surfCell{curSec+inc*2}(:,2); Z(:,end+1) = P_surfCell{curSec+inc*2}(:,3); end if curSec + inc*1 < length(P_surfCell) X(:,end+1) = P_surfCell{curSec+inc*1}(:,1); Y(:,end+1) = P_surfCell{curSec+inc*1}(:,2); Z(:,end+1) = P_surfCell{curSec+inc*1}(:,3); end X(:,end+1) = P_surfCell{curSec}(:,1); Y(:,end+1) = P_surfCell{curSec}(:,2); Z(:,end+1) = P_surfCell{curSec}(:,3); if curSec - inc*1 > 0 X(:,end+1) = P_surfCell{curSec-inc}(:,1); Y(:,end+1) = P_surfCell{curSec-inc}(:,2); Z(:,end+1) = P_surfCell{curSec-inc}(:,3); end if curSec - inc*2 > 0 X(:,end+1) = P_surfCell{curSec-inc*2}(:,1); Y(:,end+1) = P_surfCell{curSec-inc*2}(:,2); Z(:,end+1) = P_surfCell{curSec-inc*2}(:,3); end X(:,1) = [];Y(:,1) = [];Z(:,1) = []; surf(X,Y,Z,'EdgeColor','none'); end my_colour = [71 188 17] ./ 255; for i=1:size(tool_path_ord,2) curMat = tool_path_ord{i}; %plot3(curMat(:,1),curMat(:,2),curMat(:,3),'*','Color',my_colour) pv1 = curMat(:,1:3)'; nv = curMat(:,6:8)'; pv2 = pv1 - wRange/4*nv; xv = [pv1(1,:); pv2(1,:); nan([1, size(pv1,2)])]; yv = [pv1(2,:); pv2(2,:); nan([1, size(pv1,2)])]; zv = [pv1(3,:); pv2(3,:); nan([1, size(pv1,2)])]; plot3(xv(:),yv(:),zv(:),'Color', my_colour); end axis equal;axis tight;grid on;box on; view(0,90); save('thesis_toolpathPlotter.mat', 'nosM', 'pMCell', 'holeCell', 'curSec', 'secList', 'P_surfCell', 'tool_path_ord', 'wRange') %% Load laser measurments for localisation % ICP to find the transformation matrix if P_scan~=0 trans_init=0; [ trans,~] = FuncICP_Main(P_scan',P_surf',tou,d_min,k_max,n_o_app,trans_init); else trans = trans_predefined;
428
end % Save calculated data for next use save(toolPathSaveFile,'tool_path_ord','P_surf','trans','x','y','z')
2.2.3 Tangent vectors in u direction
Instead of differentiating a B-spline surface, it was found it is sufficiently accurate to generate
tangent vectors by differentiating a B-spline curve in the u direction and a Bezier curve in the w
direction. The differentiation of a B-spline curve is divided into three parts. The first part calculates
a differential equation in form of Symbolics. In the second part, u coordinates with equal spacing
are generated within an inspection region. In the third part, u values are substituted into the Symbolic
equation to calculate tangent vectors.
Part 1 FuncBspline_curveDiff
function [D]=FuncBspline_curveDiff(d,t,nc) k=d+1; n=nc-1; for i=1:1:n-k+2 ut(i)=i-1+0.5; end [utr, utc]=size(ut); NA=sym(zeros());N=sym(zeros());U=sym(); for j=1:utc for i=1:n+2 if i<k NA(i,1)=0; else if ut(j)>=t(i) && ut(j)<t(i+1) NA(i,1)=1; else if ut(j)==t(i) && ut(j)==t(i+1) NA(i-1,1)=1;NA(i,1)=0; else NA(i,1)=0; end end end end N(1:n+1,1)=NA(1:n+1,1); for m=2:k syms u for i=1:n+1 if t(i+m-1)-t(i)==0 p1=0; else p1=(u-t(i))/[t(i+m-1)-t(i)]*N(i,m-1); end if t(i+m)-t(i+1)==0
429
p2=0; else p2=(t(i+m)-u)/(t(i+m)-t(i+1))*N(i+1,m-1); end N(i,m)=p1+p2; end end U(j,1:n+1)=N(1:n+1,k);
D=diff(U); End
Part 2 FuncUSToolPath_redivide
function
[Fit,u_new,un,l]=FuncUSToolPath_redivide(degreeOfCurve,ControlPoints,knotV,spacing,u1,u2) k=degreeOfCurve+1; nc=length(ControlPoints); n=nc-1; un=u1:spacing:u2; npoints=length(un); for j=1:npoints for i=1:n+2 if i<k NA(i,1)=0; else if un(j)>=knotV(i) && un(j)<knotV(i+1) NA(i,1)=1; else if un(j)==knotV(i) && un(j)==knotV(i+1) NA(i-1,1)=1;NA(i,1)=0; else NA(i,1)=0; end end end end N(1:n+1,1)=NA(1:n+1,1); for m=2:k for i=1:n+1 if knotV(i+m-1)-knotV(i)==0 p1=0; else p1=(un(j)-knotV(i))/(knotV(i+m-1)-knotV(i))*N(i,m-1); end if knotV(i+m)-knotV(i+1)==0 p2=0; else p2=(knotV(i+m)-un(j))/(knotV(i+m)-knotV(i+1))*N(i+1,m-1); end N(i,m)=p1+p2;
430
end end U1(j,1:n+1)=N(1:n+1,k); end Fit=U1*ControlPoints; l=length(Fit); for i=1:length(un) u_new(i,1)=un(1,i); end
Part 3 FuncBspline_curveDiffPart2
function u_vector = FuncBspline_curveDiffPart2(d,t,u2,C, D) npoints2=length(u2); nc=length(C); n=nc-1; k=d+1; D2=sym(); D3=[]; du=[]; u1=u2; syms u for j=1:npoints2 %%%% new u(j) from u(i) to u(npoints2) a=u1(j); for i=k:n+2 %%%[0,1,2,3]; if u1(j)>=t(i) && u1(j)<t(i+1) D2=D(i-k+1,1:nc); else if u1(j)==t(i) && u1(j)==t(i+1)%% D2=D((i-1)-k+1,1:nc); else end end end D3=[D3;D2]; E=subs(D2,u,a); du=[du;E]; D2=sym(); end u_vector=du*C; u_vector = eval(u_vector);
2.2.4 Tangent vectors in w direction
Part 1 The main function - FuncUSToolPath_tangentVw
function [wvector, QCell] = FuncUSToolPath_tangentVw(psurf, pathP, r, uvector) % Inputs % psurf, surface points % pathP, path points % r, radius of the sphere % uvector, the tangent vector in u direction at pathP
431
% Output % QCell, extracted points for i = 1:size(pathP,1) clear angle qmA p = pathP(i,:); uv = uvector(i,:); % Extract all points inside a spherical area of radius 1 surrounding p dist = sqrt((p(1)-psurf(:,1)).^2 + (p(2)-psurf(:,2)).^2 + (p(3)-psurf(:,3)).^2); Q = [psurf(dist<=r,:) dist(dist<=r)]; qbound = Q(Q(:,4)>=0.8*r,1:3); % Search for a point, qs, in psurr which makes an angle of 90 degree or % closest to 90 degree with the u vector, and this point has to be at % least 0.8r away from pathP. % psurr = sortrows(psurr',2)'; angle = zeros(1,size(qbound,1)); for j = 1:size(qbound,1) pp0 = qbound(j,:) - p; angle(j) = atan2(norm(cross(pp0,uv)), dot(pp0,uv)); end qs = qbound(min(abs(angle-pi/2))==abs(angle-pi/2),:); % Extend the segment in both directions, so that the length of the % segment is 2r and p is the mid-point and generate lots of points on % this segment. vs = (qs-p)/norm(qs - p); qs1 = p-r*vs; qs2 = p+r*vs; spacing = norm(psurf(1,:)-psurf(2,:)); % check the spacing between each surface point nopOnSeg = ceil(norm(qs1-qs2)/spacing) * 2; % apply half of the spacing to generate points on the segment. spacing = norm(qs1-qs2)/nopOnSeg; qsA = repmat(qs1, nopOnSeg, 1) + spacing*[1:nopOnSeg]'*vs; % Find the point, qm, in Q makes the minimum distance to each point in qsA. for j = 1:size(qsA,1) dist = sqrt((qsA(j,1)-Q(:,1)).^2 + (qsA(j,2)-Q(:,2)).^2 + (qsA(j,3)-Q(:,3)).^2); qmA(j,:) = Q(min(dist)==dist,1:3); end % Delete repeated points qmA = unique(qmA,'rows'); % Check whether the path point is in the extracted point set qmA if ~ismember(p, qmA,'rows') [rowqmA,~] = size(qmA); p_ = ones(rowqmA,1)*p; dp_ = qmA - p_; dist = sqrt(dp_(:,1).^2 + dp_(:,2).^2 + dp_(:,3).^2); pathPoint = qmA(min(dist)==dist,1:3); else pathPoint = p; end
432
% Fit a Bezier curve to qmA and extract w value at pathP k = 2; [~,CtrlP,wP]=FuncUSToolPath_bezierCurve(qmA,k,pathPoint); [w_v]=FuncBezier_curveDiff(wP,CtrlP); w_v = eval(w_v); wvector(i,:) = w_v/norm(w_v); QCell{i} = Q; end
Part 2 FuncUSToolPath_bezierCurve
function [fitP,CtrlP,wPathP]=FuncUSToolPath_bezierCurve(dataPoints,k,pathP) x=dataPoints(:,1); y=dataPoints(:,2); z=dataPoints(:,3); nc=k+1; lp=length(dataPoints); %%calculate value of u l_sum=0; l_wweight(1)=0; wPathP = 0; s=size(pathP,1); s2 = 0; for j= 1:lp-1 l_p=((x(j+1)-x(j)).^2+(y(j+1)-y(j)).^2+(z(j+1)-z(j)).^2).^1/2; l_sum=l_sum+l_p; l_wweight(j+1,:)=l_sum; if s~=s2 for i = 1:s if isequal([x(j+1),y(j+1),z(j+1)], pathP(i,:)) wPathP(i) = l_wweight(j); s2 = size(wPathP(i)); continue end end end end w(1:lp,:)=l_wweight/l_sum; wPathP = wPathP./l_sum; B=zeros(lp,nc); for i=1:lp for j=0:k CC=nchoosek(k,j); B(i,j+1)=CC*w(i)^j*(1-w(i))^(k-j); end end CX=B\x; CY=B\y; CZ=B\z; CtrlP=[CX,CY,CZ]; fitP = B*CtrlP;
Part 3 FuncBezier_curveDiff
function [w_v]=FuncBezier_curveDiff(wvalue,CtrlP) nc=length(CtrlP); n=nc-1; lw=length(wvalue);
433
syms w D=sym(zeros(1,n)); for j=0:n cc=nchoosek(n,j); D(j+1)=cc*j*w^(j-1)*(1-w)^(n-j) - cc*w^j*(n-j)*(1-w)^(n-j-1); end for j=1:lw a=wvalue(j); Dw(j,:)=subs(D,w,a); end w_v=Dw*CtrlP;
434
2.3 Localisation
2.3.1 Initialisation
In the initialisation section, user data are loaded and arguments are parsed.
function [ trans,d_avg, icp ] = FuncICP_Main_2(P_mp,P_surf,varargin) % P_mp smaller set of points inp = inputParser; inp.addRequired('P_mp', @(x)isreal(x) && size(x,1) == 3); inp.addRequired('P_surf', @(x)isreal(x) && size(x,1) == 3); inp.addOptional('k_max', 100, @(x)x > 0); inp.addParameter('InitialTrans', eye(4), @(x)isreal(x) && size(x) == [4,4]); inp.addParameter('ConvergeCrit', 0.000001, @(x)x >= 0); inp.addParameter('MinE', 0.005, @(x)x >= 0); inp.addParameter('NoApproach', 1, @(x)x > 0); validMinimize = {'SVD','Quaternion'}; inp.addParameter('Minimize', 'Quaternion', @(x)any(strcmpi(x,validMinimize))); inp.parse(P_mp,P_surf,varargin{:}); arg = inp.Results; clear('inp'); %% terminationInfo = {'Minimum error reached!','Convergence reached!',... 'Maximum number of iteration...' }; rot_map = [180,0,0; 0,180,0; 0,0,180;]; if arg.NoApproach > size(rot_map,1) arg.NoApproach = size(rot_map,1)+1; end %% The ICP startes here, where some initial parameters are defined [~,N]=size(P_mp); if arg.InitialTrans==0 arg.InitialTrans=eye(4); end % Center of gravity of both the surface and the measured points are % calculated and the vector between them mu_p_mp=sum(P_mp,2)/size(P_mp,2); mu_p_surf= sum(P_ surf,2)/size(P_ surf,2; % The length scale is found l_scale=zeros(1,3); for i=1:3 l_scale(i)=max(P_surf(i,:))-min(P_surf(i,:)); end L_scale=max(l_scale); e=1/0;
435
k_count=1; k_to_t=1; converge=0; k_next=-1; k=0; d=1/0;
2.3.2 Multi-approach algorithm
In this section, the multi-approach ICP algorithm is implemented.
while d(end)>=arg.MinE && k_count<=arg.NoApproach clear qr qt timeCost = 0; terminateCondi_ = 0; nextProgressReport = 0; d=1/0; % d is reset for every approach Rot_init(:,:,1,k_count)=eye(3); % Initial rotation matrix created Rot_init(:,:,2,k_count)=eye(3); % Initial rotation matrix created Rot_init(:,:,3,k_count)=eye(3); % Initial rotation matrix created P=P_mp; % Measured points are reset for every approach if k_count==1 % Initial alignment error is not changed if this is the first approach T_rand(:,k_count)=[0;0;0]; P=arg.InitialTrans*[P;ones(1,N)]; P=P(1:3,:); else curRot = rot_map(k_count-1,:); theta_x=curRot(1); R_x=FuncICP_rotMat(theta_x,'x','d'); theta_y=curRot(2); R_y=FuncICP_rotMat(theta_y,'y','d'); theta_z=curRot(3); R_z=FuncICP_rotMat(theta_z,'z','d'); T_rand(:,k_count)=[(rand-0.5)*L_scale;(rand-0.5)*L_scale;(rand-0.5)*L_scale]; P=P-[mu_p_mp(1)*ones(1,N);mu_p_mp(2)*ones(1,N);mu_p_mp(3)*ones(1,N)]; Rot_init(:,:,1,k_count)=Rot_init(:,:,1,k_count)*R_x; Rot_init(:,:,2,k_count)=Rot_init(:,:,2,k_count)*R_y; Rot_init(:,:,3,k_count)=Rot_init(:,:,3,k_count)*R_z; P=R_x*P; P=R_y*P; P=R_z*P;
P=P+repmat([T_rand(1,k_count)+mu_p_surf(1);T_rand(2,k_count)+mu_p_surf(2);T_rand(3,k_count)+mu_p_surf(3)],1,N);
436
end while converge<2 && d(end)>arg.MinE && k<arg.k_max tic; k=k+1; % Calculate the corresponding closest points [ X,~,~] = FuncICP_closestPoint_m(P,P_surf); % Calculate centres of gravity for both sets of points mu_p=sum(P,2)/size(P,2); mu_x=sum(X,2)/size(X,2); % Calculate the cross-covariance matrix M = size(P,2); P_ = P - repmat(mu_p, 1, M); X_ = X - repmat(mu_x, 1, M); Sigma = P_*transpose(X_); switch arg.Minimize case 'SVD' [U,~,V]=svd(sigma); % Calculate SVD of the cross-covariance matrix qr_ = V*diag([1 1 det(U*V')])*U'; % Compute the optimal rotation matrix case 'Quaternion' [qr_] = Quat(sigma); end qr(:,:,k)=qr_; % Compute the optimal translation vector qt(:,k)=mu_x-qr(:,:,k)*mu_p; % Transform the measured point set P=qr(:,:,k)*P + repmat(qt(:,k),1,size(P,2)); % Calculate the mean error d(k)=sum(sum((P-X).^2).^0.5)/N; % Convergence check if k==1 e=d(k); else e=abs(d(k)-d(k-1)) ; end k_conv=k; if e<arg.ConvergeCrit converge=converge+1 ; if k_conv==(k_next+1) && converge==2 terminateCondi_ = 2; % Iteration Termination condition: convergence reached. elseif converge==2 converge=0; k_next=k_conv; else k_next=k_conv; end
437
end timeCost(k) = toc; if k/arg.k_max>nextProgressReport; disp(['k count: ',num2str(k),'/',num2str(arg.k_max),... '; Approach: ',num2str(k_count),'/',num2str(arg.NoApproach),... '; deviation = ',num2str(round(d(k),6))]); timeEst = mean(timeCost)*(arg.k_max-k+(arg.NoApproach-k_count)*arg.k_max)/60; disp(['Estimated time remaining: ',num2str(round(timeEst,2)),'min']); nextProgressReport = nextProgressReport+0.33; end end % Iteration Termination condition: minimum error reached if d(end)<= arg.MinE terminateCondi_ = 1; disp(['Minimum error reached!',num2str(d(end))]); elseif terminateCondi_~= 2 % Iteration Termination condition: if not converged terminateCondi_ = 3; % Iteration Termination condition: maximum iteration reached else disp(['Convergence reached!',num2str(d(end))]); end k_col(k_count)=k; % Number of iterations of the approach collected % Transolation matrix of the approach collected Trans_collect{k_count}=qt(:,:); % Rotational array of the approach collected Rotation_collect{k_count}=qr(:,:,:); % The final mean error of the apporach collected d_col(k_count)=d(end); icp.d{k_count}=d; icp.terminateCondi{k_count} = terminationInfo{terminateCondi_}; icp.timeCost_col{k_count}=timeCost; % Parameters for the next approach set k_count=k_count+1; k=0; e=1/0; converge=0; end %% The following section calcualtes the best transformation matrix found % The best aproach is found by selecting the set corresponding to the % minimum mean error [d_avg, I]=min(d_col); % Optimal transforamtion matrix initiated trans(:,:)=eye(4); num_of_iter=k_col(I); Trans=cell2mat(Trans_collect(I)); Rotation=cell2mat(Rotation_collect(I)); for i=0:(num_of_iter-1) trans(:,:)=trans(:,:)*[eye(3) Trans(:,(num_of_iter-i));0 0 0 1];
438
trans(:,:)=trans(:,:)*[Rotation(:,:,(num_of_iter-i)) zeros(3,1);0 0 0 1]; end if I==1 trans(:,:)=trans(:,:)*arg.InitialTrans; else trans(:,:)=trans(:,:)*[eye(3) (T_rand(:,I)+mu_p_surf);0 0 0 1]; trans(:,:)=trans(:,:)*[Rot_init(:,:,1,I) zeros(3,1);0 0 0 1]; trans(:,:)=trans(:,:)*[Rot_init(:,:,2,I) zeros(3,1);0 0 0 1]; trans(:,:)=trans(:,:)*[Rot_init(:,:,3,I) zeros(3,1);0 0 0 1]; trans(:,:)=trans(:,:)*[eye(3) mu_p_mp*(-1);0 0 0 1]; end icp.Trans=Trans_collect; icp.Rot=Rotation_collect; end
2.3.3 Quaternion method
Subfunction for solving rotational matrix using the quaternion method.
function [R] = Quat(Sigma) % The anti-symmetric part of the cross covariance matrix is found Delta=Sigma-Sigma'; % The cyclic components are found from the anti-symmetric matrix Delta=[Delta(2,3) Delta(3,1) Delta(1,2)]'; % The Q matrix is constructed B=Sigma+Sigma'-trace(Sigma)*eye(3); Q=[trace(Sigma) Delta';Delta B]; % Eigen vectors and eigenvalues are found [eig_Vec,eig_Val]=eig(Q); % The maximum eigenvalue is found C_1=max(eig_Val); [~,C_2]=max(C_1); % The unit quaternion vector is defined as the eigenvector % correspoinding to the maximum eigenvalue q=eig_Vec(:,C_2); % The optimum rotational matrix is found R=[q(1)^2+q(2)^2-q(3)^2-q(4)^2 2*(q(2)*q(3)-q(1)*q(4)) 2*(q(2)*q(4)+q(1)*q(3)); 2*(q(2)*q(3)+q(1)*q(4)) q(1)^2-q(2)^2+q(3)^2-q(4)^2 2*(q(3)*q(4)-q(1)*q(2)); 2*(q(2)*q(4)-q(1)*q(3)) 2*(q(3)*q(4)+q(1)*q(2)) q(1)^2-q(2)^2-q(3)^2+q(4)^2]; end
2.3.4 Closest point
A simple function uses Matlab built-in k-d tree algorithm to find the closest points.
function [ closest_points,mindist,match] = FuncICP_closestPoint_m(meas_points,surf_points) % find the closest point in p for each point in pt.
439
% i.e. pt covers a smaller area. kdOBJ = KDTreeSearcher(transpose(surf_points)); [match, mindist] = match_kDtree(meas_points,kdOBJ); closest_points = surf_points(:,match); function [match, mindist] = match_kDtree(p, kdOBJ)
[match, mindist] = knnsearch(kdOBJ,transpose(p));
440
2.4 Path grouping
2.4.1 The main function
After user data are read and arguments are parsed, the main function as presented below starts to
localise the specified probe path to the coordinate system of the inspection machine using the
localisation method introduced in the previous section. After the localisation, path grouping is started
in sub-functions. The results are collected at the end of the main function and saved in a text file.
function CalculateUSToolPath(toolPathLibInfo, laserInfo, usToolPath,rot_r,varargin) inp = inputParser; inp.addRequired('toolPathLibInfo'); inp.addRequired('laserInfo'); inp.addRequired('usToolPath'); inp.addRequired('rot_r'); inp.addParameter('ProofPlot', true, @(x)isbool(x)); inp.addParameter('SaveRotationFile', false, @(x)isbool(x)); inp.addParameter('ReadRotationFile', false, @(x)isbool(x)); inp.addParameter('DeleteRotationFile', false, @(x)isbool(x)); inp.addParameter('Minimize', 'Quaternion', @(x)any(strcmpi(x,validMinimize))); inp.parse(toolPathLibInfo,laserInfo,usToolPath, rot_r, varargin{:}); arg = inp.Results; clear('inp'); % Load toolPathFile [~,name,ext] = fileparts(toolPathLibInfo); if ~strcmp(ext, '.mat') toolPathLibInfo = name+'.mat'; end load(toolPathLibInfo); if trans == 0 ICP_n_o_app=10; doProffPlot = true; else ICP_n_o_app=1; end % Read laser scan result if ischar(laserInfo) [~,~,ext] = fileparts(laserInfo); if strcmp(ext, '.mat') load(laserScanFile); else [a,b,c,d] = FuncUSToolPath_readLaserScan(laserInfo); P_scan=[a,b,c+d]; end else P_scan = laserInfo; end % Deal with rotation file operation
441
rotationFile='MLData_RotDataFile_1.mat'; if arg.DeleteRotationFile if exist(rotationFile,'file') delete(rotationFile) end end [~,name,ext] = fileparts(laserInfo); if ~strcmp(ext, '.txt') toolPathLibInfo = name+'.txt'; end argpassed.save = arg.SaveRotationFile; argpassed.read = arg.ReadRotationFile; doCalculation(toolPathLibInfo, usToolPath, P_scan, argpassed, ICP_n_o_app, arg.ProofPlot ,rot_r, rotationFile); function doCalculation(toolPathLibInfo, usToolPath, P_scan, argpassed, ICP_n_o_app, doProofPlot,rot_r, rotationFile) %% Customer setting %%Input data structure and Bspline parameters sec=5;% sec is the number of sections for measured blade data nh=13; % Number of cooling channels load(toolPathLibInfo); %% Check for previouse rotations first_rot = 1; delta_theta = 0; if argpassed.read if ~exist(rotationFile,'file') first_rot = 1; delta_theta = 0; else load(rotationFile) if length(order_scan) < 2 msgbox('End of current scan session'); error('Terminated'); end order_scan = order_scan(2:end); delta_theta = theta_group(order_scan(1)); first_rot = 0; end end trans_theta = FuncUSToolPath_transRotInit( delta_theta ); %% Load laser measurments for localisation % ICP to find the transformation matrix tou=0.000001; d_min=0.005; k_max=100; trans_init=trans*trans_theta^-1; [ trans,d_avg ] = FuncICP_Main(P_scan',P_surf',tou,d_min,k_max,ICP_n_o_app, trans_init); [ P_surf ] = FuncUSToolPath_toHomoCord(P_surf,2); P_surf=(trans^-1*P_surf')';
442
P_surf=P_surf(:,1:3); xyz=[x y z]; [ xyz ] = FuncUSToolPath_toHomoCord(xyz,2); xyz=(trans^-1*xyz')'; xyz=xyz(:,1:3); x=xyz(:,1); y=xyz(:,2); z=xyz(:,3); %% Transform tool path [ tool_path_ord_1 ] = FuncUSToolPath_transProbePath( tool_path_ord,trans ); % set a color map notp = 0; for i = 1:size(tool_path_ord_1,2) notp = notp + size(tool_path_ord_1{i},1); end colorm = colormap(winter(notp)); icolor = 1; if doProofPlot figure;hold on;set(gcf,'Color',[1,1,1]); if length(P_surf)/500 == 500 pxx = reshape(P_surf(:,1),500,500); pyy = reshape(P_surf(:,2),500,500); pzz = reshape(P_surf(:,3),500,500); surf(pxx,pyy,pzz,'EdgeColor', 'none') plot3(P_scan(:,1),P_scan(:,2),P_scan(:,3),'+','MarkerSize',3,'Color',[0.2,0.2,0.2]); else plot3(P_surf(1:43:end,1),P_surf(1:43:end,2),P_surf(1:43:end,3),'.-r'); plot3(P_scan(:,1),P_scan(:,2),P_scan(:,3),'*b'); end for i=1:size(tool_path_ord_1,2) curMat = tool_path_ord_1{i}; %plot3(curMat(:,1),curMat(:,2),curMat(:,3),'*g') pv = curMat(:,1:3) - 4*curMat(:,7:9); for m=1:size(curMat,1) plot3([curMat(m,1) pv(m,1)],[curMat(m,2) pv(m,2)],[curMat(m,3) pv(m,3)],'Color',colorm(icolor,:)'); icolor = icolor+1; end end title(['Average deviation of ICP result = ', num2str(d_avg)]); grid on;axis equal;hold off;axis tight;view(180,0);xlabel('x');ylabel('y');zlabel('z');legend('B-spline surface','Laser points','Probe path') msgbox('Program paused. When inspection of the plot is done, press any key to continue...'); pause h = questdlg('Do you want to continue or terminate the program?','title','Continue','Terminate','Terminate') ; if strcmp(h, 'Terminate') error('Breaking out'); end end %% Group tool paths theta_robo_lim=63;
443
%load('temp_groupToolPath.mat'); if ~exist('order_scan','var') order_scan = 0; pathGrouping = 0; [ final_path_collect,order_scan,no_init_rot,theta_group,B, pathGrouping ] = FuncUSToolPath_groupToolPath( tool_path_ord_1,theta_robo_lim, pathGrouping); else [ final_path_collect,~,no_init_rot,~,B ] = FuncUSToolPath_groupToolPath( tool_path_ord_1,theta_robo_lim, pathGrouping); end %% Rotate tool paths [ final_path_collect_new,P_surf_rot,xyz,theta_rot ] = FuncUSToolPath_rotateToolPath(x,y,z,B,P_surf,final_path_collect,order_scan,no_init_rot,theta_group); %% Sort and assemble the tool paths [ path_output ] = FuncUSToolPath_sortAssemble( final_path_collect_new,sec,nh,order_scan,B,rot_r ); if first_rot==1 && theta_rot(order_scan(1))~=0 msg = ['Rotate ' num2str(-theta_rot(order_scan(1))) ' degrees and scan again. If this should not be the case, please review your settings or input files.']; h = questdlg([msg ' Do you want to continue or terminate the program?'],'title','Continue','Terminate','Terminate') ; if strcmp(h, 'Terminate') error('Breaking out'); end fileID = fopen(outputFile,'w+'); fprintf(fileID,'%s %.3f\n','R',-theta_rot(order_scan(1))); fclose(fileID); else %% Offset x_offset = 0; y_offset = -0; z_offset = 0; if abs(x_offset)+abs(y_offset)+abs(z_offset) ~= 0 for i=1:size(path_output,2) path_output_temp=path_output{i}; path_output_temp(:,end+1) = zeros(length(path_output_temp),1); [N,~]=size(path_output_temp); for j=1:N path_output_temp(j,1)=path_output_temp(j,1)+x_offset; path_output_temp(j,2)=path_output_temp(j,2)+y_offset; path_output_temp(j,3)=path_output_temp(j,3)+z_offset; end path_output{i} = path_output_temp; end end if doProofPlot for i=1:size(path_output,2) figure;hold on;set(gcf,'Color',[1,1,1]); if length(P_surf)/500 == 500 pxx1 = reshape(P_surf_rot(:,1,order_scan(i)),500,500); pyy1 = reshape(P_surf_rot(:,2,order_scan(i)),500,500); pzz1 = reshape(P_surf_rot(:,3,order_scan(i)),500,500); surf(pxx1,pyy1,pzz1,'EdgeColor', 'none') else
444
scatter3(P_surf_rot(1:43:end,1,order_scan(i)),P_surf_rot(1:43:end,2,order_scan(i)),P_surf_rot(1:43:end,3,order_scan(i)),'.') end plot3(xyz(:,1,order_scan(i)),xyz(:,2,order_scan(i)),xyz(:,3,order_scan(i)),'.r') path_output_temp=path_output{i}; path_output_temp(:,end+1) = zeros(length(path_output_temp),1); [N,~]=size(path_output_temp); colorm = colormap(winter(N)); icolor = 1; for j=1:N n_new = FuncUSToolPath_wprTransformation(path_output_temp(j,4), path_output_temp(j,5), path_output_temp(j,6), 0); pv = path_output_temp(j,1:3) - 4*n_new; plot3([path_output_temp(j,1) pv(1)],[path_output_temp(j,2) pv(2)],[path_output_temp(j,3) pv(3)],'Color',colorm(icolor,:)'); icolor = icolor+1; end axis equal; axis tight;xlabel('x');ylabel('y');zlabel('z');legend('B-spline surface','Section curve','Probe path');grid on; view(-30,28) end end %% File writer fileID = fopen(usToolPath,'w+'); for i=1:1 path_output_temp=path_output{i}; [N,~]=size(path_output_temp); fprintf(fileID,'%s %.3f\n','R',-theta_rot(order_scan(i))); for j=1:N spdstr = 'SPD1'; if j==1 spdstr = 'SPD2'; hole_num=path_output_temp(9); elseif path_output_temp(1,9)~= hole_num spdstr = 'SPD2'; hole_num=path_output_temp(1,9); else end fprintf(fileID,'%.3f %.3f %.3f %.3f %.3f %.3f %s %.3f %.3f %.3f \n',path_output_temp(j,1:6),spdstr,path_output_temp(j,7:9)); end if size(order_scan,2)==1 else fprintf(fileID,'%s %.3f\n','R',-theta_group(order_scan(1)+1)); end end fclose(fileID); end %% Update the rotational file or create/delete it if it is the first/last rotation
445
if argpassed.save save('MLData_RotDataFile.mat', 'order_scan', 'theta_group', 'trans','pathGrouping'); end
2.4.2 Path grouping sub-function
In this sub-function, path points and path orientations are analysed and grouped.
function [ final_path_collect,order_scan,no_init_rot,theta_group,B, pathGrouping ] = FuncUSToolPath_groupToolPath( tool_path_ord_1,theta_robo_lim, pathGrouping) if pathGrouping ~= 0 group = 0; for i = 1:size(tool_path_ord_1,2) if pathGrouping(i)~=group group = pathGrouping(i); final_path_collect{group} = tool_path_ord_1{i}; else final_path_collect{group}(end+1:end+size(tool_path_ord_1{i},1),:) = tool_path_ord_1{i}; end end no_init_rot = 1; theta_group = 0; order_scan = 0; B = size(final_path_collect,2); else [ final_path_collect,order_scan,no_init_rot,theta_group,B,pathGrouping] = doCal( tool_path_ord_1,theta_robo_lim ); end function [ final_path_collect,order_scan,no_init_rot,theta_group,B, pathGrouping ] = doCal( tool_path_ord_1,theta_robo_lim) tp_ori=tool_path_ord_1; [~,B]=size(tp_ori); %clear tp_temp angleList % Assume: the sequence of the holes is correctly defined in tool_path_ord and % cell components in tool_path_ord is ordered in the sequence of the holes. % STEP. 1, determine whether we start from the first hole or the last hole % or any where else on the surface. % This is dependant on two factors: % 1. the angles that the tool path vectors at the first hole and the last % hole make with [0 0 -1]; % 2. the direction of scanning, i.e. the sequence the tool path vectors are % ordered e.g. either from left to right or right to left. % The angles that the tool path vectors made with [0 0 -1] % Extract max and min angles that normal vectors of each scanning region for i = 1:B angleList(i,:) = [max(tp_ori{i}(:,6)), min(tp_ori{i}(:,6))]; % angle with z end
446
% Check whether we will scan the first hole or the last hole. if angleList(1,1)<angleList(end,1) starthole = 1; else starthole = B; end % Check the direction of scanning % First get the direction of the hole arrangement try vhole = tp_ori{starthole}(1,1:3) - tp_ori{starthole+1}(1,1:3); catch vhole = tp_ori{starthole}(1,1:3) - tp_ori{starthole-1}(1,1:3); end % Second get the direction of tool path arrangement and compare it with % vhole vpath = tp_ori{starthole}(1,1:3) - tp_ori{starthole}(end,1:3); if atan2(norm(cross(vhole,vpath)),dot(vhole,vpath))*180/pi <90 isdiraligned = true; else isdiraligned = false; end % STEP. 2 Grouping. % We can now determine the end of scan for the first path group and the % rotation needed for the next path group, consequently the end of the next % scan. If isdiraligned == false, i.e. directions of tool path and vhole % are different, we reverse the tool path. groupNo = 1; pathNo = 1;rot = 0; for i = 1:B if angleList(i,1) - sum(rot) > theta_robo_lim/2 groupNo = groupNo + 1; pathNo = 1; rot(groupNo) = theta_robo_lim/2 + angleList(i,2) - sum(rot); end if isdiraligned tp_temp{groupNo}{pathNo} = tp_ori{i}(1:end,:); else tp_temp{groupNo}{pathNo} = tp_ori{i}(end:-1:1,:); end tp_temp{groupNo}{pathNo}(:,6) = tp_temp{groupNo}{pathNo}(:,6) - sum(rot); pathNo = pathNo + 1; pathGrouping(i) = groupNo; end for i = 1:size(rot,2) final_path_collect{i} = tp_temp{i}{1}; for j = 2:size(tp_temp{i},2) final_path_collect{i}(end+1:end+size(tp_temp{i}{j},1),:) = tp_temp{i}{j}; end end B=size(rot,2); order_scan = 1:1:B; no_init_rot = rot(1) == 0; theta_group = rot;
447
2.4.3 Probe path transformation sub-function
In this sub-function, rotation matrices are constructed to transform the grouped probe paths.
function [ final_path_collect_new,P_surf_rot,xyz,theta_rot ] = FuncUSToolPath_rotateToolPath(x,y,z,B,P_surf,final_path_collect,order_scan,no_init_rot,theta_group) n_x=0.0084; n_y=0.999950003749688; n_z=0.0018; P_0=[432.547, -406.404, -359.440]; [N,~]=size(x); P_0_xyz=[ones(N,1)*P_0(1) ones(N,1)*P_0(2) ones(N,1)*P_0(3)]'; [N,~]=size(P_surf); P_0_surf=[ones(N,1)*P_0(1) ones(N,1)*P_0(2) ones(N,1)*P_0(3)]'; for i=1:B final_path_temp=final_path_collect{1,i}; [N,~]=size(final_path_temp); if no_init_rot==1 && order_scan(1)==i; theta_rot(i)=0; final_path_collect_new{1,i}=final_path_temp; xyz(:,:,i)=[x y z]; P_surf_rot(:,:,i)=P_surf; else theta_rot(i) = sum(theta_group(1:i)); v_th=1-cosd(-theta_rot(i)); c_th=cosd(-theta_rot(i)); s_th=sind(-theta_rot(i)); R=[ n_x^2*v_th+c_th , n_x*n_y*v_th-n_z*s_th , n_x*n_z*v_th+n_y*s_th ; n_x*n_y*v_th+n_z*s_th , n_y^2*v_th+c_th , n_y*n_z*v_th-n_x*s_th; n_x*n_z*v_th-n_y*s_th , n_y*n_z*v_th+n_x*s_th , n_z^2*v_th+c_th]; xyz(:,:,i)=(R*([x y z]'-P_0_xyz)+P_0_xyz)'; P_surf_rot(:,:,i)=(R*(P_surf'-P_0_surf)+P_0_surf)'; P_0_temp=[ones(N,1)*P_0(1) ones(N,1)*P_0(2) ones(N,1)*P_0(3)]'; final_path_temp(:,1:3)= (R*(final_path_temp(:,1:3)'-P_0_temp)+P_0_temp)'; final_path_temp(:,7:9)= (R*(final_path_temp(:,7:9)'))'; final_path_collect_new{1,i}=final_path_temp; end end
448
2.4.4 Path ordering sub-function
In this sub-function, path points are re-ordered so the inspection sequence is optimal. Then the
robot rotation parameters w, p and r are calculated based on the normal vectors.
function [ path_output ] = FuncUSToolPath_sortAssemble( final_path_collect_new,sec,nh,order_scan,B,rot_r ) %% Sort so each section get scanned at a time and from hole 1 to end for i=1:B final_path_temp=final_path_collect_new{1,i}; [N,~]=size(final_path_temp); k=0; final_path_temp_ord=[]; for l=1:sec for q=1:nh for j=1:N if final_path_temp(j,5) == q && final_path_temp(j,4) == l k=k+1; final_path_temp_ord(k,:)= final_path_temp(j,:); end end end end final_path_collect_new{1,i}=final_path_temp_ord; end %% Calculate the robot angles and assemble an output file B = size(order_scan,2); for i=1:B final_path_temp=final_path_collect_new{1,order_scan(i)}; [N,~]=size(final_path_temp); path_output_temp=[]; for j=1:N unit_v_temp=final_path_temp(j,7:9); wpr = FuncUSToolPath_vectorToWpr_RM(unit_v_temp, rot_r); Ang_x = wpr(1,1); Ang_y = wpr(1,2); Ang_z = wpr(1,3); path_output_temp(j,:)=[final_path_temp(j,1:3) Ang_x Ang_y Ang_z final_path_temp(j,4:5) final_path_temp(j,10)]; end path_output{i}=path_output_temp; end end
449
2.4.5 Robot rotation parameter calculation
This function calculates robot rotation parameters w, p and r based on a vector in Cartesian
coordinates specified by the user.
function wpr = FuncUSToolPath_vectorToWpr_RM(vector, r) % Warning: With this solution, r is not calculated. The output of r is % zero or is identical to the user specified r. % This method converts a vector into W,P,R with a method involving rotation % matrix. % Assume we have an arbitrary unit vector, A, and a unit vector N=[0 0 1]. % N needs to be rotated at most three times about x, y and z axis in % sequence to be aligned with A. % The angles of rotations are defined as w, p and r respectively and we % need to calculate them. This can be done by solving rotation matrices. % Rotation about x is defined by: % Rx = [ 1 0 0; 0 cos sin; 0 -sin cos ]; % Rotation about y is defined by: % Ry = [ cos 0 -sin; 0 1 0; sin 0 cos ]; % Rotation about z is defined by: % Rz = [ cos sin 0; -sin cos 0; 0 0 1 ]; % Therefore, we have A = N * Rx(w) * Ry(p) * Rz(r). % Let r = 0, we only need to simplify A = N * Rx(w) * Ry(p). % So we have A = [ cos(w)*sin(p), -sin(w), cos(p)*cos(w) ]. % Finally: A(1) = cos(w)*sin(p) ... Eq.1 % A(2) = -sin(w) ......... Eq.2 % A(3) = cos(p)*cos(w) ... Eq.3 % Either for w or p, we have two solutions taking quadrant into % consideration. Eventually, we end up with four different pairs of % solution and we only pick one from them. This will be decided by % converting each pair of solution back to the vector. % If an r value is specified, for a specific end effect orientation, we % can always have A/Rz(r) = N * Rx(w) * Ry(p); isTesting = 0; %% Find all four solutions % Normalize vector A_ori = vector; if size(A_ori,1) == 3 A_ori = A_ori'; end A_ori = A_ori/norm(A_ori); % A/Rz(r) Rz = [ cosd(r) sind(r) 0; -sind(r) cosd(r) 0; 0 0 1 ]; A = A_ori/Rz; % Get two solutions for w by solving Eq.2 w1 = asind(-A(2)); % When sin > 0, the second solution w2 in [-pi, pi] is 180 - w1. % When sin < 0, the second solution w2 in [-pi, pi] is -180 - w1. if -A(2) > 0
450
w2 = 180 - w1; else w2 = -180 - w1; end % Get two solutions for p by solving Eq.1/Eq.3 p1 = atand(A(1)/A(3)); % When tan > 0, the second solution p2 in [-pi, pi] is -180 + p1; % When tan < 0, the second solution p2 in [-pi, pi] is 180 + p1; if A(1)/A(3) > 0 p2 = -180 + p1; else p2 = 180 + p1; end w = [w1 w2]; p = [p1 p2];
451
2.5 Thickness evaluation
2.5.1 The main function
In the main function, the user can specify search windows = [lower thickness limit, upper thickness
limit]; thereby, in the backwall echo detection algorithm, the script is focused in the specified
thickness ranges. This would increase the chance that the wall thicknesses are evaluated at the
correct backwall echoes, especially when signal-to-noise ratio is low. However, this search window
should be reasonably wide; otherwise the calculated thicknesses may be invalid. The user is also
required to select the text file that contains ultrasonic data. The ultrasonic data are then loaded and
parsed. Interface echoes and backwall echoes are determined in sub-functions. Finally, wall
thicknesses results are plotted and saved.
clearvars -except tc ac dc;%close all; % Specify search windows for backwall echoes if available searchwindow = 0; noOfDataReadAhead = 3; % the number of data/parameters to be read ahead of ultrasonic data, i.e. timestamp, buffersize etc. [filename, pathname, filterindex] = uigetfile({'*.mat';'*.txt'}, 'Choose a ultrasonic data file required to be processed'); %% Read the original data and separate them into subsets according to hole number path(path,pathname); [~,Fname,Fext] = fileparts(filename); if strcmp(Fext,'.txt') usdata = load([Fname,Fext]); % extract info columns info_gain = usdata(:,1); info_step = usdata(:,2); info_wp = usdata(:,3); info_samplingrate = usdata(:,4); info_buffer = usdata(:,5); % delete info columns usdata(:,1:5) = []; % Seperate data regarding step number and water path % find index where discontiuities are found in info_step s_ = diff(info_step); s_ = find(s_~=0); s_ = [0;s_;size(usdata,1)]; for i = 1:length(s_)-1 % extract data for the same step data_ = usdata(s_(i)+1:s_(i+1),:); % get buffer length b_ = info_buffer(s_(i)+1:s_(i+1),:); % find index where discontiuities are found in info_wp
452
w_ = info_wp(s_(i)+1:s_(i+1),:); w_ = diff(w_); w_ = find(w_~=0); w_ = [0;w_;size(data_,1)]; % seperate data based on water path for j = 1:length(w_)-1 data_2{j} = data_(w_(j)+1:w_(j+1),1:b_(w_(j)+1)-3); end datac{i} = data_2; clear data_2 end save([Fname,'.mat'], 'usdata', 'info_gain', 'info_step','info_wp','info_samplingrate','info_buffer', 'datac'); else load(filename); end %% Seperate backwall echo and interface echo % Not implemented in the first data set xcoords = data_ori(1:2:end,2); interfaceData = data_ori(2:2:end,4:end); usdata = data_ori(1:2:end,4:end); noiseT = [130, 140]; noiseT = 0; [interfaceLoc, waterpath, ~] = USInterface_v5 (interfaceData, 3000, noiseT); [backwall, backwallAmp, thickness, noiseThreshold, backwallTreshold] = USBackwall_v2(usdata, xcoords, interfaceLoc, waterPath, searchwindow); h1 = figure;hold on; [hAx, hT, hB] = plotyy(1:length(thickness),thickness,1: length(backwallAmp),backwallAmp); plot(desiredT(:,1),desiredT(:,2),'ob'); ylabel(hAx(1), 'Thickness') ylabel(hAx(2), 'Amplitude') hAx(1).YTick=[0,2,4,6,8,10,12,14]; hAx(2).YLim = [135,260]; hAx(2).YTick=[135,150,175,190,215,230,245,260]; hdt = datacursormode; title(filename) save([filename, '_wallthickness.txt'], 'thickness')
2.5.2 Interface echo detection
The locations of interface echoes are determined in this function.
function [interfaceIndex, waterpath, amp, noiseThreshold] = USInterface_v5 (data,firstinterfacerange, noiseT) % noiseT = [low limit of noise filtre, up limit of noise filtre]; peakAmplitudeConfidentDiff = 50; % max amplitude difference between the 2nd and the 1st peak in an interface echo lowDT = 4; %low distance treshold - the distance between the 2nd and the 1st peak in an interface echo
453
highDT = 15; %high distance treshold - the distance between the 2nd and the 1st peak in an interface echo data = data'; data_ori = data; buffersize = size(data,1); ndata = size(data,2); lowunits = 5; % Waterpath treshold waterPath = 10; vwater= 0.00142342; %speed of sound in water [m/ns] waterPathTresh= waterPath/(10*vwater); %number of data points between the probe and the top surface of the workpiece. waterPathTresh= 2*(round(waterPathTresh)); %number of data points for return journey in water for i = 1:ndata %% Remove noise % if noiseT is defined if ~isempty(noiseT) if any(noiseT) noise(i) = mean(noiseT); noiseThreshold(:,i) = noiseT; data((data(:,i)>=noiseT(1) & data(:,i)<=noiseT(2)),i) = noise(i); else % 1. Take average amplitude % 2. Specify high and low threshold by scaling the average amplitude % with multipliers % 3. The high threshold must be smaller than the maximum amplitude so % the peak won't be filtered vice versa for the low threshold. % 4. However, it the peak/valley is only 5 units higher than the % average amplitude, the peak/valley is ignored, i.e. no interface echo. noise(i) = mean(data(:,i)); data(1:600,:) = noise(i); peakAmp = max(data(:,i)); valleyAmp = min(data(:,i)); if peakAmp - noise(i) < lowunits interfaceIndex(i) = 0; amp(i) = 0; waterpath(i) = 0; noiseThreshold(:,i) = [0,0]; continue; end noiseHT = noise(i) * 1.04; noiseLT = noise(i) * 0.96; noiseHT = 141; noiseLT = 135;
454
if noiseHT > peakAmp noiseHT = peakAmp - 1; end noiseThreshold(:,i) = [noiseHT,noiseLT]; data((data(:,i)>noiseLT & data(:,i)<noiseHT),i) = noise(i); end end %% Search for the first interface echo data_diff=diff(data(:,i)); %find changes in amplitude if ~any(data_diff) %if no peak, skip this row. interfaceIndex(i) = 0; amp(i) = 0; waterpath(i) = 0; continue end ampChangedIndex=find(data_diff~=0); %Indexate the places where there is a change in amplitude ampChangedIndex_diff=diff(ampChangedIndex); flatPeakIndex=find(ampChangedIndex_diff~=1 & ampChangedIndex_diff<10); %Indexate the last data point in a flat peak ampChangedIndex(flatPeakIndex+1)=ampChangedIndex(flatPeakIndex+1) - ceil((ampChangedIndex_diff(flatPeakIndex)-1)/2); %locate the middle of the flat peak and replace the loca_flat in loca_change % * ampChangedIndex(flatPeakIndex+1) returns the last point in the flat % peak(s). % * use floor() instead of ceil() to take the point to the right of the % midpoint for flat peaks consisting of even number of points. % * or use neither for a unrounded number. dataFiltered=[data(ampChangedIndex,i);data(buffersize,i)]; %get rid of all noise and reduce the flat peak to a sharp peak logiPosNeg=diff(dataFiltered)>0; %logic_positive_or_negative: +tive slope = 1, -tive slope = 0 logiMaxMin=diff(logiPosNeg); %logic_maxima_or_minima: -1 = maxima, +1 = minima peakIndex=ampChangedIndex(find(logiMaxMin==-1)+1); %Indexate the maxima valleyIndex=ampChangedIndex(find(logiMaxMin==1)+1); peakAmp=data(peakIndex,i); %find data points of the maxima valleyAmp=data(valleyIndex,i); %Take out fake maxima which are start point of a valley fakeIndex = find(peakAmp == noise(i)); peakIndex(fakeIndex) = []; peakAmp(fakeIndex) = []; fakeIndex = find(valleyAmp == noise(i)); valleyIndex(fakeIndex) = []; valleyAmp(fakeIndex) = []; if ~any(peakIndex) interfaceIndex(i) = 0; amp(i) = 0; waterpath(i) = 0; continue
455
end if length(peakIndex) == 1 interfaceIndex(i) = peakIndex; amp(i) = peakAmp; waterpath(i) = 999; continue end % find 2nd interface echo secndPeakIndex = peakIndex(peakIndex>firstinterfacerange); secndPeakAmp = peakAmp(peakIndex>firstinterfacerange); secndValleyIndex = valleyIndex(valleyIndex>firstinterfacerange); secndValleyAmp = valleyAmp(valleyIndex>firstinterfacerange); % and 1st interface echo firstPeakIndex = peakIndex(peakIndex<=firstinterfacerange); firstPeakAmp = peakAmp(peakIndex<=firstinterfacerange); firstValleyIndex = valleyIndex(valleyIndex<=firstinterfacerange); firstValleyAmp = valleyAmp(valleyIndex<=firstinterfacerange); % for a fix pulse frequency of 17MHz, the distance between two biggest % peaks in the first interface echo is usually within 150ns. % therefore, locating the first peak in the first interface echo the % peak of maximum amplide should be picked as the first try, looking % for a second peak 150ns after it. % if not find, pick the 2nd biggest peak and so on. % be aware of the exisitance of surface bubble, which may result in a % small echo. % this echo is usually very weak at low gain, therefore, can be easily % detected by comparing the amplitude of each peak with the maximum % amplitude. % also be aware of strong backwall echo. A strong backwall echo is % usually followed by a strong valley, while the second peak in the % first interface echo is typically not followed by a noticeable valley if ~any(firstPeakAmp) interfaceIndex(i) = 0; amp(i) = 0; waterpath(i) = 0; continue end if length(firstPeakAmp) == 1 interfaceIndex(i) = firstPeakIndex; amp(i) = firstPeakAmp; else % Further work: % 1. Interferance from backwall echo % 2. What if the valley between the two peaks are distorted and there % is a small peak on it? isDone = false; firstPeakAmp_ = firstPeakAmp; while ~isDone
456
if ~any(firstPeakAmp_) break; end % look for the maximum amplitude peakAmpMax = max(firstPeakAmp_); peakAmpPeakIndex = find(peakAmpMax == firstPeakAmp, 1); % check whether there is another strong peak within 150ns right after it. indexCache = firstPeakIndex(peakAmpPeakIndex:end); ampCache = firstPeakAmp(peakAmpPeakIndex:end); if any(indexCache) possible2ndPeakAmp = (firstPeakIndex(peakAmpPeakIndex) + lowDT<indexCache & indexCache<firstPeakIndex(peakAmpPeakIndex) + highDT); if any(possible2ndPeakAmp) possible2ndPeakAmp = max(ampCache(possible2ndPeakAmp)); isDone = abs(peakAmpMax - max(possible2ndPeakAmp)) < peakAmplitudeConfidentDiff; end end if ~isDone peakAmpPeakIndex = find(peakAmpMax == firstPeakAmp_, 1); firstPeakAmp_(peakAmpPeakIndex)=[]; end end if ~isDone interfaceIndex(i) = 0; amp(i) = 0; waterpath(i) = 0; continue; end interfaceIndex(i) = firstPeakIndex(peakAmpPeakIndex); amp(i) = firstPeakAmp(peakAmpPeakIndex); end % locate the 2nd interface eacho, this does not need to be very % accuracy for the time being, so simply take the maximum peak. if any(secndPeakAmp) peakAmpMax = max(secndPeakAmp); secondInterfaceIndex = secndPeakIndex(peakAmpMax == secndPeakAmp); waterpath(i) = (secondInterfaceIndex(1) - interfaceIndex(i)) / 0.2 * vwater; else waterpath(i) = 0; end end
2.5.3 Backwall echo detection and thickness calculation
The locations of the backwall echoes are determined in this function. At the end of this function,
thickness values are calculated.
function [backwall, amplitude, thickness, noiseThreshold, backwallTreshold] = USBackwall_v4(data, interface, waterPath, searchwindow) % data - U.S. data % searchwindow structure:
457
% col 1 col 2 % lowbound highbound data = data'; data_ori = data; buffersize = size(data,1); ndata = size(data,2); minbackwallamp = 16; % Waterpath treshold vwater= 0.00142342; %speed of sound in water [m/ns] waterPathTresh= (waterPath-2)/(10*vwater); %number of data points between the probe and the top surface of the workpiece. waterPathTresh= 2*(round(waterPathTresh)); %number of data points for return journey in water noise = mean(data,1); for i = 1:ndata %% Treshold
if searchwindow == 0 searchwindow = [0, ndata] end
lt_ = searchwindow(1); ut_ = searchwindow(2); lt = lt_ + interface; ut = ut_ + interface; if lt>buffersize backwall(i) = 0; thickness(i) = 0; amplitude(i) = 0; backwallTreshold(:,i) = [0,0]; noiseThreshold(:,i) = [0,0]; continue end if ut>buffersize ut=buffersize; end backwallTreshold(:,i) = [lt, ut]; %% Remove noise % 1. Take average amplitude % 2. Specify high and low threshold by scaling the average amplitude % with multipliers % 3. The high threshold must be smaller than the maximum amplitude so % the peak won't be filtered vice versa for the low threshold. % 4. However, if the peak/valley is only 5 units higher than the % average amplitude, the peak/valley is ignored, i.e. no interface echo. edata = [(1:buffersize)',data(:,i)]; try edata_ = edata(lt:ut,:); catch
458
aaa=1; end % flat peak shouldn't be the end ut_ = ut; while ~any(edata_(end,2) - edata_(end-1,2)) && edata_(end,2)> noise(i) ut_ = ut_+1; if ut>buffersize || ut_ - ut > 5 edata_(end,2) = edata_(end,2)-0.01; break; end edata_ = edata(lt:ut,:); end edata = edata_; maxamp = max(edata(:,2)); minamp = min(edata(:,2)); if maxamp < minbackwallamp backwall(i) = 0; thickness(i) = 0; amplitude(i) = 0; noiseThreshold(:,i) = [0,0]; continue; end noiseHT = noise(i) * 1.02; noiseLT = noise(i) * 0; if noiseHT > maxamp noiseHT = maxamp - 1; end noiseThreshold(:,i) = [noiseHT,noiseLT]; edata((edata(:,2)>noiseLT & edata(:,2)<=noiseHT),2) = noise(i); %% Search for the first backwall echo data_diff=diff(edata(:,2)); %find changes in amplitude if ~any(data_diff) %if no peak, skip this row. backwall(i) = 0; thickness(i) = 0; amplitude(i) = 0; continue end locChange=find(data_diff~=0); %locate the places where there is a change in amplitude locChange_diff=diff(locChange); locFlatPeak=find(locChange_diff~=1 & locChange_diff<10); %locate the last data point in a flat peak locChange(locFlatPeak+1)=locChange(locFlatPeak+1) - ceil((locChange_diff(locFlatPeak)-1)/2); %locate the middle of the flat peak and replace the loca_flat in loca_change % * locChange(locFlatPeak+1) returns the last point in the flat peak(s). % * use floor() instead of ceil() to take the point to the right of the % midpoint for flat peaks consisting of even number of points. % * or use neither for a unrounded number.
459
dataFiltered=[edata(locChange,2);edata(end,2)]; %get rid of all noise and reduce the flat peak to a sharp peak % Problem unsolved here: % if the data points are ascending or decending all the way from the % begining till the end, i.e. no valley or peak, it should give a % warning and take the start or end as the max. logiPosNeg=diff(dataFiltered)>0; %logic_positive_or_negative: +tive slope = 1, -tive slope = 0 logiMaxMin=diff(logiPosNeg); %logic_maxima_or_minima: +1 = maxima, -1 = minima locMax=locChange(find(logiMaxMin==-1)+1); %locate the maxima locMax = edata(locMax,1); if ~any(locMax) backwall(i) = 0; thickness(i) = 0; amplitude(i) = 0; continue end try dataMax=data(locMax,i); %find data points of the maxima catch aaa=1; end if length(locMax) == 1 backwall(i) = locMax; amplitude(i) = dataMax; thickness(i) = CalT(interface(i),locMax, mwp, cwp); continue end %Find the max backwall echo dataMax_ = dataMax; dataBcw = max(dataMax); locBcw = find(dataMax == dataBcw,1); dataMax_(locBcw) = 0; dataBcw2 = max(dataMax_); locBcw2 = find(dataMax == dataBcw2,1); locBcw = locMax(locBcw); locBcw2 = locMax(locBcw2); if locBcw > locBcw2 && locBcw2 - locBcw < 15 && dataBcw - dataBcw2 < 5 locBcw = locBcw2; dataBcw = dataBcw2; end amplitude(i) = dataBcw; backwall(i) = locBcw; thickness(i) = CalT(interface(i),locBcw); end function t = CalT(interface, backwall) tof = backwall-interface; [mwp,cwp] = Calibrate(tof, false); t = (tof) * mwp + cwp;
460
function [m,c] = Calibrate(value, useThickness) mc_data=[0.65 0.95 23.3 35.8 0.02403 0.08891 0.95 1.99 35.8 67.4 0.03285 -0.2244 1.99 2.98 67.4 100.9 0.02889 0.06614 2.98 3.98 100.9 128.1 0.03544 -0.5598 3.98 5.87 128.1 197.6 0.02685 0.5634 5.97 8.01 197.6 260.8 0.03412 -0.8885 8.01 10 260.8 334.9 0.02665 1.075 0 9999 0 9999 0.03043 -0.06453 ]; if useThickness i = find(value>=mc_data(:,1) & value<mc_data(:,2)); if ~any(i) i=size(mc_data,1); end else i = find(value>=mc_data(:,3) & value<mc_data(:,4)); if ~any(i) i=size(mc_data,1); end end m = mc_data(i(1),5); c = mc_data(i(1),6);