37 CHAPTER 4 BASICS OF ULTRASONIC MEASUREMENT AND ANFIS MODELLING 4.1 BASICS OF ULTRASONIC MEASUREMENT All sound waves, whether audible or ultrasonic, are mechanical vibrations involving movement in the medium in which they are travelling. A sound wave may be transmitted through any material which behaves in an elastic manner. Ultrasonic Testing (UT) uses high frequency sound energy to conduct examinations and make measurements. Ultrasonic inspection can be used for flaw detection/evaluation, dimensional measurements, material characterization, and more. To illustrate the general inspection principle, a typical pulse/echo inspection configuration as illustrated below will be used. A typical UT inspection system consists of several functional units, such as the pulser/receiver, transducer, and display devices. A pulser/receiver is an electronic device that can produce high voltage electrical pulses. Driven by the pulser, the transducer generates high frequency ultrasonic energy. The sound energy is introduced and propagates through the materials in the form of waves. When there is a discontinuity (such as a crack) in the wave path, part of the energy will be reflected back from the flaw surface. The reflected wave signal is transformed into an electrical signal by the transducer and is displayed on a screen. Signal travel time can be directly related to the distance that the signal travelled. From the signal, information about the reflector location, size, orientation and other features can sometimes be gained.
38 Ultrasonic Inspection is a very useful and versatile NDT method. Some of the advantages of ultrasonic inspection that are often cited include: It is sensitive to both surface and subsurface discontinuities. The depth of penetration for flaw detection or measurement is superior to other NDT methods. Only single-sided access is needed when the pulse-echo technique is used. It is highly accurate in determining reflector position and estimating size and shape. Minimal part preparation is required. Electronic equipment provides instantaneous results. Detailed images can be produced with automated systems. Ultrasonic testing is based on time-varying deformations or vibrations in materials, which is generally referred to as acoustics. All material substances are comprised of atoms, which may be forced into vibrational motion about their equilibrium positions. Many different patterns of vibrational motion exist at the atomic level; however, most are irrelevant to acoustics and ultrasonic testing. Acoustics is focused on particles that contain many atoms that move in unison to produce a mechanical wave. When a material is not stressed in tension or compression beyond its elastic limit, its individual particles perform elastic oscillations. When the particles of a medium are displaced from their equilibrium positions, internal (electrostatic) restoration forces arise. It is these elastic restoring forces between particles, combined with inertia of the particles, which lead to the oscillatory motion of the medium.
39 In solids, sound waves can propagate in four principle modes that are based on the way the particles oscillate. Sound can propagate as longitudinal waves, shear waves, surface waves, and in thin materials as plate waves. Longitudinal and shear waves are the two modes of propagation most widely used in ultrasonic testing. The particle movement responsible for the propagation of longitudinal and shear waves is illustrated in Figure 4.1. Figure 4.1 Propagation of ultrasonic waves In longitudinal waves, the oscillations occur in the longitudinal direction or the direction of wave propagation. Since compressional and dilational forces are active in these waves, they are also called pressure or compressional waves. They are also sometimes called density waves because their particle density fluctuates as they move. Compression waves can be generated in liquids, as well as solids because the energy travels through the atomic structure by a series of compression and expansion (rarefaction) movements. In the transverse or shear wave, the particles oscillate at a right angle or transverse to the direction of propagation. Shear waves require an acoustically solid material for effective propagation, and therefore, are not effectively propagated in materials such as liquids or gasses. Shear waves are
40 relatively weak when compared to longitudinal waves. In fact, shear waves are usually generated in materials using some of the energy from longitudinal waves. Pulse-echo ultrasonic measurements can determine the location of a discontinuity in a part or structure by accurately measuring the time required for a short ultrasonic pulse generated by a transducer to travel through a thickness of material, reflect from the back or the surface of a discontinuity, and be returned to the transducer which is interfaced with ultrasonic flaw detector (Figure 4.2). Figure 4.2 Schematic representation of ultrasonic flaw detector.
41 In most applications, this time interval is a few microseconds or less. The two-way transit time measured is divided by two to account for the down-and-back travel path and multiplied by the velocity of sound in the test material. The result is expressed in the well-known relationship (Baldev Raj et al 2002) vt d d or v 2 (4.1) 2 t where d is the distance from the surface to the discontinuity in the test piece, v is the velocity of sound waves in the material, and t is the measured round-trip transit time. 4.1.1 Sound Wave Terminology (1) Amplitude Amplitude is the size of the ultrasonic energy wave or peak to peak displacement of the sine wave received from the test surface (Figure 4.3). The RMS (root mean square) of the received signal is the measure of magnitude of varying quantity which denotes the total energy content of the reflected waves. Figure 4.3 Ultrasonic wave parameters
42 (2) Wavelength (λ) The distance travelled by a sound wave to produce one complete oscillation or cycle is termed the wavelength (λ). (3) Velocity The speed or velocity (V), measured in metres per second (m/s) is that a sound wave travelling through a medium is dependent on the elasticity and density of that medium, i.e. the material's properties. (4) Frequency Frequency is measured in cycles per second or Hertz. The more vibrations or oscillations each molecule makes in a set period of time the higher the frequency, A high frequency sound is said to have a high pitch. The wavelength (λ), the frequency (f) and the velocity (V) are related by the equation (4.2) V = f λ (4.2) where λ - wavelength in metres. f - Frequency in cycles/second. V - velocity in metres/second. (5) Attenuation When sound waves are emitted they spread out in all directions and therefore their intensity reduces with distance travelled in accordance with the Inverse Square Law. The strength of intensity is, however, also reduced or attenuated by two other mechanisms; absorption and scatter.
43 Attenuation is generally expressed in the form A 1 = A 0 e αl (4.3) where A 0 - Amplitude of reference surface A 1 - Amplitude of machined surface α - Attenuation coefficient (db/mm) L - Thickness of the tested workpiece. From equation (4.3), A 0 L 20 log A1 (4.4) If the ultrasonic probe used for the acoustic measurements is of transmitter/receiver (T/R) type, the stress wave travels twice the "L" distance, so equation (4.4) becomes 10 A log 0 L A1 (4.5) Reflection coefficient (β) is defined as the ratio between the reflected and reference amplitude. A 1 A0 (4.6) where A 1 = Obtained amplitude A 0 = Reference amplitude
44 (6) Absorption A sound wave propagates by the vibration and collision of molecules. Such molecular movements require energy and also give out energy in the form of heat due to friction. This energy originates in the sound wave. The sound wave is therefore weakened due to absorption of its energy by the molecules of the medium it travels through. Absorption decreases as sound frequency decreases. (7) Scattering Steel and metals in general, have a grain structure. Grain boundaries refract and reflect a small proportion of the incident sound wave and so tend to scatter it. As a result, less of the sound beam continues in the original direction. Scatter decreases as sound frequency and grain size decreases. Whether uniform or irregular, a rough surface has the potential to present a scattering effect at an interface where a beam impinges. This reduction in energy is used in roughness measurement using ultrasonic system. 4.2 CONCEPTS OF MODELLING ALGORITHM - ANFIS System modelling based on conventional mathematical tools is not well suited for dealing with ill-defined and uncertain systems. By contrast, a fuzzy inference system employing fuzzy if-then rules can model the qualitative aspects of human knowledge and reasoning processes without employing precise quantitative analysis. The fuzzy modelling or fuzzy identification, first exploded systematically by Takagi and Sugeno has found numerous practical applications in control, prediction and inference. Since the tool wear formation is a nonhomogenous continuous process, the analytical and statistical models may not be suitable for online measurement and
45 control. Here ANFIS is used as a modelling algorithm which relates the ultrasonic parameters with tool wear and surface roughness. The acronym ANFIS derives its name from adaptive neuro-fuzzy inference system. Using a given input/output data set, the toolbox function ANFIS constructs a fuzzy inference system (FIS) whose membership function parameters are tuned (adjusted) using either a back propagation algorithm alone, or in combination with a least squares type of method. This allows the fuzzy systems to learn from the data which is used for modelling. 4.2.1 Theory and Architecture The technique provides a method for the fuzzy modelling procedure to learn information about a data set, in order to compute the membership function parameters that best allow the associated fuzzy inference system to track the given input/output data. This learning method works similarly to that of neural networks Fuzzy systems have two steps, 1. Rules: Initially the if-then rules have to be determined. Those are usually done by knowledge acquisition from human s experience. This is a time consuming process that is fraught with difficult situations. 2. Membership functions: A fuzzy set is determined by its membership function. The ANFIS learns the membership functions and rules from input data.
46 Considering the first order Sugeno inference model (Figure 4.4) with rules as, If x is A 1 and y is B 1 THEN f 1 = p 1 x + q 1 y + r 1 If x is A 2 and y is B 2 THEN f 2 = p 2 x + q 2 y + r 2 Figure 4.4 First-order Sugeno fuzzy inference model There are a forward pass and a backward pass for the training data. The forward pass propagates the input vector through the network layer by layer. In the backward pass, the error is sent back to the network in a similar way for back propagation. 4.2.2 FIS Structure and Parameter Adjustment A network-type structure similar to that of a neural network, which maps inputs through input membership functions and associated parameters, and then through output membership functions and associated parameters to outputs, can be used to interpret the input/output map. The parameters associated with the membership functions will change through the learning process. The computation of these parameters (or their adjustment) is facilitated by a gradient vector, which provides a measure of how well the
47 fuzzy inference system is modelling the input/output data for a given set of parameters (Jang J.S.R. 1993). Once the gradient vector is obtained, any of several optimization routines could be applied in order to adjust the parameters so as to reduce some error measure (usually defined by the sum of the squared difference between actual and desired outputs). ANFIS uses either back propagation or a combination of least squares estimation and back propagation for membership function parameter estimation. The function of each node is described for the architecture in Figure 4.5. Figure 4.5 ANFIS architecture for a two rule Sugeno system Layer 1: The output of each node is O 1,i A i (x) for i 1, 2 O (y) for i 3, 4 (4.7) 1,i B i 2 The O 1,i is essentially the membership level for x and y. Where x is the input to node i, and is the linguistic label ( small, middle, large, etc.) associated with this node function. That is, O 1,i is the membership function of
48 A i and it specifies the degree to which the given x satisfies the quantifier. Consider the membership function is chosen to be bell-shaped with maximum equal to 1 and minimum equal to 0, such as the generalized bell function: (x) 1 A 2b i 1 x c a i i (4.8) where a i, b i, c i are the parameters to be learnt which are the premise parameters. When the values of these parameters change, the bell-shaped functions vary consequently, thus exhibiting various forms of membership functions on linguistic layer 2. In fact, any continuous and piecewise differentiable functions, such as commonly used trapezoidal or triangularshaped membership functions, are also qualified candidates for node functions in this layer. Layer 2 Every node in this layer is fixed. This is where the t-norm is used to AND the membership grades - for example the product, O w (x) (y), i 1,2 (4.9) 2,i i Ai Bi Each node output represents the firing strength of a rule. (In fact, other T-norm operators that performs generalized AND can be used as the node function in this layer).
49 Layer 3 Layer 3 contains fixed nodes which calculates the ratio of the rules O w 3,i i wi w w 1 2 (4.10) For convenience, outputs of this layer will be called normalized. Layer 4 the rules The nodes in this layer are adaptive and perform the consequent of O4,i wifi w i(pix qiy r i) (4.11) The parameters in this layer (p i, q i, r i ) are to be determined and are referred to as the consequent parameters. Layer 5 There is a single node here that computes the overall output O w f 5,i i i i i w f i w i i i (4.12) The input vector is fed through the network layer by layer. The ANFIS learns the premise and consequent parameters from the membership functions and the rules.
50 4.2.3 Modelling and Validation The Modelling approach used by ANFIS is similar to many system identification techniques. First, a parameterized model structure (relating inputs to membership functions to rules to outputs to membership functions, and so on) is hypothesized. Then the collected input/output data is used for training. ANFIS trains the FIS model to emulate the training data presented to it by modifying the membership function parameters according to a chosen error criterion. In general, this type of modelling works well if the training data presented to ANFIS for training (estimating) membership function parameters is fully representative of the features of the data that the trained FIS is intended to model. Validation is the process by which the input vectors from input/output data sets on which the FIS was not trained, are presented to the trained FIS model, to see how well the FIS model predicts the corresponding data set output values. The problem with model validation for models constructed using adaptive techniques is selecting a data set that is both representative of the data the trained model is intended to emulate, yet sufficiently distinct from the training data set so as not to render the validation process trivial. The algorithm for ANFIS used in this work is given in Appendix 1.