Wavelet Transform in Fault Diagnosis of Analogue Electronic Circuits

The chapter, among wavelet transform, contains also applications of other modern computational technique: evolutionary optimisation on example of a genetic algorithm, which has proven to be robust and effective optimisation tool for this kind of problems (Bernier et al. 1995; Goldberg, 1989; Grefenstette, 1981, 1986; Holland 1968; De Jong, 1975, 1980; Pettey et al., 1987; Suh & Gucht, 1987; Tanese, 1987).


Introduction
The aim of the chapter is description of a wavelet transform utilisation in fault diagnosis of analogue electronic circuits.The wavelet transform plays a key role in the presented methods and is located in important step of a feature extraction.
The chapter, among wavelet transform, contains also applications of other modern computational technique: evolutionary optimisation on example of a genetic algorithm, which has proven to be robust and effective optimisation tool for this kind of problems (Bernier et al. 1995;Goldberg, 1989;Grefenstette, 1981Grefenstette, , 1986;;Holland 1968;De Jong, 1975, 1980;Pettey et al., 1987;Suh & Gucht, 1987;Tanese, 1987).The author's intention is presentation of a practical utilisation of abovementioned methods (and their combination) in field of testing (fault diagnosis) of analogue electronic circuits.

Fault diagnosis of analogue electronic circuits
An electrical and electronic circuit testing is an inseparable part of manufacturing process.Depending on circuit type (analogue, digital, mixed), function (amplifier, oscillator, filter, mixer, nonlinear etc.) and implementation (tube or semiconductor, discrete, integrated) there have been proposed variety of testing methods.Together with development of modern electronic circuits, test engineers face more and more difficult problems related with testing procedures.Common problems are constant grow of complexity, density, functionality, speed and precision of circuits.At the same time contradictory factors like time-to-market, manufacturing and testing cost must be minimised while testing speed maximised.Important problem is also limited access to internal nodes of integrated circuits.All these problems are related to any "life epoch" of electronic circuit: from design itself, through design validation, prototype characterisation, manufacturing, post-production test (quality control) and finally board/field testing (Huertas, 1993).It must be noted: the later a fault is detected, the faster grows related cost.While final functional testing is unavoidable, there is still an effort in finding fast and simple methods detecting at least the most probable faults in early life stage of a circuit.
The proposed description of testing methods is limited to fault diagnosis of analogue electronic circuits (AEC).Testing of such circuits meets specific problems (i.e.components tolerance, fault masking, measurement inaccuracy) not presented in testing other circuits 198 types (e.g.digital).Utilisation of a wavelet transform can greatly improve efficiency of selected fault diagnosis and, in some cases, makes the diagnosis feasible at all.The wavelet transform is used here as a feature extraction procedure.It must be noted that despite of dominant role of a digital and microprocessor electronic devices, there will never be escape from analogue circuits.Growing complexity of analogue and mixed-level electronic systems (e.g.system-on-chip -SoC) still rises the bar for testing methods (Baker et al., 1996;Balivada et al., 1996;Chruszczyk et al. 2006Chruszczyk et al. , 2007;;Chruszczyk & Rutkowski 2008, 2009, 2011;Chruszczyk 2011;Dali & Souders 1989;Kilic & Zwolinski, 1999;Milne et al., 1997;Milor & Sangiovanni-Vincentelli, 1994;Pecenka et al., 2008;Saab et al. 2001;Savir & Guo, 2003;Somayajula et al., 1996).

Test environment
There have been taken following assumptions on the test procedure: 1. the only available test nodes of a circuit under test (CUT) are the external nodes, 2. CUT is excited by aperiodic excitation and its shape is optimised for given circuit, 3. the only available information about CUT state is read from measurement of four quantities (fig.1): a. output voltage y 1 (t), b. input current y 2 (t), c. supply currents y 3 (t) and y 4 (t).

