ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea)
https://www.revistaespacios.com Pag. 30
Vol. 43 (07) 2022 • Art. 3
Recibido/Received: 03/05/2022 Aprobado/Approved: 01/07/2022 Publicado/Published: 15/07/2022
DOI: 10.48082/espacios-a22v43n07p03
Granger causality procedeture to diagnosis and failture in
industrial systems
Procedimiento de causalidad de Granger para diagnóstico y localización de fallas en
sistemas industriales
BECERRA-ANGARITA, Oscar F.
1
ALVAREZ-PIZARRO, Yuli A.
2
Abstract
Industrial process supervision is an important subject nowdays due to the increased requirement for
safer processes for operators and effective for companies. Control loops affected by disturbs, are
grouped with PCA, based on their increased variability and the causal relationships between them are
detected via Granger causality. A graph drawing algorithm allows indicating the source of the
disturbance. The procedure is applied to data from a simulated chemical process CSTR. The proposed
procedeture correctly indicated the sources of disturbances.
Key words: fault diagnosis, Granger causality, system identification
Resumen
La supervisión de procesos industriales es un tema importante en la actualidad debido a la creciente
necesidad de procesos más seguros para los operadores y efectivos para las empresas. Los lazos de
control afectados por perturbaciones se agrupan con PCA, en función de su mayor variabilidad y las
relaciones causales entre ellos se detectan mediante la causalidad de Granger. Un algoritmo de dibujo
de gráficos permite indicar la fuente de la perturbación. El procedimiento se aplica a datos de un
proceso químico simulado CSTR. El procedimiento propuesto indicaba correctamente las fuentes de
perturbaciones.
Palabras clave: diagnóstico de fallas, causalidad de Granger, identificación del sistemas
1. Introduction
Technical improvements in recent years have improved quality and productivity in the industry, but they have
also resulted in the creation of increasingly complex systems to study and keep until their final stage of life. Just
managing new equipment and performing process maintenance does not guarantee a safe environment for
operators. Process plant management remains predominantly a manual activity, equally is the detection of
process abnormalities and the diagnosis of their probable causes. Knowledge about the relationships between
1
Docente investigador. Ingenieria electrónica . Universidad de Investigación y Desarrollo - UDI. Colombia. obecerra2@udi.edu.co
2
Docente. Ingenieria de telecomunicaciones. Universidad Santo Tomás. Colombia. yuli.alvarez01@ustabuca.edu.co
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 31
process variables is important to support decisions that take you back to your normal and safe operating state.
According to industry statistics, 70 % of accidents are caused by human error (Nor, N. et al., 2020). Recent events
at large plants, such as the detonation of the Kuwait Mina Al-Ahmed petrochemical refinery, had estimated
damage of $ 400 million. Some other case is the explosion of Petrobras’s offshore platform, Brazil, which resulted
in losses of $ 5 USD billion (Nor, N. et al., 2020). Although these types of large-scale accidents are not usual,
minor accidents are common, generating both economic and human losses. This indicates that there is still a long
way to go to improve supervisory and fault diagnosis performance for industrial processes.
Fault detection and diagnosis is a major problem in control systems (Alauddin, M. et al., 2018). Chemical
processes, power plants, factories and others are cases where an undetected failure can contribute to disastrous
economic, environmental and social effects. Investigations have been conducted to diagnose faults and monitor
equipment degradation. Artificial intelligence systems such as neural networks and fuzzy systems have been
applied to alleviate these difficulties and enhance the process monitoring system. (Kirilova, E. G. et al., 2022)
provide an extensive review of the various applications of neural networks for chemical engineering purposes,
and comparisons to existing conventional methods are also shown, both in simulation and online
implementation. Isolation of faults that propagate their effects on the plant are investigated in (Yong, G. et al.,
2015). Causality detection methods are used, and a new method has been proposed in (Marques, V. et al., 2015).
In a similar way to the parameter estimation failure detection methods in (Lindner, B. et al., 2019) seeks to detect
failures through changes in the causal relationships between variables. In addition, allowing the detection of
changes in the causal relationship, the data generated in each iteration can be used to test the relevance of
statistical causality, which is very important to increase the reliability in this type of research. This character test
was performed for Granger causality using surrogate series in (Sysoev, I. et al., 2015).
Faults or disturbances are detrimental in moving process variables away from their references. Its detection and
indication of the source is more problematic because its effect disappears over time (He, Z. et al., 2018). The
usual procedure is to search the databases for the variables affected by the disturbance and investigate their
cause from the knowledge of the process. This paper proposes a methodology for automatic indication of the
source of disturbances. Indicating an incipient fault detection approach via detrending and denoising is proposed.
The article is organized as follows: The next section offers a method for detecting disturbances and grouping
control loops that have been affected using PCA, and discusses the steps required to calculate Granger causality
and proposes a methodology based on it. The methodology for diagnosing system failures will be outlined step
by step in subsection 2.10 as the application of the proposed procedeture. Section 3 application to data from a
simulated industrial system CSTR. The conclusions are presented in Section 4.
2. Fault Detection in industrial systems
An industrial process has numerous variables, some of which are explicit in its importance to the process and
some are difficult to know if the process truly depends on them, but the relationship between them must be
considered. The propose of fault detection is to determine whether a potential fault has occurred in the sensor
network. A model is generally constructed through the fault-free health-monitoring in structural health
monitoring (SHM) field data to describe the normality, after that a sensor fault detection index can be defined.
Due to the difference of model building, the fault detection stage can be divides into unilabiate control chart-
based , multivariate statistical analysis base and residual based methods. The fault detection index is then
computed for the currently measured sensor data and compared to a decision threshold. The potential sensor
fault is determinate to occur after the fault detection index exceeds its corresponding threshold. (Yi, T. et al.,
2018)
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 32
A SHM system is usually equipped with different types of sensors , which constitute a sensor network, to collect
structural responses. Therefore, it is necessary to use multivariate statistics that allows the joint monitoring of
variables. Typically the and statistics are used to calculate thresholds for monitoring non-normal situations, for
that reason in SHM field, these are grouped using the PCA method (Huang, H. . et al., 2017) ,which in addition to
reducing the number of data worked, is one of the most frequently used due to simplicity of its application, high
diffusion in the literature and the possibility of statistical analysis of the process through fault detection index
that present a superior performance to univariate control diagrams.
2.1. Principal component analysis
Consider as a vector of N samples of m sensors, so each line represents a sampling of each sensor.
The matrix X must be normalized. It has zero mean and unit variance. The matrix X can be decomposed according
to the singular value decomposition algorithm (SVD) (Kruger, U. et al., 2012).
(1)
Covariance matrix
(2)
Where
𝑈" " 𝑅!"!
and
𝑉" "𝑅#"#
are unitary matrices, and
Σ"𝜖"𝑅!"#
contains the non negative real singular
values of decreasing magnitude along its main diagonal and zero off diagonal elements. Solving the equation (1)
is equivalent to solving an eigenvalue decomposition of the sample covariance matrix S. The eigenvalues of the
matrix S are placed from largest to smallest representing the variance of each component, being the first
eigenvalue representing the greatest variability of the set of variables (Kruger, U. et al., 2012).
(3)
Where the matrix P is related to the highest eigenvalues of the matrix S and the columns of the orthogonal matrix
𝑉
. To find the projections of the matrix X it is necessary to calculate the projection score matrix
𝑇
(Kruger, U. et
al. 2012).
(1)
The projection of the T is the estimated
𝑋
*
𝑋
*=𝑇𝑃$
(2)
Residue values and estimated values
𝑋
*
"
can be obtained (Kruger, U. et al. 2012).
𝑟 = 𝑋 𝑋
*= (𝐼 𝑃𝑃$)𝑥
(3)
2.2. Hoteling’s Statistic
From the equation (2), assuming invertible S, it's possible to define equation (9):
𝑧 = Λ%&'(𝑉$𝑥
(4)
Nx m
XÂÎ
T
VUX
N
S=
-1
1
1
1
TT
SXXVV
N
»=L
-
T XP=
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 33
Hoteling’s statistic is given by (Chiang, L. et al., 2001):
(5)
The
𝑇(
statistic is the square 2-norm of a normalized observation vector x. From the equation (7) a threshold can
be found to characterize the variability of the data in all observed dimensions. Turned over a significance level,
appropriate values for the
𝑇(
statistic threshold can be automatically determined by using the F distribution.
Given a α significance level, the threshold can be calculated (Chiang, L. et al., 2001):
(6)
2.3. Statistic Q
The Q statistic is the 2-norm square standard that measures the deviation of the residue generated by the
difference between the estimate and the observations made, since r is the residue, the statistic is given by
(Chiang, L. et al., 2001):
(7)
The Q distribution threshold was approached by Jackson and Mudholkar (Chiang, L. et al., 2001).
(8)
Where
𝜃)="
𝜎
*
(), += 1 (,!,"
-,#
#
!
*%./& "
and
𝑐0
is the normal deviation corresponding to the percentage
(1
𝛼)
where α is the significance level.
2.4. Statistical contributions Hoteling’s Statistic and Q
Once a fault is detected, it is necessary to determine which variables have left the control zone, which can be
extremely complex for systems with many variables. One way to distinguish affected variables is to calculate the
contributions of each variable to the statistics at the time of failure and to obtain the set of variables that
contributed to the violation. For the
𝑇(
statistic, the contributions at failure times are calculated using the T
score matrix. Negative contribution values are taken to zero.
(9)
where
𝜆&
is the eigenvalue corresponding to the score matrix column and
𝑋)1*
is the normalized sample. To
calculate the contributions of the residue, the squared residue itself is used (Chiang, L. et al., 2001).
(10)
2T
Tzz=
2(1)(1)(, )
()
mn n
TFmnm
nn m
aa
-+
=-
-
T
Qrr=
0
1
02 20 0
12
11
2(1)
1
h
hc hh
Q
a
a
qq
qqq
éù
-
=++
êú
êú
ëû
2,,
2
i
ji i j
T
i
t
CONT P X
l
=
2
()
Q
CONT r=
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 34
2.5. Granger causality
In diverse studies of science, causal relationships are inferred by using temporal signals of interest collected from
a given physical process. Thus, methodologies that may infer from these data such relationships with a certain
property have been created and discussed. In 1956, the mathematician Wiener intuitively formulated the idea
of causality in the prediction of time series (Wiener, N. et al. 1956), which was formalized in the field of
Econometrics using linear regression models by economist Granger (Granger, C. W. et al. 1969). According to
Granger causality, given two variables x and y, if the inclusion of past observations of x helps reduce the
prediction error of y then x causes y. This method was used in a financial market application to investigate the
uncertainty in predicting output growth in emerging markets (Balcilar, M. et al. 2022) and used to determine cause
and effect relationships in the social sciences studying life expectancy versus air pollution trajectories in Nigeria.
(Nwani, S.E. et al. 2022), neuroscience (Barnett et al. 2014), (Seth, A. et al. 2015), in the field of industrial process
engineering for root cause detection of disturbance or oscillation (Lindner, B. et al. 2019), (Lucke, M et al. 2022),
and recent Granger causality review and advances (Shojaie, A. et al. 2022)
In most of the causal investigations we try to discuss single causes in deterministic situations and two conditions
are important for causal determinations suppose that an event x is a cause for event y:
Granger causality assumes that the future can cause neither the present nor the past. In the case of the variables
x and y, you can have the following situations:
1. y causes x : (y → x)
2. x causes y : (x y)
3. Feedback occurs between the two variables: (x ↔ y)
4. There is no causal relationship.
Thus, what matters is whether there is a statistically significant cause and effect relationship between the
variables x and y, which only occurs if there is a correlation and temporal precedence relationship between them
(Granger, C. W. et al. 1969).
Some procedures must be performed before applying the Granger method to a set of variables of interest. It is
first necessary to check if there is a requirement to perform some kind of preprocessing to the signals and to
verify their seasonality. The definition of the order of the estimated models should be chosen based on some
selection criteria (AIC or BIC, for example), just as the models should be validated using some specific techniques.
One should also choose the statistical method to infer causality and the correct method for multiple comparisons
performed (Aguirre, L. A. et al. 2004).
2.6. Mathematical modeling
A model is the simplified representation of a real system whose purpose is to identify its most relevant aspects
without worrying about all the details. A system can be modeled using black box modeling. This modeling, also
known as identification, assumes that little or no prior knowledge of the process is required, so having only
available inputs and outputs, it is possible to obtain a mathematical model of the system under study (Ljung, L.
et al. 1998), (Aguirre, L. A. et al. 2004).
Among these forms of representation, we can highlight the representation by transfer function, by state space
and the discrete time representation. Regarding this last representation, consider the following model:
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 35
(11)
Where
𝑦(𝑡)
and
𝑢(𝑡)
are the system output and input respectively, q is the delay operator,
𝜀(𝑡)
is the white noise
residue and all variables are measured in time where
𝑡 = 1,2,3 𝑇𝐴(𝑞)
, and
𝐵(𝑞)
are arbitrary polynomials
defined by
𝐴
(
𝑞
)
= 1 𝑎&𝑞%& 𝑎(𝑞%( 𝑎!$𝑞%!$
and
𝐵
(
𝑞
)
= 1 𝑏&𝑞%& 𝑏(𝑞%( 𝑏!%𝑞%!%
the
parameters
𝑛2
and
𝑛3
refer to the number of parameters or the order of the chosen model. For this work it will
be considered that
𝑛2="𝑛2= 𝑝
in all cases analyzed, that is the number of poles is the same number of zeros.
The model presented in Equation (14) is called the autoregressive model with exogenous inputs (ARX), where
the acronym AR refers to the autoregressive part of the model given by
𝐴
(
𝑞
)
𝑢
(
𝑡
) the letter X refers to the entry
𝐵
(
𝑞
)
𝑢
(
𝑡
) is called exogenous variable x.
In this work, system identification techniques use models whose representation is the ARX. The estimation of its
parameters made using the least squares method, to properly adjust the input and output data and verify if there
is a cause and effect between these data. Significantly, for causality analysis, it is not known who is entering or
leaving the model. For this reason, we seek the causal relationship between the variables by testing them all as
input and output and verifying if the variables included in obtaining the models help to predict the variable tested
as output.
2.7. Model order selection criteria
To estimate a model using the ARX structure in Granger analysis, is necessary to choose the order of the model.
One way to make this choice is to use information criteria that minimize a residual function that is penalized by
the number of regressors used, thus looking for the most parsimonious model. In this direction, we look for the
model that regards the minimum possible parameters to estimate and explain the behavior of the study variable
(small error) (Aguirre, L. A. et al. 2004). In this work the following criteria are used: Akaike Information Criterion
(AIC), Bayesian Information Criterion (BIC) (Ljung, L. et al. 1998).
(12)
(13)
Where
𝑙𝑛
|
Σ
| is the napierian logarithm that determines the residual covariance matrix of unrestricted models
and measures the suitability of the model. Increasing the number of parameters allowed increases the number
of degrees of freedom, generating less prediction error variation or allowing for more accurate data adjustment.
Reducing error variability by increasing the number of parameters is balanced by a penalty imposed by the
reporting criterion. Therefore, how the beginning parts of the equations (15) and (16) measure the reduction in
residual variation, while the second parts penalize the inclusion of each condition. If the penalty is less than the
reduction in residual variability, the regressor should be integrated into the model. Differently, the regression
will bring more cost than benefit and should be excluded from the model, allowing selection of the order that
minimizes the criterion applied.
2.8. Granger Conditional Causality
When the number of variables are greater than
2(𝑛 > 2)
, the bivariate Granger analysis can be extended to a
multivariable case (Seth, A. K. et al. 2010). Suppose, for example, that exist three variables
𝑥&, 𝑥(, 𝑥-
and is
necessary to know if the
𝑥-
variable causes the
𝑥&
variable. So if excluding the
𝑥-
variable significantly increases
()() ()() ()Aq yt Bqut t
e
=+
2
2
ln | |
p
pn
AIC T
=S+
2
ln | |
ln | |
p
Tpn
BIC T
=S+
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 36
the model prediction error with the
𝑥&
variable output as compared to the
𝑥&
model prediction error including
all variables, then it can be said that
𝑥- 𝑥&
. To demonstrate the mathematical formulation of this analysis,
consider n variables. An
𝑦4
vector of dimension
𝑛"!
will be used to represent the observed values of all variables
at the time instant t. Thus, the autoregressive vector of order p can be expressed by:
(14)
Where
𝐴5
is the square array of parameters of the VAR model. Systems can be represented in matrix form or by
the equation (15).
(15)
The condition is
𝑚 > 𝑛𝑝
necessary to avoid singularities in the matrix product
𝑥$𝑥
, so that the B coefficients of
the B matrix can be estimated using the least squares method by the equation (19).
𝐵
*=(𝑋$𝑋)%&𝑋$𝑌
(16)
To detect the causal relationship of the variable
𝑥-
in the variable
𝑥&
, first estimate the quadratic sum of the
residuals with the variable
𝑥&
as output and all others as input (unrestricted model):
𝑅𝑆𝑆&= S𝑦" "𝑋𝛽
UV$(𝑦 𝑋𝛽
U)
(17)
Where y and β correspond respectively to y column and
𝐵
* Then, we estimate the quadratic sum of the
constrained model residues in the same way using the equation (13), having the
𝑥&
variable as output and
excluding only the
𝑥-
variable as input
𝑅𝑆𝑆-&
.Then the F distribution test statistic applies
𝐹0(𝑝, 𝑚 𝑛𝑝)
under
the null hypothesis that the variable
𝑥-
does not cause the variable
𝑥&
:
(18)
The null hypothesis will be rejected if
𝑓
""6"!> 𝐹0
or the calculated p-value is less than the significance level α
used in the test. Thus, it is said that
𝑥- 𝑥&
. To apply the Granger conditional analysis, the prerequisite that
𝑚 𝑛𝑝
must be attended. Knowing that
𝑚 = 𝑇 𝑝
the condition for applying the conditional Granger analysis
is:
(19)
2.9. Granger multiple variable Causality
Consider that it is desired to infer causality between the variables by considering the following models found in
(Seth, A. K. et al. 2010).
(20)
1
1
p
tltt
l
yAX
e
-
=
=+
å
() ( )( ) ()m n m np np n m n
YXB
´´´´
=+S
31
31 1
1
xx
RSS RSS
p
fRSS
mnp
®
-
=
-
( )
1Tpn³+
( ) ( ) ( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( )
1
2
3
0.8 1 0.5 2 0.4 1 0.2 2
0.9 1 0.8 2
0.5 1 0.2 2 0.5 1
xk xk xk zk yk
yk yk yk
zk zk zk yk
e
e
e
=---+-+-+
=---+
=---+-+
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 37
This model contains 3 different variables which have an autoregressive structure, and for this case, the variable
x depends on itself and a regressor of z and one of y; The y variable does not depend on another variable, it just
depends on itself, and finally the z variable depends on itself and y. All variable models are simulated, and white
noise has been introduced.
𝜀&, "𝜀(
and
𝜀-
.The first step is to determine if the data is stationary, because as a
requirement, the statistics applied to infer causality assume the stationary of the variables. In the Figure 1, 10
windows with 100 samples each showing the mean and standard deviation of the variables are presented. The
graphical result indicates that the data is stationary, as expected, as it was generated to satisfy this requirement.
If the data had not met this condition, the data should be differentiated until the prerequisite is met. (Ljung, L.
et al. 1998).
Figure 1
Variability stationary test
Source: Authors
The following step is established on the AIC or BIC criteria to estimate a minimum order to model the information
(Aguirre, L. A. et al. 2004). In the Figure 2 The AIC and BIC criteria for the signal set are presented. The criteria
indicate a minimum order of 2 to model all signals, which is coherent if we compare the equation (23).
Figure 2
AIC and BIC criteria for x,y and z
Source: Authors
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 38
Determining the minimum order according to the criteria, the following step is to analyze the autocorrelation of
residuals that are within the confidence interval for all regressors. In Figure 3, it is possible to verify that the
second order models adequately represent the signals, so the residue is white noise.
In order to infer causality between the set of three variables x, y and z, to solve this case it is necessary to perform
6 independent hypothesis tests or
𝑀 = 𝑛
(
𝑛 1
) where n is the number of variables. Only will be considered
significant casualties, when the p-value is less than or equal to
𝑓𝐹0
for each direction tested.
In the Figure 4 The graph found by applying the Granger causality method is shown. Comparing the result
obtained with the original equation models in equation (23), all causal relationships between x, y and x is caused
by the other.
Figure 3
AIC and BIC criteria Autocorrelation of residues for x, y and z
Source: Authors
Two variables, just as y is not caused by any other variable, so no arrow is pointing at her. Being verified the
method with this simple example; the following will be presented the methodology to solve the problem of fault
diagnosis in a complex system.
Figure 4
Granger causality graph for x, y and z
Source: Authors
2.10. Proposed procedeture to fault diagnosis
To properly diagnose the failure the following steps were defined:
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 39
Step 1 Define and select data for system operation point, this amount of time series must be sure that does not
have any disturbance, so the system is working properly. Then extract information such as mean and standard
deviation of the variables, to normalize the data. With this normal dataset, the PCA model include a number of
components representing as initial test recommendation at least 70% of the variance of the variables, this
percentage is chosen arbitrarily or by the knowledge about the system, it may be too low or too high for a
particular application. When the number of observation variables is large and the amount of data available is
relative small, the
𝑇(
statistic tends to be inaccurate representation of the in-control process behavior, especially
in the loading vector corresponding to the smaller singular values. Additionally, the smaller singular values are
prone to errors because these values contain small signal noise. Therefore, in this case the loading vectors
associated only with the larger singular values should be retained in calculating the
𝑇("
statistic (Chiang, L. . et
al., 2001).
Step 2. Using the normalized system operation point data, following the equations (9) and (11) to calculate
statistical thresholds
𝑇(
and Q.
Step 3. For each new sample compute the statistical thresholds
𝑇(
and Q, if the thresholds are violated. After a
failure is indicated, calculate with the equations (12) and (13), the contributions of each variable to the failure
are calculated for a time window before and after the failure to raise a sign of the failure with the contributions
of the two statistics. Select the variables with the highest contribution.
Step 4. Using the variables separated by the calculation of the contributions, use the Granger causality method,
to infer causality between the affected variables to find the root cause or the relationship map between the
variables, but before of that follow the next considerations:
- To calculate causality relations between variables use the same data used for the normalized system
operation point data in step 1, but only use the suggested variables indicated by the contribution in the
step 3.
- Determine if the data is stationary, because as a requirement, the statistics applied to infer causality
assume the stationary of the variables. If the data do not have this condition, the data should be
differentiated until the prerequisite is met (Ljung, L. et al. 1998).
- To estimate a model using the ARX structure in Granger analysis is necessary to choose the order of the
model using AIC and BIC criteria.
Step 5. Identify the source or the sources that originated the fault through a search in the directed graph
produced by the Granger causality method.
The main objective in fault diagnosis area is to determine the cause of the fault. Even if the cause is not detected
using this steps, the information about the control loop where the fault took place is very close to the cause of
the fault. This information is very useful for process knowledge and may help to complete the diagnosis.
3. Experimental development, case study
Continuous stirred tank reactor (CSTR), this system is a simulator modeled in the Fortran language of a chemical
reactor that takes an exothermic reaction work where the original Fortran code is available in (Finch, F. E. et
al.1989). The MIT-CSTR software consists of a single file that can be easily compiled by a standard Fortran
compiler using MATLAB. The system has 18 variables and allows you to enter 22 different faults. The process
diagram is presented in Figure 5. A substance “A” is inserted into the tank to bring out an exothermic chemical
reaction to obtain two different products B and C. This system accepts level and temperature control circuits and
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 40
valve actuators and a fluid pump. In Table 1 the names of the system variables and Table 2 list the 22 faults that
can be introduced. In this work we will use fault number 19, which is the fault that affects the level controller
reference
𝑆𝑃&
.
Figure 5
CSTR system diagram
Source: Finch,F.E .1989
Table 1
CSTR variable list
Number
Variable
Acronym
1
Feed concentration
2
Feed flow rate
3
Feed temperature
4
Reactor level
L
5
Product A Concentration
6
Product B concentration
7
Reactor temperature
8
Coolant flow rate
9
Product flow rate
10
Coolant inlet temperature
11
Coolant inlet pressure
PCW
12
Level controller output
13
Coolant controller output
14
Coolant set point
15
Inventory
16
Mol balance
17
Cooling water pressure drop
18
Effluent pressure drop
Source: Finch,F.E. 1989
0A
C
1
Q
1
T
A
c
B
c
2
T
5
F
4
F
3
T
1
CNT
2
CNT
3
CNT
1
r
2
r
3
r
4
r
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 41
Table 2
CSTR fault list
Number
Fault
Acronym
1
No fault
-
2
Blockage at tank outlet
3
Blockage in jacket
4
Jacket leak to environment
5
Jacket leak to tank
6
Leak from pump
7
Loss of pump pressure
PP
8
Jacket exchange surface fouling
AU
9
External heat source (sink)
10
Primary reaction activation energy
11
Secondary reaction activation energy
12
Abnormal feed flowrate
13
Abnormal feed temperature
14
Abnormal feed concentration
15
Abnormal cooling water temperature
16
Abnormal cooling water pressure
17
Abnormal jacket effluent pressure
18
Abnormal reactor effluent pressure
REP
19
Abnormal level controller setpoint
20
Abnormal temperature controller setpoint
21
Control valve 1 stuck
22
Control valve 2 stuck
Source: Finch,F.E. 1989
3.1. Simulation
The system was simulated for 200 minutes where the first 100 minutes the system was in its normal operating
mode, then at minute 100 fault number 19 from Table 2 is inserted, Note that this failure affects the
𝑆𝑃&
level
controller reference. In the ¡Error! No se encuentra el origen de la referencia. is shown in the time domain the
18 simulation variables.
1
R
9
R
8
R
7
R
2
R
ext
Q
1
b
2
b
1
F
1
T
0A
c
3
T
PCW
JEP
1
SP
2
SP
1
V
2
V
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 42
Figure 6
CSTR simulation with fault number 19 at 100 min
Source: Authors
It is possible to observe how many of the variables left their normal operating point, some of them did not return
to the previous operating point as others that, having a controller, it compensated the failure through its
procedure and returned to normal system operation.
3.2. Fault detection
The ¡Error! No se encuentra el origen de la referencia. shows the fault indication in the system, the PCA is trained
with the normal operation data (first 100 minutes), and was reduced to 8 components, representing the 70% of
the variability of the data set, the algorithm correctly indicated the time when the system left its normal
operation using the statistics
𝑇(
and Q.
Figure 7
Failure indication with Statistics
𝑇!
and Q at minute 200
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 43
Source: Authors
In the ¡Error! No se encuentra el origen de la referencia. the contributions of the statistics for the failure interval
presented, that is, the scores of each variable. This interval contains the set of samples of the 18 variables from
minutes 195 to 210 or 5 minutes before failure and 10 minutes after detection. The purpose of this graph is to
analyze which variables contributed at the time of failure so that the statistics exceeded their thresholds.
Figure 8
Contributions of variables to fault 19 in the 195 to 210 minute interval
Source: Authors
Based on the contributions of fault 19, it is possible to find a pattern or signature of the fault by filtering out
those moments that are most significant. For this, the sum of all contributions in the time window was performed
to calculate obtaining 100% of the contribution and from this value a threshold of 1% was used to indicate how
significant a variable was determined to exceed the threshold. The result of this procedure is shown in ¡Error!
No se encuentra el origen de la referencia.. This figure shows how from the 200th minute that fault 19 was
inserted in the system, the variables affected in the
𝑇(
statistic were 4, 8, 9, 12 and 13; for the Q statistic,
variables 4, 5, 7, 9, 12, 13 and 14. As expected, there are several variables in common between the two
signatures; these significant variables are used to infer causality between them in order to check the causal map.
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 44
Figure 9
Fault 19 in 2D signature, in the interval 195 to 210 minutes
Source: Authors
3.3. Result analysis, Granger’s causality inference on the affected variables
Succeeding, the next step is to assess whether the data set is stationary in order to apply the Granger method.
The set of variables chosen with the help of the failure signatures was 4, 5, 7, 8, 9, 12, 13 and 14 the test result
to check the variables seasonality was negative so it was necessary to differentiate once the data (Aguirre, L. A.
et al. 2004). After differentiating the data, the test was positive. The next step is to apply the AIC or BIC criteria
to establish a minimum order for the set of signals.
Figure 10
AIC and BIC criteria for selected CSTR variables
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 45
Source: Authors
The ¡Error! No se encuentra el origen de la referencia. shows the result of the AIC and BIC criteria. These criteria
indicate the minimum order to estimate the set of signals, for the AIC the order is close to 10 and in the BIC it is
in 4, these orders are an approximation or starting point since it must be verified if the autocorrelation of the
residue is in mostly within the confidence interval. Fulfilling this condition, we can say that the model adequately
represents the data set since the residue does not contain any more useful information for the model. In this
case, order 15 was found. The ¡Error! No se encuentra el origen de la referencia. corroborates that the residues
can be called white noise.
Figure 11
Autocorrelation of the residue with model of order 15 for selected variables CSTR
Source: Authors
The result of Granger's causality method can be seen in ¡Error! No se encuentra el origen de la referencia. the
graph shows the cause and effect interactions between the variables that were selected with the fault
signature. The gain obtained with the subscription managed to reduce the search area by selecting the
variables that most contributed to the failure. In the graph, the arrow indicates that the pointed variable is
caused by the variable where the arrow starts. By the graph, fault 19, which affects the 𝑆𝑃& controller
reference, directly affects three variables and generates a reciprocal effect, between the temperature
variables. Therefore, even without knowing the source of the failure, it would still be possible to identify it.
The concentration of product A was not indicated with relation to cause or effect of any other variable, which
does not indicate that it does not have, only that the method was unable to infer.
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 46
Source: Authors
4. Conclusions
The proposed procedure to fault diagnosis with Granger's causality method is reviewed under identification
framework which can be useful in detecting the root cause of a failure in an industrial system. As stated, the
order of the model must be done with caution, because, if it is poorly dimensioned, the causal relations between
the variables may appear or disappear. However, even when not chosen in an appropriate way, they provide
guidance for investigating the root of a failure. When system identification techniques are used to fit models to
paired combination of variables, and if the models are deemed to be inadequate as per the correlation tests,
then one can quickly infer that the variables do not interact. It is shown that, for a given order, the models are
fitted in both directions, then the cross-correlation between the input and residues allow one to infer causality
between the two variables. Since the method only requires that the model capture the information contained in
the input, the method is naturally extended to the multivariate case, when one variable can be affected by
others.
The proposed procedure is applied to simulated data from a benchmark problem; indicate the source of these
disturbances was proposed, only needing the indication of the normal operation period. The affected data by
the disturbance are grouped checking those whose error signal variance increased significantly. To diagnose the
source, Granger causality method was used, since it allows to build a directed graph that relates the grouped
variables. The method can be applied automatically each time that a disturbance is detected by the operation
the results are then validated and compared with Granger’s method. Measuring the similarity between the
current operating conditions and historical operating conditions, which can identify abnormal behavior. Thus it
would be possible to automatically detect the presence of disturbances and immediately indicate its source.
The Granger method assumes linearity on data. This assumption is fulfilled in this approach since during training
the variations of process variables keep close to their steady state values. An extension of the method for plants
with multiple operation points is possible using the concept of data clustering, selecting multiple PCA training
sets for different operation points. A test to calculate the distance from each new sample to each cluster is
performed to select the PCA model to be used.
References
Aguirre, L. A. (2004). Introdução à identificação de sistemasTécnicas lineares e não-lineares aplicadas a
sistemas reais. Editora UFMG. https://doi.org/10.13140/RG.2.1.1616.7925
Figure 12
Granger causality graph for selected variables CSTR
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 47
Alauddin, M., Khan, F., Imtiaz, S., & Ahmed, S. (2018). A bibliometric review and analysis of data-driven fault
detection and diagnosis methods for process systems. Industrial & Engineering Chemistry
Research, 57(32), 10719-10735. https://doi.org/10.1021/acs.iecr.8b00936
Balcilar, M., Ike, G., & Gupta, R. (2022). The role of economic policy uncertainty in predicting output growth in
emerging markets: a mixed-frequency granger causality approach. Emerging Markets Finance and
Trade, 58(4), 1008-1026.
Barnett, L., & Seth, A. K. (2014). The MVGC multivariate Granger causality toolbox: a new approach to Granger-
causal inference. Journal of neuroscience methods, 223, 50-68.
https://doi.org/10.1016/j.jneumeth.2013.10.018
Chiang, L. H., Russell, E. L., & Braatz, R. D. (2001). Fault detection and diagnosis in industrial systems.
https://doi.org/10.1088/0957-0233/12/10/706
Finch, F. E. (1989). Automated fault diagnosis of chemical process plants using model-based
reasoning (Doctoral dissertation, Massachusetts Institute of Technology). Available:
http://hdl.handle.net/1721.1/14194
Granger, C. W. (1969). Investigating causal relations by econometric models and cross-spectral
methods. Econometrica: journal of the Econometric Society, 424-438. https://doi.org/10.2307/1912791
He, Z., Shardt, Y. A., Wang, D., Hou, B., Zhou, H., & Wang, J. (2018). An incipient fault detection approach via
detrending and denoising. Control Engineering Practice, 74, 1-12.
https://doi.org/10.1016/j.conengprac.2018.02.005
Huang, H. B., Yi, T. H., & Li, H. N. (2017). Sensor fault diagnosis for structural health monitoring based on
statistical hypothesis test and missing variable approach. Journal of Aerospace Engineering, 30(2),
B4015003. https://doi.org/10.1061/(ASCE)AS.1943-5525.0000572
Joe Qin, S. (2003). Statistical process monitoring: basics and beyond. Journal of Chemometrics: A Journal of the
Chemometrics Society, 17(8-9), 480-502. https://doi.org/10.1002/cem.800
Kirilova, E. G. (2022). Artificial Neural Networks: Applications in Chemical Engineering. In Modeling and
Simulation in Chemical Engineering (pp. 127-146). Springer, Cham. https://doi.org/10.1007/978-3-030-
87660-9_6
Kruger, U., & Xie, L. (2012). Statistical monitoring of complex multivatiate processes: with applications in
industrial process control. John Wiley & Sons. https://www.wiley.com/en-
sg/Statistical+Monitoring+of+Complex+Multivatiate+Processes:+With+Applications+in+Industrial+Process
+Control-p-9780470517246
Lindner, B., Auret, L., Bauer, M., & Groenewald, J. W. (2019). Comparative analysis of Granger causality and
transfer entropy to present a decision flow for the application of oscillation diagnosis. Journal of Process
Control, 79, 72-84. https://doi.org/10.1016/j.jprocont.2019.04.005
Lindner, B., Auret, L., Bauer, M., & Groenewald, J. W. (2019). Comparative analysis of Granger causality and
transfer entropy to present a decision flow for the application of oscillation diagnosis. Journal of Process
Control, 79, 72-84. https://doi.org/10.1016/j.jprocont.2019.04.005
Ljung, L. (1998). System identification. Wiley encyclopedia of electrical and electronics engineering, 1-
19. https://doi.org/10.1002/047134608X.W1046.pub2
ISSN-L: 0798-1015 • eISSN: 2739-0071 (En línea) - Revista EspaciosVol. 43, Nº 07, Año 2022
BECERRA-ANGARITA O.F. & ALVAREZ-PIZARRO Y.A. «Granger causality procedeture to diagnosis and failture
in industrial systems»
Pag. 48
Lucke, M., Chioua, M., & Thornhill, N. F. (2022). From oscillatory to non-oscillatory disturbances: A comparative
review of root cause analysis methods. Journal of Process Control, 113, 42-67.
https://doi.org/10.1016/j.jprocont.2022.03.004
Marques, V. M., Munaro, C. J., & Shah, S. L. (2015). Detection of causal relationships based on residual
analysis. IEEE Transactions on Automation Science and Engineering, 12(4), 1525-1534.
https://doi.org/10.1109/TASE.2015.2435897
Nor, N. M., Hassan, C. R. C., & Hussain, M. A. (2020). A review of data-driven fault detection and diagnosis
methods: Applications in chemical process systems. Reviews in Chemical Engineering, 36(4), 513-553.
https://doi.org/10.1515/revce-2017-0069
Nwani, S. E. (2022). Air pollution trajectories and life expectancy in Nigeria. International Journal of Social
Economics. https://doi.org/10.1108/IJSE-06-2021-0351
Seth, A. K. (2010). A MATLAB toolbox for Granger causal connectivity analysis. Journal of neuroscience
methods, 186(2), 262-273. https://doi.org/10.1016/j.jneumeth.2009.11.020
Seth, A. K., Barrett, A. B., & Barnett, L. (2015). Granger causality analysis in neuroscience and
neuroimaging. Journal of Neuroscience, 35(8), 3293-3297. https://doi.org/10.1523/JNEUROSCI.4399-
14.2015
Shojaie, A., & Fox, E. B. (2022). Granger causality: A review and recent advances. Annual Review of Statistics
and Its Application, 9, 289-319. https://doi.org/10.1146/annurev-statistics-040120-010930
Wiener, N., & Masani, P. (1957). The prediction theory of multivariate stochastic processes. Acta
Mathematica, 98(1-4), 111-150. https://doi.org/10.1007/BF02404472
Yi, T. H., Huang, H. B., & Li, H. N. (2017). Development of sensor validation methodologies for structural health
monitoring: A comprehensive review. Measurement, 109, 200-214.
https://doi.org/10.1016/j.measurement.2017.05.064
Yong, G., Xin, W., & Zhenlei, W. (2015). Fault detection for a class of industrial processes based on recursive
multiple models. Neurocomputing, 169, 430-438. https://doi.org/10.1016/j.neucom.2014.08.107
Esta obra está bajo una Licencia Creative Commons
Atribución-NoComercial 4.0 Internacional