A fault injection test method for rail transit interlocking system

By combining STPA, CoFI and W methods, the fault scenarios of the rail transit interlocking system are identified and test cases are generated, which solves the problem of insufficient testing in the existing technology and realizes comprehensive fault injection testing of the rail transit interlocking system to ensure improve the security and reliability of the system.

CN118444667BActive Publication Date: 2024-10-22HUAQIAO UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410905362.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-10-22
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

The existing technology fails to effectively combine system safety technical process analysis (STPA), control flow injection (CoFI) and state machine test case generation (W method), resulting in rail transit interlocking system fault injection testing that is not comprehensive and effective.

Method used

The STPA method is used to identify potential fault scenarios and influencing factors of the rail transit interlocking system, the fault is injected into the control flow graph through the CoFI method and a finite state machine model (FSM) is generated, and then the W method is used to generate test cases from the FSM , to verify whether the system's behavior under different fault conditions meets the design requirements.

Benefits of technology

A comprehensive fault injection test of the rail transit interlocking system was achieved to ensure the safety and reliability of the system in the face of different fault conditions. By combining three methods, test cases covering different behavior paths of the system were generated, improving the system's Security and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118444667B_ABST
    Figure CN118444667B_ABST
Patent Text Reader

Abstract

The present invention discloses a fault injection test method for a rail transit interlocking system, which relates to the field of testing technology, and includes: using the STPA method to analyze the rail transit interlocking system, identifying potential fault scenarios and influencing factors; using the CoFI method to inject the fault scenario into the control flow graph of the rail transit interlocking system, and observing the response of the rail transit interlocking system to generate a finite state machine model FSM; using the W method to generate test cases from the finite state machine model FSM of the rail transit interlocking system; using the test cases to test whether the behavior of the rail transit interlocking system meets the design requirements when facing different fault conditions. The present invention combines the STPA method, the CoFI method and the W method to provide a comprehensive and effective method for fault injection testing of rail transit interlocking systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of testing technology, and in particular to a fault injection testing method for a rail transit interlocking system. Background Art

[0002] With the continuous development of modern rail transit systems, the reliability and safety of rail transit interlocking systems, as a key component to ensure the safety of train operation, have attracted much attention. However, due to its complexity and criticality, the testing of rail transit interlocking systems has become particularly important. During the testing process, it is necessary to identify potential faults in the system and verify whether the system's behavior in the face of these faults meets the design requirements.

[0003] System Safety Technical Process Analysis (STPA) is a system safety engineering method that aims to identify potential hazards in a system and determine how to design and operate the system to mitigate these hazards. The STPA method analyzes the system's functions, structure, and control strategies to identify various scenarios and factors that may lead to system failure.

[0004] In the testing of rail transit interlocking systems, in addition to identifying potential faults in the system, it is also necessary to effectively inject faults and verify the response of the system. This requires an effective fault injection testing method. CoFI is a commonly used formal method for describing the control flow and state transitions of the system. By injecting faults into the control flow graph and observing the behavior of the system under fault conditions, the safety of the system can be evaluated.

[0005] In addition, in order to generate effective test cases, a method based on formal specifications is required. The W method is a commonly used state machine-based test case generation method. By deriving test cases from the state machine model of the system, it covers different behavior paths of the system, thereby achieving the purpose of comprehensively testing the system functions. The existing technology does not combine the STPA method, the CoFI method and the W method. Summary of the invention

[0006] In response to the above-mentioned technical problems, the purpose of the embodiments of the present application is to propose a fault injection test method for a rail transit interlocking system, which combines the STPA method, the CoFI method and the W method to provide a comprehensive and effective method for fault injection testing of a rail transit interlocking system.

[0007] The technical solution of the present invention is as follows.

[0008] A rail transit interlocking system fault injection test method, comprising:

[0009] Use the STPA method to analyze the rail transit interlocking system and identify potential failure scenarios and influencing factors;

[0010] Use the CoFI method to inject fault scenarios into the control flow graph of the rail transit interlocking system, observe the response of the rail transit interlocking system, and generate a finite state machine model FSM;

[0011] The W method is used to generate test cases from the finite state machine model FSM of the rail transit interlocking system;

[0012] Use test cases to test whether the behavior of the rail transit interlocking system meets the design requirements when facing different fault conditions.

[0013] Preferably, the STPA method is used to analyze the rail transit interlocking system to identify potential failure scenarios and influencing factors, including:

[0014] Define the rail transit interlocking system and its services, components and boundaries; identify the corresponding accidents, hazards and the accidents that may result, as well as system-level safety constraints and related hazards; the services provided by the rail transit interlocking system include arranging the routes requested by trains; the routes requested by a train are composed of multiple sections and turnouts, and signals are used to indicate whether the train should enter the current section or path;

[0015] Using the rail transit interlocking system structural model and hazard information, a control structure is constructed to impose constraints on the behavior of the rail transit interlocking system; wherein the control structure includes system components, feedback and control action processes, system inputs, and system outputs;

[0016] Identify unsafe control behaviors of rail transit interlocking systems and the hazards caused by unsafe control behaviors;

[0017] Determine the safety requirements for controllers in the control structure based on unsafe control behaviors.

[0018] Preferably, the system components include controllers, sensors, actuators and controlled processes; the interlocking controller issues control actions to each corresponding path controller component; the sensor captures path status, train information, signal light information, turnout status information and section information; the system model includes six variables: train position, section status, path status, turnout status and signal light status.

[0019] Preferably, the CoFI method is used to inject the fault scenario into the control flow graph of the rail transit interlocking system, and the response of the rail transit interlocking system is observed to generate a finite state machine model FSM, which specifically includes:

[0020] Identify observation points PCOs, input events, output events and test structures of rail transit interlocking systems;

[0021] Establish rules for the finite state machine graph; first determine the default state of the rail transit interlocking system, then iteratively identify transitions and states based on events occurring at the PCOs; establish rules based on the identified transitions and states;

[0022] Based on the rules of the finite state machine diagram, construct the FSM of the normal behavior of train application route;

[0023] Using the FSM diagram of the normal behavior of the train applying for a route, add transitions caused by input events of the specified abnormal scenario and construct the FSM diagram of the specified abnormal behavior; construct the state transition table STT using the transitions of the FSM of the normal behavior and the FSM of the specified abnormal behavior; fill in the empty cells in the transition table STT, identify events that will occur at unexpected times, determine potential path transitions, and draw the FSM of the potential behavior, including the newly identified transitions; add fault tolerance mechanisms in the FSM modeling process;

[0024] Verify that the FSM takes into account the requirements identified by STPA, and if not, supplement the FSM.

