Abstract
Generally, the process industry is affected by unwanted fluctuations in control loops arising due to external interference, components with inherent nonlinearities or aggressively tuned controllers. These oscillations lead to production of substandard products and thus affect the overall profitability of a plant. Hence, timely detection of oscillations is desired for ensuring safety and profitability of the plant. In order to achieve this, a control loop oscillation detection and quantification algorithm using Prony method of infinite impulse response (IIR) filter design and deep neural network (DNN) has been presented in this work. Denominator polynomial coefficients of the obtained IIR filter using Prony method were used as the feature vector for DNN. Further, DNN is used to confirm the existence of oscillations in the process control loop data. Furthermore, amplitude and frequency of oscillations are also estimated with the help of cross-correlation values, computed between the original signal and estimated error signal. Experimental results confirm that the presented algorithm is capable of detecting the presence of single or multiple oscillations in the control loop data. The proposed algorithm is also able to estimate the frequency and amplitude of detected oscillations with high accuracy. The Proposed method is also compared with support vector machine (SVM) and empirical mode decomposition (EMD) based approach and it is found that proposed method is faster and more accurate than the later.
Introduction
Process control loops in process industry are very much susceptible to the control loop oscillations. These oscillations in control loops can arise due internal or external factors. These oscillations negatively impact the performance of the loop. This impact can lead to inferior product quality, reduction in profit margin of the plant and increase in threat to property and precious human lives [1–4]. Presence of oscillations could be attributed to a multitude of factors like non-linear characteristics of the system in question, external disturbances which can cause a variation in the process variable (PV), consequences triggered due to mechanical wear and tear of moving parts, faulty controller parameters and inherent non-linearities present in the final control element like control valves. In a large process plant there could be thousands of control loops and to monitor each one of them manually is a challenging task. Hence, a fast and easy to implement automatic oscillation detection algorithms are highly desirable [5]. In the past two decades many algorithms for oscillation detection have been published by several researchers. Therefore, a brief literature survey of the work done in this domain for past decade is presented here.
Heuristic nature of oscillation detection algorithms has been observed and reported by several researchers due to lack of clear mathematical descriptions of oscillations [6]. Li et al. proposed an algorithm based on discrete cosine transform (DCT) and regularity of zero-crossing index for multiple oscillation detection and their parameter estimation [7]. Sivalingam et al. proposed the cross-wavelet transform based method in order to diagnose multiple oscillations [8]. Srinivasan et al. presented a modified empirical mode decomposition (EMD) technique to detect multiple or single oscillations in data [9]. Wang et al. used improved DCT method involving a fitness index for extracting dominant oscillations and hypothesis test on magnitude of oscillations in real time univariate time series data [10].
Naghoosi et al. proposed the peak recognition and clustering method of auto correlation function to detect oscillations in control loop data [11]. Guo et al. presented a method based on improved wavelet packet transform and Shannon entropy to detect multiple or single oscillations in process control loop data [12]. Wardana presented the variational mode decomposition method for plant performance monitoring and oscillation detection [13]. Xun et al. proposed a time varying oscillation detection method using improved local mean decomposition technique [14]. Xie et al. proposed an online tool for fluctuation detection in control loop data with the help of intrinsic time scale decomposition along with a zero crossing algorithm [15]. Yan et al. used a hidden Markov model for detecting repeated patterns in time series data for oscillation detection [16]. Naghoosi et al. proposed a wavelet transform based algorithm for identification and characterization of frequencies of oscillations present in the control loop data [17]. Sharma et al. presented a machine learning based method for the detection of oscillations in control loop data with the help of artificial neural networks. They used linear predictive coefficients based feature vector for determining the presence of oscillations [18].
From the literature survey presented above, two important conclusions can be drawn: 1) Automatic detection and parameter estimation of oscillations in control loop data are necessary for satisfactory operation at any process plant; 2) A good oscillation detection algorithm must have features like high detection accuracy and less computational complexity. Further, it has been observed that negligible work has been reported in literature using artificial intelligence (AI) techniques for detection of oscillations in control loop data. In this presented work, a method for oscillation detection and parameter estimation with the help of Prony’s method of IIR filter design and deep neural network (DNN) has been presented. The proposed method first finds the denominator polynomial coefficients (DPCs) of the IIR filter obtained from Prony’s method and then use them as a feature vector for DNN to confirm the presence of oscillations in the control loop data. Amplitude and frequency of detected oscillations are estimated with the help of cross-correlation between original signal and estimated error signal. The proposed method has been evaluated with the help of real plant and simulated data. Industrial data provided by the Jelali and Huang [6] was used to train the DNN. This work also presents a comparative study between proposed method and EMD based approach [9]. EMD based approach has been used by several researchers for the comparison purpose in recent years. It can be noted that it has become a kind of benchmark method. We also have used EMD based approach for comparative study in our work due to its wide applicability for comparison purpose. Proposed algorithm was compared with EMD based approach for three performance indices: (i) Time taken in oscillation detection (or computational complexity), (ii) Amplitude estimation accuracy and (iii) Frequency estimation accuracy. Proposed algorithm outperforms the EMD based approach in all three indices mentioned above. Comparison results for simulated examples have been shown later in the paper. Major contributions of the presented work have been listed as follows: Development of a new and simple machine learning approach using DNN for oscillation detection in control loop data. Noise performance comparison between DNN and support vector machine (SVM) for oscillation detection. Improvement in speed of oscillation detection. Improved accuracy in estimation of amplitude and frequency of detected oscillations.
Organisation of rest of the work is as follows: Section 2 describes the mathematics behind Prony analysis and time domain design of IIR filter using Prony method, Section 3 elaborates the proposed oscillation detection method using DNN and also describe the procedure for quantification of frequency and amplitude of detected oscillations, Experimental results have been provided in Section 4 and Section 5 concludes the paper with possible direction of future work.
Prony method
In this section the basic underlying mathematics of Prony analysis and IIR filter design using Prony method has been presented.
Basic Prony analysis
The principle of Prony analysis is based on the procedure of finding a linear combination of exponentials for a given signal [19, 20]. Thus, any signal y (t) can be modelled as a sum of k exponentials. The model can be written mathematically as follows:
Equation (5) can be written in compact form in the following way:
Now, a 1xN matrix can be constructed as follows:
Multiplying Equation (6) on both sides by A and rearranging, yields:
Equation (11) can be derived based on the fact that Equation (7) is satisfied by each value of z i . Equation (11) can also be applied repeatedly to form Equation (12) as follows:
On careful observation, Equation (12) can be seen as a linear prediction model and the aforementioned equation will have a single solution for the condition N ⩾ 2k + 1, and values of a i can be determined using least squares problem. Once the values of a i are calculated, using Equation (7) the values of z i can be calculated and then values ofλ i can be calculated using Equation (3). Lastly, values of B i can be computed using Equation (5).
The method for IIR filter design with prescribed time-domain response with the help of Prony analysis is addressed here [21]. Prony method gives an extra dimension for IIR filter design based on time-domain specifications. Equation (13) shows the transfer function of an IIR filter.
Further, Equation (13) can be modified as follows:
Equation (15) is obtained by taking z-transform of the convolution between a(n) andh (n). The convolution can be further written in matrix multiplication form using first q+1 terms of the impulse response.
In order to find the values of b
i
and a
i
, the matrices can be partitioned to give:
In Equation (17) the matrix
The upper (M + 1) equations of Equation (17) are written as follows:
Equation (19) directly computes the coefficient matrix
In this work, above describe method to design IIR filter using Prony method has been used to develop a control loop oscillation detection and parameter quantification algorithm. This method estimates the H (z) with desired number of poles and zeros assuming time domain data under consideration as the impulse response h (n) of the filter. Further, detailed description of the proposed algorithm is given in forthcoming section.
Description of the steps involved in proposed oscillation detection and parameter quantification algorithm using IIR filter design by Prony method has been presented in this section.
Step 1: Pre-processing
It has been observed that set point (SP) variation and external disturbances often corrupt the control loop data. The former one introduces the slow varying trend in the measured PV Data of control loop. Accurate detection of oscillations requires removal of these slow varying trends. This can be achieved by pre-processing the data prior to using it for oscillation detection purpose. There are several methods available for removing these slow varying trends from the data. In this work best fit line to the measure data was subtracted from itself in order to remove the slow varying non-stationary trend.
Step 2: Extraction of denominator polynomial of an IIR filter
Description of the steps involved in oscillation detection in control loop data is given in the following sub-sections.
IIR filter design
With the aid of Prony method, an IIR filter is designed whose transfer function H (z) is given by Equation (13). The impulse response of the designed filter h (n) approximates the input data. As mentioned by Jelali and Huang [6], process control loop oscillation detection algorithms are heuristic in nature due to lack of available mathematical description. Order of numerator and denominator are considered to be a reasonably optimal choice after observing their effect in several experimental trials. Numerator and denominator were considered as 5th order polynomial while describing the relation between DPC (a) and presence of oscillations in the control loop data in next paragraph.
Relation between denominator polynomial coefficients and presence of oscillation
After finding the denominator coefficients a, denominator polynomial A (z) is reconstructed and its roots r, which are essentially the poles of H (z), are obtained. These roots can be represented on z-plane as roots of A (z) are complex in nature. It was noticed that the roots of A (z) were lying very close to the unit circle if the signal under observation is oscillatory in nature. Thus, the presence of oscillations in control loop data can be investigated with the help of information about roots’ location on z-plane. In the case of oscillatory impulse response (problem under consideration) the obtained IIR filter will be marginally stable. Hence, one or more poles of the IIR filter or roots of the denominator polynomial will lie on the unit circle. This is also evident from the Fig. 1, in which some of IIR filter poles lies on the unit circle for a pure sinusoidal oscillatory signal. Further, it was observed that for a noisy oscillatory signal, poles of the IIR filter don’t lie on the unit circle anymore but lies in the region very close to the unit circle.

