Underground Risk Index Assessment and Prediction Using a Simpliﬁed Hierarchical Fuzzy Logic Model and Kalman Filter

: Normally, most of the accidents that occur in underground facilities are not instantaneous; rather, hazards build up gradually behind the scenes and are invisible due to the inherent structure of these facilities. An efﬁcient inference system is highly desirable to monitor these facilities to avoid such accidents beforehand. A fuzzy inference system is a signiﬁcant risk assessment method, but there are three critical challenges associated with fuzzy inference-based systems, i.e., rules determination, membership functions (MFs) distribution determination, and rules reduction to deal with the problem of dimensionality. In this paper, a simpliﬁed hierarchical fuzzy logic (SHFL) model has been suggested to assess underground risk while addressing the associated challenges. For rule determination, two new rule-designing and determination methods are introduced, namely average rules-based (A RB ) and max rules-based (M RB ). To determine efﬁcient membership functions (MFs), a module named the heuristic-based membership functions allocation (HBMFA) module has been added to the conventional Mamdani fuzzy logic method. For rule reduction, a hierarchical fuzzy logic model with a distinct conﬁguration has been proposed. In the simpliﬁed hierarchical fuzzy logic (SHFL) model, we have also tried to minimize rules as well as the number of levels of the hierarchical structure fuzzy logic model. After risk index assessment, the risk index prediction is carried out using a Kalman ﬁlter. The prediction of the risk index is signiﬁcant because it could help caretakers to take preventive measures in time and prevent underground accidents. The results indicate that the suggested technique is an excellent choice for risk index assessment and prediction.


Introduction
Worldwide, rapid urbanization is taking place in many countries.Better health facilities, along with more job opportunities, education facilities, businesses, and other facilities attract people to migrate from rural areas to urban areas.Hence, cities are becoming more congested and the installation of underground facilities is regularly growing.Consequently, enormous growth in underground facilities is expected in the future due to such relocation of the masses [1].These facilities consist of underground metro buses, railway lines, parking lots, markets, power supply, water supply, sewerage lines, etc.Any failure to these facilities can cause personal injury, death, mission degradation, property destruction [2], etc.The theory of risk was initially presented in the field of economics at the end of the 19th century.Nowadays it is generally used in almost all fields, i.e., environmental science, natural disaster planning, and architectural engineering [3,4].Risk indicates failure probability and has a close relationship with uncertainty.The risk assessment is the deployment of quantitative or qualitative actions to determine the risk correlated with a specific threat [2].
Many accidents occur due to the lack of a proper mechanism for underground risk assessment [5].Hence, it is mandatory to design an efficient technique for underground risk index assessment.Several risk assessment methods have been proposed, such as for coal mines [6], natural disasters [7], long-distance water transmission [8], road tunnels [9,10], water supply pipelines [11], bridges [12], etc.In the recent past, fuzzy logic models have captured the attention of many researchers and have been used extensively for risk assessment and other purposes [11,13] such as sensor designing [14], measuring [15], identifying [16], controlling [17], assessing [5,18], etc.The fuzzy logic is a form of many-valued logic in which the truth values may be any real number between 0 and 1 rather than binary logic, in which the truth value may be either 0 or 1. Fuzzy logic is normally used to deal with the partial truth.The core challenge faced by conventional fuzzy logic (CFL) is rules-explosion as new variables arrive into the system [19].For example, a fuzzy logic model having p input variables and for each input variable q membership functions (MFs) are defined.Hence, to construct a full structure fuzzy logic p q fuzzy rules would be required.For a fuzzy logic model having 12 input variables, for each variable five membership functions are defined.To implement a full structure, fuzzy logic model 5 12 rules would be required.It is very difficult for experts to design 244140625(5 12 ) rules accurately [5,6].Therefore to solve the problem of rule explosion, researchers introduced the hierarchical fuzzy logic (HFL) concept.In HFL, the fuzzy logic model is divided into sub-modules hierarchically [6].The HFL significantly decreases the number of rules in the rules base.Rules reduction makes experts able to design accurate rules, decrease the probability of error, and minimize the chance of overfitting rules [19].The HFL is an appropriate choice for a situation in which a lot of variables need to be considered [20].Many researchers have used the hierarchical fuzzy logic methods in different fields for different purposes, i.e., for biped robot controlling [21], water mains risk assessing [20], modeling, controlling, prediction [22], Internet safety [23], etc. Prediction of underground risk index is also essential to find the trend of risk indices.Prediction of risk has been carried out in various fields to take measures in advance and escape from losses [1,24].The Kalman filter is a very famous technique that has been used by many authors in different areas for prediction purposes such as energy consumption prediction [25], detection and location of leaks in long-distance pipelines [26] water level prediction [27], body weight prediction [28], etc.
In this paper, a methodology comprised of two main modules, namely hierarchical fuzzy logic module and a Kalman filter module for underground risk index assessment and prediction, has been proposed.In the hierarchical fuzzy logic module, we have introduced a SHFL model with a distinct configuration.The purpose of this model was to build a full-structure fuzzy logic model having the least rules and the least levels.Usually, more levels in a hierarchical model complicate the rule-designing process, and it becomes very challenging for experts to map rules from all levels to obtain a single risk index value.Rule designing in a fuzzy inference system is also a challenging task.Normally, experts are required for rule designing, but finding such experts with potential knowledge is time-consuming and also very expensive.In the SHFL model, two rule-designing mechanisms called average rules-based (A RB ) and max rules-based (M RB ) have been proposed to help rule designers.Accurate membership functions (MFs) determination is also essential because it has a direct impact on system accuracy.In the SHFL model, we have also added a heuristic-based membership function allocation module to help the manager in the determination of optimized membership functions (MFs) for the improvement in accuracy of the fuzzy logic model.The SHFL model helps to assess the risk index based on factors provided to the model.Risk index prediction is also significant to take preemptive measures to minimize the risk of failure.Herein we have used the Kalman filter to predict the risk index to make the trend of underground risk indices in the future.Risk index prediction is also significant to take some measurements in advance to avoid losses.
The remainder of the paper is structured as follows: Section 2 explains the related work; in Section 3 the proposed method and experimental requirements are discussed in detail.The results and discussion are given in Section 4, and the paper is concluded in Section 5.