[0025] Preferably, in the step of identifying observation points PCOs, input events, output events and test structures of the rail transit interlocking system, the test structure consists of a system under test SUT, i.e., a rail transit interlocking system, and a test system, and the SUT and the test system communicate through PCOs; input events cause the SUT to generate output events; the control point is where the input event triggers / enters the SUT, and the observation point is where the test system observes the output event; the control structure provides information for PCOs, input and output events, and control, feedback and information flows are received / sent in the control structure through PCOs.

[0026] Preferably, the FSM steps for constructing the normal behavior of train application route specifically include:

[0027] Confirm the initial state of the FSM; the initial state of the FSM is that all paths and sections are idle, the signal lights are red, the switches are locked, there are no control actions being processed or feedback being transmitted; and no trains have entered the entire rail transit interlocking system;

[0028] Describe the sequence of transitions and indicate the rules that apply; the FSM shows the time sequence of events that occur in the rail transit interlocking system flowing through the PCOs, as follows:

[0029] (a) The train automatic monitor receives the train position information and sends a route requisition request, which is represented by the input event "train sends route requisition request", and executes the action "monitor sends requisition request"; the next state is "monitor is requesting a path", in this state, the path controller detects the path information, if the path requested by this train conflicts with other paths, then the input event "request path or section has conflict", triggers the action "controller cancels requisition request", and returns to the initial state; if there is no conflicting path or section, then the request is passed, the input event "request path passed", triggers the action "controller adjusts the switch position", the next state is "switch is adjusting position"; in this state, the switch sensor receives the switch status information, if the switch fails and cannot be adjusted to the correct position, then the input event "faulty switch cannot be adjusted to the correct position, controller emergency processing", triggers the action "controller emergency processing"; if all the switches are in the normal position and locked, then the input event "switch has reached the correct position and locked" triggers the action "controller adjusts the signal light color", the next state is "signal light adjusts color";

[0030] (b) If the signal light is correctly indicated at this time, the input event "the signal light has been correctly indicated" triggers the action "the train can enter the path", and the next state is "the train is passing through the path"; in this state, the path sensor senses the train position, the input event "the path sensor senses the train position information" triggers the action "the sensor sends the position information", and the next state is "the sensor is sending the position information";

[0031] (c) When the train leaves the section, the controller needs to cancel the section, return the switch to its original position, and turn the signal light red. The input event "the train completely leaves the section" triggers the action "the controller cancels the section" and the next state is "the train is passing the path".

[0032] (d) After all switches are returned to their positions and the signal light turns red, the controller releases the path or section authority.

[0033] Preferably, the W method is used to generate test cases from the finite state machine model FSM of the rail transit interlocking system, specifically including:

[0034] Let the finite state machine FSM of the rail transit interlocking system be M, and the feature set derived from the description of M be W;

[0035] Construct a k-equivalence partition of M;

[0036] Generate a distinguishing sequence for all state pairs in M ​​to obtain the W feature set;

[0037] Based on the W feature set, use the W method to construct a test set for M.

[0038] Preferably, the W method is used to construct a test set for M, specifically including:

[0039] Construct a test tree for M and determine the transition cover set P of the transformations;

[0040] Construct set Z based on transition cover set P;

[0041] Let P·Z be the test set including the test cases.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] (1) The STPA method used in the method of the present invention is a system process analysis method, which aims to discover potential safety risks and failures by deeply analyzing the process in system design and operation. By analyzing the rail transit interlocking system through STPA, its potential risks can be identified, thereby obtaining unsafe control behaviors and safety requirements;

[0044] (2) CoFI is a commonly used formal method for describing the control flow and state transition of a system. By injecting faults into the control flow graph and observing the behavior of the system under fault conditions, the safety of the system can be evaluated. The method of the present invention generates a control structure diagram of the rail transit interlocking system through CoFI, and generates an FSM based on this and in combination with the safety requirements of STPA.

[0045] (3) The W method is a commonly used state machine-based test case generation method. By deriving test cases from the state machine model of the system, different behavior paths of the system are covered, thereby achieving the purpose of comprehensively testing the system functions. Finally, the method of the present invention uses the W method to generate test cases from the state machine model of the rail transit interlocking system to verify whether the behavior of the rail transit interlocking system meets the design requirements when facing different fault conditions, thereby ensuring the safety and reliability of the rail transit interlocking system. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 This is a flow chart of a rail transit interlocking system fault injection test method according to an embodiment of the present invention;

[0048] Figure 2 A detailed flow chart of a rail transit interlocking system fault injection test method according to an embodiment of the present invention;

[0049] Figure 3A schematic diagram of a simple rail transit interlocking system according to an embodiment of the present invention;

[0050] Figure 4 A control structure diagram of a rail transit interlocking system according to an embodiment of the present invention;

[0051] Figure 5 A schematic diagram of a normal behavior FSM according to an embodiment of the present invention;

[0052] Figure 6 A schematic diagram of an abnormal behavior FSM according to an embodiment of the present invention;

[0053] Figure 7 Schematic diagram of potential path conversion in an embodiment of the present invention Figure 1 ;

[0054] Figure 8 Schematic diagram of potential path conversion in an embodiment of the present invention Figure 2 ;

[0055] Fig. 9 Schematic diagram of potential path conversion in an embodiment of the present invention Figure 3 ;

[0056] Fig.10 A schematic diagram of a turnout fault FSM according to an embodiment of the present invention;

[0057] Fig.11 This is a schematic diagram of an FSM added according to type requirements in an embodiment of the present invention;

[0058] Fig.12 A simple FSM diagram for the application of the w method;

[0059] Fig.13 Schematic diagram of the test tree for the application of the w method;

[0060] Fig.14 Schematic diagram of the extra state FSM applied for the w method. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0062] STPA (System-Theoretic Process Analysis) is a system process analysis method that aims to discover potential safety risks and failures by deeply analyzing the process in system design and operation. STPA focuses on analyzing the system in order to fully understand the complexity and potential risks of the system.

[0063] There are four main steps in STPA, which are as follows:

[0064] 1) Define the purpose of the analysis, aiming to identify losses, hazards, and system boundaries. 2) Model the control structure using STAMP to capture the functional relationships and interactions of the elements. 3) Identify unsafe controls Identify potential unsafe control actions (UCAs) and associated safety constraints. For each control action, which is typically a command issued against a controlled process, the analyst must identify situations in which the control action could be hazardous. 4) Identify loss scenarios to reveal potential causes of the issue.