Sinusoidal signal and poles of obtained IIR filter on z-plane.
Same is evident from the Fig. 2 too, in which poles of IIR filter has been shown on z-plane for a noisy oscillatory sinusoidal signal. Distance of the poles from the unit circle further depends upon the presence of noise in the signal under observation. Hence, it can be said that vector a inherits oscillatory information of the signal and can be used for the oscillation detection purpose. Keeping this in mind it can be concluded that machine learning algorithm can be utilized here for the purpose of decision making about the presence or absence of the oscillations in the control loop data.

Noisy sinusoidal signal and poles of obtained IIR filter on z-plane.
As explained in the previous step, DPCs of the obtained IIR filter contain the information about presence of oscillation in the control loop data. Artificial intelligence techniques like DNN can be utilized to decide the presence or absence of oscillations in the control loop data based on the DPCs. DNN is the extension of artificial neural network with more than one hidden layers. DNN based method of oscillation detection involves two phases: (i) training phase and (ii) testing phase. This procedure has been shown with the help of a block diagram in Fig. 3. In training phase DPC features are extracted from the training data set and DNN is trained with the help of supervised learning. During the training phase, training data set was divided into three different data sets: (i) training, (ii) testing and (iii) validation. This is done in order to train DNN more effectively.

Graphical representation of oscillation detection method based on DNN.
In testing phase trained DNN is used to identify the presence or absence of oscillations in input data and this is done by extracting the DPC feature vector from input data and then feeding it to the trained DNN. It should be noted that in testing phase new data (which was not the part of training data set) is used to test the performance of trained DNN. Further, DNN gives output in the form of 0 or 1 corresponding to absence or presence of oscillations in the input data. In this step 3, data set description, feature vector extraction, and training of DNN has been described.
In machine learning approach, performance of the classifier depends upon its training which ultimately depends upon the training data base. Larger the training data base better will be the performance of the classifier. In this work raw industrial data provided by Jelali and Huang [6] was used to create training data base. Raw industrial data contains control loop data from several processes like flow, pressure, level, concentration etc., having oscillations due to stiction, external disturbances and controller tuning. Some control loop data was having no oscillations as well.
Training data base was created from this raw industrial data with the following procedure: (i) SP was subtracted from process variable (PV) in order to get error data without SP bias. (ii) Normalization was done of the obtained error data so that amplitude variation remains within the range of –1 to+1. (iii) Finally normalized error data was split into several little parts in a way that each part accommodates at least two or three oscillation cycles. This division of data was done to create much larger data set for training of DNN. Further, it should be noted that, non-uniform division was done as sampling frequency, data length and oscillation frequency were different for different control loop data.
Information about control loop name, type of oscillation, number of sub-segments done for each control loop and total training data sets formed are given in Table 1. In total 286 data sets were created involving non-oscillatory and oscillatory control loop data. Within these 286 data sets 86 oscillatory data sets were because of disturbances, 132 oscillatory data sets were because of stiction problem in control valves, 17 oscillatory data sets were because of controller tuning and 51 data sets were there without any kind of oscillation. Additionally, target data set was created having dimension of 1x286, in which 1 and 0 was used to indicate oscillatory and non-oscillatory data set respectively. So, in target data set, there were in total 51 zeros corresponding to non-oscillatory data sets and 235 ones corresponding to oscillatory data sets.
Control loop name and no. of sub segments for each loop data
Control loop name and no. of sub segments for each loop data
Input data contains lot of samples and hence cannot be used to train the DNN directly, instead features are extracted from the data and these extracted features are used for training and testing of DNN. Further, features are hidden information within the data based on which any specific decision can be taken. In the underline problem of oscillation detection, poles of the obtained IIR filter have the information about the presence of oscillations and hence denominator coefficients (a) of the designed IIR filter were used as a feature vector to train the DNN. As described in previous step, ten denominator coefficients will be extracted from each training data set given in Table 1 and will form the feature vector for input data.
DNN architecture
As described before, DNN is the extension of ANN with more than one hidden layers. Figure 4 shows the DNN architecture used in presented work. DNN contains three layers named as: input layer, hidden layer and output layer. Input layer of DNN has 10 neurons, equal to the number of features in feature vector, hidden layer consists of three layer of neurons with 15 neurons in each layer and output layer contains only one neuron in order to give 1 or 0 depending upon the presence and absence of oscillations in the input data.

