Structural health monitoring of a rotor using continuous learning artificial immune systems algorithms

The work proposes a methodology for the development of structural integrity monitoring based on intelligent computation techniques, with the purpose of detecting structural faults in a rotor using the technique of artificial negative and clonal selection immune systems. The method makes it possible to compose the diagnostic system able to learn continuously, covering two situations of damage, without the need to restart the learning process. The negative selection algorithm is responsible for the pattern recognition process and the clonal selection algorithm is responsible for the continuous learning process. To evaluate the methodology, an experimental bench was set up that produces a signal which, from which captured and treated, can be identified, classified and even defined the prognosis of the test behavior. The results demonstrate robustness and precision of the proposed methodology.


Introduction
Manufacturing systems are currently considered the main generators of wealth, which are referentially based on the growth of an economy. The term intelligent manufacturing (IM) is the result of changes in science and technology, the needs of global manufacturing, and the relationship of the environment. Thus, in a way, revolutions can be classified as: the age of manual skills; the age of machines and rigid automation; the information age and flexible automation; and the age of knowledge and intelligent automation (ZHOU; WANG; LOU, 2010).
Maintenance prevention is applied to production systems in order to keep machines running, reducing operating failures (Werbinska-Wojciechowska, 2019) and the monitoring of the condition of a machine is done by integrated systems and analysis of high adjustable signals, identifying the characteristics of changes (WANG; GAO, 2006).
Structural Health Monitoring (SHM) of detecting early state failures, intervening in propagation, and preventing structural stalling or damage (HALL, 1999). SHM is a process that, in its current phase, seeks to move from controlled laboratory testing to practical applications, providing an estimate of the remaining life of the damaged system or equipment.
The SHM is based on factors such as predictive models, experimental and operational conditions, among others.
Monitoring systems are divided into separate steps, which include detecting and locating damage to the structure, identifying the type of damage, assessing the extent of damage, and identifying the remaining life of the structure. The SHM increases safety and reduces maintenance costs. SHM systems are designed to reliably monitor and test the integrity and performance of structures (FARRAR; LIEVEN; BEMENT, 2005).
The technique for monitoring a structure depends on the constructive configuration, the experimentation environment and the type of structure, which can be based on several nondestructive techniques called NDE. These include magnetic particle inspection, Eddy currents, strain analysis, fiber optic techniques, acoustic emissions, comparative vacuum, xrays, penetrating liquids, wave propagation (Lamb waves), vibration and electromechanical impedance (GONSALEZ et al., 2012). Development, v. 9, n. 7, e96973546, 2020 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v9i7.3546 4 The present research presents a methodology for the development of SHM based on intelligent computing techniques, aiming to detect and locate structural faults in a rotor, using the technique of artificial immune systems, such as negative selection and clonal selection algorithm.
Negative Selection (NSA) and Clonal Selection (CLONALG) Algorithms are justified due to the pattern recognition and continuing learning characteristics, and to perform well in other pattern recognition and diagnostic problems  and (OLIVEIRA; CHAVARETTE; LOPES, 2019).
The negative selections and clonal selection algorithms showed good results and to perform well in other pattern recognition and diagnostic problems.