[0065] CoFI (Conformance and fault injection) is a model-based testing approach that aims to create conformance test cases and fault injection cases to verify the behavior of software systems under normal and abnormal execution conditions. Abnormal execution conditions include specified exceptions, timeout events, and hardware failures. Generally speaking, hardware failures prevent the system from performing its functions. If a hardware failure is detected, the fault tolerance mechanism may be triggered, which can be tested through fault injection techniques.

[0066] CoFI has five steps. The first step determines the characteristics of the SUT (system under test) and its constraints: identifying system services (i.e., the main functions provided by the SUT) and identifying control and observation points (PCOs), input events, output events, and the test system. The next two steps aim to build FSMs of four categories of behavior, namely normal, specified exceptions, hidden paths, and fault tolerance. The last two steps aim to verify and refine the requirements and generate test cases.

[0067] In this embodiment, STPA (System-Theoretic Process Analysis) is combined with CoFI (Conformance and fault injection) to generate requirements and test cases for safety-critical systems before the design stage, and this method is used in a rail transit interlocking system.

[0068] like Figure 1 and Figure 2 As shown, this embodiment provides a rail transit interlocking system fault injection test method, including the following steps.

[0069] S101, use the STPA method to analyze the rail transit interlocking system and identify potential failure scenarios and influencing factors. The details are as follows.

[0070] 1. Define the purpose of the analysis and identify system services.

[0071] In this step, the interlocking system and its services, components, boundaries, failures, and hazards are defined.

[0072] As a key component to ensure the safety of train operation, the rail transit interlocking system uses a series of sensors to obtain information about the system path and arrange the route applied by the train based on this information to prevent train collisions, rear-end collisions, derailment and other accidents. Figure 3 shown.

[0073] Railway topology consists of a fixed number of track segments, which are units that provide physical paths for trains to travel. These track segments consist of various elements such as segments, switches, and intersections. Each track segment is equipped with track circuits that detect whether there is a train on the segment. Therefore, a track segment can be in one of two different states: unoccupied (no train) or occupied (with a train).

[0074] A turnout has two positions that allow track sections to establish precise connections with other sections. By configuring these connections, the turnout effectively determines the path and direction of the train's travel. And the turnout has a locking function to fix it in a specified position without loosening.

[0075] Signals are entities that convey information to trains. Each signal is associated with a specific route in a specific direction. Signals can be in one of two states: red or green. By default, signals are set to red. Trains are expected to obey signals, specifically to stop when the signal is red.

[0076] A section is a basic unit in a railway route, and a turnout is included in a section. A route (path) requested by a train is composed of multiple sections and turnouts, and a signal indicates whether the train should enter the current section or path.

[0077] Requisition (reservation) of a path is to apply for the corresponding resources for the path and allocate them to a single train, and release (revocation) involves the train releasing the resources after the corresponding resources have been used by the train. Figure 3 It contains 6 sections (B1-6) and two turnouts (P1, P2). When a train enters, the train automatic monitor communicates with the interlocking system to apply for a route for it. The interlocking system then applies for resources based on the corresponding path information. If it is safe, the interlocking system will approve the application. If it is not safe, it will cancel or revoke the application.

[0078] Therefore, when applying for a route, it is necessary to consider whether the section or path applied for conflicts with other trains, which is crucial to safety. After completing the route requisition, the interlocking system will also switch the turnout to the corresponding position and lock it. After completing all the work, the signal will turn green to indicate normal passage.

[0079] After the train leaves the section, the interlocking system will first change the signal to red, then unlock the switch, and then cancel the section's authority to allow other trains to use it.

[0080] To make the description of the method complete, it is assumed that all components and paths may fail.

[0081] An accident represents the occurrence of a safety-critical problem. For the rail transit interlocking system, four accidents are identified as shown in Table 1 below.

[0082] Table 1

[0083] Serial No. A ACCIDENT 1 Rear-end collision 2 Head-on collision 3 Side impact 4 Derailment

[0084] A hazard is a system state that, together with an unsafe control action, leads to an accident. For the rail transit interlocking system, the following hazards in Table 2 are identified.

[0085] Table 2

[0086]

[0087] System-level safety constraints are derived from the hazards. They are shown in Table 3 below:

[0088] Table 3

[0089]

[0090] 2. Model the control structure.

[0091] A control structure is a hierarchical system model that includes system components (controllers, sensors, actuators, and controlled processes), the flow of feedback and control actions, system inputs, and system outputs. The control structure imposes constraints on the behavior of the system. The control structure is constructed using the system structure model (including the components within each structure in the system and the controlled processes) and hazard information. The control structure of the interlocking system can be found in Figure 4 The interlocking controller issues control actions to each corresponding path controller component.

[0092] Sensors capture path status, train information, signal light information, turnout status information, and section information. Control actions and corresponding feedback are as follows; turnout lock and unlock turnout are two control actions of the turnout controller, and the lock state of the turnout is the corresponding feedback. The turnout controller locks and unlocks the turnout. The algorithm issues control actions based on the process model. The entire system process model has six variables: train position, section status, path status, turnout status, and signal light status.

[0093] 3. Identify unsafe control behaviors and the causes of unsafe control behaviors.

[0094] Unsafe control actions (UCA) are control measures that can lead to hazards in specific situations and worst-case scenarios. For rail transit interlocking systems, 27 unsafe control actions were identified, as shown in Table 4. After each UCA, the hazard identification (H1, H2, or H3) caused by the UCA is added. For example, UCA1 leads to H2.

[0095] Table 4

[0096]

[0097] 4. Determine loss scenarios and safety requirements.

[0098] The requirements for the controller can be derived directly from the unsafe control actions in Table 5. This is not a complete list of safety requirements.

[0099] Table 5

[0100]

[0101] A total of 27 requirements were identified. These requirements will be used in subsequent CoFI methods.

[0102] S102, injecting the fault scenario into the control flow graph of the rail transit interlocking system using the CoFI method, observing the response of the rail transit interlocking system, and generating a finite state machine model FSM.

[0103] The specific steps include:

[0104] 1. Identify PCOs, input events, output events, and test structures.

[0105] The system under test is considered as the System Under Test (SUT). Assume that there is a test system which represents the system responsible for executing one or more test cases. The test structure consists of the SUT and the test system. They communicate through PCOs. Assume that the SUT processes events generated by the interaction between components and the interaction between the environment and the system. Events that cause the SUT to react are called input events. Input events cause the SUT to generate responses. The responses are considered as observable output events or actions. Control points are where input events trigger / enter the SUT, while observation points are where the test system can observe output events. Meanwhile, the places in the control structure that receive or send control, feedback, and information flows are PCOs.