DNN architecture for proposed work.
DNN was trained with the help of feature vectors obtained from the data set described in Table 1. MATLAB® environment was used to create and train the proposed DNN structure using trainlm algorithm. During training process of the DNN, 90% of the data set was used for training, 5% of the data set was used for validation and 5% of the data set was used for testing purpose. Mean squared error (MSE) performance of the DNN was achieved of 7.147x10-5. Further, 100% detection accuracy was obtained in training, validation and testing phase. Confusion matrix for the trained DNN is shown in Fig. 5 and corresponding performance curve are depicted in Fig. 6. This trained DNN has been used further, to detect the oscillations in control loop data.

Confusion matrix for the trained DNN.

Performance graph of the trained DNN during training stage.
Steps involved in estimating the frequency and amplitude of detected oscillations are presented here.
Computation of estimated error and cross-correlation
In Prony method of IIR filter design, impulse response of the filter h (n) was supposed to be the original data sequence from which filter transfer function H (z) was obtained. First signal is estimated from the impulse response of the designed filter. Then estimated error ee (n) was calculated between the original signal and estimated signal. Mathematically it can be expressed as follows:
As mentioned in previous step, cross-correlation values corresponding to the positive lags (C
xee
[l+]) were selected in order to estimate the oscillation frequency. Now, mean of the selected cross-correlation values was subtracted from them, as per Equation (22).
This operation removes any false information in the form of a DC bias. After this, magnitude spectrum of resultant cross-correlation was computed with the help of fast fourier transform (FFT). The resultant magnitude spectrum was then normalized as per Equation (23).
Oscillation amplitude estimation is the last step in proposed algorithm. For estimating the amplitude of detected oscillations, magnitude spectrum of the original data sequence was computed and magnitude values corresponding to the estimated frequencies (estimated in previous step) were considered as the amplitude of oscillations present in the signal.
Logical flow chart of the proposed oscillation detection and quantification algorithm is shown in Fig. 7.

