## 4 Expert Diagnostic System Design Based on Infrared Images  
### Design of the Expert System  
As presented in Figure 15, areas of the segments are not absolutely representative of the engine's technical state, as their changes are quite slow as the engine heats up or cools down and the internal thermal energy is transferred to its casing, which has its own heating and cooling dynamics. The main task of the expert system is to evaluate the areas of the segments and their changes, and to then present to the operator some information about the technical state of the engine. To fulfill this task, the designed expert system needs as an input the total area of the segments and some indication of how they evolve over time. Temporal changes in the areas of the segments can be predicted by the computation of derivations/differences between two segmented images in a set time interval \(\Delta t\). The standard derivative equation can be used for this purpose for the \(i\)-th neuron and the total area of the i-th segment \(S_{i}\):  
\[dS_{i}(t)=\frac{S_{i}(t+\Delta t)-S_{i}(t)}{\Delta t} \tag{6}\]  
From a diagnostic point of view, it makes sense to investigate only the three hottest states (levels \(S_{1}\)-\(S_{3}\)) and their derivations \(S_{1,d}\)-\(S_{3,d}\), as they represent the most critical temperatures for the engine. The time derivation of the surface areas of the segments allows the magnitude of the change in the area of different temperature regions to be determined and early structural failures to be detected. The knowledge base of the proposed expert diagnostic system consists of a set of rules that describe normal and atypical engine operation based on the outputs of the Kohonen SOFM. Each rule \(R_{i}\) (\(i=1,2,...,8\) \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & & \multicolumn{6}{c}{**Actual Class**} \\ \cline{3-7}  & & \(\mathbf{N_{1}}\) & \(\mathbf{N_{2}}\) & \(\mathbf{N_{3}}\) & \(\mathbf{N_{4}}\) & \(\mathbf{N_{5}}\) \\ \hline \multirow{4}{*}{**Predicted Class**} & \(\mathbf{N_{1}}\) & 286 & 5 & 2 & 0 & 0 \\  & \(\mathbf{N_{2}}\) & 10 & 284 & 15 & 1 & 0 \\  & \(\mathbf{N_{3}}\) & 4 & 10 & 272 & 4 & 6 \\  & \(\mathbf{N_{4}}\) & 0 & 1 & 10 & 275 & 34 \\  & \(\mathbf{N_{5}}\) & 0 & 0 & 1 & 20 & 260 \\ \hline \multirow{2}{*}{**Accuracy**} & \(95.3\%\) & \(94.6\%\) & \(90.6\%\) & \(91.6\%\) & \(86\%\) \\ \hline \multirow{2}{*}{**Total Accuracy**} & \multicolumn{6}{c}{\(91.8\%\) (\(1377/1500\))} \\ \cline{2-7}  & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The confusion matrix of the trained Kohonen self-organizing feature map (SOFM). Figure 18: Division of the infrared image for the insertion of the artificial anomaly. is designed according to precisely defined intervals of the allowed amount of pixels (area sizes) of individual color levels and intervals of allowed values of their derivations, based on results for the normal state and atypical states of the object. The outputs of the rules \(R_{i}\) take Boolean logical values \(R_{i}\)\(\in\)\(\in\)\(\in\)\(\in\)\(\in\)\(\in\)\(\in\)\(0\); \(1\). The rules \(R_{i}\) in Table 3 are defined as follows:  
IF \(S_{i}\) is the area size \(<\)from;to\(>\) AND \(S_{i\_d}\) is the derivative \(<\)from;to\(>\)\(>\)\(R_{i}\), where \(S_{i}\) (\(i=1,2,3\)) (7)  
The rules \(R_{i}\) are partial conclusions about the technical state of the investigated engine. In order to obtain some knowledge about the engine's technical state, the hypotheses which are to be connected with these rules have to be defined. In order to keep the rule base simple at first, diagnostic signals (hypotheses) for a turbojet engine are proposed in Table 4.  
These diagnostic signals (\(D_{i}\); \(i=0,1,2,...,5\)) are activated by combinations of the proposed rules. The rules to obtain the diagnostic signals are defined in Table 5.  
The rules, hypotheses, and inputs can be formalized in the form of an oriented graph. The inference network is defined in Section 2.3.