Related Work
Many efforts have been reported in the literature to assess risk in underground facilities as well as in other fields.Some of the methodologies for underground risk assessment and other fields are discussed in detail.
Image processing is an important technique used in nearly every field for detection, monitoring, and assessment.Kleta et al. [29] summarized the potential solutions, methods, and benchmarks to identify different types of damage.An approach based on an augmented reality concept consists of three main stages, namely image preprocessing, automatic damage detection, and crack monitoring.Several preprocessing methods have been applied to the images such as histogram equalization, homomorphic processing, and noise reduction to correct the images.In the automatic damage detection stage two techniques, namely color space transformation and thresholding algorithms, have been used.In the third stage, they have deployed the image differencing method for automatic crack development monitoring.Kuttisseril et al. [30] proposed a method based on image processing techniques such as edge detection and contour detection to detect damage in underground structures.Different image processing techniques have also been used for displacement monitoring [31], underground structural health monitoring [30], etc.
Mostly underground accidents occur because of failures of infrastructure facilities, such as subways, bridges, and buildings.Therefore, it is necessary to assess the underground risk in a timely manner to avoid such accidents [5].Khan et al. [32] suggested a general risk assessment technique to acquire data and surveil underground facilities.Choi et al. [33] proposed a technique consisting of four stages of underground construction projects to identify, analyze, evaluate, and manage the risk.An identical system to determine the underground risk of a subway construction project was suggested during the development of Incheon Airport, South Korea [34].The purpose was to assess the situation on the ground and ensure safety during the construction of the subway.A methodology was developed to assess risk during the Warsaw, Poland Metro construction project [35].Shamir et al. [36] proposed a method to assess the breakage rate of pipes over time.The developed technique is based on regression analysis.Numerous risk calculation methods in coal mines have been discussed in [9].Several risk assessment techniques have been suggested for risk assessment, such as Monto Carlo simulation, event trees (ET), fault trees (FT), failure mode, multi-criteria verbal analysis (MCVA), and Grey Systems (GS) [37].
The most common and efficient technique to assess underground and manage underground risk is fuzzy logic [5].Fuzzy logic methods are used in many different fields.Tripathy et al. [5] developed a method for safety risk assessment in underground coal mines.Their proposed technique is based on the Mamdani fuzzy logic method.A case study has been carried out to validate the applicability of the suggested method.Chen et al. [38] suggested a fuzzy decision-making methodology to handle the supplier chain selection issue in the supply chain system.Gul et al. [39] used a fuzzy set theory in the aluminum industry.Zhao et al. [40] suggested an approach based on fuzzy logic for risk assessment in green projects.Zhang et al. [8] suggested a fuzzy comprehensive evaluation method to analyze the risk of a long-distance water supply system.Li et al. [41] suggested a technique for long-distance water transmission pipeline risk evaluation.Pokoradi et al. [3] discussed in detail the fuzzy logic-based risk assessment approach for human safety.
The main problem faced by conventional fuzzy logic is rule explosion; a lot of work has been done by many researchers to overcome this problem.Fayaz et al. [5] developed a technique for underground risk assessment using hierarchical fuzzy logic (HFL).Yager et al. [42] constructed a hierarchical-type fuzzy systems model, namely a hierarchical prioritized structure, and studied its structure in detail.An expert system based on HFL has been proposed to evaluate the risk of water mines in [20].A methodology to decrease the computational time of the hierarchical fuzzy logic modes was suggested by Chang et al. [19].Plamena et al. [43] designed an HFL model for natural risk assessment in Southwest Bulgaria.Heung et al. [44] suggested a technique based on HFL and the genetic algorithm (GA) to control traffic at a road junction.HFL logic is designed to decrease the number of rules, and the GA algorithm is used for rule generation.
The prediction techniques in almost every field have been used to help system managers with planning.Numerous researchers have used different prediction techniques for various purposes, such as for the pipeline failure prediction of a water distribution system [22], earthquake prediction [45], soil hydraulic properties prediction [46], weather prediction [47], etc.A Kalman filter is also a very significant method used by several authors for prediction purposes.Safdar et al. [25] used a Kalman filter for energy consumption prediction in Korean residential buildings.Average and maximum predicted values for daily, weekly, monthly, and yearly energy consumption have been calculated.Benkherouf et al. [26] presented a new technique based on the Kalman filter to locate and detect leaks in long-distance pipelines.Israr et al. [26] used the Kalman filter for water level prediction.Another method was introduced in [27] to predict the weight of a person using the Kalman filter.
Although different authors have proposed various methods, there is a need to develop a method to assess and predict the underground risk index accurately.The proposed technique is an attempt in this regard.

