







































AF. Obele et al. /Future Technology                                                                                           August 2024| Volume 03 | Issue 03 | Pages 
08-14 

8 

 

 

 

Article 

The application of the Bayesian linear regression 

model to optimize the maintenance of a 

programmable logic controller  
Alenju Frank Obele*, Daniel O. Aikhuele, Nwosu H.U. 

 Department of Mechanical Engineering, University of Port Harcourt, East-West Road, Port Harcourt, Nigeria 

A R T I C L E   I N F O 
 

Article history: 
Received 09 February 2024  
Received in revised form 
18 March 2024 
Accepted 27 March 2024 
 
Keywords:  
Programmable Logic Controllers, Bayesian Linear 
Inference, Total Downtime, Total Unexpected 
Intervals, Mean Time to Repair, Mean Time 
Between Failures 
 
*Corresponding author 
Email address: 
alenjuobele@yahoo.com  
 
 
DOI: 10.55670/fpll.futech.3.3.2 
 

A B S T R A C T 
 

In this paper, an optimization approach, which is based on the Bayesian Linear 
Inference (BLI) model, has been proposed for the maintenance of 
Programmable Logic Controllers (PLCs). The BLI model, which is implemented 
using historical data, incorporates maintenance indicators like the number of 
failures (NF), total downtime (TD), total unexpected intervals (TUI), mean time 
to repair (MTTR) and mean time between failures (MTBF). It offers a 
probabilistic framework for determining the influence of each predictor 
variable on PLC maintenance. The model produces posterior means, credible 
intervals, and standard deviations, which provide insights into the magnitude 
and uncertainty of these relationships. The results from the study show that 
factors like NF and TD are influenced by the magnitude and direction of the 
maintenance levels. Also, the R-squared score (0.85) also indicates how much 
of the variability in maintenance in the system. From the results obtained, the 
study can conclude that the BLI model can optimize PLC maintenance 
procedures by identifying essential components and their contributions. Also, 
it is able to estimate future maintenance requirements and helps with resource 
allocation and process optimization decisions. 

 

1. Introduction 

Programmable logic controllers (PLCs), which are 
essential components of industrial automation systems, are 
used in manufacturing settings to manage and monitor a 
variety of operations. For PLCs, effective maintenance 
procedures are critical to ensuring their longevity and 
reliability. Although several authors have proposed and 
developed models for the management of maintenance, 
longevity, and reliability of the PLC systems [1- 5]; however, 
there are still limited studies, on the specific subjects of 
maintenance optimization for PLC systems. Through typical 
maintenance optimization, organizations can reduce the 
probability of unexpected failures, such that they can reduce 
the amount of downtime and increase productivity. Also, they 
will be able to guarantee that PLC systems run at optimal 
efficiency with the lowest failure risk by optimizing 
maintenance schedules based on criteria such as equipment 
usage, operational conditions, and historical performance 
data. This method bridges the gap between academic 
research and the practical application of maintenance 
optimization models. Dekker [6] described his perception of 
an optimization model as representing a technical system, its 
function and importance, system deterioration, available 

system information, an objective function, and an 
optimization technique. Wang [5] created a general 
framework for optimizing maintenance policies, system 
configuration, maintenance effectiveness, maintenance cost, 
optimization criteria, modeling tools, planning horizon, 
reliability, and system information which are used as inputs 
for the framework. According to Marais & Saleh [7], different 
optimization models can be obtained by changing the system 
configuration, maintenance effectiveness, planning horizon, 
analytical tools, and component dependencies. Although this 
provides a good idea for building a maintenance optimization 
model; however, it does not include all of the optimization 
classes. Optimization classes are the input parameters 
required to build a maintenance optimization model, which is 
expected to produce the desired output. While most 
optimization models adopt a component perspective, Tan & 
Raghavan [8] developed a framework for a predictive 
maintenance-based plan generated from a system 
perspective. Wang [5] and Nicolai & Dekker [3] considered 
the planning horizon when categorizing the different 
optimization methods where they were classified into models 
for finite periods; however, they didn’t consider the 
exploration of maintenance optimization. Using the Markov 

 

 

Future Technology 

Open Access Journal 

https://doi.org/10.55670/fpll.futech.3.3.2 

 

 

 

 

 

 

 

 

August 2024| Volume 03 | Issue 03 | Pages 08- 14 

Journal homepage: https://fupubco.com/futech 

 

ISSN 2832-0379 

mailto:alenjuobele@yahoo.com
https://doi.org/10.55670/fpll.futech.3.3.2
https://fupubco.com/futech
https://fupubco.com/


AF. Obele et al. /Future Technology                                                                                           August 2024| Volume 03 | Issue 03 | Pages 08-14 

9 

 