The negative selection algorithm
The NSA presents characteristics which make it different from other intrusion approaches, such as: enables to adjust the detection rate, defining the number of detectors generated, each detector can detect abnormalities independently; the detection is local; the detector defined in each location can be unique and the auto adjustment and set of detectors are mutually protectors (JUNGWON et al., 2007).
The NSA is carried out in two phases: censoring and monitoring as described by TIMMIS, 2003) and (LIMA et al., 2013).
In the censoring phase of the NSA, the self detectors are defined, which represent the normal condition of the organism, known as self chains, aiming to generate a set of detector patterns which can identify the nonself pattern in the monitoring phase of the NSA. Once the data are read, random chains are chosen and the affinity is evaluated between them and the set of self chains, based on comparisons between them. If the affinity is higher than a threshold that is defined previously, such chain is rejected. Otherwise, this chain is accepted into the detector set and used in the classification process during the data monitoring. The detectors can detect any nonself element, a modification or error present in the data that are intended to be monitored (BRADLEY;TYRREL, 2002).
In the monitoring phase, the data are monitored with the purpose of identifying changes in the behavior of the dataset and classifying such changes using the detector set created during the censoring phase. The protected chains are compared to the detector set and the affinity is Development, v. 9, n. 7, e96973546, 2020 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v9i7.3546 5 evaluated. If the affinity between the chains is higher than a previously defined threshold, the nonself element is identified and classified TIMMIS, 2003).
The censoring phase of the negative selection algorithm are illustrated in Figures 1 defined by TIMMIS, 2003) and (LIMA et al., 2013). In the censoring phase, the proper chains that will be used in the monitoring phase are  In the monitoring phase, the detectors are identified on their self and their nonself. Development, v. 9, n. 7, e96973546, 2020 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v9i7.3546 6 The chains in the NSA can be classified in two types: antigens (Ag) and lymphocytes (Ab). Ag is the signal to be analyzed or unknown by the NSA, and can be represented by equation 1. The detectors, or lymphocytes (Ab), can be expressed according to equation 2, defined by TIMMIS, 2003) and (BRADLEY;TYRREL, 2002).
Where: L is the dimension of the space of the lymphocytes (Ab) and the antigens (Ag).
It is important to highlight that the censoring and monitoring phases of the NSA are carried out offline and online, respectively (DE CASTRO; TIMMIS, 2003).

1 Matching criterion and match ratio
To evaluate and verify the affinity between the chains (self and nonself), as well as to check whether they are similar, a criterion known as match criterion is used. The match can be perfect or partial. The match is considered perfect when two chains analyzed are the same. In this work, the concept of partial match was used, and only a certain number of positions between the patterns must present similar values to confirm a match. This number is defined as affinity rate (BRADLEY; TYRREL, 2002).
The affinity rate (TAf) represents the necessary degree of similarity for a match between two chains under analysis to occur. The affinity rate is defined by equation 3: Where: TAf : affinity rate; An : number of normal strings in problem (own strings); At : total number of strings in the problem (own and non-own chains).
In the model proposed by (Lima et al., 2013) there is a deviation linked to the plus and minus tolerant detector pattern, which can be combined with the standards. This deviation Research, Society and Development, v. 9, n. 7, e96973546, 2020 (CC BY 4 When T Af is greater than or equal to TAf occurs the marriage, and are considered similar, that is, it is classified as a normal condition of the structure, as it presents characteristics of the set of its own detectors. If T Af is smaller than TAf the detector does not recognize the pattern, therefore there is no match between the signals, therefore, as a structural damage.

Clonal Selection (clonalg)
In the CLONALG two characteristics principle are considered: (1) maturation and (2) selection proportional to the affinity. There are two versions of such algorithm in the literature: the first one for problems involving pattern recognition, and the second one for optimization problems TIMMIS, 2002).
The CLONALG algorithm can be described according to the steps presented below (DE CASTRO; TIMMIS, 2002): Step I: Initialization: randomly generate a population (Ab=AbM+ AbR) with n lymphocytes for each antigen (Agi). N is given by M+R; Step II: Affinity evaluation: each antigen (Agi) is presented to the lymphocytes of the population (Ab) in the process of affinity evaluation. An affinity vector f is determined; Step III: Selection: the n lymphocytes with the highest values of affinity f in relation to (Agi) are selected to compose the subpopulation (Abn); Step IV: Cloning: the n lymphocytes selected (cloning) proliferate proportionally to the affinities of the antigen (Agi), generating a population C of clones. The higher the affinity f is, the higher the number of selected lymphocytes n is; Step V: Hypermutation: afterwards, the population C of clones is subjected to a process of affinity maturation, generating a new population C*, where each lymphocyte undergoes mutation at a rate that is inversely proportional to the affinity f; Step VI: Affinity evaluation: determine the affinity f* between the mutated set C* of clones and the antigen (Agi); Step VII: Re-selection: from the mature population C*, re-select the n best maturated lymphocytes composing the subpopulation (Abn). From this subpopulation, the best lymphocytes are selected to compose the memory set (AbM). The lymphocyte composes the memory set when it presents high affinity rates, and may replace a memory lymphocyte; Step VIII: Metadynamics: replace d antibodies of (AbR) for (Abd) new individuals, thus inducing diversity in the repertoire. The antibodies with the lowest affinities are selected to be replaced; Step IX: Repeat steps II through VIII until a stopping criterion is met.
At the end of the iterative process, the memory set (AbM) presents M lymphocytes with high affinity rates in relation to the antigen (Agi). This memory set is used by the NSA for detecting and classifying the antigen that was learned in the process of CLONALG.
The number Nc of clones generated in Step IV for each lymphocyte i is given by Research, Society and Development, v. 9, n. 7, e96973546, 2020 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v9i7.3546 fmax : maximum affinity value; Therefore, each clone undergoes a mutation process given by equation 9: Where: m : number of mutations; round : operator which rounds the value to its closest integer; α : mutation rate; N : random gaussian variable whose mean is equal to zero and standard deviation equal to one.

