Fuzzy filtering method and associated fuzzy filter

Abstract: The fuzzy filtering of a noise signal comprising a plurality of signal samples [s(t,k)] is carried out using as variables the variation of the signal in the considered window and the distance of the samples from a sample to be reconstructed, so as to distinguish the typical variations of the original signal from those due to the noise and to identify the signal fronts. The method comprises the steps of: defining a current signal sample [s(t)] from among the plurality of signal samples; calculating a plurality of difference samples [D(t,k)] as difference in absolute value between the current signal sample and each signal sample; defining distance values (k) between the current signal sample and each signal sample; determining weight parameters [P(k)] on the basis of the difference samples and the distance values by means of fuzzy logic; and weighing the signal samples with the weight parameters so as to obtain a reconstructed signal sample [o(t)].

Description: The invention relates to a fuzzy filtering method and associated fuzzy filter. As is known, a large number of mass-market applications (such as hi-fi, telecommunications) requires the definition of dedicated methods and architectures for the filtering of the deterministic signals corrupted by noise. Traditionally the problems of noise reduction ("denoising") are dealt with using linear filters (such as low-pass type filters with fixed cut-off frequency) or with non-linear filters such as median filters. The traditional linear filters are ideal for solving problems in which the frequency specifications are well defined. They do, however, have the disadvantage that, in order to reduce noise, they often eliminate data belonging to the original signal. As far as non-linear type filters are concerned, median filters have proved to be very efficient in eliminating pulse-type noise, but they are less efficient in the case of Gaussian noise. For this reason, filters of a completely different type have been proposed: for instance, the article "A Non-Linear Digital Filter Using Fuzzy Clustering" by Kaoru Arakawa and Yasuhiko Arakawa describes a simplified filter either using digital (0/1) weights (crisp clustering shown in figure 2 (b)) or a step-like variable weights (membership function shown in figure 4), so that the weights are only function of the distance between the samples. Furthermore, the article entitled "Fuzzy Rule-Based Signal Processing and Its Application to Image Restoration" by Kaoru Arakawa, IEEE Journal on Selected Areas in Communications, Vol. 12, No. 9, December 94, to which the preamble of claim 1 refers proposes a filter based on the processing of the signal by means of "fuzzy" logic, in which the signal is reconstructed by means of a filter which weighs local samples of the signal received and the weights are calculated using three rules whose variables are the difference between the signal samples, the time difference between those signal samples and the local variance of the signal; the filter also uses a learning signal to fix a number of filtering parameters. This approach is burdensome in its calculations and is not always capable of supplying the desired accuracy of reconstruction of the signal. The object of the invention is therefore to provide a method and a filter for signals affected by noise, in particular by white noise of Gaussian distribution, capable of performing an efficient reconstruction of the signal, with calculation work that is reduced or in any event acceptable as regards the intended applications. According to the invention a fuzzy filtering method and associated fuzzy filter are provided, as defined in Claim 1 and, respectively, 8. In practice, according to the invention, the filtering is carried out by using as variables the variation of the signal in the considered window and the distance between the samples and a sample to be reconstructed, so as to distinguish the typical variations of the original signal from those due to the noise, i.e. so as to succeed in identifying the signal fronts. For an understanding of the invention, a preferred embodiment will now be described purely by way of non-exhaustive example, with reference to the accompanying drawings in which: Figs. 1 and 2 show the plot over time of two signals, and specifically of a square-wave signal and a square-wave signal affected by white noise; Figs. 3-5 show the membership functions of three variables of the system, according to fuzzy logic; Fig. 6 shows the general flow diagram of the filtering method according to the invention; Fig. 7 shows the membership function of a first variable of the system, in discrete form; Fig. 8 shows the membership function of a second variable of the system, in shifted discrete form; Fig. 9 shows a detail of the flow diagram of Fig. 6, with discrete system variables; Fig. 10 shows the architecture of an embodiment of the fuzzy filter according to the invention; Figs. 11-12 show more detailed block diagrams of the fuzzy filter of Fig. 10. The filtering according to the invention is applied in particular in the case of signals with constant sections, with rapid transitions, like the signal of Fig. 1. Let us suppose that, following transmission for example, the signal is corrupted by white Gaussian-type noise and therefore has the form of Fig. 2. If we call the corrupted signal received (Fig. 2) s(t), the non-corrupted signal it is desired to reconstruct g(t) (Fig. 1) and the noise n(t) and if we allow the signal to be sampled at times t=0...T, this will give: s(t) = g(t) + n(t). The purpose of the filtering is therefore to localize and filter the zones disturbed by the noise by means of a local analysis of the signal, moving on windows of pre-determined size. In particular, the signal s(t) is sampled so as to respect the constraints of the sampling theorem. The signal is analyzed in work windows which contain 2*N+1 points [s(t-N), ..., s(t-1), s(t), s(t+1), ..., s(t+N)] and which shift whenever centred on successive points of the said signal; the size 2*N+1 of the window thus tells us how much of the signal's history is taken into account at time t. The variables used with this method are the variables k, D(k), P(k), in which k is an index which assumes whole values between -N and +N; D(k) (also denoted as D below) is given by the absolute value of the difference between different samples of the signal s(t) and P(k) are the weights with which the signal samples s(t-k) have to be weighed so as to obtain the filtered output signal, according to the equations (which define the antecedents of the rules): D(t, k) = | s(t-k)-s(t) | where k=-N, ..., N and k ≠ 0 k = the time distance between s(t-k) and s(t) and according to the equation (which constitutes the consequent of the rules): P(k) = weighing coefficients between [0,1] inclusive. The value of the filtered signal, called o(t), is given by the following equation: o ( t ) = Σ k P ( k )* s ( t - k ) Σ k P ( k ) k=-N,...,N in which the relative weight at the point s(t), P(0), is always set equal to 1. This method uses an adaptive type of scheme to define the membership functions of the variable D, by evaluating the maximum excursion of the signal in the considered window and the local estimate of the noise n(t) in a window of size [2*W+1], centred on the point t-W-1 (noise estimated for the signal samples preceding the one considered). In particular, two values V x and V n are determined, defined as: V x = max [s(t)] which represents the maximum value of the universe of the variable D, and V n = max [err(t,j)] where err(t,j) is given by: err(t,j) = s(t-j) - o(t-j) and defines a vector of dimensions 2*W+1. For every time t, therefore, two membership functions shown in Fig. 3 are given for the variable D, in which V x and V n have the meaning and are calculated as indicated above and µ represents the confidence level or truth level of the variable D for each membership function. Consequently, the membership functions of the variable D are parametrized with respect to the values V x and V n so as to distinguish the signal from the noise. In contrast the variable k has two fixed membership functions, shown in Fig. 4, which provide respective confidence levels η. According to this method, the following rules are applied for every value of the variable k (and hence of the relative value of the variable D) : R1: IF D is SMALL and k is SMALL THEN p 1 is LARGE R2: IF D is SMALL and k is LARGE THEN p 2 is MEDIUM R3: IF D is LARGE and k is LARGE THEN p 3 is SMALL to determine corresponding membership functions of values p i used to calculate the weights P(k). In practice, on the basis of such rules, if the variation D between the sample s(t) considered and the sample s(t-k) is large and k is large, then a noise zone has been identified and thus the weight of the point s(t-k) in the reconstruction of the signal must be small; if the variation D is small, p i must be large if k also is small, whereas it is medium if k is large. Furthermore, the case of large variation D and small k is not taken into account as it has no influence. In fact, only a very large window causes a loss of accuracy on the progress of the signal and tends to make the output function "smooth". The variable k enables this smoothing effect to be limited in that in the reconstruction of the sample s(t) it acts so that the size of the sample s(t-k) is smaller, the greater the distance between the two samples considered. The membership functions of the weight values p i are shown in Fig. 5 and are represented by curves of constant area, so as to permit a simplification of the counts in the defuzzing phase. In Fig. 5, C1, C2 and C3 represent the centroids respectively for the case p i SMALL, MEDIUM and LARGE, and are preferably selected so that their sum is equal to a power of two and they are arranged at uniform distances. According to this method, given the rules R1, R2 and R3, to calculate the weights P(k) to use in equation (2), the p i values are determined on the basis of the rule of the minimum (p iSMALL is determined, for example, as minimum between the corresponding values of µ LARGE and η LARGE ) and hence are multiplied by the values of the corresponding centroid (C 1 , for example, in the case of p 1 ), to determine the weights P(k) on the basis of the equation: The overall diagram of this method is shown in Fig. 6 and will now be described in detail. The method provides a sequence of phases repeated for each sample of the signal s(t) to be reconstructed and begins, after a series of initial phases comprising the initialization of filter parameters and variables, block 5, and the definition of the variable k, block 6, with an assignment of the parameter t (block 10); the definition of the considered samples window (by means of storage, for example, in a first register, of a vector s of 2N+1 samples [s(t-N), ..., s(t-1), s(t), s(t+1), ..., s(t+N)] centred on s(t), block 11; the definition of the estimated noise window, by means of previously calculated samples (by means of storage, for example, in a second register, of a vector err of 2W+1 samples [err(t-2W-1), ..., err(t-1)] centred on err(t-W-1), block 12 (preferably, N=W, so that an equal number of signal and noise samples is considered); and the calculation, according to equation (1), of the 2K values of the variable D, for example, stored as vector D in a third register, block 13; alternatively, the vectors s , err and D of the signal samples, of the noise samples and of the values of the variable D are stored in three different parts of one and the same register. The minimum and maximum values S_MIN, S_MAX, ERR_MIN, ERR_MAX assumed by the signal samples s(t) and by the estimated noise err(t) in the windows considered (or of the samples stored above, block 14) are then calculated (in parallel or in succession); the values V x and V n are determined, as S_MAX-SMIN and ERR_MAX=ERR_MIN (block 15); and, on the basis of the values V x and V n just calculated, the membership functions of the variable D are defined, block 16. Then, for every value of k from -N to +N, with k ≠ 0, the respective value of the variable P(k) is determined, so as to obtain a vector P . In detail, starting from k=-N (block 20), on the membership functions of the variable D which have just been defined (Fig. 3), the respective values µ s , µ L are determined respectively in the case of D=SMALL and D=LARGE (block 21); on the membership functions of the variable k (Fig. 4), the respective values η s , η L respectively in the case k=SMALL and k=LARGE (block 22); then, by applying the rules R1, R2 and R3 described above and the rule of the minimum, the three associated weight values p 1 , p 2 and p 3 are obtained (block 23) and, on the membership functions of the weight values, the respective centroids C 1 , C 2 and C 3 (block 24). For example, for rule R1, the corresponding weight value p 1 is equal to the minimum among the values µ s and η s determined previously (e.g. µ s ) and the corresponding centroid (given that p 1 =LARGE, according to Rule 1) is equal to C 1 . Next, on the basis of equation (6), the weight variable P(k) is calculated and is stored in an appropriate location in a respective register, block 25; the variable k is incremented (block 26); a check is made as to whether k is different from zero (block 27, in which case p(k) is set equal to 1, block 28, k is incremented again and, as long as k is not greater than N (output NO from block 29), the above-mentioned phases relating to blocks 21-26 are repeated. At the end, all the 2N+1 weights P(k) necessary in order to weigh the signal s(t) are available; consequently the output signal o(t) is now calculated according to equation (2), block 40. Finally the new estimate of the noise at time t, err(t), is calculated as the difference between the local value of the corrupted signal s(t) and the local value of the reconstructed signal o(t), block 31. The procedure then begins again for a successive sample, as shown in the flow diagram with the return to block 10. The above-mentioned method is implemented by means of a hardware architecture that will now be described. In particular, in designing the architecture, the problem was addressed of finding data structures capable of meeting two contrasting requirements of information representation and data processability. This problem related in particular to the membership functions of the variable D which is the most costly from the point of view of the calculations required. Generally the membership functions are represented in analytical or vectorial manner. However, the first solution requires a computational complexity (in particular because of the number of divisions required) that is such that the requirements in terms of hardware are unacceptable for the majority of mass-market applications; in contrast, the second solution proves impossible to achieve in that, in the presence of input signals with 20-24 bit dynamics, the vectorization of the membership functions would require values of N (and hence of the associated samples) of the order of 2 20 - 2 24 which are incompatible with any practical implementation. To solve this problem, according to this solution, the membership functions of both the variable D and the variable k are discretized, and a desired level of accuracy is pre-determined. This solution is advantageous in that k of itself assumes only discrete values, so that it is sufficient to associate with each value of k a corresponding truth value (see Fig. 7). In the example considered, where N=5, there are six different truth values to store. By selecting an accuracy of representation of 4 bits it is thus possible to construct a table of 11x2 elements, containing the binary code of the values val0...val5 (equal to 0000; 0011; 0110; 1001; 1100 and 1111) for the eleven values of k and for the two situations k=SMALL and k=LARGE. Given that the variable D is linked by AND conditions to the variable k and once the accuracy of the variable k has been chosen, the deduction is that it is not necessary to define truth values relating to the variable D with an accuracy greater than that relating to the variable k. This causes a notable simplification of the hardware structure; in particular the increasing and decreasing sections of the level of truth associated with the variable D in both cases, SMALL AND LARGE, can be divided into sixteen horizontal levels, from 0 to 15, and these may be made to correspond to sixteen sub-intervals of variability of the variable D, characterized in that they have a same value of µ. According to this solution, furthermore, for values of the variable D that are smaller than V n (where D=SMALL), the associated level of truth µ is set equal to the maximum value (15) and the discrete transfer function is shifted along the axis of the abscissae until the point D=V n is brought to the origin of the axes. A discretized virtual membership function is thus obtained, shown in Fig. 8, in which D T is the shifted variable D, comprised between 0 and (V x -V n ) inclusive, and its variability interval, denoted overall by A, has been divided into 16 sub-intervals equal to A/16. In this way, and as described with reference to Fig. 9, the level of truth associated with each value of D may be produced by means of simple additions, comparisons and repeated divisions by 2 without calculating or storing the said function. In the case of D=LARGE the membership function is obtained solely by discretizing the levels of truth associated with sixteen sub-intervals of variability of the variable D in the increasing section (between 0 and V x -V n ) and setting µ=15 when D>V x -V n . With reference to Fig. 9, the algorithm for calculating the degrees of membership of the variable D in the case D=SMALL will now be described in detail; the calculation in the case D=LARGE is similar, apart from a number of inversions relating to the comparisons and the direct comparison between the variable D and the variability intervals. The value D is initially compared with V n (block 40); if D<V n , µ=15 is set (block 41) and the calculation ends; otherwise (output NO from block 40) the central point (V x -V n )/2 of the variability interval of the variable D T is calculated and a variable DCOMP is initialized with this value (block 42); the value D-V n is compared with DCOMP (block 43); if D-V n <DCOMP (or the variable D T is to the left of the central point, output YES from block 43), µ=8 is set (block 44); then, block 45, the value DCOMP is updated by decrementing it by (V x -V n )/16, that is reducing the comparison value DCOMP by one sixteenth of the variability interval A of D T , corresponding to a different level of truth. The value D-V n is then compared with the new value of DCOMP (block 46); if D-V n ≥DCOMP (that is D T is to the right of the new DCOMP value) the value of µ is already the correct one and the procedure ends. Vice-versa (output YES from block 46), µ is incremented by one unit (block 47) and one returns to block 45, again decrementing DCOMP by a quantity equal to a sub-interval A/16, and resuming the above-mentioned phases of updating DCOMP, incrementing µ and checking until D T comes to be to the right of the current value of DCOMP, after which the procedure ends. Similarly, where the comparison carried out in block 43 gives a negative outcome (the variable D T is to the right of the central point, µ is set at equal to 7 (block 50), the DCOMP value is updated by incrementing it by (V x -V n )/16, that is increasing the comparison value by a sixteenth of the variability interval of D T , block 51; the value D-V n is compared with the new value of DCOMP (block 52); if D-V n >DCOMP (or D T is to the right of the new DCOMP value) µ is decremented by one unit (block 54) and one returns to block 51, again incrementing DCOMP by a quantity equal to a sub-interval, otherwise (output NO from block 52) the procedure ends. Fig. 10 shows a hardware structure, denoted in its entirety by 60, implementing the filtering method described above. In the particular example shown, N=W=5 has been set and the signals are coded by means of 24 bits. The structure 60 comprises a control unit 61, such as a states machine, which determines the processing sequence, the loading and the passage of data between the various units; a first data store 62; a minimum/maximum determination unit 63; a second data store 64; a difference unit 65; a third data store 66; a fuzzy calculation unit 67; a fourth data store 68; a weights calculation unit 69 and an output calculation unit 70. As well as control lines connecting the control unit 61 to the various units 62-70, Fig. 10 shows lines representing the flow of data within the structure; in particular, for the first data store 62, the inputs at which the signal samples (from the outside) and (from the difference unit 65) the noise samples and the samples of the variable D are supplied are shown. The output of the first data store 62 is connected to the minimum/maximum determination unit 63, to the difference unit 65, to the fuzzy calculation unit 67 and to the output calculation unit 70; the output of the minimum/maximum determination unit 63 is connected to the second data store 64 whose output is connected to the difference unit 65; the difference unit 65 has an input connected to the output of the output calculation unit 70 and outputs connected to the first 62 and to the third data store 66; the latter has an output connected to the fuzzy calculation unit 67, whose output is connected to the fourth data store 68; the latter has an output connected to the fourth data store 68 whose output is connected to the weights calculation unit 69, connected in its turn at its output to the output calculation unit 70. The first data store 62 is intended to store the signal samples s(t-5)...s(t+5), the noise samples err(t-11)...err(t-1) and the vector D D(t-5)...D(t+5) and thus comprises 32 registers (11 for the signal samples, 11 for the noise samples and 10 relating to the elements D(k), where k≠0, of the vector D). The first data store 62 is updated at every cycle, and specifically at the start of each new cycle, by causing the preceding signal samples to shift so as to eliminate the "oldest" sample and inserting a new signal sample (corresponding to the load phase indicated by block 11 in Fig. 6), then storing the value of the variables D calculated by the difference unit 65 in the first processing phases (according to block 13 of the diagram of Fig. 6) and, at the end of the procedure for calculating the reconstructed signal sample o(t), inserting a new noise sample err(t), after having caused the preceding noise samples to shift and having thus eliminated the oldest noise sample (corresponding to block 12 of Fig. 6). The structure of the minimum/maximum determination unit 63 is shown in Fig. 11. The unit 63 comprises a multiplexer 73 having two data inputs 74, 75, a selection input 76 and an output 77 connected to an input of a demultiplexer 78 having a selection input 79 and two outputs 80, 81; the output 80 is connected to an input of a maximum register 82 having two outputs 83, 84; the output 81 is connected to an input of a minimum register 86 having two outputs 87, 88. The outputs 83, 87 of the registers 82, 86 are connected to the inputs of a multiplexer 90 having a selection input 91 and an output 92 connected to a first input 93 of a comparison block 94 having a second input 95 connected to the first data store 62 and an output connected to a first input 96 of an AND gate 97 having a second input 98 and an output connected to the selection input 76 of the multiplexer 73. The input 74 of the multiplexer 73 is connected to the output 92 of the multiplexer 90 and the input 75 is connected to the first data store 62, together with the second input 95 of the comparison block 94. According to the illustration in Fig. 11, the first data store 62 has a control input to which is supplied a pointer signal Pt which specifies successive registers of the said first data store 62 relating to the signal samples s(t) and noise samples err(t) stored, whose contents are supplied, one at a time, simultaneously to the inputs 75 of the multiplexer 73 and 95 of the comparison block 94. Furthermore, the inputs 79, 91 and 98 all receive a 1-bit signal M which specifies each time whether a minimum or maximum comparison is being made and switches with every timing pulse so as to carry out, for example, firstly a minimum comparison and then a maximum comparison for one and the same binary signal (signal or noise sample) supplied by the first store 62. The minimum/maximum determination unit 63 operates as follows. Initially the registers 82, 86 are initialized to arbitrary values, such as the minimum number (for the maximum register 82) and the maximum number (for the minimum register 86) permitted by the accuracy provided. Then, to the inputs 75 of the multiplexer 73 and 95 of the comparison block 94, the first data store 62 supplies a first datum, such as the first signal sample s(t-5); the selection signal M is at the minimum comparison logic value. Then the multiplexer 91 supplies the input 93 of the comparison block 94 with the content of the minimum register 86 which is then compared with the sample present at the input 95. The comparison block 94 then generates at the output a 1-bit signal C whose logic value indicates whether the signal at the input 93 is greater than the signal at the input 95 or not. The signal C is combined by the AND gate 97 with the selection signal M so as to supply to the input 76 a control signal SEL which specifies which of the two data inputted at the multiplexer 73 must be outputted, according to the table below in which, by way of example, it is supposed that the signal M is 1 in the case of seeking the maximum and 0 if it is not, the signal C is 1 in the case where the datum at the input 93 is greater than that present at the input 95 and 0 if it is not, and the signal SEL is equal to 1 if the multiplexer has to output the datum present at its input 74 and 0 if it does not. M\C 0 1 0 SEL=1 SEL=0 1 SEL=0 SEL=1 If the datum at the inputs 75 and 95 is less than the datum at the inputs 74 and 93, it is then supplied to the demultiplexer 78 which, on the basis of the low value of the signal M, supplies it to the output 81 for storage in the register 86 in the place of the preceding value. The signal M then switches to 1, the multiplexer supplies to the inputs 74 and 93 the content of the register 82 which is compared by the block 94 with the said datum supplied by the first data store 62 and previously compared with the content of the register 86. On the basis of the outcome of the comparison, and by analogy with the explanation of the minimum comparison, the maximum between the two data is supplied at the output 77 and, via the demultiplexer 78, to the maximum register 72. In a successive cycle the first data store 62 supplies a second signal sample s(t-4), on which the comparisons are made as described above, and so on, for all the signal samples as far as s(t+5). At the end of the comparisons, the minimum and maximum value of the signal are stored in the registers 82 and 86 and these values, called S_MIN, S_MAX, are copied into two of the four registers of the second data store 64. The process described above is then repeated for all the noise samples err(t), permitting the storage, in the other two registers of the second data store 64, of the minimum and maximum value of the noise, denoted by ERR_MIN, ERR_MAX. The second data store 64 comprises four registers for storing S_MAX, S_MIN, ERR_MAX and ERR_MIN. The difference block 65 is implemented by a hardware adder of known type and not therefore shown. The third store 66 comprises two registers for storing the values of V x and V n . The structure of the fuzzy calculation unit 67 is shown in Fig. 12. The unit 67 comprises three registers, and specifically two shift registers 100, 101 and one simple register 102, all 24-bit ones. The registers 100-102 each have a first input, respectively 103, 104 and 105, a second input, respectively 106, 107 and 108, and an output, respectively 109, 110, 111. The shift registers 100, 101 also have a control input 113, 114 to which is supplied a control signal which specifies whether the content of the register should be shifted and by how many positions (to carry out a division by 2 or by 16, according to the provision of the flow diagram shown in Fig. 9). The outputs 109 and 111 of the registers 100 and 102 are connected to respective inputs of a multiplexer 117 also having a selection input 118 and an output 119 connected to an input of an adder element 120 having a second input connected to the output 110 of the register 101, a timing input 121 and an output 122. The output 122 is connected to the input of a demultiplexer 123 having a two-bit selection input 124 and three outputs, connected to the inputs 106-108 of the registers 100-102. The output 122 of the adder 120 is also connected to the control unit 61 (Fig. 10) which also supplies the selection and control signals to the multiplexers 117, 123 and to the registers 100, 101 so as to control the timing of the flow of data between the various elements of the unit 67 and to determine the operations to be carried out. In particular, as explained above, on the basis of the output of the adder 120, the control unit 61 determines the outcome of the comparisons described in the blocks 40, 46 and 52 of the flow diagram of Fig. 9 and it also determines whether the DCOMP value needs to be incremented or decremented (whether to move to the right or left of the mid-point of the discretized and moved membership function of Fig. 8). Furthermore, the control unit 61 provides to update the value of µ. Initially, the registers 100-102 are loaded with the values D, V n and V x ; then the adder 120 receives at its inputs the values V x from the register 101 and the value D from the multiplexer 117, appropriately controlled via the selection signal present at its input 118. In a successive phase, the adder 120 carries out the difference between D and V x , controlled via the control input 121, and simultaneously receives the values V x and V n from the registers 102 (via the multiplexer 117) and 101. The result of the difference (D-V n ) is supplied both to the multiplexer 123 and to the control unit 61 which, according to whether it is positive or negative, checks the condition of the block 40 of Fig. 9; in particular, if the difference is negative, the control unit sets µ=15 and ends the procedure, otherwise it generates a control signal for the multiplexer 123 so that it supplies the output of the adder 120 to the register 102, the content of which is not modified further. The control unit 61 then controls the adder 120 so that it carries out the difference between the inputted values V x and V n ; it also controls the multiplexer 123 so that it supplies to the registers 100 and 101 the output of the adder 120 and the registers 100 and 101 so that they cause the value received to shift respectively by four bits and one bit to the right, determining a division by 16 and by 2. At the end of this phase the register 100 stores the value (V x -V n )/16; the register 102 stores the value D-V n ; and the register 101 stores the value (V x -V n )/2. After that the content of the register 100 is not modified further. Subsequently the control unit 61 controls the multiplexer 117 so that it supplies to the first input of the adder the content of the register 102 (D-V n ); it also controls the adder 120 so that it carries out the difference between the datum present at its first input and the datum present at its second input (equal to the content of the register 101, (V x -V n )/2) and checks whether the result is positive or negative, as specified in block 43 of Fig. 9, and thus whether the value of D-V n is to the right or left of the central point of the variability interval. On the basis of this result of the comparison, the content of the register 101 is updated by adding at every step the content of the register 100, according to block 51 of the diagram of Fig. 9, or by subtracting at every step the content of the register 100, according to block 45 (updating of DCOMP). These updates are carried out by appropriately controlling the adder 120, storing the result of the addition or subtraction in the register 101; thus, in every checking cycle, the content of the register 101 is subtracted from the content of the register 102 (equal to D-V n ), to make the comparison provided for in block 45 or block 51; on the basis of the result of this subtraction the control unit 61 decides whether to proceed with the updating of the comparison value DCOMP stored in the register 101 and with the updating of the value of µ or whether to interrupt the calculation cycle, according to the description in the diagram of Fig. 9. In this way, with seven iterations at the most, by carrying out simple additions and subtractions, it is possible to determine the value of µ for a pre-determined value of k and a specific condition (D=SMALL or D=LARGE); the repetition of the phases described for all the values of k (apart from k≠0) and both the conditions of D enables ten values of µS corresponding to D=SMALL and ten values of µL corresponding to D=LARGE to be calculated. The fourth data store 68 comprises four groups of ten registers (40 registers in total) of 4 bits, for storing truth values µ and η for D=SMALL and D=LARGE, respectively k=SMALL and k=LARGE for k=-5...+5, with k≠0, as indicated in Fig. 1 from µS1...µS10, µL1...µL10, ηS1...ηS10, ηL1...ηL10. In particular the values of µS and µL are supplied by the fuzzy calculation unit 67, as described above, whilst the values of ηS and ηL can be stored permanently in the fourth data store 68, given that they do not depend on the value of the signal samples s(t,k) or on other variables conditioned by local situations or events, but only on k, whose variability is predefined at the design stage, as explained above with reference to Fig. 7. The phases of acquisition of the values k (block 6 of Fig. 6) and of the respective levels η S , η L (block 22) may therefore be carried out once and for all, in the design phase or when the fuzzy filter 60 is used for the first time. The weights calculation unit 69 provides to apply the rules to determine the weight values p i and the associated centroids and to calculate the variables P(k), according to the description with reference to blocks 23-25 of Fig. 6. This unit is produced by means of a dedicated ALU, produced in known manner and not therefore described, which takes advantage of the fact that the sum of the centroids is equal to a power of 2, as described above, so as to reduce the final division provided in equation (6) to one shift in one register by a number of positions equal to that power. The output calculation unit 70 determines the estimated value of the signal o(t) on the basis of equation (2) on the basis of the weights P(k) and the signals s(t-k) supplied by the first data store 62 and by the weights calculation unit 69. This unit 70 is also produced as a dedicated ALU, preferably separated from the previous one to allow pipeline processing of the data. The output o(t) thus calculated is outputted as reconstructed signal sample and furnished to the difference unit 65 so that it calculates the difference between it and the signal sample s(t) to determine the noise err(t) required for the successive calculation cycle relating to the signal sample s(t+1). The operation of the hardware structure 60 will be evident from the above and on the basis of the flow diagrams according to Figs. 6 and 9. The advantages that can be obtained with the method and the architecture described are as follows. Firstly, they permit a good reconstruction of the signal affected by Gaussian white noise even when the signal has steep fronts (square-wave signal). Furthermore, the reconstruction of the signal can be carried out by means of a hardware structure that is relatively simple and inexpensive, and capable of calculating the reconstructed signal samples in real time. This structure may be implemented and integrated with ease, permitting an integrated circuit dedicated to the reconstruction of the signal to be obtained. The method and architecture described do not require the presence of ordered data, which would involve burdensome operations from the point of view of the calculations, and permit the calculation of variable membership functions (dependent on the values V x and V n determined from time to time), which could not be tabulated and the calculation of which by intersection would be burdensome with traditional methods. It will also be evident that modifications and variants may be introduced to the method and structure described and illustrated herein without thereby departing from the scope of the invention. For instance, the first data store 62 may be sub-divided into three separate store elements, for the signal samples, for the noise samples and for the elements of the vector D , instead of being a single element, or encompassing further sections of store comprising the stores 64, 66 and 68.