analysis method, Alizadeh & Sriramula [9] and Liu & 
Frangopol [10] presented a novel reliability model for 
redundant safety-related systems. Providing a logical 
reliability assessment of ship structures under various 
threats throughout their lifecycle. A flexible set of modeling 
patterns was presented by Meng et al. [11] and implemented 
in the Alta-Rica 3.0 language. Chen & Mehrabani [12]  
introduced a technique for analyzing the reliability of coastal 
flood defenses, such as earth sea dykes, about changing 
operating conditions. The method also included future 
performance projections and the best maintenance plan. A 
unique approach to reliability-centered maintenance based 
on artificial neural networks was introduced by Pliego 
Marugán et al. [13]. Zhu et al. [14] presented and examined a 
reliability and maintenance model of a k-out-of-n: F system 
for PLCs. During this process, the system underwent a 
rebuilding process with reduced performance, which was 
followed by preventive maintenance (PM) with the 
replacement of malfunctioning components. During this 
rebuilding process, the system was susceptible to failure with 
various failure criteria. Izquierdo et al. [15] proposed a novel 
strategy that used a case study approach to validate it, which 
helped to reduce the uncertainty arising from the operational 
context. A condition-based maintenance decision framework 
for a multi-component system subject to a system reliability 
requirement was created by Shi et al. [16]. Ma et al. [17] 
looked into the methodologies for maintenance optimization 
and reliability analysis of a two-unit warm standby cooling 
system. A performance-balanced system operating in a shock 
environment was proposed by Wang et al. [18], which is 
hardly observed in the literature. The joint optimization of lot 
sizing and maintenance policy for a multi-product production 
system subject to two failure scenarios was studied by Gao et 
al. [19]. Chang et al. [20] applied the approach of minimal cuts 
for demand d (d-MC) to evaluate the time-related reliability 
of a multi-state flow network (MSFN).  

To address the maintenance optimization issue of the 
PLCs system, a Bayesian Linear Inference (BLI) model has 
been proposed in this study. The BLI is a potent statistical 
method that maximizes maintenance strategies by utilizing 
both linear modeling and Bayesian principles. Using the BLI 
model to schedule and carry out maintenance for PLC systems 
transforms the process and results in lower costs, downtime, 
and an increase in the system’s reliability. With the BLI model, 
the study will be able to take into account system variability 
and uncertainties, which are common within the complex and 
dynamic environments in which PLCs operate. This model is 
especially useful as it is possible to accurately estimate future 
maintenance requirements by simulating the interactions 
between the many elements that characterize the PLCs 
system performance. Maintenance workers can make well-
informed decisions and judgments using these approaches, 
which offer a probabilistic framework based on the likelihood 
of various outcomes and for handling the inherent 
uncertainties in PLC's behavior, such as wear and tear, 
weather conditions, and component deterioration.  

2. Bayesian linear inference model 

The Bayesian Linear Inference model is a probabilistic 
version of the linear regression that applies the Bayesian 
principles. It represents a framework for the estimation of the 
parameters of a linear regression model taking into account 
the uncertainty, and allowing for re-use of previous 
experience. It is a powerful agent in incorporating past 
knowledge of the parameters. This is most beneficial in cases 
where such information about the variables or parameters is 

available previously. Uncertainty in parameter estimations is 
captured in it. Rather than providing point estimates of 
regression coefficients and error variance, the model 
generates posterior distributions that represent the range of 
feasible values for the parameters in light of the observed 
data and previous knowledge. The governing equations of the 
model have been presented in the following definitions. 

3. Definition  

Let the prior distribution of θ be given as a normal 
distribution Ν(μ,Σ) where μ is the mean and can also be 
referred to as the first moment and Σ be the covariance matrix 
and the second moment of the distribution, such that the 
probability of θ is given as: 

𝑃(𝜃) =
1

𝑍
𝑒𝑥𝑝 {−

1

2
(𝜃 − 𝜇)𝑇Σ−1(𝜃 − 𝜇)}         (1) 

where 

𝜇 = 𝐸𝑝(𝜃)[𝜃]      𝑎𝑛𝑑      Σ = 𝐸𝑝(𝜃)[(𝜃 − 𝜇)𝑇(𝜃 − 𝜇)]  

Equation (1) is the governing equation of the BLI model, and 
it refers to the moment parametrization of θ since it consists 
of the first moment (𝜇) and the second moment (Σ) of the 
variable. Z is a normalization factor with the value 

√(2𝜋)𝑛det (Σ), where,𝑛 is the dimension of 𝜃. To prove this 

equation, one can translate the distribution from the origin 
and do a change of variables such that the distribution has the 
form and can be expressed 𝜃′ in polar coordinates and 
integrate over the space to compute Z. 

𝑃(𝜃′) =
1

𝑍
𝑒𝑥𝑝 {−

1

2
𝜃′𝑇𝜃′}                                                                                   (2) 

With the BLI model, it is possible to determine the probability 
of an output 𝑦𝑡+1 given a new input 𝑥𝑡+1 and the set of data 
𝐷 = {(𝑥𝑖 , 𝑦𝑖)}𝑖 = 1, ⋯ , 𝑡. To compute the probability 
𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝐷), the distribution𝜃is introduced into this 
expression and marginalize over it. 

𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝐷) = ∫ 𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝜃, 𝐷)
𝜃∈Θ

𝑃(𝜃|𝑥𝑡+1, 𝐷)        (3) 

D explains no more than what θ does, 𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝜃, 𝐷) is 
essentially 𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝜃, ). Also, from the graphical model 
the study can determine𝑃(𝜃|𝑥𝑖 , 𝐷)is 𝑃(𝜃|𝐷) since 𝑦𝑖  is known 
and thus 𝜃 and𝑥𝑖  are independent, hence, Equation (3) can be 
rewritten as: 

𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝐷) = ∫ 𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝜃)
𝜃∈Θ

𝑃(𝜃|𝐷)        (4) 

However, computing with the above equation may be too 
complex due the moment parameterization of normal 
distributions(𝜃) but not with the natural parameterization. 
Hence, the moment parameterization of normal 
distributions(𝜃) is converted to natural parameterization of 

normal distributions in the form 𝑃(𝑥) =
1

𝑍
𝑒𝑥𝑝 {−

1

2
(𝑥 −

𝜇)𝑇Σ−1(𝑥 − 𝜇)}which can also be expressed further as: 

𝑃(𝑥) =
1

𝑍
𝑒𝑥𝑝 {𝐽𝑇𝑥 −

1

2
𝑥𝑇�̌�𝑥}          (5) 

The natural parameterization simplifies the multiplication of 
normal distributions as it becomes the addition of the J and �̌� 
matrices of different distributions. Transforming the moment 
parameterization to the natural parameterizationis done by 
first expanding the exponent: 

−
1

2
(𝑥 − 𝜇)𝑇Σ−1(𝑥 − 𝜇) = −

1

2
𝑥𝑇Σ−1 + 𝜇𝑇Σ−1𝑥 −

1

2
𝜇𝑇Σ−1𝜇

             (6) 



AF. Obele et al. /Future Technology                                                                                           August 2024| Volume 03 | Issue 03 | Pages 08-14 

10 

 

The last term in the above equation, has nothing to do with x 
and can therefore be absorbed into the normalizer, by 
comparing equations (5) and (6), J and �̌�therefore can be 
expressed as: 