Fig. 1. Assumed test procedure
There are only measured output voltage y 1 (t) and input current y 2 (t) in case of a passive circuits.
The optimisation goal is the best shape of input excitation voltage (in time-domain).
Generally, it can be described as a continuous time function x(t) (fig.2): Due to practical reasons, there has been assumed discrete form of excitation x(n) described by sequence of N P samples x n with constant sampling period T s .The sampling period always conforms Whittaker-Nyquist-Kotelnikov-Shannon sampling theorem for excitation x(t) and all measured CUT responses.Additionally, value of T s is set to be 10 times smaller

199
than the smallest time constant of a linear CUT.This ensures good approximation of a continuous excitation x(t) by its discrete equivalent.Maximal time length t max of excitation x(t) (so its discrete approximation x(n) as well) is set to be 5 times greater than the longest time constant of a linear CUT.Value of each sample x n is quantised to K levels (fig.3 In order to consider influence of real digital-to-analogue (A/D) converters, there have been used two types of x(n) approximations: 1. "step-shape" (0 th -order polynomial), fig.4, 2. piece-wise linear (1 st -order polynomial), fig. 5.
There have been analysed only single catastrophic (hard) and parametric (soft) circuit faults, because such faults are the most probable.The L-Tester (fault location) points which circuit element is faulty or decision "?", if proper classification cannot be performed.
The deepest level: fault identification (information about faulty element value or at least its shift -represented by I-Tester) has not been analysed in this work.

Fault detection: D-Tester design
Presented fault diagnosis method belongs to class SBT (Simulate-Before-Test) with fault dictionary.The dictionary contains information related to selected faults that are simulated before circuit measurements.There is defined set  The fault dictionary S is built from simulated CUT responses (for all analysed faults).The dictionary contains N F + 1 fault signatures S k , k = 0, 1, 2…, N F , where each signature S k corresponds to fault F k (fig.9).
The example of the fault dictionary for single response y(n) is placed below: Each particular signature S k is vector containing samples of response y(n) = { y 1 , y 2 , …, y Np }: Tolerances of circuit elements must be taken into consideration when building fault dictionary.There has been used Monte-Carlo (MC) function of a PSpice simulator.Values of non-faulty elements are uniformly random within their tolerance interval.The result is multiplication of CUT responses, thus fault signatures, by factor N MC + 1, where N MC is number of performed Monte-Carlo analyses (without nominal circuit).The example below is a fault dictionary for passive CUT (i = 1, 2) and two Monte-Carlo analyses (m = 0, 1, 2), where m = 0 = "nom" denotes circuit with nominal values of elements:  1. one-dimensional Euclidean distance d: where: i = 1, 2 for passive CUT or i = 1, 2, 3, 4 for active one, 2. absolute difference d and selected threshold U min : Wavelet Transform in Fault Diagnosis of Analogue Electronic Circuits 205 where: i = 1, 2 for passive CUT or i = 1, 2, 3, 4 for active CUT.Level of the threshold U min is related to measurement accuracy and is chosen arbitrarily by test engineer.

Fault location: L-Tester design
According to fig. 7, step of the fault location is performed only, if fault detector returns decision NO GO.Then, fault locator tries to find which element is responsible for circuit fault or returns decision "?" ("unknown").The structure, design and work of L-Tester is similar to the D-Tester, except missing state F 0 (healthy circuit) in set F of analysed circuit faults.It must be noted that, despite of one CUT state less to classify from (F 0 ), the diagnosis goal of fault location is much more difficult than fault detection.
Totally, the fault dictionary contains 2•(N MC +1)•N F signatures for passive circuit or 4•(N MC +1)•N F signatures for active CUT.

Utilisation of a wavelet transform
One of alternative methods for simultaneous time-frequency analysis is a wavelet transform (Daubechies, 1992).The most important differences comparing to popular Fourier transform are:  use of base function with limited (or approximately limited) time domain.This implies that base function must be aperiodic,  base function is scaled and shifted simultaneously.
Conceptually wavelet transform is equivalent to constant percentage bandwidth frequency analysis: f/f0=const, used.e.g. in acoustics, but differently implemented.
The formula below defines continuous real wavelet transform (Daubechies, 1992): The function ψ(t) is called base wavelet (or mother wavelet) and its stretched and shifted form ψ a,b (t) called just a wavelet: The parameter a (called scale parameter) is responsible for analysis "resolution".Small value corresponds to high detail level which can be analysed in function x(t).This is analogue to high frequency harmonics in Fourier transform.The parameter b (shift) is responsible for location on the time axis (fig.11).
The inverse transform is defined as (Daubechies, 1992): where  is a synthesising function, dual to the analysing wavelet function ψ and satisfying condition: Fig. 11.Scaling and shifting of the base functions in short-time Fourier transform (STFT) and in wavelet transform

Discrete wavelet transform
In case of a discrete function x(n), the parameters of scale a and shift b are discrete as well and equation ( 14) is modified: In order to completely, but non redundantly cover domain of analysed function x(n), the parameters a and b must be calculated as follows (Daubechies, 1992): Unfortunately, in case of a discrete wavelet transform, there is no guarantee of reconstruction of x(n) based only on values of X(m,n) coefficients (Daubechies, 1992).

Applied modifications of a wavelet transform
Utilisation of a wavelet transform as a feature extractor is based on a continuous transform.Numerical calculations (performed in Matlab environment) lead to following assumptions:  continuous function x(t) is approximated by discrete x(n) (0 th order polynomial, fig.4), values of scale parameter a are limited to natural numbers and value of a max is selected by test engineer:  values of shift parameter b are limited to natural numbers including 0: This allows following transformations of formula ( 14): where expression: is calculated numerically, dependent on selected base wavelet (Daubechies, 1992).In simplified case, when mother wavelet ψ(t) exists in analytical form, equation ( 25) can be expressed directly in discrete form: The above formula clearly shows, that there must performed N P operations of convolution of sequence x(n) with discrete wavelet ψ(n) for each value of scale parameter a.This allows easy evaluation of a numerical complexity of such transformation.

Fault detection with wavelet fault dictionary: DW-Tester
CUT returns discrete responses y i (n) for applied excitation x(n).According to eq. ( 25) or ( 27) there is calculated set of wavelet coefficients Y i (a,b) for each response y i (n): where i = 1, 2 for passive CUT or i = 1, 2, 3, 4 for active CUT and TF is a transform with selected base wavelet function, according to (25) or ( 27).
Distance of a single CUT response y i (n) (represented by matrix of wavelet coefficients Yi ) to appropriate fault signature (also in form of a wavelet coefficients , , ) is calculated as: 1. two-dimensional Euclidean distance: where i = 1, 2 for passive CUT or i = 1, 2, 3, 4 for active CUT; 2. two-dimensional linear Pearson correlation: where: and: = , , … , = , , … , where: i = 1, 2 for passive CUT or i = 1, 2, 3, 4 for active CUT, and ̅ are mean values of elements of respectively matrixes Y and S, , , denotes wavelet signature (matrix of wavelet coefficients) of i-th response yi(n), for k-th fault Fk and j-th Monte-Carlo analysis.

Fault location with wavelet fault dictionary (LW-Tester)
According to fig. 7, the fault location is performed only, if fault detector returns decision NO GO.Then, the fault locator points damaged element or returns decision: "?" ("unknown").The structure, design and work of LW-Tester is similar to the DW-Tester, except missing state F 0 (healthy circuit) in set F of analysed circuit faults.
Distance of a single CUT response y i (n) (represented by matrix of wavelet coefficients Y i ) from appropriate fault signature (also in form of a wavelet coefficients , , ) is calculated as follows: 1. two-dimensional Euclid distance: where i = 1, 2 for passive CUT or i = 1, 2, 3, 4 for active CUT; 2. two-dimensional linear Pearson correlation: where: and: for: = , ,…, = , , … , where: i = 1, 2 for passive CUT or i = 1, 2, 3, 4 for active CUT, and ̅ are mean values of elements of respectively matrixes Y and S, , , denotes wavelet signature (matrix of wavelet coefficients) of i-th response yi(n), for k-th fault Fk and j-th Monte-Carlo analysis.Tolerances of non-faulty elements were equal 2% for resistors and 5% for capacitors.Sampling time of discrete excitation and CUT response was equal to T s = 50 ns.

Example 1: Biquadrate active low-pass filter
There have been investigated three cases, different by method of comparison of CUT responses with appropriate fault signatures and utilisation of wavelet transform.
1.The distance between CUT responses and fault signatures is calculated by means of one-dimensional Euclidean distance ( 11) and wavelet transform is not used.The excitation x(n) and CUT responses y i (n) were discretised by N P = 200 samples.2. Fitness value fit of a particular solution in a genetic algorithm was modified by energy density in found excitation frequency spectrum.This introduced positive selection "pressure" on solutions (excitations) with lower high frequency components.The first step was calculation of discrete frequency spectrum F(m) of a excitation x(n) [Lyon99]: Then, obtained spectrum was divided into two equal intervals: , and , , or equivalently , − and , − .In last step, total energy E i in each i-th interval was calculated: Finally, value of fitness function fit was modified as follows: 3. There has been used wavelet transform to build fault dictionary.The excitation x(n) and CUT responses y i (n) were approximated by N P = 100 samples.

Ad. 1
Figure 14 presents found excitation in time domain and its normalised amplitude spectrum can be found in figure 15.Table 1 shows efficiency of fault detection for step and specialised excitation (probabilities of a healthy circuit correct detection -true positive H H ; healthy circuit incorrect detection -false negative H F ; faulty circuit correct detection -true negative F F and faulty circuit incorrect detection -false positive F H ). Similar data, but for case of fault location (probabilities of fault F x classified as D x , with correct decisions in main diagonal) can be found in table 2 for found excitation and in table 3 for diagnosis with step excitation.It can observed that found specialised excitation x 1 (n) increased test yield in case of fault detection (tab. 1) and efficiency proper fault location was 1.5 ÷ 5 times greater (tab. 2 and 3 main diagonals, better values marked red).

Ad. 2
Figure 16 presents found excitation in time domain and its normalised amplitude spectrum in figure 17.Found specialised excitation x 2 (n) increased test yield in case of fault detection (tab.4) and, in most cases, increased efficiency of a proper fault location (tab.5 and 6).

Ad. 3
Figure 18 presents found excitation in time domain and its normalised amplitude spectrum in figure 19.Table 7 shows efficiency of fault detection for step and specialised excitation (probabilities of a healthy circuit correct detection -true positive H H ; healthy circuit incorrect detection -false negative H F ; faulty circuit correct detection -true negative F F and faulty circuit incorrect detection -false positive F H ). Similar data, but for case of fault location (probabilities of fault F x classified as D x , with correct decisions in main diagonal) can be found in tab.8 for found excitation and tab.9 for diagnosis with step excitation.Designed specialised excitation x 3 (n) together with utilisation of wavelet transform has increased efficiency of a proper fault location (tab.8 and 9), with exception of faults F 3 and F 4 .However, it must be noted that specialised excitation together with wavelet transform enabled proper location of faults F 2 and F 5 (tab.9, marked blue), which cannot be localised at all using simple step excitation.

Example 2: Active low-pass filter
Figure 20 presents active low-pass filter (Kaminska et al., 1997).Designed excitation x(n) has been approximated by a 0 th order polynomial (fig.4).Amplitude of each sample x n is binary coded by N B = 3 bits.Width t w of each interval is changed in range 1 do 8 s and its resolution is M B = 2 bits coded by Gray code.Non-faulty tolerances were equal 2% for resistors and 5% for capacitors.There were selected 8 parametric (soft) faults of discrete elements (R 1 , R 2 , R 3 and C): 10% shift above and below nominal values.
There have been analysed four active CUT responses (fig.1).Assumed observation windows was T max = 50 s after last falling edge of the excitation.This value is also equal to time when circuit reaches steady state after step excitation.
There have been investigated two cases: 1. D-Tester (without wavelet transform) and one-dimensional Euclidean distance metrics (11).2. DW-Tester with Meyer base wavelet and two-dimensional Euclidean distance metrics (30).

Conclusions
Utilisation of a wavelet transform as a feature extraction from CUT responses and in building fault dictionary resulted in general improvement of diagnosis efficiency.There have been investigated single catastrophic (hard) and parametric (soft) faults of passive and active analogue electronic circuits.It must be emphasized that the last faults are much more difficult to diagnose, because their influence on circuit behaviour (e.g.transfer function) is much weaker than catastrophic ones.It must be also noted that fault location is more difficult diagnostic goal than fault detection ("just" a differentiation between healthy and faulty circuits).Wavelet transform has been found useful tool in diagnosis of analogue electronic circuits, both in reference cases of simple excitations (step function, real Dirac pulse, linear function) and in cases when excitation has been designed by genetic algorithm.
In every case, combination of specialised excitation and wavelet transform resulted in highest efficiency of fault diagnosis.
It has been also found that in some cases (example 2) utilisation of wavelet transform allowed 100% location of a selected faults.Merging genetic algorithm and wavelet transform in example 1 allowed design of test excitation which enabled location of faults completely hidden for diagnosis using step excitation.
It must be also added that abovementioned results have been achieved for simple, nonoptimised classifiers based on simple, the closest neighbourhood metrics.

Fig. 2 .
Fig. 2. General form of an input excitation t

Figure
Figure below presents structure of the D-Tester (fault detector).

Fig. 9 .
Fig. 9. Schema of fault dictionary creationAccording to the test and measurement assumptions, excited passive CUT returns two responses: output voltage y 1 (n) and input current y 2 (n), where excited active CUT returns four responses -additionally positive y 3 (n) and negative supply current y 4 (n).The dictionary S contains fault signatures S i,k , k = 0, 1, 2…, N F for particular CUT responses y i (n).Example for passive CUT is presented on fig. 10 (i = 1, 2): ,k means set of signatures of k-th fault for i-th response y i (n), obtained from N MC Monte-Carlo simulation, where k = 0, 1, 2, …, N F and i = 1, 2 for passive or i = 1, 2, 3, 4 for active circuit: fault dictionary for passive CUT contains 2•(N MC +1)•(N F +1) signatures and for active CUT: 4•(N MC +1)•(N F +1) signatures.

Figure 10
Figure10contains exemplary signatures for single CUT response and two selected faults F 1 and F 2 .Number of Monte-Carlo analyses is N MC = 4.There has been assumed that location of particular signature is distance from signature (healthy nominal circuit).If there are no Monte-Carlo analysis performed (all circuits are nominal), the horizontal axis contains only signatures.The Monte-Carlo analysis introduces spread around nominal values and single signatures turn into a group of signatures , , where m = 1, 2, …, N MC for i-th CUT response y i (n) and k-th fault F k .This enables finding border values of the signature sets (groups) -fig.10.

Fig
Fig. 12. Schematic of a DW-Tester

Fig. 13
Fig.13presents biquadrate active low-pass filter[Bali96].Specialised excitation has been found by means of a genetic algorithm and diagnosis efficiency has been compared to case of testing using simple excitation: input voltage step.There have been selected 8 parametric faults among 4 discrete elements: C 1 , C 2 , R 2 and R 4 : 10% above and below nominal values.Tolerances of non-faulty elements were equal 2% for resistors and 5% for capacitors.Sampling time of discrete excitation and CUT response was equal to T s = 50 ns.

Fig. 21
Fig. 21 and 22 present found excitations for case 1 and 2 respectively.Tab. 10 presents diagnosis efficiency for defined faults and excitations.

Table 6 .
Table4shows efficiency of fault detection for step and specialised excitation (probabilities of a healthy circuit correct detection -true positive H H ; healthy circuit incorrect detection -false negative H F ; faulty circuit correct detection -true negative F F and faulty circuit incorrect detection -false positive F H ). Similar data, but for case of fault location (probabilities of fault F x classified as D x , with correct decisions in main diagonal) can be found in table 5 for designed excitation and in table 6 for diagnosis with step excitation.Fault location efficiency for step excitation (ad.2)