Introduction

Energy consumption is fueled by the expanding global population and the desire to improve quality of life, which results in ongoing energy depletion1,2,3,4. In countries where there is a great need for fuel, whether for industrial use, energy generation, or even transportation mobilization, crude oil plays a very significant role. Therefore, crude oil is a vital resource principally in industrial settings where it is used in the energy contribution5,6. As a result, transportation operations of crude oil from wells to reach the refining stations is a very important stage and while we are dealing with petroleum products that are exposed to the risk of combustion and explosion at any time due to any external cause, strict safety measures should be applied to keep even the individuals or the facility safe and ensuring the success and continuity of facility’s production. Risk is formally defined as the effect of uncertainty on objectives (ISO 31000:2009)7. Many risks can be found in industrial facilities due to human error or equipment failure which may cause human injuries, fatalities, environmental damage, or even economic loss. Application of means of safety prevent or mitigate the hazards that are the reason of impact event that cause the harmful consequences.

Several risk assessment techniques can be used to identify the potential hazard and its impacts at various stages during the process. HAZOP is one of the famous qualitative analyzing approaches, used from the 1970's, while LOPA receives output from a qualitative hazard analysis such as HAZOP studies and it leads to quantification8. The Hazard and operability (HAZOP) technique is one of the Process Hazard Analysis (PHA) techniques used widely for estimating both the hazards of a system, and its operating barriers, by examining the impacts of any deviations from design conditions9. While these techniques alone are unable to assess the contributions of particular system components to the overall risk of a chemical facility, further risk assessment methods are studied. LOPA is one of these methods which gives a simple and good performance to analyze risks and prevent or reduce the consequences of undesired cases10,11. Layers of protection analysis LOPA is a semi-quantitative method for analyzing and rating risk, as mentioned in the IEC61511 standard12, the main aim of applying LOPA is to estimate whether there are enough independent protection layers (IPLs) to mitigate risk to an acceptable level for a selected incident scenario. Typical IPLs are shown in Fig. 1.

Figure 1
figure 1

Typical IPLs against potential incidents.

Fuzzy logic is a knowledge-based system for quantifying, estimating, and assessing imprecision13. The models built using the fuzzy logic approach are reliable, efficient, and cost-effective. To meet the requirements for safety, they could also be modified14.

Ouazraoui et al.15 represented the data from reliability databases and experts opinions in LOPA using fuzzy quantities. Since no uncertainty information is retained, even though the outcome is a parameter value, this is regarded as a disadvantage of the approach. Khalil et al.14 performed a risk assessment research using cascaded Fuzzy-LOPA model, to avoid or lessen undesired events in a natural gas plant, which can handle various frequencies and is employed for specific dangerous situations. The model built calculate the SIL rating through two fuzzy control stages while The proposed system is easier and uses only one fuzzy control stage that calculates TEF, SIL rating is then calculated using a similar method to that in traditional LOPA. Darwish et al.16 applied the HAZOP approach to a particular DRI market niche. By keeping an eye on the LOPA study, they sought to gauge the outcomes and assess the system's IPLs for sufficiency by identifying SIL. Also a fuzzy logic is employed for risk assessment to calculate the SIL ratio and compared the estimated frequency to that obtained by conventional LOPA. They guess the use of Gaussian MF in their model while in our study we use three different MFs to decide which one is better. The pre-methods were used in several industries, according to the literature researchs, but not in crude oil shipping facilities. Applying the procedures will therefore greatly aid in providing high levels of protection. This work is concerned with the catastrophic failure that could occur due to reverse flow from the new crude oil pumps’ discharge into the existing crude oil pumps’ discharge and have severe consequences in the shipping system. It presents a fuzzy-LOPA model for SIL assessment that uses the data obtained from the HAZOP along with that from the look-up tables. The proposed system is easier and uses only one fuzzy control stage that calculates TEF. The SIL rating is then calculated using a similar method to that in the LOPA16. Since it is difficult to guess the suitable MF to be used, this fuzzy model is based on using the most common MFs to select the better ones with two sets of assumed rules. Finally results from the LOPA model and fuzzy one are compared.

Hazard and operability study (HAZOP)

HAZOP, which examines the effects of any deviations from design and operating circumstances, is one of the most organized methodologies for analyzing risks and operability issues. It was created in the 1970s by Imperial Chemical Industries (ICI), but it wasn’t until a chemical plant explosion in the UK that was creating nylon intermediate that resulted in 28 deaths and numerous injuries that it really became a standard17.