[0106] The rail transit interlocking system under test is a control structure with test elements, such as Figure 4 PCOs are represented by circles and boxes. The control point (circle) is where control actions, execution, sensing, feedback, system input, information, and control actions are received. The observation point (box) is where control actions, execution, sensing, feedback, information, and system output are sent.

[0107] exist Figure 4 In the table, the system under test has 26 PCOs. The arrows indicate the information being transmitted. The information being transmitted is represented by text, indicating the information or action being passed in the PCOs. In the table, not all PCOs are shown here. For PCO7, two input events may occur: the signal light color is green and the signal light color is red. Similarly, in PCO13, input events related to the status of the train on the route are specified, as shown in Table 6 below.

[0108] Table 6

[0109]

[0110] 2. Rules for building finite state machine diagrams.

[0111] The statechart uses a Mealy machine, where the output value is determined by the current state and the current input. A Mealy machine is a deterministic finite state transducer: for each state and input, at most one transition is possible. A Mealy machine is a six-tuple consisting of: 1) a finite set of states, 2) an initial state, 3) an input alphabet, 4) an output alphabet, 5) a transition function that maps states and inputs to corresponding next states, and 6) an output function that maps states and inputs to corresponding outputs. When an input event occurs in a state, the FSM generates an output event and moves to another state. The initial state is first determined, and then transitions and states are identified iteratively. The STPA process model, its variables and values, and changes in the controlled process provide data for identifying the states of the FSM. In an interlocking system, each controller has a set of process model variables. For example, the signal model variables include the color of the signal light (two values) and the driving authority given to the train (two values). The value changes of the process model variables can be represented as transitions of the FSM. Transitions and states are identified based on the events that occur at the PCOs. Five rules are formulated to systematically identify transitions. These rules are expressed as input event / output event pairs as shown below. Transitions are caused by feedback, external communication, or control actions by higher-level controllers. The controller receives feedback from the automatic train monitor, and control actions may update variables, causing the controller to issue control actions. Rule 1 is as follows:

[0112] “Receive feedback from the automatic train monitor, control actions or update variables, and the controller issues corresponding control actions.”

[0113] Update, Issue control actions are output events in a single transformation.

[0114] Transformations caused by sensors, control actions, and execution actions. There are three rules, as follows:

[0115] The sensor detects some change in the variable and transmits it to the controller. This transformation is represented by the rule "The sensor detects a change in the controlled process / the sensor sends feedback to the controller" (Ru2).

[0116] The actuator receives the control action and passes the execution to the controlled process. This transition is represented by "Actuator receives control action / Actuator causes execution of the controlled process" (Ru3).

[0117] The controlled process receives an execution from the actuator, which causes the controlled process to change. The rule is represented by "the controlled process receives an execution from the actuator" (Ru4).

[0118] A transition caused by a system input. This represents a change in the state of the controlled process, detected by a sensor. The definition rules are as follows:

[0119] “The controlled process senses system input events” (Ru5).

[0120] 3. Construct the FSM diagram of normal behavior.

[0121] The FSM diagram of the normal behavior class represents the behavior of the system when it provides services correctly. To make the FSM diagram simpler and easier to handle, the normal behavior class can be represented in different scenarios. Each FSM diagram represents a scenario.

[0122] In this example, the scenario of the entire process of train application route (requisition path) is used, such as Figure 5 shown.

[0123] The initial state of the FSM is that all paths and sections are idle, the signal lights are red, the switches are locked, there are no control actions being processed or feedback being transmitted; and no trains have entered the entire interlocking system.

[0124] Next, describe the transitions and indicate the rules that apply. In the method of the present invention, the FSM shows the time sequence of events that occur in the system (and its components) flowing through the PCOs. The names of events and states are shown in italics, and the rules are shown in brackets. Consider the first start event. The path sensor works, resulting in the input event "path sensor senses train position information" triggering the action "sensor sends position information" (Ru2). The next state is "sensor is sending position information".

[0125] The automatic train monitor receives the train position information, sends a route requisition request, which is represented by the input event "train sends route requisition request", and executes the action "monitor sends requisition request" (Ru1). The next state is "monitor is requesting a path". In this state, the controller detects the path information. If the train requests a path that conflicts with other paths, the input event "request path or section has conflict" triggers the action "controller cancels requisition request" (Ru3) and returns to the initial state. If there is no conflicting path, the request is passed, the input event "request path passed" triggers the action "controller adjusts the switch position" (Ru4) The next state is "switch is adjusting position". In this state, the sensor receives the switch status information. If the switch fails and cannot be adjusted to the correct position, the input event "faulty switch cannot be adjusted to the correct position, controller emergency processing" triggers the action "controller emergency processing" (Ru3). If all the switches are in the normal position and locked, the input event "switch has reached the correct position and locked" triggers the action "controller adjusts the signal light color" (Ru4), and the next state is "signal light adjusts color".

[0126] At this time, if the signal light is correctly indicated, the input event "the signal light has been correctly indicated" triggers the action "the train can enter the path" (Ru2), and the next state is "the train is passing through the path". In this state, the path sensor senses the train position, and the input event "the path sensor senses the train position information" triggers the action "the sensor sends the position information" (Ru2), and the next state is "the sensor is sending the position information".

[0127] When the train leaves the section, the controller will cancel the section, return the switch to its position, the signal light will turn red, and the input event "the train completely leaves the section" will trigger the action "the controller cancels the section" (Ru1), and the next state is "the train is passing through the path".

[0128] Finally, we get a normal behavior FSM, such as Figure 5 shown.

[0129] 4. Construct the FSM diagram of abnormal behavior.

[0130] Two types of abnormal behaviors are considered in CoFI: 1) Specified abnormalities - abnormalities that can be foreseen in the system under test

[0131] 2) Latent behavior – due to foreseeable input events that occur at unexpected times

[0132] Specified exception behavior is behavior that is different from normal behavior, but is expected in some way. To create a FSM for specified exceptions, use the FSM for normal behavior and add transitions that are caused by input events for specified exception scenarios.

[0133] In the interlocking system, the specified abnormal scenario is related to the danger. This embodiment takes the abnormal situation that occurs when a train applies for a requisitioned path as an example. Figure 6 In Figure 1, part of the abnormal situation that occurs when a train applies for a route is shown. It starts with the input event "Train sends a route requisition request" and consists of several simple events and states. This sequence simply outlines the FSM modeling method for predictable behavior. We can associate dangers based on PCOs and obtain possible abnormal behaviors.

[0134] When the input event "train sends route requisition request" occurs in the initial state (such as Figure 6 As shown), it triggers the output event "Monitor sends requisition request". The next state is "Monitor is requesting a path". In this state, when the input "Requested path or segment conflicts with other requests", it triggers the output event: Controller cancels requisition request. When the input event "Requested path or segment is occupied" occurs, the output event "Controller changes requested segment" is triggered.

