Proceedings of the 7th IFAC Symposium on Fault Detection, Supervision and Safety of Technical Processes Barcelona, Spain, June 30 - July 3, 2009
Pattern recognition for valve stiction detection with principal component analysis M. Stockmanna, R. Habera, U. Schmitzb a
Department of Process Engineering and Plant Design, Laboratory of Process Control, Cologne University of Applied Science, D-50679 Köln, Betzdorfer Str. 2, Germany fax: +49-221-8275-2836 and e-mail: {markus.stockmann; robert.haber}@ fh-koeln.de b Shell Germany Oil GmbH, Rheinland Raffinerie,
[email protected]
Abstract: Static friction (stiction) in control valves is an often unrecognized problem which can lead to oscillating process variables. Therefore it is important to detect stiction at an early stage as the reason for oscillation. This work presents a new and robust method which uses the pattern recognition with principal component analysis for stiction detection. Keywords: valves, static friction, stiction, oscillation, statistical analysis, principal component analysis, hydro-cracker 1. INTRODUCTION Many classic methods for stiction detection use the characteristic shape of a stiction valve oscillation. (e.g. Yamashita (2006), Singhal and Salsbury (2005)). The main disadvantage of all these methods is that their rate of detection becomes low for noisy processes. The presented method for non-integrating processes uses the principal component analysis (PCA) for pattern recognition with prior data transformation for (oscillation) time and amplitude normalisation. With the PCA it is possible to eliminate noise by neglecting certain system variance and hence system information. With the PCA it is also possible to cluster time series on the basis of their shape.
leaded above all these MOS and causes on every sensor a current level. On the basis of their typical signature shapes the substances (similar to an unique fingerprint) can be assigned to a reference measurement of comparable shape.
Substance A
2. PRINCIPAL COMPONENT ANALYSIS
Sample:
PCA classifies and clusters data with similar information content as new latent variables (linear combinations) the so called principal components. Principal components are constructed by decreasing relevance and every component explains a certain ratio of the system total variance. This means that via the first principal component most of system variance is explained.
Substance B
Substance ?
By neglecting a certain rest variance possibly caused by noise for example a system with ten measured attributes (pHvalue, temperature, pressure, ...) can be satisfactorily reproduced with only two principal components which explain e.g. 99 percent of total variance. This reduction of dimension (here from ten to two) can improve the data clustering. The mode of operation is presented briefly for a simple example.
Substance C
Example: The electronic nose (EN) is one of the main fields of application for PCA. It consists normally of different metal oxide semiconductors (MOS) gas sensors each designed for different gasses. The gas (substance) to be examined is
978-3-902661-46-3/09/$20.00 © 2009 IFAC
Substance D Fig. 1. Assignment of one sample (left column) to one of the four reference measurements (right column) with an electronic nose (six MOSs)
1438
10.3182/20090630-4-ES-2003.0223
7th IFAC SAFEPROCESS (SAFEPROCESS’09) Barcelona, Spain, June 30 - July 3, 2009
In Fig. 1 this is demonstrated for a sample (left column) with its six signal intensities (y-axis) for the six different gas sensors (x-axis) and four known reference measurements (right column) (substance A, B, C, D) with their signature shapes. The unknown substance (sample) has to be assigned to one of these four substances. It is very easy to identify the sample as substance C. For one sample the manual pattern recognition is very easy to perform. More samples or more measured characteristics (e.g. 100 MOSs) require an automated recognition. Therefore in Fig. 2 a more complex example is shown with 80 samples (x-axis) with their characteristic amplitude for the different MOSs (y-axis). A clear assignment seems to be impossible here. With the PCA a clustering is possible if the first principal component is plotted versus the second one. These components explain the biggest ratio of the total variance (in this example 88 %).
oscillation shape. In Fig. 4 both oscillation shapes are plotted.
Fig. 4. Comparison of the oscillation modes which have to be distinguished. Left: sinusoidal oscillation, right: typical stiction oscillation 3. MODE OF OPERATION Due to the fact that oscillating processes differ in many characteristics (mean value, periodic time, amplitude, sampling time, dynamics and many more) first of all a normalisation of the signal has to be performed as below. One original measured signal course free from outliers is shown in Fig. 5.
Fig. 2. Assignment of 80 samples (x-axis) to one of the four reference measurements with an electronic nose (six MOSs (y-axis)) This (the so called score) plot is shown in Fig. 3 and it is in evidence that there are four significant groups. With the drawn reference measurements (bold) the unknown measurements (see Fig. 2) can clearly be classified to the four substances (A, B, C, D). Further on one can see three samples (PC1 ~ -0.1, PC2 ~ 0) from a so far unknown substance.
Fig. 5. Original measured signal course Step 1: One oscillation period has to be cut out. The window can be chosen between three time points of mean value crossing (see Fig. 6, here the mean value is five)
Fig. 3. Score plot of first principal component (x-axis) versus second component (y-axis) for the simulated data from Fig. 2. (Reference measurements: light) The above example has shown briefly that the PCA can be used for pattern recognition. Aim of this work is to show that with this PCA procedure a classification can be made between the typical stiction oscillation and the sinusoidal
Fig.6: One oscillation period of original signal
1439
7th IFAC SAFEPROCESS (SAFEPROCESS’09) Barcelona, Spain, June 30 - July 3, 2009
Step 2: The number of measurements has to be normalized (e.g. by cubic spline or other interpolation algorithms). Here 100 data points were created (see Fig. 7).
Fig. 7. One oscillation period of original signal with a normalised number of measurements (100)
Fig. 8. Comparison of different stiction and sine wave simulations with changing noise and stiction influence
Step 3: Normalise range to one and subtract mean value of signal course.
It must be pointed out that if N spline values were created under Step 2 at least N+1 simulated reference measurements must be available if the classical R-mode principal component analysis is used. This method creates the principal components by estimating the eigenvectors of a covariance matrix from the data matrix X. The other and better method is the Q-mode where the principal components were calculated by singular value decomposition of the data matrix X by (1)
The pre-treatment and normalisation is completed. As explained briefly in Section 2 sufficient reference measurements have to be known for correct pattern recognition. Because sinusoidal and stiction oscillation are to be distinguished as well sine wave as stiction oscillations have to be simulated and according to Step 1 to 3 pre-treated. The stiction valves were simulated by the method of Shoukat Choudhury, et al. (2005). It is advisable to vary the size of the added white noise ε and effect of stiction (compared to Shoukat Choudhury, et al. (2005) the parameters S (deadband plus stickband) and J (slipjump)) in every simulation to achieve enough variance in data. The variation in every simulation can be achieved if as well the standard deviation of white noise as the stiction parameters are Gaussian distributed random numbers (in the following simulations: ε ~ N(0, 0.01) and S, J ~ N(20, 25). In Fig. 8 some simulated courses were shown. Afterward the simulated data sets have to be merged by row to a matrix X. That means that the third row contains data of the third simulation for instance. Stiction
Sinusoidal
X =U X S XVXT (1) The score values T can so be calculated by (2)
T =U X S X (2) The PCA (both R- and Q-mode) can be calculated with mathematical software like R (2005). By doing this calculation for data matrix X with N+1 simulations (even recommended for Q-mode to achieve enough reference oscillations) one can get the variance distribution per principal component for the first ten components from Fig. 9. The graphic can be interpreted as follows. The total variance is the sum of all explained variances per principal components. In this example the total variance is 0.23. So the first principal component explains thereof 0.09 which are about 39 percent of the total variance. The second principal component explains other 24 percent of the total variance. By plotting the first component versus the second component 63 percent of the total information were reproduced and only 37 percent were disregarded.
1440
7th IFAC SAFEPROCESS (SAFEPROCESS’09) Barcelona, Spain, June 30 - July 3, 2009
in T being normal distributed one can estimate the probability distribution. For the two classes from Fig. 10 the results are shown in Fig. 12 and 13.
Fig. 9. Explained variance per principal component for the first ten principal components It is assumed that these 63 percent of information contain the information “sinusoidal” or “stiction shape”. This means that sinusoidal oscillation should differ clearly from stiction oscillation in the score plot. In Fig. 10 the score plot is shown by “o” representing simulated stiction oscillation and “x” representing simulated sine waves.
Fig. 12. Estimated probability distribution for stiction class
Fig. 10. Score plot of first principal component (x-axis) versus second component (y-axis) for simulated stiction oscillation (o) and simulated sine waves (x) One stiction cluster (o) and one sinus cluster (x) can easily be identified. If a data set of an oscillating process variable has to be analysed (see normalized test data Fig. 11) this data set must be pre-treated as explained in Step 1 to 3 and merged by an additional row to the reference matrix X. Afterwards the PCA has to be performed.
Fig. 13. Estimated probability distribution for sinus class By plotting the level course and calculating the integral one can estimate the areas (ellipse) which contain 95 percent of all normal distributed data with identical basic population. In Fig. 14 the PCA is performed for the test data (Fig. 11) (shown as ●) and the 95 percent boarders. That the test data point lies inside the 95 percent boarder of the stiction cluster the test data set can be classified to the stiction group and the oscillation shape is rather stiction like than sinusoidal. Hence, the reason for oscillation can be stiction. It must be mentioned that in some cases stiction level can rather be uniformly distributed. In this case, the classification process cannot be based on the bivariate Gaussian distribution estimation. Other classification methods like for instance k nearest neighbours (see Dasarathy (1991) or naive Bayes classifier (see Zhang and Su (2004)) have to be used.
Fig. 11. Normalised test data set for analyse The classification to the groups stiction or sinusoidal oscillation (e.g. as it appears for tuning problems) can be made under consideration of the bivariate probability distribution. Under the reduced assumption of both classes
1441
7th IFAC SAFEPROCESS (SAFEPROCESS’09) Barcelona, Spain, June 30 - July 3, 2009
Fig. 16. Normalised industry sample data – temperature measurement (loop TC1)
Fig. 14. Score plot of first PC (x-axis) vs. second PC (y-axis) for simulated stiction oscillation (o) and simulated sine waves (x) with test data (●) (see Fig. 11) Four different processes were simulated. The standard deviation σε of the additive, zero mean white noise is given. Each of these datasets consists of 100 oscillation periods. The rate of detection is presented in the right column of Table 1.
First, one oscillation period is chosen randomly, cut off and normalized in Fig. 16 (compare chapter 2). The score plot of first and second principal component (see Fig. 17) shows that the sample can clearly be classified to the stiction group. This result can be confirmed by classical methods like the cross correlation analysis by Horch (1999) (see Fig. 18) and the process variable histogram by Horch and Isaksson (2000) (see Fig. 19). Both methods show the effect of stiction.
Table 1 Rate of detection for different simulated processes Simulation parameters G(s) = G ( s) =
G ( s) = G(s) =
Detect. rate
2 , S = J = 20, σ = 0.2% ε 1 + 10s 2
96%
, S = J = 20, σε = 0.2%
86%
2 e − 2 s , S = J = 20, σε = 0.2% 1 + 10s
92%
(1 + 1/ 3s )3
2
(1 + 1/ 3s)
3
e−2s , S = J = 20, σε = 0.2%
Fig. 17. Score plot of first principal component (x-axis) versus second one (y-axis) for simulated stiction oscillation (o) and simulated sine waves (x) with sampled data of loop TC1 (●)
84%
4. TEST ON INDUSTRY DATA To show the effectiveness of the presented method it was tested on industry data. Fig. 15 shows oscillating temperature measurements from a bed-inlet temperature controller in a quench cooling hydro-cracker (negative gain because of cooling process).
The cross correlation method (see Fig. 18) identifies it by the lag between manipulated signal and process variable and the histogram method (see Fig. 19) finds the typical Gaussian form of the first derivation histogram for nearly rectangular oscillation shapes of controlled signal like stiction oscillation have them.
Fig. 15. Oscillating temperature measurement from a hydrocracker (entrance bed 4, loop TC1)
Fig. 18. Cross correlation between manipulated signal and process variable for a negative gain process of loop TC1
1442
7th IFAC SAFEPROCESS (SAFEPROCESS’09) Barcelona, Spain, June 30 - July 3, 2009
of this method is that many reference simulations with great data variance have to be done once and merged in a reference matrix. But if the matrix has been created successfully it can be used for all future analysis, as well.
Fig. 19. Histogram of process variable first derivation of loop TC1 Another industry data sample is shown in Fig. 20. It is supposed that this control valve does not suffer from valve stiction. One oscillation period is randomly chosen and normalised as described in Step 1 to 3 (see Fig. 21).
Fig. 22. Score plot of first principal component (x-axis) versus second one (y-axis) for simulated stiction oscillation (o) and simulated sine waves (x) with sampled data of loop TC2 (●) 6. ACKNOWLEDMENTS
Fig. 20. Oscillating temperature measurement from a hydrocracker (entrance bed 2, loop TC2) By calculating the scores of the first and second principal components (see Fig. 22) it can clearly be seen that this oscillation shape can be classified to the sinus cluster and hence the valve seems not to suffer from stiction.
Fig. 21. Normalised industry sample data (loop TC2) 5. CONCLUSION A new method for the distinction between typical stiction oscillation shape (rather rectangular, see Fig. 4., right column) and sinusoidal oscillation for non integrating processes is presented which hence can indirectly be used to detect stiction in oscillating control loops. The pattern recognition uses the clustering by principal components analysis. Compared to other classical methods this PCA based recognition delivers acceptable results also for noisy processes. The prior data normalisation allows comparing data with different process background. Main disadvantage
The authors gratefully acknowledge the support by the Ministry for Innovation, Science, Research and Technology of North Rhine-Westphalia (Germany) and the Cologne University of Applied Science in the framework of the competence platform "Sustainable Technologies and Computational Services for Environmental and Production Processes" (STEPS). 7. REFERENCES Dasarathy, B. V. (1991). Nearest Neighbor (NN) Norms: NN Pattern Classification Techniques. Los Alamitos, Washington. Horch, A. (1999). A simple method for detection of stiction in control valves. Control Engineering Practice, 7, 12211231. Horch, A., Isaksson, A.J. (2000). Detection of valve stiction in integrating processes. Internal Report, Royal Institute of Technology, Stockholm, Sweden, IR-S3-REG-0006 R Development Core Team (2005). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-90005107-0, URL http://www.R-project.org. Shoukat Choudhury, M.A.A, Thornhill, N.F., Shah, S.L. (2005). Modelling Valve Stiction. Control Engineering Practice, 13, 641-658. Singhal, A., Salsbury, T.I. (2005). A simple method for detecting valve stiction in oscillating control loops, Journal of Process Control, 15(4), 371-382. Yamashita, Y. (2006). An automatic method for detection of valve stiction in process control loops. Control Engineering Practice, 14, 503-510. Zhang, H., Su, J. (2004). Naive Bayesian classifiers for ranking. Proc. of the 15th European Conference on Machine Learning (ECML2004).
1443