• No results found

Fuzzy adaptive smoothing (FA S)

5. Processing QoS parameter m easurem ents

5.3 Fuzzy adaptive smoothing (FA S)

We present a smoothing mechanism based on the work in [KK92]. This mechanism, which we call the fuzzy adaptive smoother (FAS), can be used as a pre-filter to the FAP (or any other mechanism). The purpose of this pre-filter is to “de-spike” noisy measurements. The FAS is based on (5.1):

 = + ( l - > ) P r (5.3)

The FAS uses a fuzzy logic mechanism to provide values for y . The fuzzy reasoning for computing values of j is as follows:

if CIV is LARGE

if CIV is SMALL

then y is LARGE

then y is SMALL (5.4)

where CIV is the change-in-value:

CIV = MIN V

i A - 1

Pi

Px = M A X (p,,^,_^),P 2 = M IN (p ,,p ,_ ^) (5.5)

As FAP is not immune to large spikes, we use our own smoothing mechanism, FAS, which can cope with large spikes. So, in our use of FAP, we choose to set the FAP “spike-smoothing” in the estimation of “change-in-error” to 1 rather than 3 as suggested in [KK92] and [Kes91].

K is an integer that is a m easure o f the “spike-duration” that we wish to filter. N ote that for (5.5) we define:

CIV = 0 if = 0 ,/? 2 = 0 C I V = 1 if # 0 ,/ 7 2 = 0

CIV has the range [0, 1], and assumes that m easured values o f p, and p,.K are always positive. To explain the use o f CIV, we assume that we are in the steady state. The use of (5.3) with the if-then assertions in (5.4) are saying:

1. if there is a LA RG E change-in-value (CIV), this is probably due to a spike, rather than a change in P, so give precedence to the previous estim ate, i.e. ignore the spike

2. if there is a SM A LL change in value (CIV), this is probably due to changes in the value o f P so give precedence to the current m easured value

In the definition o f CIV from (5.5), we see that we have chosen to define a spike as a change o f factor 2 or greater in the measured values. This is depicted in Figure 5.4.

definition of CIV O 0.6 0.4 0.2 1 1.2 1.4 1.6 1.8 2 2.2 P/P2

Figure 5.4: Definition of CIV (change-in-value)

The effects o f increasing the value o f K are shown in Figure 5.5. The input to the FAS is shown in Figure 5.5(a) and has four spikes o f duration 1, 2, 3 and 4. The effect o f using the FAS with K = 1, K = 2 and K = 2 is shown in parts (b), (c) and (d) o f Figure 5.5, respectively. Notice the delay in the output o f K time units com pared to the input. So the FAS imposes a trade-off betw een filtering o f spikes and tim eliness o f information.

LA RGE and SM ALL are fuzzy linguistic variables that are defined as shown in Figure 5.6(a). The overall m apping o f CIV to } is shown in Figure 5.6(b). The m apping in (5.4)

from CIV to } uses a min-max rule of inference with a centroid (composite moment) de­ fuzzification process, and then the final consequent fuzzy set is normalised.

s p ik e s in input e ffect of K=2 input 25 tim e [s] output

(a)

effect of K=1 tim e [s] (c) effect of K=3 output 0 5 10 15 20 25 30 35 output tim e [s] tim e [s]

(b)

(d)

F igu re 5.5: U sin g fuzzy ad aptive sm ooth in g (FA S) to rem ove sp ik e s o f d u ration K from th e input

c fla n g e in v alu e (CIV) a n d g a m m a m ap pin g of CIV to g a m m a SMALL LARGE 0.9 0.9 0.8 0.7 0.7 20.6 0.6 a) 0.5 E 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.2 0.3 0 .4 0.5 0 .6 0 .7 0.8 0.9 v alu e of CIV o r g a m m a 1 0 0.1 0.2 0 .3 0 .4 0.5 0 .6 0 .7 0 .8 0 .9 1

(a)

(b)

The mapping in Figure 5.6(b) is an evaluation of the assertions in (5.4). The value of } can be computed from CIV efficiently by use of tables for Figure 5.6(b)^^. This removes the need to evaluate the consequent fiizzy sets in (5.4) dynamically. The process of computing a value for p, involves the following steps:

1. evaluate CIV using (5.5)

2. map CIV to j using tables for Figure 5.6(b) 3. evaluate using (5.3)

Notice that Figure 5.6(b) shows that the mapping of CIV to j is very close to being linear. Using the linear approximation CIV = } would eliminate step 2, simplifying the evaluation of p, even further. The amount of state required is simply the table for Figure 5.6(b) (which is static) and the previous K measurements of P for evaluating the CIV in (5.5). Similar methods are used for the FAP, which has two EWMA adaptive filters, but the FAP only needs to store one previous value for each of them. So, both the FAS and FAP mechanisms remain relatively inexpensive in terms of computational cost.

The FAS is used to pre-filter the input to the FAP (FAS-FAP), as shown in Figure 5.7.

P-P

[KK92]

delay o f one m easurem ent interval

FAS FAP

FAP fuzzy adaptive predictor

FAS fuzzy adaptive sm oother

K K > 0 (integer)

p m easured value o f param eter P

p_p Q oSParam value

F igu re 5.7: A sch em atic diagram o f the F A S-F A P estim ator for p rod ucing Q o S P a ra m valu es

The effects of using FAS-FAP {K= 1) is shown in Figure 5.8. Figure 5.8(a) shows a generated input of steady state value P = 10 with (uniform, random, zero mean) noise, and spikes of duration 1. The input has a mean SNR = 19.7dB (10.4% noise). Figure 5.8(b) shows the effects of using only the FAP and then using the FAS and FAP together.

2 5 r

steady v alu e with n o ise an d sp ik es u se of FAS to rem ove sp ik e s

— actual FAP noisy — FAS-FAP to o 150 time to o 150 time

(a)

(b)

Figure 5.8: Use of fuzzy adaptive sm oothing (FAS) and fuzzy adaptive prediction (FAP)

For now we see that the FA S-FAP appears to provide suitable rem oval o f noise and spikes. Next, we examine the FAP in more detail and assess its suitability for use in the QoSEngine back-end.

Related documents