[0135] Potential behavior is an unexpected behavior that may occur in the operation of the system. It is triggered by a known input event but is unexpected in the current state. The identification of potential path behaviors requires a comprehensive analysis of all inputs involved in each state of the FSM. This analysis is performed using a state transition table (STT).

[0136] The STT is first constructed using the transitions of the normal behavior and the specified abnormal behavior FSM. Table 7 shows an excerpt of the STT with three input events and three states.

[0137] Table 7

[0138]

[0139] By filling in the empty cells of the table, events that may occur at unexpected times are identified, and potential path transitions are determined. This embodiment draws a FSM diagram of potential behaviors, including the newly identified transitions.

[0140] In the interlocking system, after sending a request to requisition a path, a train may issue the same command again. This potential path transition is considered in three states: the supervisor is requesting a path, the switch is adjusting position, and the signal light is adjusting color. Figure 7 , Figure 8 and Fig. 9 Potential pathway transitions are shown (in bold black).

[0141] The interlocking system analysis identified possible component failures. For example, Req16 and Req17 in Table 5 may involve turnout failures. When a turnout sensor fails, it may send incorrect turnout status information, resulting in failure to meet safety requirements.

[0142] This embodiment constructs Fig.10 The FSM shown in is to satisfy the requirements of Req16 and Req17.

[0143] 5. Verify and supplement the FSM to consider STPA requirements.

[0144] In this step, verify that the FSM takes into account the requirements identified by STPA. If not, supplement the FSM. This step takes into account the requirements (Req1-Req27) derived from the UCA identified by STPA. Verify against the following requirements:

[0145] 1) Control action must be provided; 2) Control action must not be provided; 3) Control action must not be provided too late; 4) Action must not be provided in advance; 5) Control action must not be provided too long; 6) Control action must not be provided too short.

[0146] The type "must provide" requirement consists of a control action followed by the keyword "when...". For example, the control action of Req1 (controller requisitions the path when there is no conflict with the paths requisitioned by other routing controllers) is "controller requisitions the path", and the scenario is that there is no conflict with the paths requisitioned by other routing controllers. In the method of the present invention, the control action corresponds to the output event. For each requirement of the "must provide" type, find the corresponding state when the scenario occurs. For these states, it must be ensured that the output event occurs. If it cannot be ensured that it occurs, a transition to an error state will be added, such as Fig.11 Part (a).

[0147] A requirement of the type "shall not provide" consists of a control action followed by the keyword "when..." and a scenario. We look for the corresponding state when the scenario occurs and ensure that the control action provided never occurs in the transition. If the control action provided occurs in the transition, the next state must be an error state, see Fig.11 Part (b).

[0148] The same reasoning applies to requirements of the type “not provided too late”, “not provided too early”, “not provided for too long”, “not provided for too short a time”, etc. Fig.11 Part (c) Fig.11 As shown in part (f) of the figure. In the requirements of "shall not provide too long" and "shall not provide too short a time", it must be considered that the control action has a duration, such as the duration of the red and green lights, and the FSM transition includes the control action end / start timer. For the interlocking system, the requirements for not providing control actions include "shall not provide too late", "shall not provide too early", "shall not provide too long", "shall not provide too short a time" and other types of requirements.

[0149] S103, generating test cases from the finite state machine model FSM of the rail transit interlocking system using the W method.

[0150] S1031, feature set definition.

[0151] Most methods for generating test cases from FSM use an important set, called the feature set. This set is usually denoted by W and is sometimes called the W-set. The following will explain how to derive the W-set from the description of the FSM. Let M = (X, Y, Q, q1, δ, O) be a minimal complete FSM. Where X is a finite set of input events, also called the input alphabet, Y is a finite set of output events, also called the output alphabet, Q is a finite set of states, q0∈Q is the initial state, δ: Q×X→Q is the next state or state transition function, and O: Q×X→Y is the output function.

[0152] A feature set of M, denoted W, is a set of finite input sequences that distinguish any pair of state behaviors in M. Thus, if q i and q j is a state in Q, then there exists a string s that belongs to W such that O(s,q i )≠O(s,q j ). The following is a simple example to briefly illustrate the construction process of the feature set and the application of the W method. For simplicity and technical protection, this example uses simple letters to represent states and input and output events. For the interlocking system q can be represented as follows Figure 5 Any state in, a / b and 0 / 1 can represent any input event and output event.

[0153] Example 3.1.

[0154] Consider a finite state machine M = (X, Y, Q, q1, δ, O), where X = {a, b}, Y = {0, 1}, Q = {q1, q2, q3, q4, q5}, q1 is the initial state. The state transition function δ and the output function O are as follows Fig.12 As shown. For this finite state machine, the given feature set W is as follows:

[0155] W = {a, aa, aaa, baaa} (the elements represent continuous input sequences, for example, baaa means inputting b, a, a, a in sequence. The feature set W is the set of such continuous input sequences, and a / b is just a code for input events. Mapped to the real interlocking system, if a represents the input "train sends a request for route requisition", and b represents the input "requested path or section is occupied", then baaa means the inputting "train sends a request for route requisition", "requested path or section is occupied", "requested path or section is occupied", and "requested path or section is occupied" in sequence).

[0156] The algorithm for constructing the feature set of a finite state machine M consists of two main steps. The first step is to construct a set of k-equivalent partitions P1, P2, ..., P m , where m>0. In the second step, these k-equivalence partitions are traversed in reverse order to obtain the distinguishing sequence of each pair of states. These two steps will be explained in detail in the following subsections.

[0157] S1032, construct k-equivalence partitions.

[0158] Given a finite state machine M = (X, Y, Q, q1, δ, O), if there is no continuous input event (string) s such that O(s, q i )≠O(s,q j ), then the two states q i∈Q and q j ∈Q is considered to be k-equivalent.

[0159] A k-equivalence set consists of k-equivalent states, i.e., states that cannot be distinguished by any string (input event) of length k or less over the input alphabet. A k-equivalence partition is a finite set of k-equivalence sets such that each state in the FSM belongs to exactly one set. States that belong to different k-equivalence sets are said to be k-distinguishable.

[0160] Given a finite state machine M = (X, Y, Q, q1, δ, O), Q = a k-equivalent partition, denoted by P k , is a set of n finite state sets, represented by ∑ k1 ,∑ k2 , ..., ∑ kn , the following conditions are met:

[0161] For 1≤j≤n,∑ kj The states in are k-equivalent; if q l ∈∑ ki And q m ∈∑ kj For i≠j, then q l and q m Must be k-differentiable.