It is a qualitative risk assessment method that can be used for hazard assessment at all stages of the process life cycle, from process development to plant shutdown, as well as for any adjustments that are being considered during normal operation16, further, it has the benefit of applying to all types of processes, whether continuous, batch, or semi-batch. Maximum details, such as P&IDs drawings, flowcharts, process descriptions, and for batch/semi-batch operations, an operating manual, must be provided to construct a high level of detailed HAZOP research.

The HAZOP technique carefully examines plant processes and operations to see whether there might be any deviations from the intended conditions that might materialize during operation due to a particular deviation16. Figure 2 represent the HAZOP study structure.

Figure 2
figure 2

HAZOP study structure.

Despite HAZOP technique used widely, it has some limitiation procedure is meticulous and time consuming and is unwarranted for systems where the risk is minor. Instead of using algorithms, it depends on heuristics, and the formal framework provides practitioners the impression that a thorough study is being conducted. There are no assurances that the most significant deviations, triggers, or scenarios have been found, though. Because of this, HAZOP investigations are prone to being insufficient, and this risk grows as the system becomes more complicated and there are more factors to take into account17.

Layers of protection analysis (LOPA)

Despite HAZOP technique used widely, it has some limitiation procedure is meticulous and time consuming and is unwarranted for systems where the risk is minor. Instead of using algorithms, it depends on heuristics, and the formal framework provides practitioners the impression that a thorough study is being conducted. There are no assurances that the most significant deviations, triggers, or scenarios have been found, though. Because of this, HAZOP investigations are prone to being insufficient, and this risk grows as the system becomes more complicated and there are more factors to take into account16.

A simple semi-quantitative18 hazard analysis method called LOPA can be used following a HAZOP investigation. The parameters required for the computation of the necessary risk reduction level are rated using numerical categories. Safeguards that meet the IPLs (Independent Protection Layers) standards established by the CCPS (Centre of Chemical Process Safety) can be found using LOPA19. LOPA supports compliance with process safety regulations-including OSHA PSM1910.119, Seveso II regulations, ANSI / ISAS84.01, IEC61,508, and IEC6151116. IPLs can be passive, like a dike, fireproofing, or blast wall, or active, like a relief valve, rupture disc, or BPCS (Basic Process Control System). These crucial requirements for an IPL must exist20.

LOPA is applied to a single cause-consequence pair at a time. An acceptable or maximum tolerable risk is compared to the resulting risk. Additional IPLs will be added to the process if the estimated risk of the chosen scenario is considered to be very high which calls for higher installation and maintenance costs.

For the selected case identified during a qualitative hazard review such as a HAZOP study risk assessment using the LOPA technique, can be explained as follows:

  • Select a failure scenario. LOPA is applied to one scenario at a time. This scenario describes a single-cause consequence pair.

  • Identify the initiating event of the scenario and estimate the initiating event frequency. Typical databases are that of the Center for Chemical Process Safety (CCPS)21 and the Offshore Reliability Data Handbook (OREDA)22.

  • List the Independent Protection Layers (IPLs) and calculate each IPL's Probability of Failure upon Demand (PFD). To obtain a tolerable risk for the accident scenario, some accident situations only need one IPL, while others need numerous IPLs or IPLs with a very low PFD as shown in Fig. 3. The essence of LOPA is identifying the safeguards that satisfy the requirements of IPLs for a given scenario. By adding the frequency of the beginning event, the IPL values, and the consequence value, you may estimate the risk of the scenario.

Figure 3
figure 3

Event tree showing the hazard scenario analyzed in LOPA.

To decide how to respond to the situation, a scenario’s risk must be matched against acceptable risk standards.

An IPL must have the following important characteristics20,23:

  • Specificity Ability to lessen or stop the effects of a potentially harmful occurrence.

  • Independence Separate from other layers of protection associated with a particular hazard event.

  • Dependability Must offer protection that lessens the potential risk by a particular percentage.

  • Auditability It is designed to help ensure that the protective functions are consistently effective.

LOPA technique helps to set the required SIS (Safety Instrumented Systems), and SIL rating.

The SIL rating is shown in Table 1 rated from 1 to 4 indicates the safety protection level wanted in such a process. SIL1 meets the lowest rate of safety protection while SIL4 meets the highest one, which is used only for the nuclear industry24.

Table 1 SIL rating meeting RRF value.

Fuzzy logic technique

