# Risk Assessment in the Design of Railroad Control Command and Signaling Devices Using Fuzzy Sets
## 3 Application of Fuzzy Sets
These two steps make up the inference phase. Defuzzification is the last block of the fuzzy control system. Its input is the resultant membership function. This is the result of the system operation presented in a fuzzy form. In order to be able to output it to the controlled object, it is converted into a specific numerical value (this process is called sharpening or defuzzification). The most popular methods of defuzzification are [41]:  
1. First maximum method;
2. Last maximum method;
3. The method of the center of maximum;
4. Center of gravity method (centroid);
5. Height method. Defuzzification is required to convert fuzzy numbers to single explicit results, which are \(FIS\)-\(R_{CR}\), a substitute for the previously computed \(R_{CR}\). Figure 5 shows the stages of fuzzification of the input variables, the obtained estimated \(FIS\)-\(R_{CR}\) value, and the modified risk category. Figure 5: Window of rules created in MatLab (source: own elaboration). The process begins with identifying the features that the analysis must cover. The function acts as the basis for the development of the method described in the dissertation in Ref. [1]. The first five steps constitute the traditional risk analysis procedure using the technique described in point 3 of this article. Identification of component functions for urgency \(P_{CR}\), greatness \(W_{CR}\), and difficulty \(T_{CR}\) is required as an input for the creation of appropriate membership functions [42]. The process of applying fuzzy logic was shown at Figure 6.  
As a result of the work carried out, risks were identified and assessed for the previously defined risk areas. Risk assessment and valuation were carried out in two stages. In the first stage, the classical method was used, using rigidly assigned numerical values for sets \(P_{CR}\), \(T_{CR}\), and \(W_{CR}\) and obtaining \(R_{CR}\) as the product of their mean values. In the second step, the values of the \(P_{CR}\), \(T_{CR}\), and \(W_{CR}\), sets were assigned the attributes \"greater than,\" \"between,\" or \"less than,\" thus obtaining _FIS-\(P_{CR}\), _FIS-\(T_{CR}\)_, and _FIS-\(W_{CR}\)_, respectively. In the second stage, the fuzzy _FIS-\(R_{CR}\)_ set was obtained using the MatLab Fuzzy Logic Toolbox. The following methods were used for defuzzification:  
* Center of gravity--centroid;
* Bisector;
* Mean of maximum (Mom);
* Largest of maximum (Lom);
* Smallest of maximum (Som). The selected results are presented in Table 5.  
The results obtained with different methods of defuzzification were compared with each other, as shown in Figure 7. As the method chosen for further consideration, the center of gravity--centroid method was adopted due to the fact that those results were the closest to the median of all of the solutions. Figure 6: The process of applying fuzzy logic. Figure 7: The comparison of different fuzzy logic methods. \begin{table}
\begin{tabular}{l|l|l|l|l|l|l|l|l|l|l|l|l|l|l|l|l|l} \hline \hline \multicolumn{Further analysis was performed using [PERSON]'s control charts [43]. The control chart is the most basic and the oldest tool for statistical process control. It is a graphical method of presenting and comparing information from a series of samples representing the current state of the process, with the limits resulting from taking into account its own variability. The main purpose of the cards is to signal a deviation from statistical stability, which can occur for various reasons, regardless of whether they affect, in particular, the average value or the scatter in the process. Median control charts were used, for which the upper control limit (\(UCL_{Me}\)) was determined using the following relationship:  
Figure 4:0  
The upper control limit is to determine the level of critical risk requiring immediate countermeasures. The upper control limit \(UCL_{Me}\) determined for the results of the classical product method \(R_{CR}\) was 20,645, whereas for the method using fuzzy sets the FIS-\(R_{CR}\) was 25,043.