Abstract
1. Introduction
A fault detection and identification system (FDIS) [1] is an important field of technology for autonomous systems, especially in large and complex systems with many pieces of sub-systems. A superior FDIS detects system faults quickly and accurately, helping the whole autonomous system make timely and adequate responses, and reducing the risk of fatal system failure to a minimum level. When an abnormal behaviour occurs, the FDIS should indicate the existence of a fault and identify the type of the fault, then pass that information onto a corresponding module for analysis. Considerable methodological advances have been made in this area, such as model-based methods [2–10]. It is noted that most model-based fault detection techniques are based on observers or state estimating filters, but the presence of modelling errors often results in inaccurate state estimates causing false alarms. Knowledge-intensity expert systems techniques [11–17] are applied to this field, however, the lack of flexibility and ability to adapt to changing environments limit the applicability of this method. Recently, fuzzy set theory and neural network methods [18–20] are explored for FDIS, which grant the system a certain degree of intelligence, dealing with varying environments through online-updating. Note that, however, this method demands the construction of an optimal set of fuzzy rules or extremely reliable neural networks, which is usually difficult, if not impossible.
In this paper, a new approach to building FDIS is explored, which is primarily motivated by the negative selection, mutation and stimulation mechanisms of the immune system [21–24]. The developed FDIS removes all the aforementioned deficiencies. The proposed method is able to continuously optimize its recognition capabilities along with the dynamic environment. Meanwhile, because of its distributed nature, it can provide effective detection and identification without heavy computations.
2. Fundamentals of the immune system
2.1. Overview
The protection system that eliminates foreign substances that invade a living body is called the immune system [25].
The human immune system works on two levels with the general goal of pathogen control: a general response mechanism, called innate immunity that does not directly respond to any specific pathogen and a specific, antibody-mediated response mechanism called acquired immunity.
2.2. B-cell
The B lymphocyte, also known as the B-cell, is an important component in the immune system. On the surface of each lymphatic cell are receptors that enable them to recognize foreign substances (antigens). These receptors are very specialized; each can match only one specific antigen. Each type of B-cell has a distinct molecular structure and secretes certain types of Y-shaped antibodies from its surface. The antibody can attach itself to the antigen that it recognizes, leading to its eventual demise. The region on an antibody that is used to recognize and grab the antigen is called

B-cell, antibody and antigen
2.3. Mutation and Archival Memory
Mutation and archival memory are two characteristics that make the immune system an adaptive and self-learning system. If the immune system is exposed to some unknown antigen, the immune system will activate a small number of best-matching B-cells. These B-cells can have little affinity to the antigen. A mutation mechanism is subsequently put into effect which improves the affinity of B-cells to fight against this specific antigen. Meanwhile, these higher affinity B-cells are selected to enter a pool of memory cells, where they are archived for later use. This is illustrated in Figure 2. Such a strategy ensures both the speed and accuracy of the immune system.

Mutation and archival memory
2.4. Negative Selection
The natural immune system is capable of distinguishing virtually any foreign cell from the body's own cells. This is known as self-nonself discrimination [26]. Lymphatic cells have receptors on their surfaces that can detect foreign proteins, known as antigens. However, these receptors are made by random genetic combinations, making it possible to generate some self-reactive receptors. Such self-reactive cells are detected in the thymus. (See Figure 3). Only those cells that fail to bind to self-proteins are allowed to leave the thymus, entering thisstage actively.

Negative selection
3. Immune System-inspired Fault Detection and Identification
3.1. Proposed FDIS Structure and Learning Mechanism
The Fault Detection and Identification System (FDIS) receives and preprocesses sensor data. It then passes the resulting feature vectors to a set of individual detectors which detect and distinguish certain faults. Furthermore, a central processing unit is also placed to monitor and adjust the individual detectors in the case of failure. The proposed FDIS has a distributed structure in the sense that each detector adapts its parameters and performs its identification function without any central coordination. The distributed structure enhances the response speed because of its inherent parallelism. Moreover, the whole system is adaptive to the faults and is motivated by the immune system.
The proposed FDIS algorithm works in two stages (see Figure 4, 5). The first stage is a supervised training phase designed to represent the normal operation of the system by a collection of detectors. In this stage, a simplified version of an immunology-inspired FDIS, called an NFDIS, is used to identify the so-called self-state. This is the set of states to which the feature vector belongs if the system is operating normally. In this stage, a certain amount of feature vectors, which only represent the normal state, are sent into the system for training, every time a vector drops out of any existing detectors, a new detector is stimulated, whereas if the vector drops into any existing detector, the mutation procedure is activated, which will be introduced in the following sections. Finally, the collection of all the detectors which are generated by these training vectors represent the normal state (self-state) as a whole.
The second stage is an almost unsupervised training phase designed to represent faults. The only supervision available is the classification output provided by NFDIS which has already been learnt. In this stage, no information is available about the classes to which faults (feature vectors not in the self-set identified by NFDIS) belong. In the training phase, known fault feature vectors, which cover all types of faults, are sent into the system. The fault classification and identification process is similar to defining the normal state, the only differences are that: 1) natural death

Stage I of the FDIS algorithm

Stage II of the FDIS algorithm
3.2. Immunology-Inspired Supervised One-Class Identification
New Detector Generation
The fault detectors are generated in the complementary region of the self-state
If a new feature vector does not fall within any existing detector, a new detector which is centred at that point can be created with a pre-specified radius. In the proposed FDIS algorithm, detectors are allowed to overlap with each other. This characteristic insures the coverage of fault points and helps the identification of fault types. The overlapping distance is defined as