The Zadeh principle of complexity states that the more complex a system is the less exact information is available25. Even though this information is rapidly evolving, there is still much information that is absent and unclear, hidden in variables, models, and subjectivity, particularly when it comes to highly infrequent events like catastrophic disaster dangers. There are numerous methods for analyzing uncertainty, including the possibility approach, sensitivity analysis, classical statistics, and probabilistic methods26. There is a widespread belief that using fuzzy logic is considered one of the powerful ways to handle all kinds of information including ignorance and vagueness27

The basic concept of fuzzy logic is of a linguistic variable nature as its values depend on words rather than numbers. Words are less precise than numbers; however, they are closer to human intuition28,29. Fuzzy Logic techniques are used widely in the field of process safety analysis fault tree analysis, fuzzy risk matrix, bow-tie analysis, etc.30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45 also a lot of researches are performed to apply fuzzy LOPA as a new approach to calculate the SIL rating meeting the risk1,14,16,27.

The Mamdani procedure46 is used to determine the outcome of the membership functions on the relevant variables and derive a final crisp parameter value. It is based on a simple structure of maximum and minimum operations based on fuzzy logic rules cast in IF… Then… statements. The Matlab Fuzzy Logic toolbox can be used to perform fuzzy modeling in three steps, and Fig. 4 interprets the conceptual organization of the modeling system.

Figure 4
figure 4

Fuzzy models’ architecture.

Steps of fuzzy modeling

  • Suitable input, output, and discourse universe variables for each variable are fuzzified, and then, fuzzy membership functions count the number of linguistic phrases for each input and output variable.

  • The fuzzy inference system employs the Mamdani technique. Based on the information and knowledge that is already available (such as common sense, the knowledge of experts, and physical laws), create a list of fuzzy if–then rules.

  • The resulting fuzzy membership function is defuzzified. Convert the output of each fuzzy if–then rule into a crisp value that can be understood.

Case study

Node description

The crude oil shipping facility aims to collect crude oil from oil fields by implementing new storing and pumping facilities within plants and a new transporting pipeline.

Crude Oil (C.O) from the 10-TK-011 storage tank is transported through a set of centrifugal pumps with suction and discharge piping system 10-P-001 A/B/C (C.O shipping pumps) have a rated capacity 280 m3/hr and diff pressure 45.5 bar.

The new shipping pumps output stream is combined with C.O from existing pumps and reaches pig launcher 10-L-001 while a part of the feed from the storage tank go to the closed drain vessel 10-V-001. Figure 5 represents the process flow diagram of the new crude oil shipping pumps.

Figure 5
figure 5

Process flow diagram of new crude oil shipping pumps.

Research methodology

In accordance with the CCPS Layer of Protection Analysis recommendations, the research methodology included defining a specific chemical process unit and conducting a PHA to identify potentially dangerous situations, as well as conducting layers of protection analysis on the most dangerous situations shown at Table 2 according to its severity degree shown at Table 3 to determine the SIL requirements for any additional safeguards that may be required. The data collected from the PHA and look-up tables are used with the fuzzy logic model to establish the SIL required for any additional precautions. The results of the LOPA technique and those obtained from the fuzzy model are then compared. Figure 6 depicts our research methods.

Table 2 HAZOP table for new crude oil shipping pumps.
Table 3 Severity degree and TEF.
Figure 6
figure 6

Semi-quantitative risk assessment methodology flow diagram.

After determining the SIL rating for the most dangerous scenarios using LOPA study, an additional investigation applying fuzzy logic is carried out to quantify the severity of scenarios and calculate the SIL rating to be compared with the one acquired by LOPA study. In order to use the fuzzy logic technique, the impact events' severity has been modelled using the MATLAB toolbox.

Our prior experience with fuzzy logic and our analysis of this data result in the described system. The proposed system has one output and two inputs. It is necessary to assign membership functions (MF). To achieve the best results in a fuzzy model, the fuzzy model is built using the most popular MFs, which are Gaussian, trapezoidal, and triangular, with two different sets of rules (simple and hard), as shown in Table 4A, B. Fuzzy logic variables using different membership functions are shown at Fig. 7. Figures 8 and 9 depict the 3D surface of a simple and hard set of rules using Trap. MF.

Table 4 (A) The proposed simple set of fuzzy IF–then rules that take the decisions, (B) The proposed hard set of fuzzy IF–then rules that take the decisions.
Figure 7
figure 7

Fuzzy logic variables using different membership functions.

Figure 8
figure 8

3D surface of hard set of rules.

Figure 9
figure 9