[0162] Now let's use an example to derive the k-equivalence partition using the FSM of Example 3.1 above.

[0163] Example 3.2.

[0164] First, calculate the FSM( Fig.12 ) of the 1-equivalent partition P1. To this end, the state transition and output function of the FSM are written in a tabular form as shown in Table 8 below.

[0165] Table 8

[0166]

[0167] The next step is to regroup the states so that all states that are the same in the output column belong to the same group. Add a ∑ column to indicate the group name, as shown in Table 9. In this example, the groups are labeled 1 and 2.

[0168] Table 9

[0169]

[0170] The construction of P1 is completed as above. The groups separated by horizontal lines form a 1-equivalent partition, and the resulting 1-equivalent partition is as follows:

[0171] P1={1,2};Group 1=∑ 11 ={q1,q2,q3}; Group 2 =∑ 12 ={q4,q5};

[0172] Build the P1 table in the following manner. First, copy the "Next State" subtable. Next, rename each next state entry by adding a second subscript that indicates the group to which the state belongs. For example, the next state entry in column "a" of the first row is q1. Since q1 belongs to group 1, rename it to q 11 . Obtain the P1 table, as shown in Table 10 below.

[0173] Table 10

[0174]

[0175] Given the P1 table above, construct the P2 table as follows. First, regroup all rows that have the same second subscript in the row entry of the "NextState" column. The subscript refers to the group label. For example, in q 42 , the subscript referred to is 2 instead of 42. As an example of regrouping in the P1 table, the rows corresponding to current states q1 and q2 have next states with the same subscript, so they are grouped together. This regrouping results in additional groups, and we relabel these groups and update the subscripts associated with the next state entries, resulting in the following P2 table, as shown in Table 11 below.

[0176] Table 11

[0177]

[0178] Note that there are three groups in the P2 table. The entries in the P2 table are regrouped using the scheme described earlier for generating the P2 table. This regrouping and relabeling gives the following P3 table, as shown in Table 12 below.

[0179] Table 12

[0180]

[0181] Further regrouping and relabeling of the P3 table gives the following P4 table, as shown in Table 13 below.

[0182] Table 13

[0183]

[0184] When no further partitioning is possible using the scheme described above, the construction of k-equivalent partitions of M is completed.

[0185] Each group in the P4 table consists of exactly one state. This means that all states in M are distinguishable.

[0186] S1033, generate the feature set.

[0187] As the k-equivalent partition, i.e., the Pk table, has been constructed as above, the set W is now derived from M. In the following process, G(q i , x) represents the label of the group to which the FSM moves when using the input x in state q i . For example, in the P3 table, G(q2, b) = 4 and G(q5, a) = 1.

[0188] The W process for deriving W from a set of partition tables is as follows:

[0189] 1. Let M = (X, Y, Q, q1, δ, O) be an FSM, where P is the set of k-equivalent partition tables,, initialize

[0190] 2. For each pair of states (q i , q j ), i ≠ j, in M, repeat steps 2(a) to 2(d).

[0191] 2(a). Find an r, 1 ≤ r < n, such that for P r , the pair of states (q i , q j ) belongs to the same group but not to P r+1 . If such an r is found, go to step 2(b), otherwise find an η ∈ X such that O(q i , η) ≠ O(q j , η), let W = W ∪ {η}, and continue with the next available pair of states.

[0192] 2(b). Initialize z = ε. Let p1 = q i and p2 = q j be the current pair of states. For m = r, r - 1, r - 2,..., 1, perform steps (i) to (iii).

[0193] (i) Find an input symbol η in P m such that G(p1, η) ≠ G(p2, η). (ii) Set z = z.η. (iii) Set p1 = δ(p1, η) and p2 = δ(p2, η).

[0194] 2(c). Find an η ∈ X such that O(p1, η) ≠ O(p2, η). Set z = z.η.

[0195] 2(d). For the pair of states (q i , qj ), distinguish the sequence from the sequence z. Set W = W ∪ {z}.

[0196] The next example applies the W procedure to obtain the W set of the FSM (Example 3.1).

[0197] Example 3.3:

[0198] The following describes how to find the distinguishing input sequence of (q1, q2) in M. Initially start with the pair (q1, q2).

[0199] According to step 2(a) of the W process, we first determine r. From Example 3.2, we can see that the last P table in which q1 and q2 appear in the same group is P3. Therefore, r=3.

[0200] Next, go to step 2(b) and set z = ε, p1 = q1, p2 = q2. From P3, find that G(p1,b) ≠ G(p2,b), and update z to z = zb. Therefore, b is the first symbol in the input string that distinguishes q1 from q2. According to step 2(b)(iii), reset p1 = δ(p1,b) and p2 = δ(p2,b). We get p1 = q4 and p2 = q5.

[0201] Go back to step 2(b)(i) and find from table P2 that G(p1,a)≠G(p2,a). Update z to za=ba, and reset p1 and p2 to p1=δ(p1,a) and p2=δ(p2,a). Now we have p1=q3 and p2=q2. Therefore, a is the second symbol in the string that distinguishes states q1 from q2.

[0202] Return to step 2(b)(i) again. Looking at the P1 table, we find that the state G(p1,a)≠G(p2,a) and G(p1,b)≠G(p2,b). We choose a as the third symbol of the string that will distinguish states q3 from q2. According to steps 2(b)(ii) and 2(b)(iii), we update z, p1, and p2 to obtain z=za=baa, p1=δ(p1,a), and p2=δ(p2,a). This update results in p1=q5 and p2=q1.

[0203] Finally, in step 2(c), we look at the original state transition table of the FSM. States q1 and q5 in the table are distinguished by the symbol a. This is the last symbol in the string that distinguishes states q1 and q2. Next, we set z = za = baaa. The string baaa can now be the input sequence that distinguishes states q1 and q2. We add this sequence to W. As can be seen from Example 3.1, baaa is indeed the distinguishing sequence for states q1 and q2.

[0204] The complete set of distinguishing sequences for FSM M is shown in the following table. The two leftmost columns are labeled S i and S j contains the state pairs that need to be distinguished. The column labeled x contains the distinguishing sequence of the state pairs to its left. The two rightmost columns in Table 14 show the application of input x to state S i and S j For example, we have seen before that O(q1,baaa)=1101. Therefore, in the table, only 1 is shown in the corresponding output column.

[0205] Table 14