System response with incoming error
If
If
If,
This new detector can be tagged as a specific class if that information is available, for instance, from an existing supervisor. Moreover, if the new detector overlaps with existing detectors which are tagged identically (they are all of the same type), that detector is tagged similarly.
In the first stage, where all feature vectors are assumed to represent a normal state, the tagging problem is trivial. However, this approach may lead to the creation of too many detectors. A more sophisticated approach is obtained by introducing a memorization and stimulation process. In this process, the vector is reproduced within a radius around itself according to a probability distribution which is one at the centre and decays to zero at the rim. Once any of the progeny faults is detected by a detector, that detector is mutated.
Note that because of this mechanism, the FDIS is able to identify and remember unknown types of faults that are not in the training data. This is because in real-time operation, if a new type of fault occurs, new detectors will be activated and hence tagged as a new type.
Mutation
This process plays an important role in improving the fault recognition capability of the detectors, as well as improving the efficiency of the FDIS by possibly reducing the number of needed detectors.
A mutation process occurs whenever a feature vector is collected by any of the detectors. Such a process is to optimize the affinity between detectors and their corresponding faults. The new centre of the mutated detector denoted by
where
where
Note that because of mutation, the proposed FDIS is able to improve its accuracy constantly during its real-time operation, in addition to during the training phase.
Natural Death
In order to reduce the number of detectors, and to eliminate unnecessary ones, a natural death mechanism is introduced. An attractive approach is to program the mass of a detector to decay slowly with time and eliminate detectors which are too light. For instance:
where
Flow Chart
See Figure 7 for flow chart of the process.

The process of fault detection and identification
4. Simulation Verification
4.1. Example of a Banana-Shaped Self-state
In this section, the FDIS is applied to a nonlinearly separable class, which is considered to be the normal state. Here, normal states are assumed to lie within the contour of the so-called banana function:
where
Figure 8 shows the FDIS that detects normal states belonging to the above set. The blue dots are the training data generated randomly with

Detectors for a banana-shaped 2D class
Fdis performance
It can be seen that with the initial training data, the detection correctness is only 58%. However, once the training data increased to 808, the detection correctness improved to near 94%.
4.2. Unsupervised Multiple Fault Identification
In the previous section the FDIS is demonstrated to classify a single class, which is assumed to be the normal state, while in this section, the FDIS is applied to multiple nonlinearly separable classes, which are considered to be different types of faults, without supervision.
Figure 9 shows the classification result of the FDIS. Its recognition accuracy with different amounts of training data is summarized in Table 2.
Next, the FDIS is applied to overlapping bananas. There are three banana-shaped classes in the field with two classes overlapping. Figure 10 illustrates these classes. The recognition accuracy is presented in Table 3. The points that belong in the overlapping region are classified as both types.
Fdis performance (multiple bananas)

Detectors for multiple banana-shaped 2D classes

Detectors for overlapping banana-shaped 2D classes
Fdis performance (overlapped bananas)
4.3. Discussion of Detector Overlapping
In this section different values are assigned to
Table 4 gives the statistical results regarding their accuracy and efficiency. We define:
False positive: data is not a fault, but is recognized as a fault.
False negative: data is a fault, but is not recognized as a fault.
The percentages of faults are normalized by the number of faults in the test data. As

Enlarged view of detectors with
5. Application to a Rotary-wing Aerial Vehicle's Fault Detection and Identification System
In this section, the proposed FDIS is applied to a rotary-wing aerial vehicle as shown in Figure 12. This vehicle is equipped with two sensors, which measure the vehicle's pitch angle and acceleration correspondingly. If the vehicle is operating in normal conditions, the maximum pitch angle this vehicle could reach is 50 degrees and the maximum horizontal acceleration then at 7m/s2. The vehicle's acceleration increases as the pitch angle increases nonlinearly because of free stream resistance.

A rotary-wing aerial vehicle
Generally, there are three types of faults during the flight:
Insufficient thrust: pitch angle is very big, but acceleration is small.
Stalling: both pitch angle and acceleration are very big, out of boundary.
Strong wind: pitch angle is small, but an unexpected large acceleration is detected.
The computer-based simulation results using the proposed FDIS are shown in Figure 13. The area bounded by blue lines and the y axis represents the normal state (flying in normal conditions). The blue dots are system faults and the detectors marked by three different colours detect and identify these faults.

Rotary-wing aerial vehicle fault detection and identification
The red detectors identify type I faults, the green detectors identify type II faults and the purple detectors identify type III faults. Note that
It is can be seen that the proposed FDIS works satisfactory when it is applied to the rotary-wing aerial vehicle. The accuracies for type I and type II faults are a little bit lower because there are overlaps between type I and type II faults.
Comparison with different
FDIS performance with the real vehicle
6. Conclusion
In this paper algorithms for fault detection and identification inspired by the immune system were developed. It is shown that the derived fault detection and identification algorithms perform well in learning the self-state in a supervised fashion, even when the shape of the boundary of that set was nonlinearly separable. Allowing a certain degree of overlap between any two detectors helps to largely increase fault detection and identification abilities. Overlapping is needed to ensure that there are no gaps in the detector cover of the desired region in the featured space.
As the overlapping distance