Material and methods
This research is experimental carried out with laboratory tests with qualitative character.
The first concept of dynamic rotors was introduced by Jeffcott, H.H. in 1919, which consists of a solid shaft-mounted disc located equidistant between two bearing housings, which allows one to understand the behavior of the forces that unbalance this dynamic system (LEE, 1993). Basically, the movement of the rotor demonstrates two phenomena, the first being lateral displacement and the second the gyroscopic effect, both acting directly on the rotor axis (KRAMER, 1993) and (MUSZYNSKA, 2005).
The experimental model of the dynamic rotor, used in this experiment, is composed of: 1 electric motor for system activation; a frequency inverter that controls the shaft speed of the WEG CFW10 brand electric motor; two bearings P205 MITSU, two bearings GBR6205 ZZC3. The movement of the mainshaft is done by coupling two pulleys connected by a belt, and the speed of the shafts is changed through the frequency inverter. Consider that the mainshaft is supported on two bearings with a fixed equidistant disk between them. Figure 3 shows the experiment and its couplings between the axes.   The signal acquisition system consists of 1 MPU6050 3-axis accelerometer and one UNO arduino board. The way to collect the signal is made considering that the accelerometer is superimposed on one of the bearings and, with the electric motor running, given a certain frequency, the vibration signal is collected. Afterwards, the accelerometer is superimposed on the second bearing and the signal collection method is repeated, considering the same settings Research, Society and Development, v. 9, n. 7, e96973546, 2020 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v9i7.3546 as the first bearing. The dimensional technical specifications of the experiment are: shaft with mass of 0.5 kg; shaft stiffness of ; spindle length 128.0 mm; shaft diameter of 6.0 mm. Figure 6 shows the detail of the shaft supported on the bearings and the mass fixing disc. seconds. The assembly for collecting the signals in points 1 and 2, for the characterization of the system, were in the first phase between two new bearings; and in the second phase a new bearing and a bearing already used.
Using the experimental configuration, the database was developed considering the acquisition of the signals varying the frequencies every 2Hz, starting at 4Hz and ending at 60Hz. The signal every 2Hz, is composed of 400 displacement samples. The overall result of this step was a database with an array of 46x400 signals without failures.
Using the experimental configuration, the mass was introduced into the mass disk, causing the shaft to be unbalanced. The frequencies used in this condition were from 4Hz to 14Hz, every 2Hz, with 10 signals picked up for each frequency. The limit up to 14Hz was specified maximum, due to the limitations of the experiment conditions. The assembled database resulted in an array of 60x400 faulty signals.
The mass was introduced into the mass disk, located at 60° from the position, causing another type of shaft imbalance. The frequencies used in this condition were from Research, Society and Development, v. 9, n. 7, e96973546, 2020 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v9i7.3546 13 4Hz to 14Hz, every 2Hz, with 10 signals picked up for each frequency, the same frequencies used in the pickup with the mass . In this case the limit up to 14Hz was also specified maximum due to the limitations of the experiment conditions. The assembled database resulted in an array of 60x400 faulty signals.
Note that, in general, two databases of the standard configuration were set up, where the first database is formed by a 46x400 matrix of good and faultless signals. In the second database, a matrix of 120x400 of signals with axis imbalance data of and was formed.
The SHM system was composed of six main modules: data acquisition system, censoring module of the SHM, novelty detection module, continuous learning module, monitoring module of the NSA, and knowledge update module.  Source: Adapted from ).
Data acquisition system: data were obtained through an experimental apparatus that produces a vibration signal which, from which captured and treated.
The data were used in the following modules: censoring of the NSA, novelty detection, continuous learning, monitoring of the NSA, and knowledge update.
Censoring module of the NSA: the diagnosis system was carried out in two stages, online and offline. In the offline process, the initial learning of the system was carried out (training), which is called censoring module. In this process, the self detectors were defined, composing the detector set of the NSA. This set of self detectors is regarded as the knowledge of the intelligent system for decision-making during the online process. The set of own detectors were constituted of the matrix of 46x400 (good signals without fail), and the matrix of 120x400 (signals with axis imbalance), these matrices were treated using the theory of digital analysis of signals, being 60 signals related to the damage 1 and 60 signs referring to damage 2 thus forming a 120x400 matrix. In this context, the set of self detectors was generated by randomly choosing between normal signals and signals with non repeating damages in the dataset. The data were compared pointwise with the self detectors. If a match occurred, the random vector was rejected, because self characteristics were identified. Otherwise, it was accepted and then stored as a self detector into the self detectors set.
Once the self detectors set was obtained, it was used in the stages of the diagnosis system, such as: novelty detection, continuous learning module, monitoring module of the NSA and knowledge update module. After carrying out the process offline, the monitoring process was carried out online.
Novelty detection module: in the process of online monitoring of the system, the antigen set was obtained. This set was composed of the signals from the dataset. Afterwards, a signal was randomly chosen for analysis. This signal was then subjected to the novelty detection module. In the novelty detection stage, a comparison between the signal under analysis and the detector set of the NSA was performed. If a match occurred, such a signal was considered as already known by the system, that is, it was not a novelty. Otherwise, it was considered as a novelty, that is, unknown by the system.
When the system identified a novelty, the continuous learning stage was activated with the purpose of learning about the new antigen (signal under analysis), which is characterized as the continuous learning process by the CLONALG algorithm. When the signal was known by the system, it was analyzed by the monitoring module of the NSA, which is described below. Development, v. 9, n. 7, e96973546, 2020 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v9i7.3546 15 Continuous learning module: the CLONALG algorithm aimed to generate a memory set (knowledge) from the unknown signal (antigen). Firstly, a population of lymphocytes was randomly generated. To quantify the affinity between the lymphocytes of the population (Ab) and the antigen, equation 3 was used. Afterwards, the N best lymphocytes with the highest affinity values in relation to the antigen were selected for the cloning and hypermutation processes. The number of clones was calculated by equation 6 and the number of mutations was determined by equations 7 and 9. The purpose of mutation was to perform slight modifications in the structure of the lymphocytes, thus increasing the affinity in relation to the antigen.
In this methodology, as the signals analyzed were expressed as vectors with positive and negative real numbers, it was necessary to use an inductive technique (WYLIE; SHANKHNOVICH, 2012). Therefore, the mutation process used equation 10 or equation 11, at a position of the signal (lymphocyte) that was randomly chosen. (10) After carrying out the maturation of the lymphocytes, the N best maturated clones were re-selected to be incorporated into the population again. The selected lymphocytes replaced the worst ones of the population. Afterwards, the best lymphocytes of the population were set aside for the memory set. The process was repeated until a stopping criterion was met. In this research, the stopping criterion was determined by the number of iterations.
After completing the learning process, a memory set (knowledge) in relation to the unknown antigen was obtained. This knowledge set was incorporated into the detector set of the NSA, thus providing knowledge to the system, so that for future analyses that involve the same antigen the system is able to recognize and classify the damage. Such process was defined as continuous learning.
Knowledge update module: after carrying out the continuous learning process and obtaining the memory set, the detector set of the NSA was updated.
Monitoring module of the NSA: when, in the novelty detection stage, a novelty was not identified, that is, the antigen was already known by the NSA and the signal under analysis was compared to the detector set of the NSA and both affinity and match were evaluated, it was possible to detect the signal containing damage and then classify it according to the two different damage situations. Afterwards, the monitoring process of the NSA was then completed.
For the immune system algorithm to work well, considering continuous learning, some parameters of the NSA and CLONALG were used. After empirical tests, the parameters which presented the best performance for the system are listed in table 1. Source: Elaborated by the author. Table 1 represents the best parameters that were used in the CLONALG.
The system was subjected to a testing and parameter settings phase, that is, a crossvalidation test, in which the system was executed 30 times to ensure accuracy in the results.