[0206] <![CDATA[S i ]]> <![CDATA[S j ]]> x <![CDATA[O(S i ,x)]]> <![CDATA[O(S j ,x)]]> 1 2 baaa 1 0 1 3 aa 0 1 1 4 a 0 1 1 5 a 0 1 2 3 aa 0 1 2 4 a 0 1 2 5 a 0 1 3 4 a 0 1 3 5 a 0 1 4 5 aaa 1 0

[0207] S1034, W method.

[0208] The W method is used to construct a test set from a given finite state machine (FSM) M.

[0209] The implementation modeled by M is also called the implementation under test (IUT), which is the actual object of testing.

[0210] The W method needs to meet the following assumptions to work effectively:

[0211] M is fully specified, minimal, connected, and deterministic. M starts from a fixed initial state. M can be reset exactly to the initial state, generating empty outputs during the reset operation. M and the IUT have the same input alphabet. Given a FSM M = (X, Y, Q, q0, δ, O), the W method consists of the following steps:

[0212] Step A estimates the maximum number of states in a correct design. Step B builds the feature set W for a given machine M. Step C builds the test tree for M and determines the transition cover set P. Step D builds the set Z. Step EP·Z is the desired test set.

[0213] S1035, calculation of transition covering set.

[0214] The so-called transition cover set, denoted as P, is defined as follows. Let q i and q j (i≠j) are two states in M. P contains sequences sx such that δ(q0,s)=qi and δ(qi,x)=q. The empty sequence ε is also in P. We can construct P using the "test tree" of M. The test tree of the FSM is constructed as follows.

[0215] The initial state q0 is the root of the test tree. Assume that the test tree has been constructed to the kth level. The (k+1)th level is constructed as follows.

[0216] Select a node n at level k. If n appears in any level from level 1 to level k, then n is a leaf node and is not expanded further. If n is not a leaf node, expand it by adding a branch from node n to a new node m for x∈X, where δ(n,x)=m. Repeat this step for all nodes at level k.

[0217] The following is an example of building a test tree, which contains the state transitions and output functions shown in Fig.12 middle.

[0218] Example 3.5:

[0219] Initialization of the test tree sets the initial state q1 as the root node. Next, note that δ(q1,a)=q1 and δ(q1,b)=q4. Therefore, two nodes are created at the next level and labeled q1 and q4. The branches from q1 to q1 and q4 are labeled a and b, respectively. Expand the tree starting at level 2. At level 2, first consider the node labeled q1. However, another node labeled q1 already appears at level 1, so this node becomes a leaf node. Next, check the node labeled q4. Note that δ(q4,a)=q3 and δ(q4,b)=q4. Therefore, two new nodes are created at level 3 and labeled q4 and q3, and the corresponding branches are labeled b and a. Expanding down one level at a time in a similar manner yields Fig.13 The test tree for the FSM shown in . Once the test tree is constructed, the transition cover set P is obtained by concatenating the labels of all partial paths in the tree.

[0220] Traversing all paths in the tree in the graph, we obtain the following transition cover set.

[0221] P={ε,a,b,bb,ba,bab,baa,baab,baaa,baaab,baaaa}.

[0222] As its name transition cover indicates, the FSM reaches every state each time it starts from the initial state after using all elements in P. Therefore, using elements of P applied to the FSM ensures that all states are reached and all transitions have been traversed at least once.

[0223] S1036, structure of Z.

[0224] Assume that the estimated number of IUT states is m, the number of states in the designed system under test is n, and m ≥ n. Based on this information, Z can be calculated as follows:

[0225] Z=(X 0 ·W)∪(X·W)∪(X 2 W)∪…∪(X m-1-n·W)∪(X m-n ·W)

[0226] Among them, X 0 ={ε},X 1 =X,X 2 =X·X, and so on, where the symbol “·” represents a string concatenation operation.

[0227] It is easy to see that when m = n, Z = X·W. For convenience, we will use the abbreviation X[p] to represent the following set union: {ε}∪X 1 ∪X 2 …∪X p-1 ∪X p Now, Z can be rewritten as Z=X[mn]·W.

[0228] After constructing P and Z, we can easily get a test set T as P·Z.

[0229] Example 3.6:

[0230] Assume that the number of states in the IUT (system under test) is the same as the number of states in the given system shown in Example 3.1:

[0231] Z=X 0 W = {a, aa, aaa, baaa}

[0232] Concatenating P with Z, we get the desired test set.

[0233] T=P·Z={ε,a,b,bb,ba,bab,baa,baab,baaa,baaab,baaaa}·{a,aa,aaa,baaa}

[0234] Assuming that the IUT has an extra state, namely m=6, we can get Z and the test set P·Z as follows.

[0235] Z=X 0 W∪X 1 ·W={a,aa,aaa,baaa,aa,aaa,aaaa,abaaa,ba,baa,baaa,bbaaa}

[0236] T=P·Z={ε,a,b,bb,ba,bab,baa,baab,baaa,baaab,baaaa}·{a,aa,aaa,baaa,aa,aaa,aaaa,abaaa,ba,baa,baaa,bbaaa}

[0237] S1037, Application of W method.

[0238] To test a given IUT M i To determine whether it meets its specification M, perform the following steps for each test input.

[0239] Find the expected response M(t) for a given test t. This can be done by looking at the STPA specification. Enter t at the initial state and obtain the IUT's response M to t i (t). If M(t)=M i (t), then no defect has been detected in the IUT so far. If M(t)≠M i (t) then there may be a defect in the IUT under test.

[0240] Example 3.7.1.

[0241] The W method is applied to the state machine shown in Test Example 3.1 as follows. Consider two possible implementations to be tested. Fig.14 As shown in part (a), it is called M. The two faulty designs are called M1 and M2, corresponding to the two IUTs to be tested, as shown in Fig.14 Part (b) and Fig.14 As shown in part (c).

[0242] Note that M1 has a transmission error in state q2, which should be δ1(q2,a) = q1 instead of δ1(q2,a) = q3. M2 also has an operation error in state q5, which should output 1 instead of 0 when input b is given.

[0243] For the test of M1 on M, we apply the test case t from the set P·Z derived from Example 3.6 and compare M(t) with M1(t). We first choose t = ba. After tracing the output, we obtain M(t) = 11 and M1(t) = 11. Therefore, the behavior of IUT M1 is correct when the input sequence is ba. Next, we choose t = baaaaaa as the test input, and we obtain M(t) = 1101000 and M1(t) = 1101001. Therefore, the input sequence baaaaaa shows a transmission error in M1.

[0244] Next, test whether M2 complies with specification M. Select the input sequence t=baaba for this test, which results in M(t)=11011 and M2(t)=11001. Since the two conversions are different, the input sequence baaba shows an operational error. Therefore, the two input sequences baaba and baaaaaa in P·Z show errors in the two IUTs under test.

