• 검색 결과가 없습니다.

48 5. Single Variable Detection

process industry. SPC involves many methods for monitoring and presenting measurement variables, but perhaps the most common ones are:

 'x'-charts, that is measurement values plotted against the time;

 MA charts, i.e. a moving average of the measurement series plot-ted against time;

 EWMA charts, that is exponentially weighted moving average ltered measurements;

 CUSUM charts, cumulative sum of the di erence between the measurement and a target value.

These methods have great similaritiesto conventional signal processing techniques. There are many references to SPC in the literature, such as Bissel (1994), Thompson and Koronacki (1993) and Box and Lu-ceno (1997). SPC in wastewater treatment applications is described in Chapman (1992). In this thesis, only some basic aspects of SPC is discussed.

5.2. Detection in the Time Domain 49

0 10 20 30 40 50 60 70 80

0 10 20 30 40 50 60

time (days)

infl. ammonia

Figure 5.1 Monitoring the location of in uent ammonia concentration with constant limits based on the 0.01 and 0.99 quantiles of normal operating conditions, respectively (real data from the Ronneby wastewater treatment plant).

to let the computer calculate limits from a historic moving window.

The limits are continuously updated and thus adapted to the actual situation. Depending on the purpose of the detection, the adequate choice of detection limits may di er. If the main objective is to keep the level below or within speci c limits, constant limits based upon desired levels are used. On the other hand, if the purpose is to de-tect relative changes then adapting limits are normally more ecient.

In uent ammonia measurements from the Ronneby wastewater plant are investigated. It is established that the data cannot be considered as normally distributed. In Figure 5.1, a constant limit, based on 3 weeks of normal operation, is used as the detection limit for in uent ammonia. Peaks in the in uent ammonia concentration are easily de-tected and so are major decreases. However, the number of triggered detections are increasing when the process conditions change. From day 45 and onwards deviating measurements are constantly detec-ted. Figure 5.2 shows monitoring of in uent ammonia concentration with adapting limits. Even though the limits adapt to the changing conditions, major increases or decreases are detected. But instead of continuously triggering the detection, the limits adapt to the new situ-ation. The detection limits are based on the 0.01 and 0.99 quantiles of the previous 14 days of data.

Instead of using the 0.01 and 0.99 quantiles, the IQR of previous data can be used. The limits are then calculated as the median f IQR where f is typically in the range of 2 to 3. When the distribution

50 5. Single Variable Detection

0 10 20 30 40 50 60 70 80

0 10 20 30 40 50 60

time (days)

infl. ammonia

Figure 5.2 Monitoring the location of in uent ammonia concentration with adapting detection limits based on 0.01 and 0.99 quantiles of the last 14 days of data (real data from the Ronneby wastewater treatment plant).

of deviating values are distorted, the direction of detection may be taken into consideration. Kanaya et al. (1996) use a factor times the di erence between the 0.75 and 0.50 quantiles of a previous day's data to calculate the upper limit. The lower limit is, consequently, calculated as a factor times the di erence between the 0.50 and 0.25 quantiles of the same previous data.

Monitoring the Spread

The spread or variability of a signal may reveal information on process stability or sensor performance. A sensor exposed to a disturbance may show an increase of the noise level of the measurement signal.

An increase of the noise level will add variance to the signal in the frequencies dominated by the noise. By monitoring the signal variance, a disturbance of this type can be detected. One way of monitoring the measurement signal variance is to calculate the variance of a moving window from a certain number of measurement samples. However, it may be necessary to high-pass lter the signal before the variance calculation can be performed. This is done in order to remove the slow variations (in comparison with the noise variation) caused by process changes, since this will distort the variance calculations. In Figure 5.3 (top) a measurement signal is displayed. It can be observed that the noise level increases signi cantly at sample 480. This may be an indication that something has happened to the measuring device.

5.2. Detection in the Time Domain 51

0 100 200 300 400 500 600 700 800 900 1000

5 10 15 20 25