Flow chart of the proposed oscillation detection and quantification algorithm.
Several case studies involving simulated and real plant data have been considered to evaluate the proposed oscillation detection algorithm. Results of all the test cases have been provided in this section.
Simulation case studies
In simulation case study, four examples with and without oscillations have been considered. Examples 3 and 4 were taken from EMD based approach in order to perform comparative study between proposed method and EMD based method [9]. In simulation cases, additive white gaussian noise (AWGN) was also added to the simulated signal in order to make simulations more realistic. In this simulated study, comparison between DNN and other AI technique named as SVM for oscillation detection was also done. Further, 100 independent runs were performed for every example and results were recorded. Mean value of these runs was considered as the final result and is presented here. It should be noted that, these simulation examples were not used for the training purpose of the DNN and SVM.
Example 1: Data without oscillation
In this example, proposed algorithm was applied on time series data with no oscillations and contains only AWGN with 1.3 variance and zero mean. Figure 8 shows the simulated data without oscillations. Further, obtained feature vector for this example is shown in Table 2. DNN gives 0 for this example on feeding the corresponding feature vector to it.

Data without any oscillations: Example 1.
Feature vector and output of DNN for simulation studies
In this example, a sinusoidal signal with different amount of noise content was considered to evaluate the oscillation detection ability of proposed algorithm in noisy environment. Signal corrupted with AWGN is given by Equation (24).