[0245] Note that for the sake of brevity, only two test inputs are used. However, in practice, the test inputs need to be applied to the IUT in some order until the IUT fails or the IUT executes successfully on all tests.

[0246] It can be seen that the W method can detect various faults in FSM. At the same time, using CoFI to generate finite state machines and using the W method to generate test cases based on FSM, this method has great prospects in the field of rail transit interlocking.

[0247] S104, using test cases to test whether the behavior of the rail transit interlocking system meets the design requirements when facing different fault conditions.

[0248] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A rail transit interlocking system fault injection test method, characterized in that: include: Use the STPA method to analyze the rail transit interlocking system and identify potential failure scenarios and influencing factors; Use the CoFI method to inject fault scenarios into the control flow graph of the rail transit interlocking system, observe the response of the rail transit interlocking system, and generate a finite state machine model FSM; The W method is used to generate test cases from the finite state machine model FSM of the rail transit interlocking system; Use test cases to test whether the rail transit interlocking system's behavior meets the design requirements when facing different fault conditions; The STPA method is used to analyze the rail transit interlocking system and identify potential failure scenarios and influencing factors, including: Define the rail transit interlocking system and its services, components and boundaries; identify the corresponding accidents, hazards and the accidents that may result, as well as system-level safety constraints and related hazards; the services provided by the rail transit interlocking system include arranging the routes requested by trains; the routes requested by a train are composed of multiple sections and turnouts, and signals are used to indicate whether the train should enter the current section or path; Using the rail transit interlocking system structural model and hazard information, a control structure is constructed to impose constraints on the behavior of the rail transit interlocking system; wherein the control structure includes system components, feedback and control action processes, system inputs, and system outputs; Identify unsafe control behaviors of rail transit interlocking systems and the hazards caused by unsafe control behaviors; Determine safety requirements for controllers in the control structure based on unsafe control behaviors; The CoFI method is used to inject fault scenarios into the control flow graph of the rail transit interlocking system, observe the response of the rail transit interlocking system, and generate a finite state machine model FSM, which includes: Identify observation points PCOs, input events, output events and test structures of rail transit interlocking systems; Establish rules for the finite state machine graph; first determine the default state of the rail transit interlocking system, then iteratively identify transitions and states based on events occurring at the PCOs; establish rules based on the identified transitions and states; Based on the rules of the finite state machine diagram, construct the FSM of the normal behavior of train application route; Using the FSM diagram of the normal behavior of the train applying for a route, add transitions caused by input events of the specified abnormal scenario and construct the FSM diagram of the specified abnormal behavior; construct the state transition table STT using the transitions of the FSM of the normal behavior and the FSM of the specified abnormal behavior; fill in the empty cells in the transition table STT, identify events that will occur at unexpected times, determine potential path transitions, and draw the FSM of the potential behavior, including the newly identified transitions; add fault tolerance mechanisms in the FSM modeling process; Verify that the FSM takes into account the requirements identified by STPA, and if not, supplement the FSM.

2. The rail transit interlocking system fault injection test method according to claim 1, characterized in that: The system components include controllers, sensors, actuators and controlled processes; the interlocking controller issues control actions to each corresponding path controller component; the sensors capture path status, train information, signal light information, turnout status information and section information; the system model includes six variables: train position, section status, path status, turnout status and signal light status.

3. The rail transit interlocking system fault injection test method according to claim 1, characterized in that: In the step of identifying observation points PCOs, input events, output events and test structure of the rail transit interlocking system, the test structure consists of the system under test SUT, i.e. the rail transit interlocking system, and the test system, and the SUT and the test system communicate through PCOs; input events cause the SUT to generate output events; the control point is where the input event triggers / enters the SUT, and the observation point is where the test system observes the output event; the control structure provides information for PCOs, input and output events, and the control structure receives / sends control, feedback and information flow through PCOs.

4. The rail transit interlocking system fault injection test method according to claim 1, characterized in that: The FSM steps for constructing the normal behavior of train application routes include: Confirm the initial state of the FSM; the initial state of the FSM is that all paths and sections are idle, the signal lights are red, the switches are locked, there are no control actions being processed or feedback being transmitted; and no trains have entered the entire rail transit interlocking system; Describe the sequence of transitions and indicate the rules that apply; the FSM shows the time sequence of events that occur in the rail transit interlocking system flowing through the PCOs, as follows: (a) The train automatic monitor receives the train position information and sends a route requisition request, which is represented by the input event "train sends route requisition request", and executes the action "monitor sends requisition request"; the next state is "monitor is requesting a path", in this state, the path controller detects the path information, if the path requested by this train conflicts with other paths, then the input event "request path or section has conflict", triggers the action "controller cancels requisition request", and returns to the initial state; if there is no conflicting path or section, then the request is passed, the input event "request path passed", triggers the action "controller adjusts the switch position", the next state is "switch is adjusting position"; in this state, the switch sensor receives the switch status information, if the switch fails and cannot be adjusted to the correct position, then the input event "faulty switch cannot be adjusted to the correct position, controller emergency processing", triggers the action "controller emergency processing"; if all the switches are in the normal position and locked, then the input event "switch has reached the correct position and locked" triggers the action "controller adjusts the signal light color", the next state is "signal light adjusts color"; (b) If the signal light is correctly indicated at this time, the input event "the signal light has been correctly indicated" triggers the action "the train can enter the path", and the next state is "the train is passing through the path"; in this state, the path sensor senses the train position, the input event "the path sensor senses the train position information" triggers the action "the sensor sends the position information", and the next state is "the sensor is sending the position information"; (c) When the train leaves the section, the controller needs to cancel the section, return the switch to its original position, and turn the signal light red. The input event "the train completely leaves the section" triggers the action "the controller cancels the section" and the next state is "the train is passing the path". (d) After all switches are returned to their positions and the signal light turns red, the controller releases the path or section authority.

5. The rail transit interlocking system fault injection test method according to claim 1, characterized in that: The W method is used to generate test cases from the finite state machine model FSM of the rail transit interlocking system, including: Let the finite state machine FSM of the rail transit interlocking system be M, and the feature set derived from the description of M be W; Construct a k-equivalence partition of M; Generate a distinguishing sequence for all state pairs in M ​​to obtain the W feature set; Based on the W feature set, use the W method to construct a test set for M.

6. The rail transit interlocking system fault injection test method according to claim 5, characterized in that: Based on the W feature set, the W method is used to construct a test set for M, including: Estimate the maximum number of states of M; Construct a test tree for M and determine the transition cover set P of the transformations; Construct set Z based on transition cover set P; Let P·Z be the test set including the test cases.