{
J = Σ−1𝜇

�̌� = Σ−1
                                           (7) 

where the matrix �̌� is called the precision matrix.  

4. Posterior distribution 𝑃(𝜃|𝐷) 

Using Bayes rule, the posterior probability 𝑃(𝜃|𝐷)can be 
expressed as  

𝑃(𝜃|𝐷) ∝ 𝑃(𝑦1:𝑡|𝑥1:𝑡, 𝜃)𝑃(𝜃) ∝ (∏ 𝑃(𝑦1|𝑥1, 𝜃)𝑡
𝑖=1 )𝑃(𝜃) 

             (8) 

The 𝑦𝑖′𝑠 and 𝜃 have a diverging relationship at 𝜃, and since 𝜃 
is unknown, it follows that the 𝑦𝑖′𝑠 are independent of each 
other; that is, 𝑃(𝑦1:𝑡|𝑥1:𝑡, 𝜃) = ∏ 𝑃(𝑦1|𝑥1, 𝜃)𝑡

𝑖=1 . An easy 
updating rule can compute this product. By examining the 
result of𝑃(𝑦1|𝑥1, 𝜃)𝑃(𝜃). 

𝑃(𝑦1|𝑥1, 𝜃)𝑃(𝜃) ∝ 𝑒𝑥𝑝 {−
1

2𝜎2
(𝑦𝑖 − 𝜃𝑇𝑥)2} 𝑒𝑥𝑝 {𝐽𝑇 −

1

2
𝜃𝑇𝑃𝜃} ∝ 𝑒𝑥𝑝 {−

1

2𝜎2
(−2𝑦𝑖𝜃𝑇𝑥𝑖 + 𝜃𝑇𝑥𝑖𝑥𝑖

𝑇𝜃)} 𝑒𝑥𝑝 {𝐽𝑇𝜃 −
1

2
𝜃𝑇𝑃𝜃} = 𝑒𝑥𝑝 {

1

𝜎2
𝑦𝑖𝑥𝑇𝜃 −

1

2𝜎2
𝜃𝑇𝑥𝑖𝑥𝑖

𝑇𝜃} 𝑒𝑥𝑝 {𝐽𝑇𝜃 −

1

2
𝜃𝑇𝑃𝜃} = 𝑒𝑥𝑝 {(𝐽 +

1

𝜎2
𝑦𝑖𝑥𝑖)

𝑇
𝜃 −

1

2
𝜃𝑇 (𝑃 +

1

𝜎2
𝑥𝑖𝑥𝑖

𝑇) 𝜃}  

   = 𝑒𝑥𝑝 {𝐽′𝑇𝜃 −
1

2
𝜃𝑇𝑃′𝜃} 

where𝑃(𝑦1|𝑥1, 𝜃) is the likelihood function and 𝑃(𝜃) is the 
prior distribution. The equation was broken down to 
understand the components of the posterior distribution as. 

i. 𝑃(𝑦1|𝑥1, 𝜃)𝑃(𝜃) ∝ 𝑒𝑥𝑝 {−
1

2𝜎2
(𝑦𝑖 − 𝜃𝑇𝑥)2} 𝑒𝑥𝑝 {𝐽𝑇 −

1

2
𝜃𝑇𝑃𝜃} 

This step involves multiplying the likelihood function 
𝑃(𝑦1|𝑥1, 𝜃) and the prior distribution 𝑃(𝜃) together. The 
likelihood function represents the probability of observing 
the data 𝑦1 given the parameters 𝜃and 𝑥1. The prior 
distribution represents our initial beliefs about the 
distribution of 𝜃 before observing any data. 

ii. ∝ 𝑒𝑥𝑝 {−
1

2𝜎2 (−2𝑦𝑖𝜃𝑇𝑥𝑖 + 𝜃𝑇𝑥𝑖𝑥𝑖
𝑇𝜃)} 𝑒𝑥𝑝 {𝐽𝑇𝜃 −

1

2
𝜃𝑇𝑃𝜃} 

In this step, the quadratic term was expanded in the 
exponential and the expression was simplified. The terms 
were combined with 𝜃 to form a quadratic form. 

iii. ∝𝑒𝑥𝑝 {
1

𝜎2 𝑦𝑖𝑥𝑇𝜃 −
1

2𝜎2 𝜃𝑇𝑥𝑖𝑥𝑖
𝑇𝜃} 𝑒𝑥𝑝 {𝐽𝑇𝜃 −

1

2
𝜃𝑇𝑃𝜃} 

Here, the terms were collected with 𝜃 to rewrite the 
expression. 

iv. ∝𝑒𝑥𝑝 {𝐽′𝑇𝜃 −
1

2
𝜃𝑇𝑃′𝜃} 

Finally, the terms involving 𝜃were combined, resulting in the 
desired form. J' and P' represent new vectors or matrices 
obtained from the original terms, depending on the values of 
𝐽, 𝑃, 𝑦𝑖 , 𝑥𝑖 , and 𝜎 respectively. 
The resulting expression is proportional to the exponential of 
a quadratic form in 𝜃. This form is typical in Bayesian 
inference, where the posterior distribution is often 
proportional to the exponential of a quadratic form due to the 

conjugacy of certain prior and likelihood combinations. Line 
1 to line 2 is true because any term that does not have 𝜃 can 
be absorbed into the normalizer. Now, we can apply the 
generalized result to Equation (8) and derivethe following: 

𝑃(𝜃|𝐷) ∝ 𝑒𝑥𝑝 {(𝐽 +
∑ 𝑦𝑖𝑥𝑖𝑖

𝜎2
)

𝑇
𝜃 −

1

2
𝜃𝑇 (𝑃 +

∑ 𝑥𝑖𝑥𝑖
𝑇

𝑖

𝜎2
)}        (9) 

where, 𝑃(𝜃|𝐷) is a normal distribution with 𝐽𝑓𝑖𝑛𝑎𝑙 = 𝐽 +
∑ 𝑦𝑖𝑥𝑖𝑖

𝜎2  

and 𝑃𝑓𝑖𝑛𝑎𝑙 = 𝑃 +
∑ 𝑥𝑖𝑥𝑖

𝑇
𝑖

𝜎2
 . 𝑃𝑓𝑖𝑛𝑎𝑙is the precision matrix of the 

normal distribution, and as the number of 𝑥𝑖  increases, the 
terms in this matrix become larger. Also, since 𝑃𝑓𝑖𝑛𝑎𝑙  is the 

inverse of the covariance, the variance gets lower as the 
number of samples grows. This is a characteristic of a 
Gaussian model that a new data point always lowers the 
variance, but this downgrading of variance does not always 
make sense. If we believe that there are outliers in our 
dataset, this model will not work. With the relation previously 
given, the mean and covariance of this distribution may be 
determined: 

𝜇𝑓𝑖𝑛𝑎𝑙 = (Σ−1 +
∑ 𝑥𝑖𝑥𝑖

𝑇
𝑖

𝜎2
)

−1
∑ 𝑦𝑖𝑥𝑖𝑖

𝜎2
   

  

Σ𝑓𝑖𝑛𝑎𝑙 = (Σ−1 +
∑ 𝑥𝑖𝑥𝑖

𝑇
𝑖

𝜎2
)

−1

     

where, 𝜇𝑓𝑖𝑛𝑎𝑙  is the mean of the distribution and Σ𝑓𝑖𝑛𝑎𝑙  is the 

covariance of the distribution. 
𝜇𝑓𝑖𝑛𝑎𝑙  and Σ𝑓𝑖𝑛𝑎𝑙  are broken down as: 

𝜇𝑓𝑖𝑛𝑎𝑙 = (Σ−1 +
∑ 𝑥𝑖𝑥𝑖

𝑇
𝑖

𝜎2
)

−1
∑ 𝑦𝑖𝑥𝑖𝑖

𝜎2
  

In this Equation, Σ represents the covariance matrix and Σ−1 
denotes its inverse. The term (∑ 𝑥𝑖𝑥𝑖

𝑇
𝑖 ) represents the sum of 

the outer products of the input vectors 𝑥𝑖 . 𝜎is the standard 
deviation or noise parameter. The expression (∑ 𝑦𝑖𝑥𝑖𝑖 ) 
represents the sum of the product of the observed target 
values 𝑦𝑖  and the corresponding input vectors 𝑥𝑖 . The 
expression calculates the updated value of the mean 
parameter 𝜇𝑓𝑖𝑛𝑎𝑙 . It involves matrix computations where the 

inverse of the covariance matrix Σ is added to the sum of the 
outer products (∑ 𝑥𝑖𝑥𝑖

𝑇
𝑖 ). This sum of outer products captures 

the structure of the input data. The term (∑ 𝑦𝑖𝑥𝑖𝑖 ) is multiplied 
by the inverse of the noise parameter 𝜎2. 

i. Σ𝑓𝑖𝑛𝑎𝑙 = (Σ−1 +
∑ 𝑥𝑖𝑥𝑖

𝑇
𝑖

𝜎2
)

−1

 

 Here, the expression calculates the updated value of the 
covariance matrix Σ𝑓𝑖𝑛𝑎𝑙 . It involves a similar matrix 

computation as in the previous Equation. The inverse of the 
covariance matrix Σ−1 is added to the sum of the outer 
products (∑ 𝑥𝑖𝑥𝑖

𝑇
𝑖 ), capturing the structure of the input data. 

This sum is then inverted to obtain the updated covariance 
matrix Σ𝑓𝑖𝑛𝑎𝑙 .  

These Equations are used in BLI to update the mean and 
covariance of the posterior distribution of the parameters. 
They incorporate the observed data and provide a way to 
update the prior beliefs based on the likelihood of the data 
and the noise parameter σ. 

5. Probability distribution of the prediction  

The next step is to compute the probability distribution 
of prediction𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝜃). Since the linear combination of 
normal distributions is also a normal distribution, 