Claims: Method of fuzzy filtering of a noise signal comprising a plurality of signal samples [s,(t,k)], comprising the steps of: a) defining (11) a current signal sample [s(t)] from among said plurality of signal samples; b) calculating (13) a plurality of difference samples [D(t,k)] as the difference in absolute value between said current signal sample and each sample of said plurality of signal samples; c) defining (6) distance values (k) between said current signal sample and each sample of said plurality of signal samples; d) determining (25) weight parameters [P(k)] on the basis of said difference samples and said distance values by means of fuzzy logic; and e) weighing (30) said signal samples with said weight parameters so as to obtain a reconstructed signal sample [o(t)]; characterized by the steps of: f) calculating (31) a noise sample [err(t)] as the difference between said reconstructed signal sample [o(t)] and said current signal sample [s(t)], wherein said step of determining weight parameters comprises the steps of: repeating said steps a)-f) to obtain a plurality of samples of reconstructed current signal and a plurality of samples of estimated noise; determining (14) a noise maximum variation value (V n ) on the basis of a maximum value [ERR_MAX] and a minimum value [ERR_MIN] of said estimated noise samples; determining (15) a signal maximum variation value (V x ) on the basis of a maximum value [S_MAX] and a minimum value [S_MIN] of said signal samples; determining (16) at least two first classes of membership (D=SMALL, D=LARGE) for said plurality of difference samples, said first classes of membership being defined by functions with sections having as limits said noise and signal maximum variation values; associating (21) with each difference sample a respective difference level of truth (µ) in each of said first classes of membership; determining (fig. 4) at least two second classes of membership (k=SMALL, k=LARGE) for said distance values; associating (22) with each distance value (k) a respective distance level of truth (η) in each of said second classes of membership; applying fuzzy rules (23) to associate said difference and distance levels of truth with weight values (p i ) and with respective third classes of membership; determining (25) said weight parameters [P(k)] as a function of said weight values and with pre-determined parameters (C i ) of said third classes of membership. Method according to Claim 1, characterized in that said step of determining (16) at least two first classes of membership comprises the steps of: determining a SMALL membership class having a horizontal section for values of said difference (D) samples between zero and said noise maximum variation value (V n ) and a section of constant gradient for values of said difference samples between said noise maximum variation value and said signal maximum variation value (V x ); determining a LARGE membership limitation value (V x -V n ) as the difference between said signal maximum variation value (V x ) and said noise maximum variation value (V n ); determining a LARGE membership class having a constant gradient section for values of said difference (D) samples between zero and said LARGE membership limitation value and a horizontal section for values of said difference samples between said-LARGE membership limitation value and said signal maximum variation value. Method according to Claim 2, characterized in that said step of associating (21) with each difference sample comprises the steps of: 1. determining a central point [V x -V n )/2] of said constant gradient sections of said SMALL and LARGE membership classes; 2. setting said difference level of truth (µ) equal to a pre-determined value; 3. comparing said difference (D) sample with said central point; 4. determining a comparison point (DCOMP) on the left of said central point if said difference sample is less than said central point and a comparison point (DCOMP) on the right of said central point if said difference sample is greater than said central point; 5. comparing said difference (D) sample with said comparison point (DCOMP); 6a. modifying said difference level of truth (µ) according to a first direction of increment and modifying said comparison point on the left if said difference sample is less than said comparison point on the left; 6b. modifying said difference level of truth (µ) according to a second direction of increment and modifying said comparison point on the right if said difference sample is greater than said comparison point on the right; 7. repeating said steps 5. and 6a or 6b until said difference sample (D) is greater than said comparison point on the left or less than said comparison point on the right. Method according to Claim 3, characterized in that it determines a sub-interval width (A/16) of said constant gradient sections equal to the width (A) of said constant gradient sections divided by a power of 2; in that said step of modifying said comparison point on the left comprises the step of decrementing said comparison point on the left (DCOMP) by a quantity equal to said sub-interval width and in that said step of modifying said comparison point on the right comprises the step of incrementing said comparison point on the right by a quantity equal to said sub-interval width. Method according to anyone of Claims 1-4, characterized in that said step of applying fuzzy rules (23) comprises the step of applying, for each difference sample and each distance value, the following rules: R1: IF D is SMALL and k is SMALL THEN p 1 is LARGE R2: IF D is SMALL and k is LARGE THEN p 2 is MEDIUM R3: IF D is LARGE and k is LARGE THEN p 3 is SMALL where D is said difference sample, k is said distance value and p i is a respective weight value. Method according to anyone of Claims 1-5, characterized in that said pre-determined parameter is the centroid (C i ) of a triangular function and in that said weight parameters [P(k)] are determined on the basis of the following equation: where p i are said weight values and C i are the associated centroids. Fuzzy filter for implementing the filtering method according to anyone of Claims 1-6, characterized in that it comprises: first store means (62) for storing signal samples; second store means (62) for storing estimated noise samples; third store means (62) for storing difference samples; subtractor means (65) connected to said first and second store means; maximum/minimum determination means (63) connected to said first and second store means; fourth store means (64) for storing minimum and maximum values of signal and of estimated noise, said fourth store means being connected to said subtractor means and to said maximum/minimum determination means; fifth store means (66) for storing values of maximum variation of signal and of noise, connected to said subtractor means; a fuzzy calculation unit (67) connected to said third and said fifth store means; sixth store means (68) for storing levels of truth associated with said difference samples and with distance values between said signal samples, connected to said fuzzy calculation unit; weight calculation means (69) for calculating weight samples, connected to said sixth store means; output calculation means (70) connected to said first store means and to said weight calculation means to perform the weighed addition of said signal samples with said weight samples; and a control unit (61) connected to said first, second, third, fourth, fifth and sixth store means (62, 64, 66, 68), to said subtractor means (65), to said maximum/minimum determination means (63), to said fuzzy calculation unit (67), to said weight calculation means (69) and to said output calculation means (70). Fuzzy filter according to Claim 7, characterized in that said maximum/minimum determination means (63) comprise: a comparison element (94) having a first and a second input (93, 95) and an output, said first input (93) of said comparison element being connected to said first store means (62); a first selector element (73) having a first and a second datum input (74, 75), a selection input (76) and an output (77), said first and second datum input (74, 75) of said first selector element being connected to said first and, respectively, said second input (93, 95) of said comparison element (94) and said selection input (76) of said first selector element being connected to said output of said comparison element; a first switching element (78) having a datum input connected to said output (77) of said first selector element (73), a control input (79), a first and a second output (80, 81); a first and a second store element (82, 86) connected to said first and, respectively, said second output (80, 81) of said first switching element (78); a second selector element (90) having a first and a second datum input, a selection input (91) and an output (92), said first and second datum input of said second selector element being connected to said first and, respectively, said second store element (82, 86) and said output (92) of said second selector element being connected to said second input (95) of said comparison element (94), said control input (79) of said first switching element (78) and said selection input (91) of said second selector element (90) receiving a minimum/maximum control signal (M). Filter according to Claim 8, characterized in that it comprises logic gate means (97) having a first input (96) connected to said output of said comparison element (94), a second input (98) receiving said minimum/maximum control signal (M) and an output connected to said selection input (76) of said first selection element (73). Filter according to anyone of Claims 7-9, characterized in that said fuzzy calculation unit (67) comprises: a third, a fourth and a fifth store element (100-102) having at least one datum input (106-108) and an output (109-11) ; a third selection element (117) having a first and a second datum input, a selection input (118) and an output (119), said first datum input of said third selection element being connected to said output (109) of said third store element (100), said second datum element of third selection element being connected to said output (111) of said fifth store element (102) ; an adder element (120) having a first and a second datum input, a control input (121) and an output (122), said first datum input of said adder element being connected to said output (119) of said third selection element (117), said second datum input of said adder element being connected to said output (110) of said fourth store element (101); and a second switching element (123) having a datum input, a control input (124), a first, a second and a third output, said datum input of said second switching element being connected to said output (122) of said adder element (120), said first, second and third output of said second switching element being connected to said datum input (106-108) of said third, fourth and fifth store element (100-102) respectively. Filter according to Claim 10, characterized in that said third and fourth store element (100, 101) comprise shift registers each having a respective control input (113, 114). Filter according to Claim 10, characterized in that said selection input (118) of said third selection element (117), said control inputs (121, 124) of said adder element (120) and of said second switching element (123) and said control inputs (113, 114) of said third and fourth store element (100, 101) are connected to said control unit (61).

Inventors: DI GIURA MADDALENA, PAGNI ANDREA, POLUZZI RINALDO, RIZZOTTO GIANGUIDO, DI GIURA, MADDALENA, PAGNI, ANDREA, POLUZZI, RINALDO, RIZZOTTO, GIANGUIDO
Applicants: ST MICROELECTRONICS SRL, STMICROELECTRONICS S.R.L.
Application year: 1996
Main classification: G05B13
IPC codes: G06N3, G06F9, G06F15, G06N7, G05B13, H03H17, H03H21