Sinusoidal signal corrupted with AWGN (a) SNR=10dB (b) SNR=7dB (c) SNR=5dB (d) SNR=2dB: Example 2.
Further, it also evident from Table 2 that DNN shows superior noise performance as compared to SVM for oscillation detection in noisy data.
In this example, a sinusoidal signal corrupted using colored noise was studied in order to evaluate the proposed algorithm. Colored noise was obtained after passing AWGN with zero mean and unit variance through a filter with the following transfer function: 1/(1 - 0.7z-1) . The resultant signal can thus be expressed by Equation (25).

Signal with sinusoidal oscillation and corrupted with colored noise: Example 3.
Signal with slow varying trend and multiple oscillations was considered for this example. Mathematically it is represented by Equation (26).

Signal with multiple oscillations and slow varying trend: Example 4.
Example 3 and 4 were further compared to the EMD based approach with speed and accuracy of frequency and amplitude estimation as the comparison metric. For this comparison purpose 100 trials were conducted and result of each trial was stored. Further, mean value of the stored data was considered as the final value. Results of this comparative study have been tabulated in Table 3. Personal computer with Intel® Core ™ i5 CPU and 8GB RAM was used for this comparative study. Further, results of this comparative study are shown graphically in Fig. 12. Figure 12(a) shows the comparison result of time taken by proposed method and EMD based method, Fig. 12(b) shows the accuracy obtained in both methods for amplitude estimation and Fig. 12(c) shows the accuracy in frequency estimation by both methods.
Comparative study summary of Examples 3 & 4 with EMD based approach

(a) Computational time comparison result (b) Comparison result of estimated amplitude accuracy (c) Comparison result of estimated frequency accuracy.
The proposed method of oscillation detection was also applied to the real plant data. This was done to verify the algorithm in real life scenarios. Oscillatory PV data was recorded from a laboratory scaled flow process plant with a final control element (pneumatic control valve) suffering from stiction nonlinearity [22]. Detailed specifications and description of the plant can be found in [22]. Proportional-Integral (PI) controller with transfer function
PV data recorded from the plant was subtracted from the SP in order to remove the SP bias and resultant error signal was considered for further study. Figure 13 shows the error signal from the control loop. Feature vector obtained for this real plant data is shown in Table 2. This feature vector was fed to the trained DNN. Output of the DNN confirmed the presence of oscillations in the input data. Amplitude and frequency of oscillation were estimated as 1.6389 units and 0.1222Hz respectively. Further, comparative study with EMD based approach is given in Table 4. The EMD based approach was unable to detect oscillations in real flow process plant data. This comparison clearly shows that the proposed algorithm is superior to the EMD based approach.

Error signal obtained from the flow process plant.
Comparison result with EMD for real plant data
A new algorithm based on Prony method of infinite impulse response filter design and deep neural network (DNN) was proposed to detect and quantify the oscillations in control loop data. The proposed algorithm was successfully able to detect single, multiple and non-stationary control loop oscillations. In order to show the effectiveness of proposed algorithm, several simulation examples with and without noise were considered. Comparative study between DNN and other AI technique support vector machine (SVM) shows that DNN noise performance is better than SVM. Proposed method was also compared with the empirical mode decomposition (EMD) based method for oscillation detection speed and accuracy in estimating the amplitude and frequency of oscillations. Proposed scheme was found to be more accurate and faster than the EMD based approach. Further, real world applicability of proposed method was ascertained by using this method for oscillation detection in laboratory scaled flow process data. Comparison with the EMD based approach shows that the proposed algorithm is superior in oscillation detection and frequency estimation when applied on real world data. In future work, this algorithm will be implemented on real time hardware with the help of digital processors.