AF. Obele et al. /Future Technology                                                                                           August 2024| Volume 03 | Issue 03 | Pages 08-14 

11 

 

𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝜃)therefore the distribution can be written in the 

form 
1

𝑍
𝑒𝑥𝑝 {−

1

2𝜎2
(𝑦𝑡+1 − 𝜇𝑦𝑡+1

)
𝑇

Σ𝑦𝑡+1
(𝑦𝑡+1 − 𝜇𝑦𝑡+1

)}, where 

𝜇𝑦𝑡+1
= 𝐸[𝑦𝑡+1] = 𝐸[𝜃𝑇𝑥𝑡+1 + 𝜖] = 𝐸[𝜃𝑇𝑥𝑡+1] + 𝐸[𝜖] =

𝐸[𝜃]𝑇𝑥𝑡+1 + 0 = 𝜇𝜃
𝑇𝑥𝑡+1  

and 

Σ𝑦𝑡+1
= 𝑥𝑡+1

𝑇Σ𝜃𝑥𝑡+1 + 𝜎2  

The components are broken down and explained as:  

i. 𝑃(𝑦𝑡+1|𝑥𝑡+1, 𝜃) =
1

𝑍
𝑒𝑥𝑝 {−

1

2𝜎2 (𝑦𝑡+1 − 𝜇𝑦𝑡+1
)

𝑇
Σ𝑦𝑡+1

(𝑦𝑡+1 −

𝜇𝑦𝑡+1
)} 

This equation represents the conditional probability 
distribution of the target variable 𝑦𝑡+1 given the input 
variable 𝑥𝑡+1 and the parameter 𝜃. It is characterized by a 
multivariate Gaussian distribution.  

ii. 𝜇𝑦𝑡+1
= 𝐸[𝑦𝑡+1] = 𝐸[𝜃𝑇𝑥𝑡+1 + 𝜖] = 𝐸[𝜃𝑇𝑥𝑡+1] + 𝐸[𝜖] 

           = 𝐸[𝜃]𝑇𝑥𝑡+1 + 0 = 𝜇𝜃
𝑇𝑥𝑡+1 

In this expression, 𝜇𝑦𝑡+1
 represents the mean of the target 

variable 𝑦𝑡+1. It is calculated by taking the expected value of 
𝜃𝑇𝑥𝑡+1 and considering that the expected value of the noise 
term 𝜖 is zero. Thus, the mean of 𝑦𝑡+1 is given by the dot 
product of the expected value of 𝜃 (denoted as 𝜇𝜃) and the 
input variable 𝑥𝑡+1. 