time (samples)

influent ammonia

0 100 200 300 400 500 600 700 800 900 1000

0 0.5 1 1.5

time (samples)

variance

Figure 5.3 In uent ammonia measurement signal (top) and the variance of the high-pass ltered measurement signal (bottom).

A moving window of 24 samples is used to calculate the variance.

Here, 24 samples correspond to 2 hours of continuous sampling. The variance of the inter-sample di erence (a di erence builder used as high-pass lter) is calculated for every sample and can be viewed in Figure 5.3 (bottom). There is a sudden increase in the variance at sample 480. The peak is caused by the large intersample distance when the amplitude increases quickly, but the variance level is kept at a high level and is easily detected.

In order to detect changes in the variance, the noise of the measure-ment must not be removed during the data screening phase, since it is the noise that is the important information. However, outliers and missing values must still be dealt with. This emphasises the need for di erent data-screening methods for di erent types of analyses.

Rate of Change Monitoring

The rate of change or the derivative of a measurement signal will provide information on some of the dynamic properties of the signal.

52 5. Single Variable Detection

The rate of change is calculated in its simplest way with a di erence builder expressed by (Olsson and Piani 1992):

y^(k) = y(k) = y(k),y(k ,1) (5.7) which is a special case of the general high-pass lter.

Trend Detection

Recognising trends in data series is important to understand the long term variations or tendencies of the process. By trends we mean signal changes with time constants in the range of days, or more likely weeks, months and even years. Trends are normally not recognisable if only a day or a few days are considered in the analysis or monitoring task.

Trends in time series do not display a speci c point in the time series that is easily detected. This makes it hard to detect drifting measure-ments and, consequently, a drift may continue for a long time before it is detected. For this reason the damage may become severe and be costly in terms of quality and economics. In varying conditions, a limit of the amplitude of the signal is not applicable. Instead, the long-term trend must be addressed. Two ways of accomplishing this are slope tting and cumulative residuals.

Slope Fitting

By identifying the slope of the long-term changes in measurements, trends can be detected. For mean-centred data the slope can be found by the least squares method, that is:

y

= b

x

(5.8)

where b is de ned by

b = (

x

T

x

),1

x

T

y

(5.9) This can be done on not mean-centred data as well, but since we are only interested in the slope, mean centring is convenient. Monitoring the slope of a signal over a longer period of time can give us some indication of how the variable changes. Deviating slope values can be

5.2. Detection in the Time Domain 53

5 10 15 20 25

15 20 25 30 35

time (days)

meas. signal

5 10 15 20 25

−0.5 0 0.5

slope coeff.

time (days)

Figure 5.4 A measurement signal (top) and the slope coecient of the last week's data.

a criterion for detection. Figure 5.4 (top) shows a signal which varies slowly during 28 days. Below, the slope of the preceding week's data is shown. This means that the slope b is calculated from a moving window of a length of one week. As a new sample is obtained, the slope is calculated again and the result can be plotted as a time series.

It is clear that the data display some slow variations or trends.

54 5. Single Variable Detection

5 10 15 20 25

−1

−0.5 0 0.5 1

cumulative sum x103

time (days)

Figure 5.5 Cumulative residual between the present sample and a mean of the preceding week.

Cumulative Residuals

Plotting the cumulative residual between the measurement and a tar-get value, may reveal a long-term trend in the signal, which is dicult to detect manually. The target value can be one out of several choices.

Some examples are:

 set-point value where the process is known to perform well;

 long-term mean of the signal;

 predicted or forecasted value of the signal.

The absolute value depends on when the summation was started and may, therefore, look completely di erent depending on the start time.

Instead, the important criterion for detection in a cumulative residual plot is the change within a certain time window. In Figure 5.5, the cumulative sum of the residual between the signal, shown in Figure 5.4 (top), and a mean of the preceding week (2016 samples), is presented.

It can be seen that there is an increasing trend and especially the period between day 10 and 14 displays a signi cant increase.