3D surface of hard set of rules.

Consent to participate

All authors consent to participating in this work.

Results

The annual frequency of the initiating cause and PFD for each IPL (collected from the look-up tables, the offshore reliability data (OREDA), and several companies’ standards according to the industry experience)11,22. MEF is calculated by multiplying the frequency of initiating cause and the PFD of each IPL the result is compared with TEF to know if the suggested IPLs are enough for the potential hazard or if they need more risk reduction. NRR is calculated by dividing TEF/MEF the result presents the PFD of the SIS wanted to reduce the risk. Then we can calculate RRF is equal to PFD−1. Thus SIL rating can be calculated according to Table1. Table 5 shows the LOPA results sheet.

Table 5 LOPA results sheet and SIL rating.

Applying fuzzy logic to the system using different membership functions to select the best one ,Results from the three models showed in Table 6A, B were compared and showed that trap. MF. gives the least RRF for the selected scenarios which can cause several damage in location and an economic loss.

Table 6 (A) Comparison between 3 different MF based on simple set of rules. (B) Comparison between 3 different MF based on hard set of rules.

Finally LOPA and fuzzy LOPA results are compared as illustrated in Table 7, which showed that in spite of being SIL is the same in traditional and fuzzy LOPA, fuzzy approach gives better results in risk reduction.

Table 7 Comparison between traditional and fuzzy logic LOPA.

Discussion

The previous results demonstrated the effectiveness of the proposed study in reducing the risk, whether in hard or simple rules using a one stage model instead of using a cascade fuzzy model as Khalil14. Using different models demonstrated the effectiveness of using the trapezoidal membership function over others to reduce the risk instead of guessing a special one as at16.

The proposed method is considered more effective in analyzing risks that cause serious damage than the qualitative method, which does not give us adequate analysis of such risks and in a way simpler than the quantitative method, integration of the proposed method with the existing safety management systems in petroleum production facilities will lead to effective results in saving time and money. Using fuzzy logic model may have a higher cost than using the LOPA model, but considering the impact of its use of reducing the RRF this model is considering more economical, this can be explained by looking at the results in the scenario of high pressure/low pressure interface (HP/LP) between the new crude oil shipping pumps’ discharge side and the existing crude oil pumps discharge side, as in the safety integrity level change from SIL1 at LOPA model to SIL2 at the fuzzy model, the cost of applying safety measures at SIL2 much higher than in SIL1.which is much lower than the cost of applying fuzzy logic on the system. This illustrates the economic impact of the proposed study. The proposed method is considered more effective in analyzing risks that cause serious damage than the qualitative method, which does not give us adequate analysis of such risks and in a way that is less complex than the quantitative method. Integration of the proposed method with the existing safety management systems in petroleum production facilities will lead to effective results in saving time and money. The results of the mentioned scenarios shows the sensitivity of the study as each one has different inputs which causing change in the RRF value obtained.

Conclusions

The process of crude oil transportation is considered the first step in the petroleum industry. Therefore, applying means of protection and risk analysis is extremely important to limit the occurrence of any problems that may hinder the transportation process and may cause accidents. In this study, the major risk caused by reverse flow from the new crude oil pumps’ discharge into the existing crude oil pumps’ discharge was studied and layers of protection analysis (LOPA) were used as a semi-quantitative method for risk analysis after determining it using the qualitative method (HAZOP). The proposed method determines the SIL rating in order to identify the process need for any additional means of protection.

Fuzzy logic technology has been used to determine SIL and validate the obtained results from the LOPA study in a faster and more economical way that serves well in the planning process for establishing any industrial facility. This fuzzy model has been established based on economic loss and number of injuries that can be produced from the potential hazard using the most common membership functions (Gaussian, trapezoidal, and triangular) and using two rule assumptions (simple &hard). Since fuzzy systems’ performance is totally based on experts and their contributions towards setting up the membership functions, the rules, and the defuzzification method, several trials have been considered. The obtained results for two fuzzy models are shown. According to obtained results, it could be noted that both the LOPA and the fuzzy LOPA give convergent results in calculating the SIL rating. Especially if the RRF value is in the middle of the level range, but if it is on the level’s border, applying fuzzy logic takes us to the lower level in either the simple or hard rules. Furthermore, the use of trapezoidal membership functions has given the most adequate results.

Applying fuzzy logic technique can produce good results if used in quantitative risk analysis if the safety integrity level of the system results to be SIL3 or SIL4 with simple and cost effective method.