iii. Σ𝑦𝑡+1
= 𝑥𝑡+1

𝑇Σ𝜃𝑥𝑡+1 + 𝜎2 

Here, Σ𝑦𝑡+1
 represents the covariance matrix of the target 

variable 𝑦𝑡+1. It is calculated by taking the outer product of 
𝑥𝑡+1 and Σ𝜃 (the covariance matrix of 𝜃) and adding the 
variance 𝜎2. The expression captures the uncertainty in the 
target variable 𝑦𝑡+1 based on the uncertainty in the parameter 
𝜃 (represented by Σ𝜃) and the noise level 𝜎. In addition, the 
equation defines the conditional probability distribution of 
𝑦𝑡+1 given 𝑥𝑡+1 and θ as a multivariate Gaussian distribution, 
characterized by the mean 𝜇𝑦𝑡+1

 and covariance matrix Σ𝑦𝑡+1
. 

These parameters depend on the expected value of θ (𝜇𝜃), the 
input variable 𝑥𝑡+1, and the covariance matrix of 𝜃 (Σ𝜃), as 
well as the noise level 𝜎. 

6. Application of the model, results and discussions 

The summary output of the BLI model offers details on 

credible intervals, the posterior distribution of the 

coefficients, and other pertinent statistics. BLI yields a 

distribution for every coefficient rather than point estimates. 

The range of values that a coefficient is most likely to fall into 

with a given probability is represented by credible intervals. 

The linear regression model's details, such as coefficients, p-

values, R-squared, etc., are shown in the summary output. A 

coefficient shows how each predictor, and the dependent 

variable are related to one another. The importance of every 

prediction is shown by the P-value. Indicators of statistical 

significance have a low p-value (< 0.05). Alongside the fitted 

linear regression line are the real data points in this graphic. 

Due to the dependent variable's linear relationship to the 

predictors, the anticipated values are shown by the linear 

regression line. The places where the model might not fit well 

are indicated by data points deviating from the line. The 

distribution of residuals, or the disparities between actual 

and expected values, is displayed in the residuals plot. The 

residuals should ideally be dispersed randomly at about zero.  

3.1 PLC maintenance 
        Number of Failures, or NF: Understanding the correlation 
between the number of failures and the months can be aided 
by linear regression. The NF plot has a positive relationship; 
although the data point have a good fit with the regression 
line. The data point suggests that failure rates have increased 
in the last few months. Residual plot exhibit a normal 
distribution with a negative (-ve) intercept at the y-axis.  
Mean time to repair (MTTR): The MTTR plot has a positive 
relationship, with the data point having a good fit with the 
regression line. The data point suggests that failure rates have 
decreased in the last few months. Residual plot exhibit a 
normal distribution with a positive (+ve) intercept at the y-
axis. 
Total Downtime (TD): The TD plot has a positive relationship, 
with the data point having a good fit with the regression line. 
The data point suggests that failure rates have decreased in 
the last few months. Residual plot exhibit a normal 
distribution with a negative (-ve) intercept at the y-axis. 
Total Unscheduled Incidents (TUI): The TUI plot has a 
negative relationship, with the data point having a good fit 
with the regression line. The data point suggests that failure 
rates have decreased in the last few months. Residual plot 
exhibit a normal distribution with a negative (-ve) intercept 
at the y-axis. 
Mean time before failure (MTBF): The MTBF plot has a 
negative relationship, with the data point having a good fit 
with the regression line. The data point suggests that failure 
rates have decreased in the last few months. Residual plot 
exhibit a normal distribution with a positive (+ve) intercept 
at the y-axis. 
Generally, the relationship between the predictor variables 
(NF, TD, TUI, MTTR, and MTBF) is revealed by the results 
from the implementation of the BLI model. A more detailed 
explanation of the essential elements and data used in the 
model are summary as follows: 
a. The initial maintenance value is from January when all 
predictors are 0.0 and a 95% credible interval ([145.5, 
154.9]) which indicates that the true value of the intercept is 
most likely located within this range about 95% of the time.  
b. The modest p-value is <0.001, it is concluded that there is a 
significant difference between the intercept and zero. SD 
(2.1): The degree of fluctuation or uncertainty surrounding 
the estimate. NF (Number of Failures): A rise in failures of one 
unit is correlated with a rise in maintenance of 3.5 units. [2.8, 
4.2] is the 95% credible interval for NF.SD (0.6): The 
estimate's level of uncertainty. Given the modest p-value 
(<0.001), a significant positive connection is implied. 
TD (Total Downtime): There is a -1.2 unit drop in 
maintenance for every unit rise in total downtime. Lower 
maintenance appears to be linked to increased total 
downtime, as indicated by the negative coefficient. [-1.7, -0.7] 
is the 95% credible interval for TD. There is a substantial 
negative association, as indicated by the p-value of 0.012. 
Similar interpretations as NF and TD apply to TUI (Total 
Unexpected Intervals), MTTR (Mean Time to Repair), and 
MTBF (Mean Time Between Failures). R-squared: With an R-
squared of 0.85, the model accounts for 85% of the variation 
in the maintenance measures. This gives a very good 
regression performance.  In conclusion, estimates of each 
predictor's influence on PLC maintenance are provided by the 
Bayesian linear regression model, coupled with an 
explanation of the uncertainties surrounding these values 
(Table 1). It gives an indication of the factors that are highly 
correlated with maintenance and a gauge of how well the 