Results and Discussions
The proposed methodology was evaluated by assessing the efficiency, accuracy and robustness in the process of SHM using the conventional algorithm (without continuous learning) and the algorithm with continuous learning.
With the purpose of assessing the performance of the modules of novelty detection, continuous learning and knowledge update in the algorithm proposed in this work, the censoring phase in both systems (without and with continuous learning) was carried out excluding a pattern, damage 2 was chosen and so the algorithm started the online monitoring process without prior knowledge of the patterns, damage 2 was chosen and so the algorithm started the online monitoring process without prior knowledge of the patterns.
After applying the NSA to the test set of the two damage situations, the results presented in Table 2 were obtained. Based on table 2, the NSA could not identify the pattern that was excluded from the censoring process, that is, without a previous knowledge of the damage.
Thus, the SHM was unable to identify damage 2, where there was no hit. It was observed that the SHM analysis system performed on a rotor presented good 100.00% hit rate, and that the detector quantities directly influence the damage recognition. Given the results from Table 3, it is possible to observe that the system with continuous learning was able to learn the unknown damage and, based on this, could diagnose the damage in the next analysis.
It was also noted that the knowledge update module contributed to the NSA. This is because SHM updates the NSA detector set in the online monitoring process, providing enhanced and improved knowledge.
Another test was performed excluding two patterns, and damages 1 and 2 were chosen and thus the algorithm started the online monitoring process without previous knowledge of the patterns. By applying the NSA to the test set, the results presented in Table 4 were obtained.  Table 4 shows that the NSA failed to identify the patterns excluded from the censoring process, and without prior knowledge of the damage. Thus, the SHM was unable to identify damage 1 and 2, where there were no hits. It was observed that the structural integrity analysis system performed on a rotor presented good 100.00% hit rate, and that the detector quantities directly influence the damage recognition. Table 5 presents the results obtained by SHM with continued learning in the same condition as Table 4. Comparing tables 4 and 5, it was observed that the conventional NSA did not recognize the patterns excluded from the censoring process, presenting 0% accuracy. Subsequently, the continuous learning system was used and the patterns were identified, with a 100.00% hit rate for the three distinct damage situations.

Final considerations
In this work it was possible to demonstrate that the algorithm developed to monitor structural integrity is able to detect and locate damage by analyzing vibration signals. Of damage detection was possible considering the fact that the concept of artificial negative selection and clonal selection immune systems was used.
It was possible to prove in the NSA through the tests performed that the greater the knowledge obtained in the censoring module, the greater the efficiency in the recognition and classification process of the NSA in the monitoring module. Still, considering the tests performed, it was possible to demonstrate that the CLONALG has the ability to continue learning, because it learns the unknown damage, improving the results in a next analysis, and the cross-reference test, provides reliability and speed. Development, v. 9, n. 7, e96973546, 2020 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v9i7.3546 20 The knowledge update module has contributed to continued learning, so the hit rate has increased and this is due to the fact that in the system the NSA detector pool is updated in the online monitoring process, providing improvement and robustness in knowledge.
It is observed that the NSA and CLONALG proposed in this work, based on intelligent computation techniques were efficient, reliable, robust and accurate in performing structural integrity monitoring. In this respect, the application of this algorithm can be done on industrial machines in general, contributing to cost reduction and productivity increase.
As a future suggestion, another intelligent technique can be implemented and compared to continued learning.