Methods
Figure 1 shows the proposed conceptual model for underground risk index assessment and prediction.The suggested model has two main modules: a simplified hierarchical fuzzy logic (SHFL) model and the Kalman filter predicted model.The simplified hierarchical fuzzy logic (SHFL) model has been designed with a unique structure to decrease the number of rules.We have also enhanced the capability of conventional hierarchical fuzzy logic and added two rule schemes for efficient rule specification.For accurate membership function determination, a heuristic-based approach has been introduced.A detailed description of each module is given below.The prediction techniques in almost every field have been used to help system managers with planning.Numerous researchers have used different prediction techniques for various purposes, such as for the pipeline failure prediction of a water distribution system [22], earthquake prediction [45], soil hydraulic properties prediction [46], weather prediction [47], etc.A Kalman filter is also a very significant method used by several authors for prediction purposes.Safdar et al. [25] used a Kalman filter for energy consumption prediction in Korean residential buildings.Average and maximum predicted values for daily, weekly, monthly, and yearly energy consumption have been calculated.Benkherouf et al. [26] presented a new technique based on the Kalman filter to locate and detect leaks in long-distance pipelines.Israr et al. [26] used the Kalman filter for water level prediction.Another method was introduced in [27] to predict the weight of a person using the Kalman filter.
Although different authors have proposed various methods, there is a need to develop a method to assess and predict the underground risk index accurately.The proposed technique is an attempt in this regard.

Methods
Figure 1 shows the proposed conceptual model for underground risk index assessment and prediction.The suggested model has two main modules: a simplified hierarchical fuzzy logic (SHFL) model and the Kalman filter predicted model.The simplified hierarchical fuzzy logic (SHFL) model has been designed with a unique structure to decrease the number of rules.We have also enhanced the capability of conventional hierarchical fuzzy logic and added two rule schemes for efficient rule specification.For accurate membership function determination, a heuristic-based approach has been introduced.A detailed description of each module is given below.The simplified hierarchical fuzzy logic (SHFL) model, as illustrated in Figure 2, consists of three layers: the input layer, medium layer, and top-level layer.The input layer consists of eight different variables, namely water supply pipeline risk probability (P1), water supply pipeline risk severity (P2), sewerage supply risk probability (P3), sewerage supply risk severity (P4), metro structure risk probability (P5), metro structure risk severity (P6), geo-environmental risk probability (P7), and geoenvironmental risk severity (P8).The medium-level layer has four sub-modules, consisting of water supply risk index fuzzy logic (WPR F ), a sewerage supply risk index (SPR F ), a Metro structure risk index fuzzy logic (MR F ), and geo-environmental risk index fuzzy logic (GR F ). WPR F , SPR F , MR F , and GR F are used to calculate the water supply pipeline risk index (M1), sewerage supply pipeline risk The simplified hierarchical fuzzy logic (SHFL) model, as illustrated in Figure 2, consists of three layers: the input layer, medium layer, and top-level layer.The input layer consists of eight different variables, namely water supply pipeline risk probability (P 1 ), water supply pipeline risk severity (P 2 ), sewerage supply risk probability (P 3 ), sewerage supply risk severity (P 4 ), metro structure risk probability (P 5 ), metro structure risk severity (P 6 ), geo-environmental risk probability (P 7 ), and geo-environmental risk severity (P 8 ).The medium-level layer has four sub-modules, consisting of water supply risk index fuzzy logic (WPR F ), a sewerage supply risk index (SPR F ), a Metro structure risk index fuzzy logic (MR F ), and geo-environmental risk index fuzzy logic (GR F ). WPR F , SPR F , MR F , and GR F are used to calculate the water supply pipeline risk index (M 1 ), sewerage supply pipeline risk index (M 2 ), metro structure risk index (M 3 ), and geo-environmental risk index (G).The variables P 1 and P 2 are inputted to WPR F , the WPR F fuzzy logic gets the P 3 , and P 4 variables as inputs, the MR F gets the P 5 , and P 6 variables as inputs, and geo-environmental fuzzy logic (GER F ) gets P 7 and P 8 variables as inputs.The results from the fuzzy logic are entered into the top-level layer fuzzy logic as input in the top layer.The output of the simplified hierarchical fuzzy logic (SHFL) model is then further inputted to the Kalman filter module; the Kalman filter module provides the predicted risk index based on the current risk index values.
index (M2), metro structure risk index (M3), and geo-environmental risk index (G).The variables P1 and P2 are inputted to WPR F , the WPR F fuzzy logic gets the P3, and P4 variables as inputs, the MR F gets the P5, and P6 variables as inputs, and geo-environmental fuzzy logic (GER F ) gets P7 and P8 variables as inputs.The results from the fuzzy logic are entered into the top-level layer fuzzy logic as input in the top layer.The output of the simplified hierarchical fuzzy logic (SHFL) model is then further inputted to the Kalman filter module; the Kalman filter module provides the predicted risk index based on the current risk index values.
The proposed simplified hierarchical fuzzy logic (SHFL) model, as illustrated in Figure 2, provides partial solutions in the middle layer; these partial solutions are then used in the next subsequent modules to generate the final system output.The simplified hierarchical fuzzy logic (SHFL) model is primarily designed to reduce the computational complexity when the variables are greater in number.In the conventional fuzzy logic model, as shown in Figure 3, all inputs are directly entered into a single fuzzy logic method; hence, as new variables enter the system, the number of rules increases exponentially in the rules base.
Underground Risk Index