AF. Obele et al. /Future Technology                                                                                           August 2024| Volume 03 | Issue 03 | Pages 08-14 

12 

 

model matches the data. These observations can be helpful in 
maximizing PLC's general maintenance plans (Figures 1-5). 

 
Figure 1. Linear regression plot of number of failures 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 2. Linear regression plot of mean time to repair 

 

 

Figure 3. Linear regression plot of total downtime 

 
Figure 4. Linear regression plot of total unscheduled incidents 

 

 
Figure 5. Linear regression plot of mean time before failure 

 
 

Table 1. Bayesian linear inference results 

 

 

 

Variable  Posterior 

mean 

Credible 

interval 

Posterior 

SD 

P 

Intercept  150.2 [145.5, 154.9] 2.1 <0.01 

NF 3.5 [2.8, 4.2] 0.6 <0.01 

TD -1.2 [-1.7, -0.7] 0.3 0.012 

TUI 0.02 [-0.1, 0.14] 0.08 0.775 

MTTR -5.8 [-0.72, -4.4] 1.2 <0.01 

MTBF 0.15 [0.08, 0.22] 0.03 <0.01 



AF. Obele et al. /Future Technology                                                                                           August 2024| Volume 03 | Issue 03 | Pages 08-14 

13 

 

7. Conclusion 

The use of Bayesian linear regression to optimize the 
overall maintenance of Programmable Logic Controllers 
(PLCs) is a valuable and insightful method. The resulting 
plots, which demonstrate the correlations between key 
maintenance indicators and overall maintenance levels, are a 
visual depiction of the model's predictions and uncertainty.  
The Bayesian linear regression model, with its posterior 
means, credible intervals, and standard deviations, allows for 
a more nuanced understanding of the impact of variables like 
the number of failures (NF), total downtime (TD), total 
unexpected intervals (TUI), mean time to repair (MTTR), and 
mean time between failures (MTBF) on PLC maintenance. 
These insights enable stakeholders to identify crucial factors 
impacting maintenance levels and make sound decisions 
about resource allocation and process improvement. The R-
squared values, which indicate the model's explanatory 
power, show what percentage of variability in maintenance 
the model explains. This fit value gives confidence that the 
model can reflect the complexity of the predictor-
maintenance connection. Furthermore, the provided 
Bayesian linear regression model provides a probabilistic 
framework that takes into account uncertainty in parameter 
estimations, which improves its robustness in real-world 
applications. This functionality is especially important in the 
dynamic and frequently unpredictable industrial settings 
where PLCs operate. The application of Bayesian linear 
regression to optimize PLC maintenance demonstrates a 
thorough and adaptable methodology. This approach, which 
uses historical data and probabilistic modelling, provides a 
valuable tool for not just anticipating future maintenance 
requirements, but also strategically improving overall system 
reliability and efficiency. The plots and findings show that 
Bayesian inference has the potential to be a valuable tool in 
the optimization and decision-making processes of PLC 
maintenance. 

Ethical issue 
The authors are aware of and complies with best practices in 
publication ethics, specifically with regard to authorship 
(avoidance of guest authorship), dual submission, 
manipulation of figures, competing interests, and compliance 
with policies on research ethics. The authors adhere to 
publication requirements that the submitted work is original 
and has not been published elsewhere. 

Data availability statement 
Datasets analyzed during the current study are available and 

can be given following a reasonable request from the 

corresponding author. 

Conflict of interest 

The authors declare no potential conflict of interest. 

References 

[1] Brown, M. and Proschan, F. (1983) ‘Imperfect repair’, J 

Appl Probab, 20, pp. 851–859. 

[2]  Cho, D. and Parlar, M. (1991) ‘A survey of maintenance 

models for multi-unit systems’, Eur J Oper Res, 51, pp. 

1–23. Available at: https://doi.org/10.1016/0377- 

2217(91)90141-h. 

[3]  Nicolai, R.. and Dekker, R. (2007) Optimal maintenance 

of multi_component systems: a review. Complex 

system maintenance handbook. London: Springer. 

Available at: https://doi.org/10.1007/978-1- 84800-

011-7_11. 

[4]  Pham, H. and Wang, H. (1996) ‘Imperfect 

maintenance’, European Journal of Operational 

Research, 94(3), pp. 425–438. Available at: 

https://doi.org/10.1016/S0377-2217(96)00099-9. 

[5] Wang, H. (2002) ‘A survey of maintenance policies of 

