## 4 Construction Principle of Immune System Model of Safe Production in Chemical Enterprise
### Evaluation Principle of Immune Model in Safe Production  
Calculation of immune indexes' contributions  
Principal component analysis (PCA) mainly studies the multiple factors concentration and main information extraction, aiming to reveal most of the information from original indexes by a few key immune indexes. The calculation steps are as follows:  
In the first step, according to the existing four immune objects and \(n\) evaluation indexes, the evaluation results of each immune index were normalized. \[{S_{k}}^{2}=\frac{1}{n-1}\sum\
olimits_{k=1}^{n}\left(X_{ik}-\overline{X_{k}} \right)^{2} \tag{1}\]  
where \(i\) = 1, 2, 3, 4; \(k\) = 1,2,3, \(\ldots\), \(n\); \(X_{ik}\) is value of certain index; \(\overline{X_{k}}\), \({S_{k}}^{2}\) are mean value and standard deviation of evaluation indexes, respectively. The second step is to construct the immune index matrix \(X\):  
\[X=\left(X_{ik}\right)_{4\times n}= \begin{bmatrix}X_{11}&\ldots&X_{1n}\\ \vdots&\ddots&\vdots\\ X_{41}&\ldots&X_{4n}\end{bmatrix}  \tag{2}\]The third step is the orthogonalization of immune index matrix. Here, \(L_{ik}{}^{T}\) is a set of unit vectors (\(L_{ik}{}^{T}=[L_{i1}\), \(L_{i2}\),..., \(L_{in}]^{T}\) and \(\sum_{k=1}^{n}L_{ik}{}^{2}=1\)), through which new comprehensive variables \(R_{i}\) (\(i\) = 1, 2... 8) are constructed:  
\[\left\{ \begin{array}{l}R_{1}=L_{11}X_{1}+L_{12}X_{2}+\ldots L_{1n}X_{n}\\ R_{2}=L_{21}X_{1}+L_{22}X_{2}+\ldots L_{2n}X_{n}\\ \vdots\ \ \vdots\ \ \vdots\\ R_{4}=L_{41}X_{1}+L_{42}X_{2}+\ldots L_{4n}X_{n}\end{array} \right. \tag{3}\]  
where \(R_{1}\), \(R_{2}\)... \(R_{4}\) represent the immune index after normalization. The fourth step is to calculate the eigenvalue \(\lambda\) and the eigenvector \(\alpha\) of vector group \(R_{i}\), and the eigenvalue \(\lambda_{i}\) is the variance of the principal component \(R\). The principal component \(\lambda_{i}>1\) is usually selected for analysis. Fifth, the principal component index is determined according to the correlation coefficient \(\beta_{i}=\sqrt{\lambda_{i}}\alpha_{ik}\) between the principal immune index \(R\) and variable \(X_{i}\). In order to ensure that \(R\) has most of the original information, the cumulative contribution \(\theta_{i}\geq 90\%\). \[\theta_{i}=\sum_{k=1}^{n}\beta_{i}{}^{2}=\sum_{k=1}^{n}\lambda_{k}\alpha_{k}{} ^{2} \tag{4}\]  
where \(\beta_{i}\) is the immune index load, \(\alpha_{ik}\) is the \(i\)th value in the \(k\)th eigenvector, and \(\theta_{i}\) is the contribution of the \(i\)th immune index to the immune system. Layer analysis and evaluation of immune indexes  
In order to achieve safe production immune maturity evaluation, a coordinate system is established according to the contribution of immune factors (B) and antigenic factors (G), and the energy level diagram of accident-inducing immune factors is thus drawn in Figure 3. The center of the circle is the core of the immune system, and the outside of the circle is the external environment. According to the contribution of the immune factor to the immune system (the combined antigen-antibody score value), it is divided into five levels: initial level I [0.0, 0.2], defined level II [0.2, 0.4], repetition level III [0.4, 0.6], continuation level IV [0.6, 0.8], and optimization level V [0.8, 1.0]. For the immunity factor (B), the closest internal level V has the highest energy level, indicating the better safety status of the chemical company. The outermost energy level I is the lowest, which is also the highest hazard level. The further away the accident immune factor is from the control target (center of the circle), the lower the degree of control of the antigen by that antibody, i.e., the lower the energy level. For the antigenic factor (G), which induces harm, the energy level diagram is interpreted in the opposite way.