Input Layer Middle Layer
Top Level Layer In the proposed SHFL model, the Mamdani fuzzy logic method [48] has been used because of its simplicity and efficiency [5].The main components of the Mamdani fuzzy logic method are fuzzification, knowledge base, fuzzy inference system, and defuzzification.In fuzzification, the crisp inputs are translated into fuzzy values using membership functions (MFs).The fuzzy sets are defined in the knowledge base.The rule base is comprised of if-then rules.If-then rules are used for capturing the indefinite models of reasoning.These rules play a significant role and enable us to decide in The proposed simplified hierarchical fuzzy logic (SHFL) model, as illustrated in Figure 2, provides partial solutions in the middle layer; these partial solutions are then used in the next subsequent modules to generate the final system output.The simplified hierarchical fuzzy logic (SHFL) model is primarily designed to reduce the computational complexity when the variables are greater in number.In the conventional fuzzy logic model, as shown in Figure 3, all inputs are directly entered into a single fuzzy logic method; hence, as new variables enter the system, the number of rules increases exponentially in the rules base.
In the proposed SHFL model, the Mamdani fuzzy logic method [48] has been used because of its simplicity and efficiency [5].The main components of the Mamdani fuzzy logic method are fuzzification, knowledge base, fuzzy inference system, and defuzzification.In fuzzification, the crisp inputs are translated into fuzzy values using membership functions (MFs).The fuzzy sets are defined in the knowledge base.The rule base is comprised of if-then rules.If-then rules are used for capturing the indefinite models of reasoning.These rules play a significant role and enable us to decide in situations of uncertainty and imprecision.The structure of Mamdani fuzzy logic is presented in Figure 4 for the WPR F fuzzy logic.Similarly, the Mamdani fuzzy logic for SPR F , MSR F , and GR F has been used, having the same characteristics as in Figure 4.
Processes 2018, 6, x FOR PEER REVIEW 6 of 22 situations of uncertainty and imprecision.The structure of Mamdani fuzzy logic is presented in Figure 4 for the WPR F fuzzy logic.Similarly, the Mamdani fuzzy logic for SPR F , MSR F , and GR F has been used, having the same characteristics as in Figure 4.   situations of uncertainty and imprecision.The structure of Mamdani fuzzy logic is presented in Figure 4 for the WPR F fuzzy logic.Similarly, the Mamdani fuzzy logic for SPR F , MSR F , and GR F has been used, having the same characteristics as in Figure 4.A fuzzy inference system performs mapping of fuzzy inputs to fuzzy outputs using fuzzy theory models.The MFs play an essential role in the fuzzy theory.In the SHFL model, triangular MFs have been used.The triangular MFs reduce the computational complexity, are very useful, and are most commonly used in Mamdani fuzzy logic [49].The formula for triangular MF is defined in Equation (1).Defuzzification is used for converting fuzzy output values to crisp values.There are different defuzzification methods [50]; in the proposed SHFL model fuzzy logic the center of gravity algorithm has been used in defuzzification [51].The triangular curve is a function of vector x, and depends on three scalar factors, a, b, and c, as given by The fuzzy inference model diagram is given in Figure 5 to elaborate the simplified hierarchical fuzzy logic (SHFL) model in detail.As mentioned earlier, in the middle layer there are four fuzzy logic types: the P 1 and P 2 variables are input to WPR F fuzzy logic, the SPR F inputs are P 3 and P 4 variables.MR F takes P 5 and P 6 as inputs, and P 7 , and P 8 are input to GR F .µ (x i ) indicates the degree of truth for each input premise in the fuzzification processes in the middle layer.The computed truth value for the premise of each rule is represented as (z i ) in the inference process of the middle layer.In the composition processes, all the subsets allocated to each output variable are combined to form a single fuzzy subset for each output variable, which is represented as u(y k ), where k = 1, 2, 3, 4 are in the middle layer.A fuzzy inference system performs mapping of fuzzy inputs to fuzzy outputs using fuzzy theory models.The MFs play an essential role in the fuzzy theory.In the SHFL model, triangular MFs have been used.The triangular MFs reduce the computational complexity, are very useful, and are most commonly used in Mamdani fuzzy logic [49].The formula for triangular MF is defined in Equation (1).Defuzzification is used for converting fuzzy output values to crisp values.There are different defuzzification methods [50]; in the proposed SHFL model fuzzy logic the center of gravity algorithm has been used in defuzzification [51].The triangular curve is a function of vector x, and depends on three scalar factors, a, b, and c, as given by f(x; a, b, c) = max (min ( The fuzzy inference model diagram is given in Figure 5 to elaborate the simplified hierarchical fuzzy logic (SHFL) model in detail.As mentioned earlier, in the middle layer there are four fuzzy logic types: the P1 and P2 variables are input to WPR F fuzzy logic, the SPR F inputs are P3 and P4 variables.MR F takes P5 and P6 as inputs, and P7, and P8 are input to GR F .µ (xi) indicates the degree of truth for each input premise in the fuzzification processes in the middle layer.The computed truth value for the premise of each rule is represented as (zi) in the inference process of the middle layer.In the composition processes, all the subsets allocated to each output variable are combined to form a single fuzzy subset for each output variable, which is represented as u(yk), where k = 1, 2, 3, 4 are in the middle layer.b1, b2, b3, b4 are the crisp output values after defuzzification processes in the middle layer.The output crisp values of each fuzzy logic type in the middle layer are further input to top-level layer fuzzy logic.The same fuzzification inference, composition, and defuzzification processes are applied in this fuzzy logic in order to get the final risk index value.Fuzzy membership function determination is something of a trial and error exercise.The set of membership functions (MFs) where the empirical relationship between inputs and outputs is represented with a satisfactory level of accuracy may be considered final, and can be further used for prediction purposes with other data as well.In the conventional Mamdani fuzzy logic technique, the determination of MFs is done through experts and remains fixed for the entire dataset [3].In the proposed work, a module called Heuristic-Based Membership Functions Allocation (HBMFA) has Fuzzy membership function determination is something of a trial and error exercise.The set of membership functions (MFs) where the empirical relationship between inputs and outputs is represented with a satisfactory level of accuracy may be considered final, and can be further used for prediction purposes with other data as well.In the conventional Mamdani fuzzy logic technique, the determination of MFs is done through experts and remains fixed for the entire dataset [3].In the proposed work, a module called Heuristic-Based Membership Functions Allocation (HBMFA) has been added to the traditional Mamdani fuzzy inference system to make the membership functions flexible.In the proposed SHFL model for each fuzzy logic module, the membership function generations are carried out through the HBMFA module by using historical data.The fuzzy logic module gets the same historical data and a set of membership functions from the HBMFA module and provides estimated risk index values.The estimated risk index values are further inputs to the Analyzer Module (AM) module.The analyzer module uses the mean square error (MSE) [11] for performance evaluation.The mean square error indicates the error between estimated risk index values and the referenced index values.The comparator stores the value of MSE and control goes to the HBMFA module.The next MFs are allocated to a fuzzy logic model, and again the MSE value is computed for that MFs set.This process continues until we find the best set in the available membership functions set.Similarly, the next MFs set is applied to similar historical data, and the performance of the proposed model is evaluated using mean square error.This process is repeated a specific number of times and, in this way, the best membership functions set is obtained.This membership functions set is then further used for the next dataset.
The Kalman filter has been used in this model to predict the underground risk index.A Kalman filter takes the output values of the SHFL model as inputs and calculates the predicted underground risk index values.The prediction is essential to assist the manager with taking action in advance.The Kalman filter addresses the common issue of trying to predict the state x" R n of a discrete time.The Kalman filter uses the below formulas (Equations ( 2)-( 4)) for prediction. EST where K G , EST t , EST t−1 , MAE, E MAE , and E EST represent the Kalman gain, current estimate, previous estimate, measurement, error in measurement, and error in estimation, respectively.Kalman gain has two inputs, namely error in the estimated data and error in the actual data.The following diagram shows how the Kalman filter works [25,52].The structure diagram for the Kalman filter is shown in Figure 6.
Processes 2018, 6, x FOR PEER REVIEW 8 of 22 been added to the traditional Mamdani fuzzy inference system to make the membership functions flexible.In the proposed SHFL model for each fuzzy logic module, the membership function generations are carried out through the HBMFA module by using historical data.The fuzzy logic module gets the same historical data and a set of membership functions from the HBMFA module and provides estimated risk index values.The estimated risk index values are further inputs to the Analyzer Module (AM) module.The analyzer module uses the mean square error (MSE) [11] for performance evaluation.The mean square error indicates the error between estimated risk index values and the referenced index values.The comparator stores the value of MSE and control goes to the HBMFA module.The next MFs are allocated to a fuzzy logic model, and again the MSE value is computed for that MFs set.This process continues until we find the best set in the available membership functions set.Similarly, the next MFs set is applied to similar historical data, and the performance of the proposed model is evaluated using mean square error.This process is repeated a specific number of times and, in this way, the best membership functions set is obtained.This membership functions set is then further used for the next dataset.
The Kalman filter has been used in this model to predict the underground risk index.A Kalman filter takes the output values of the SHFL model as inputs and calculates the predicted underground risk index values.The prediction is essential to assist the manager with taking action in advance.The Kalman filter addresses the common issue of trying to predict the state x" Rn of a discrete time.The Kalman filter uses the below formulas (Equations ( 2)-( 4)) for prediction. (3) where KG, ESTt, ESTt-1, MAE, EMAE, and EEST represent the Kalman gain, current estimate, previous estimate, measurement, error in measurement, and error in estimation, respectively.Kalman gain has two inputs, namely error in the estimated data and error in the actual data.The following diagram shows how the Kalman filter works [25,52].The structure diagram for the Kalman filter is shown in Figure 6.The rules are made in the modules of the SHFL model based on their roles.Each module returns a partial result, and these partial results are combined in the corresponding module to provide a final system output.Hence, for each partial module, the rules are defined.Equation ( 5) determines the required rules for the complete fuzzy system.

Number of Rules
where n indicates the number of variables in a fuzzy logic, and m represents the number of The rules are made in the modules of the SHFL model based on their roles.Each module returns a partial result, and these partial results are combined in the corresponding module to provide a final system output.Hence, for each partial module, the rules are defined.Equation ( 5) determines the required rules for the complete fuzzy system.

Number of Rules
where n indicates the number of variables in a fuzzy logic, and m represents the number of membership functions.
The rule base consists of the number of if-then rules in the Mamani fuzzy logic model.If-then rules are used for capturing the indefinite models of reasoning.These rules play an important role in deciding between environments of uncertainty and imprecision.In the SHFL model two methods, namely average rules-based (A RB ) and max rules-based (M RB ) mechanisms for defining rules in the fuzzy logic modules, have been suggested according to the weights assigned to MFs in Table 1.For ease, we have defined five MFs for all input/output variables.For example, the linguistic terms very low risk (VLR), low risk (LR), medium risk (MR), high risk (HR) and very high risk (VHR) are assigned to MFs for a variable in fuzzy logic.A RB and M RB rules are illustrated in Equations ( 6) and ( 7), respectively.
A RB and M RB rules can be calculated using the weights assigned to corresponding MFs that are illustrated in Table 1.In Table 2 the specification of rules has been carried out using the A RB rules method, and in Table 3 both A RB and M RB methods rules are applied.In this study, we have used only the A RB rules mechanism for fuzzy logic in middle-level fuzzy logic; while for top-layer fuzzy logic both A RB and M RB rules mechanisms are used.We can use both rule schemes alternatively depending on the system need.Equation ( 1) can be used to specify rules through the A RB method.After calculating the mean value, if the output is a fraction then the ceiling value is considered.  2 shows the rules determined using the M RB method; in this table each cell indicates a risk index.These rules are defined for fuzzy logic in the middle-level layer.
Defining rules using M RB and A RB methods are determined in Table 3 for the top-level SHFL model.After applying the formula, the fraction part is eliminated using a ceiling function in the M RB method.

Experimental Requirements
All the implementation of the suggested work is done in Matlab R2015aSP1 (Version 8.5.1); in particular, a fuzzy logic toolbox has been used for SHFL implementation.
For simplicity and better representation, five MFs are defined for each variable in each fuzzy logic method.Fuzzy logic methods with membership function, rules editor, and input/output variables are given below in detail.Figure 7 represents the inference system of the Mamdani fuzzy logic model for water supply risk index.The inputs are P 1 and P 2, and M 1 is the output.All the implementation of the suggested work is done in Matlab R2015aSP1 (Version 8.5.1); in particular, a fuzzy logic toolbox has been used for SHFL implementation.
For simplicity and better representation, five MFs are defined for each variable in each fuzzy logic method.Fuzzy logic methods with membership function, rules editor, and input/output variables are given below in detail.Figure 7 represents the inference system of the Mamdani fuzzy logic model for water supply risk index.The inputs are P1 and P2, and M1 is the output.
Figure 8 illustrates the input and output MFs for water supply fuzzy logic.This fuzzy logic has two inputs, P1 and P2, and output M1.Five MFs have been defined for each variable to better represent the characteristics of each variable.
A total of 25 rules are defined for WPR F fuzzy logic.The A RB rules scheme has been applied to specify rules for WSPR fuzzy logic, as given in Table 2. Figure 9 presents the fuzzy rules editor of the fuzzy logic toolbox for rules determination using the A RB method for the WPR F method.The labels of the input variables and the output variable are represented as a list for the user to choose and combine using the logical operators 'and' and 'or'.A total of 25 rules are defined for WPR F fuzzy logic.The A RB rules scheme has been applied to specify rules for WSPR fuzzy logic, as given in Table 2. Figure 9 presents the fuzzy rules editor of the fuzzy logic toolbox for rules determination using the A RB method for the WPR F method.The labels of the input variables and the output variable are represented as a list for the user to choose and combine using the logical operators 'and' and 'or'.
The same number of rules and the same mechanism as in Table 2 are determined for every fuzzy logic method in the middle layer.
In the same way, the rules for every fuzzy logic type in the middle-level layer are defined using the A RB method.The same numbers of membership functions (5), with the same linguistic terms as for WPRF fuzzy logic, are defined for each input/output variable.Output risk values are then further used as inputs to the top-level layer.The fuzzy logic in a top level gets the middle-layer fuzzy logic output values.The Mamdani fuzzy inference for top-level fuzzy logic is shown in Figure 10.The same number of rules and the same mechanism as in Table 2 are determined for every fuzzy logic method in the middle layer.
In the same way, the rules for every fuzzy logic type in the middle-level layer are defined using the A RB method.The same numbers of membership functions (5), with the same linguistic terms as for WPRF fuzzy logic, are defined for each input/output variable.Output risk values are then further used as inputs to the top-level layer.The fuzzy logic in a top level gets the middle-layer fuzzy logic output values.The Mamdani fuzzy inference for top-level fuzzy logic is shown in Figure 10.
There are four inputs (M, M2, M3 and G) to the top-level layer fuzzy logic and the output is the underground risk index; hence, for each input variable five MFs are defined with the same linguistic terms and different scale.The input and output membership functions are shown in Figure 11.
For rule specification in the top level layer fuzzy logic to calculate the final risk index, both A RB and M RB rules specification methods have been applied.The complete rule set (775 rules) of Table 2 derived through the A RB method is specified using the rule editor for top-level fuzzy logic, as shown in Figure 12.
The rule viewer for specifying rules through an A RB rules specification scheme is shown in Figure 13, where the inputs are M1, M2, M3 and G, and the resulting values are the final risk index values of the proposed SHFL model.There are four inputs (M, M 2 , M 3 and G) to the top-level layer fuzzy logic and the output is the underground risk index; hence, for each input variable five MFs are defined with the same linguistic terms and different scale.The input and output membership functions are shown in Figure 11.For rule specification in the top level layer fuzzy logic to calculate the final risk index, both A RB and M RB rules specification methods have been applied.The complete rule set (775 rules) of Table 2 derived through the A RB method is specified using the rule editor for top-level fuzzy logic, as shown in Figure 12.Similarly, the rules for fuzzy logic method in the top-level layer are specified through the M RB rules specification method given in Figure 14.The rule viewer for specifying rules through an A RB rules specification scheme is shown in Figure 13, where the inputs are M 1 , M 2 , M 3 and G, and the resulting values are the final risk index values of the proposed SHFL model.Similarly, the rules for fuzzy logic method in the top-level layer are specified through the M RB rules specification method given in Figure 14.Similarly, the rules for fuzzy logic method in the top-level layer are specified through the M RB rules specification method given in Figure 14.

Results
For analyzing the proposed risk index assessment and prediction model, the generation of the data is carried out using some exponential functions.The data that are generated using the exponential function are increasing in for 1000 values from 0 to 10.In this model eight inputs are The rule viewer for specifying rules through max-based rules schemes is shown in Figure 15, where the inputs are M 1 , M 2 , M 3 and G and the output is the top-level risk index.

Results
For analyzing the proposed risk index assessment and prediction model, the generation of the data is carried out using some exponential functions.The data that are generated using the exponential function are increasing in for 1000 values from 0 to 10.In this model eight inputs are

Results
For analyzing the proposed risk index assessment and prediction model, the generation of the data is carried out using some exponential functions.The data that are generated using the exponential function are increasing in for 1000 values from 0 to 10.In this model eight inputs are considered for the experiment.Hence the generated data are given to the SHFL model as inputs.The proposed model is evaluated on this data.The functions used to generate the data are given below.
Figures 16 and 17 illustrate the simulated data generated through the above functions; these generated data ae further used as input to the SHFL model.In the top-level layer the rules are defined using both M RB and A RB .Figure 18 indicates the top-level layer fuzzy logic underground risk index values using the A RB method for defining rules, along with Kalman filter predicted underground risk index results.Figure 19 illustrates the underground risk index results of top-level fuzzy logic using the M RB rules determining method along with the Kalman filter predicted results for underground risk index.In the top-level layer the rules are defined using both M RB and A RB .Figure 18 indicates the top-level layer fuzzy logic underground risk index values using the A RB method for defining rules, along with Kalman filter predicted underground risk index results.Figure 19 illustrates the underground risk index results of top-level fuzzy logic using the M RB rules determining method along with the Kalman filter predicted results for underground risk index.The outputs risk index values of fuzzy logic in the top-level layer are the final risk index values of the SHFL model, where inputs to the top-level fuzzy logic are M 1 , M 2 , M 3 and G.In the top-level layer the rules are defined using both M RB and A RB .Figure 18 indicates the top-level layer fuzzy logic underground risk index values using the A RB method for defining rules, along with Kalman filter predicted underground risk index results.Figure 19 illustrates the underground risk index results of top-level fuzzy logic using the M RB rules determining method along with the Kalman filter predicted results for underground risk index.

Discussion
The number of underground facilities is growing day by day, so underground risk assessment is very important.Underground risk assessment is a very complicated process because a lot of parameters need to be taken into account.Eight variables are used as inputs to assess the underground risk index.In this case, to apply the conventional fuzzy logic (CFL) is not a suitable choice because it is unable to handle a lot of parameters.Therefore, the SHFL model has been proposed to overcome the problems faced by the CFL method.
The SHFL model based on hierarchical fuzzy logic shrinks the number of rules in the rule base.As mentioned earlier, five MFs are determined for each variable, and the number of input variables is eight.By putting the number of variables and the MFs in Equation ( 1) for the SHFL model and in Equation ( 2 By using the SHFL model, the rules can be reduced significantly.It is essential to reduce the rules in the rule base because the justification and designing of thousands of rules is extremely difficult.Usually, the massive volume of rules causes rule overfitting.
While designing the SHFL model, the number levels have also been considerably reduced because more levels in a hierarchical model complicate the rule-designing process and it becomes challenging for experts to map rules efficiently at all levels.In the proposed work we have also kept this in consideration to reduce the rules as well as to minimize the number of levels in the SHFL model.

Discussion
The number of underground facilities is growing day by day, so underground risk assessment is very important.Underground risk assessment is a very complicated process because a lot of parameters need to be taken into account.Eight variables are used as inputs to assess the underground risk index.In this case, to apply the conventional fuzzy logic (CFL) is not a suitable choice because it is unable to handle a lot of parameters.Therefore, the SHFL model has been proposed to overcome the problems faced by the CFL method.
The SHFL model based on hierarchical fuzzy logic shrinks the number of rules in the rule base.As mentioned earlier, five MFs are determined for each variable, and the number of input variables is eight.By putting the number of variables and the MFs in Equation ( 1 By using the SHFL model, the rules can be reduced significantly.It is essential to reduce the rules in the rule base because the justification and designing of thousands of rules is extremely difficult.Usually, the massive volume of rules causes rule overfitting.
While designing the SHFL model, the number levels have also been considerably reduced because more levels in a hierarchical model complicate the rule-designing process and it becomes challenging for experts to map rules efficiently at all levels.In the proposed work we have also kept this in consideration to reduce the rules as well as to minimize the number of levels in the SHFL model.
The SHFL model also minimizes the number of factors in the mathematical formulas of the fuzzy inference system.The main problem faced by the CFL model is that a higher number of factors are required to specify a rule, fuzzification, defuzzification, and different operations as new parameters arrive in the model.A vast number of variables increase the computational complexity and processing time.
Defining rules is also a tedious task in Mamdani fuzzy logic that requires experts to specify or design rules.Hence, in the SHFL model, we have introduced two rule specification mechanisms, called A RB and M RB methods, to assist the manager with designing rules for a system.
The fuzzy membership function determination is something of a trial and error exercise; it takes a lot of time and expertise to determine the proper MFs distribution.To achieve adequate membership functions, a HBMFA scheme has been introduced.This module assists the manager with determining an appropriate set of MFs to improve the accuracy of the system.Suitable membership function determination has a direct impact on system accuracy.
Nowadays, prediction is frequently used in many fields [26,27,52], hence in the proposed work we have also taken into account the underground risk index prediction.Underground risk index prediction is also essential to assist the caretaker with taking safety measures before an accident or failure happens.

Conclusions
In this work, we have focused on the construction of a model based on the hierarchical fuzzy model and the Kalman filter.The purpose of this study was to design a system for underground risk assessment and prediction.For this purpose, a model has been designed that is based on the hierarchical fuzzy logic method and Kalman filter.This hierarchical fuzzy system model is designed for rule reduction as new variables arrive in the model.The proposed SHFL model is simple in structure and requires fewer rules to implement a full-structure fuzzy logic model.Rule designing is also a matter of high importance and requires experts and time to design accurate rules for a system.To specify rules in the SHFL model, we have offered two rule schemes, namely average rules-based (A RB ) and max rules-based (M RB ) rules; the selection of any scheme from them for any fuzzy logic depends on the system needs.Membership function determination is a challenging task and has a major impact on system performance.In the proposed work we have used a heuristic-based membership function determination scheme to get a suitable membership functions set.To test the proposed risk index assessment and prediction model, we have also generated data through exponential functions.The Kalman filter has also been applied to predict the risk index; risk index prediction is also essential to take preemptive measures.

Figure 4 .
Figure 4. Structure diagram of Mamdani fuzzy logic model.

Figure 4 .
Figure 4. Structure diagram of Mamdani fuzzy logic model.Figure 4. Structure diagram of Mamdani fuzzy logic model.

Figure 4 .
Figure 4. Structure diagram of Mamdani fuzzy logic model.Figure 4. Structure diagram of Mamdani fuzzy logic model.
b 1 , b 2 , b 3 , b 4 are the crisp output values after defuzzification processes in the middle layer.The output crisp values of each fuzzy logic type in the middle layer are further input to top-level layer fuzzy logic.The same fuzzification inference, composition, and defuzzification processes are applied in this fuzzy logic in order to get the final risk index value.Processes 2018, 6, x FOR PEER REVIEW 7 of 22

Figure 6 .
Figure 6.Kalman filter model for underground risk index prediction.

Figure 7 .
Figure 7. Mamdani fuzzy inference system for WPR F fuzzy logic.

Figure 7 .
Figure 7. Mamdani fuzzy inference system for WPR F fuzzy logic.

Figure 8 Figure 8 .
Figure8illustrates the input and output MFs for water supply fuzzy logic.This fuzzy logic has two inputs, P 1 and P 2 , and output M 1 .Five MFs have been defined for each variable to better represent the characteristics of each variable.Processes 2018, 6, x FOR PEER REVIEW 11 of 22

Figure 9 .
Figure9.Rules editor for specifying rules using the A RB method for the water supply risk index fuzzy logic model.

Figure 9 .
Figure 9.Rules editor for specifying rules using the A RB method for the water supply risk index fuzzy logic model.Figure9.Rules editor for specifying rules using the A RB method for the water supply risk index fuzzy logic model.

Figure 9 .
Figure 9.Rules editor for specifying rules using the A RB method for the water supply risk index fuzzy logic model.Figure9.Rules editor for specifying rules using the A RB method for the water supply risk index fuzzy logic model.

Figure 10 .
Figure 10.Mamdani fuzzy inference system for top-level fuzzy logic.Figure 10.Mamdani fuzzy inference system for top-level fuzzy logic.

Figure 10 .
Figure 10.Mamdani fuzzy inference system for top-level fuzzy logic.Figure 10.Mamdani fuzzy inference system for top-level fuzzy logic.

Figure 11 .
Figure 11.Membership functions for input variables (M1, M2, M3 and G) and output variable (underground risk index) in the top-level fuzzy logic method.Figure 11.Membership functions for input variables (M 1 , M 2 , M 3 and G) and output variable (underground risk index) in the top-level fuzzy logic method.

Figure 11 .
Figure 11.Membership functions for input variables (M1, M2, M3 and G) and output variable (underground risk index) in the top-level fuzzy logic method.Figure 11.Membership functions for input variables (M 1 , M 2 , M 3 and G) and output variable (underground risk index) in the top-level fuzzy logic method.

Figure 12 .
Figure 12.Rule editor A RB rule specification.

Figure 13 .
Figure 13.Example of A RB fuzzy rules used in top-level fuzzy logic.

Figure 12 .
Figure 12.Rule editor A RB rule specification.

Figure 13 .
Figure 13.Example of A RB fuzzy rules used in top-level fuzzy logic.

Figure 13 .
Figure 13.Example of A RB fuzzy rules used in top-level fuzzy logic.

Figure 14 .
Figure 14.M RB method rules in the rules-based top-level fuzzy logic.

Figure 15 .
Figure 15.Example of max-based fuzzy rules used in the top-level FIS.

Figure 14 .
Figure 14.M RB method rules in the rules-based top-level fuzzy logic.

Processes 2018, 6 , 22 Figure 14 .
Figure 14.M RB method rules in the rules-based top-level fuzzy logic.

Figure 15 .
Figure 15.Example of max-based fuzzy rules used in the top-level FIS.

Figure 15 .
Figure 15.Example of max-based fuzzy rules used in the top-level FIS.

Processes 2018, 6 ,
x FOR PEER REVIEW 16 of 22 considered for the experiment.Hence the generated data are given to the SHFL model as inputs.The proposed model is evaluated on this data.The functions used to generate the data are given below.Figures16 and 17illustrate the simulated data generated through the above functions; these generated data ae further used as input to the SHFL model.

Figure 16 .
Figure 16.Data generated through different functions for water pipeline and sewerage pipeline risk probabilities and severities.

Figure 17 .
Figure 17.Data generated through different functions for Metro structure and geo-environmental risk probabilities and severities.

Figure 16 .
Figure 16.Data generated through different functions for water pipeline and sewerage pipeline risk probabilities and severities.

Figure 16 .
Figure 16.Data generated through different functions for water pipeline and sewerage pipeline risk probabilities and severities.

Figure 17 .
Figure 17.Data generated through different functions for Metro structure and geo-environmental risk probabilities and severities.

Figure 17 .
Figure 17.Data generated through different functions for Metro structure and geo-environmental risk probabilities and severities.

Figure 18 .
Figure 18.(a) Output values of SHFL model using A RB rules; (b) predicted values using Kalman filter for underground risk index.Figure 18.(a) Output values of SHFL model using A RB rules; (b) predicted values using Kalman filter for underground risk index.

Figure 18 .Figure 19 .
Figure 18.(a) Output values of SHFL model using A RB rules; (b) predicted values using Kalman filter for underground risk index.Figure 18.(a) Output values of SHFL model using A RB rules; (b) predicted values using Kalman filter for underground risk index.

Figure 19 .
Figure 19.(a) Output values of the SHFL model using M RB rules definition method; (b) predicted values using Kalman filter for underground risk index.

Table 1 .
Membership labels along with assigned weights.

Table 2 .
Rule determination using the M RB method.

Table 3 .
Example cases for illustration of rules specification using A RB and M RB schemes.

Table 3 .
Example cases for illustration of rules specification using A RB and M RB schemes.