deteriorating systems’, Eur J Oper Res, 139, pp. 469–

489. Available at: https://doi.org/10.1016/s0377-

2217 (01)00197-7.  

[6]  Dekker, R. (1995) ‘On the use of operations research 

models for maintenance decision making’, 

Microelectronics Reliability, 35(9–10), pp. 1321–1331. 

Available at: https://doi.org/10.1016/0026-

2714(95)99380-2. 

[7]  Marais, K. and Saleh, J. (2009) ‘Beyond its cost, the 

value of maintenance: an analytical framework for 

capturing its net present value’, Reliab Eng Syst Saf, 94, 

pp. 644–657. Available at: https://doi.org/10.1016/ 

j.ress.2008.07.004. 

[8]  Ming Tan, C. and Raghavan, N. (2008) ‘A framework to 

practical predictive maintenance modeling for multi-

state systems’, 93, pp. 1138–1150. Available at: 

https://doi.org/10.1016/j.ress.2007.09.003. 

[9] Alizadeh, S. and Sriramula, S. (2018) ‘Impact of 

common cause failure on reliability performance of 

redundant safety related systems subject to process 

demand’, Reliability Engineering & System Safety, 172, 

pp. 129–150. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2017.1

2.011. 

[10]  Liu, Y. and Frangopol, D.M. (2018) ‘Time-dependent 

reliability assessment of ship structures under 

progressive and shock deteriorations’, Reliability 

Engineering & System Safety, 173, pp. 116–128. 

Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2018.0

1.009. 

[11]  Meng, H., Kloul, L. and Rauzy, A. (2018) ‘Modeling 

patterns for reliability assessment of safety 

instrumented systems’, Reliability Engineering & 

System Safety, 180, pp. 111–123. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2018.0

6.026. 

[12]  Chen, H.-P. and Mehrabani, M.B. (2019) ‘Reliability 

analysis and optimum maintenance of coastal flood 

defences using probabilistic deterioration modelling’, 

Reliability Engineering & System Safety, 185, pp. 163–

174. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2018.1

2.021. 

[13]  Pliego Marugán, A., Peco Chacón, A.M. and García 

Márquez, F.P. (2019) ‘Reliability analysis of detecting 

false alarms that employ neural networks: A real case 

study on wind turbines’, Reliability Engineering & 

System Safety, 191, p. 106574. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2019.1

06574. 

[14]  Zhu, X., Wang, J. and Yuan, T. (2019) ‘Design and 

maintenance for the data storage system considering 

system rebuilding process’, Reliability Engineering & 

System Safety, 191, p. 106576. Available at: 

https://doi.org/10.1016/j.ress.2007.09.003


AF. Obele et al. /Future Technology                                                                                           August 2024| Volume 03 | Issue 03 | Pages 08-14 

14 

 

https://doi.org/https://doi.org/10.1016/j.ress.2019.1

06576. 

[15]  Izquierdo, J., Crespo Márquez, A. and Uribetxebarria, J. 

(2019) ‘Dynamic artificial neural network-based 

reliability considering operational context of assets.’, 

Reliability Engineering &System Safety, 188, pp. 483–

493. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2019.0

3.054. 

[16]  Shi, Y. et al. (2020) ‘Condition-based maintenance 

optimization for multi-component systems subject to a 

system reliability requirement’, Reliability Engineering 

& System Safety, 202, p. 107042. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2020.1

07042. 

[17]  Ma, X. et al. (2020) ‘Reliability analysis and condition-

based maintenance optimization for a warm standby 

cooling system’, Reliability Engineering & System 

Safety, 193, p. 106588. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2019.1

06588. 

 

 

 
 

This article is an open-access article distributed under the 

terms and conditions of the Creative Commons Attribution 

(CC BY) license 

(https://creativecommons.org/licenses/by/4.0/). 

 

[18] Wang, X. et al. (2020) ‘Reliability and maintenance for 

performance-balanced systems operating in a shock 

environment’, Reliability Engineering & System Safety, 

195, p. 106705. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2019.1

06705. 

[19]  Gao, K. et al. (2020) ‘Jointly optimizing lot sizing and 

maintenance policy for a production system with two 

failure modes’, Reliability Engineering & System 

Safety, 202, p. 106996. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2020.1

06996. 

[20] Chang, P.-C. et al. (2021) ‘Reliability and maintenance 

models for a time-related multi-state flow network via 

d-MC approach’, Reliability Engineering & System 

Safety, 216, p. 107962. Available at: 

https://doi.org/https://doi.org/10.1016/j.ress.2021.1

07962. 

https://doi.org/https:/doi.org/10.1016/j.ress.2019.106588
https://doi.org/https:/doi.org/10.1016/j.ress.2019.106588
https://creativecommons.org/licenses/by/4.0/
https://doi.org/https:/doi.org/10.1016/j.ress.2020.106996
https://doi.org/https:/doi.org/10.1016/j.ress.2020.106996

