Genetic Algorithm Based Fault Diagnosis and Repair Strategy in Computer Hardware System
Published Online: Mar 19, 2025
Received: Nov 01, 2024
Accepted: Jan 31, 2025
DOI: https://doi.org/10.2478/amns-2025-0438
Keywords
© 2025 Tao Wang et al., published by Sciendo
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
In today’s information society, the rapid development of computer technology has made computer hardware an indispensable part of people’s daily life. However, just like any other mechanical equipment, computer hardware can also fail [1–4]. When computer hardware failure occurs, we need to carry out accurate fault diagnosis, and take corresponding repair measures. Fault diagnosis is a key technology, which plays an important role in various fields [5–8]. However, traditional fault diagnosis methods are often limited by the limitations of expert knowledge and cannot deal with complex fault situations. In recent years, genetic algorithms, as an emerging optimization method, have been gradually introduced into the field of fault diagnosis and have made significant research progress [9–12].
Genetic algorithm is a mathematical model that simulates the laws of biological evolution in nature, simulates the process of “gene” inheritance, mutation, and selection in the process of biological evolution, and solves a series of problems by expressing “gene” sequences as a set of numerical values, and gradually generating better “gene” sequences through random evolution and natural selection [13–16]. In the field of fault diagnosis, the fault diagnosis system based on genetic algorithm monitors the working state of the equipment, uses the data collected by the sensor as the diagnostic object, constructs the fault diagnosis model, and optimizes it through genetic algorithm to find the optimal solution so as to realize the fault diagnosis [17–20].
The study firstly proposes a method for computer hardware system fault feature extraction, i.e., using wavelet packet transform for model computer hardware system fault feature extraction. Then the genetic algorithm model and its algorithm implementation are discussed and utilized to improve the BP neural network operation efficiency and achieve the improvement of the function of the whole fault diagnosis system. Specifically, for the problem that the BP neural network is easy to fall into local minima in some regions, the initial of the weights and thresholds of the BP network are optimized with the help of the genetic algorithm. Finally, a model for diagnosing faults in computer hardware systems has been designed. In order to verify the feasibility and scientificity of the model proposed in this paper in computer hardware system fault diagnosis, the article concludes with simulation experiments and parametric experiments using the GA-BP neural network fault diagnosis model proposed in this paper.
According to the wavelet transform theory, it is known that the wavelet transform has poor frequency resolution in the high frequency band. The emergence of wavelet packets overcomes this shortcoming of the wavelet transform, and it is a signal processing method that can provide a more refined analysis of the signal. Wavelet packets are capable of further decomposing the high-frequency portion that is not subdivided by the multiresolution analysis, which allows for improved frequency resolution in the high-frequency band. Theoretically, for non-stationary signals such as computer hardware system failure signals, it would be more advantageous to use wavelet packets to analyze them.
The three-layer wavelet packet decomposition is shown in Figure 1. The wavelet packet technique clarifies the connection between multiresolution approximation and wavelets. In analog computer hardware system troubleshooting, the faulty signal is analyzed using wavelet packets in a process that can be viewed as filtering the signal using a set of high-pass and low-pass filters [21].

Three-layer wavelet packet decomposition
The wavelet packet decomposition process is illustrated by performing a three-layer wavelet packet decomposition of the signal, S0 denotes the original sample signal, which is decomposed by one layer of wavelet packet decomposition to obtain the low-frequency component L1 and the high-frequency component L2. Then by further decomposition of the low-frequency components and high-frequency components, the low-frequency components and high-frequency components on the next scale function can be obtained, and so on, the low-frequency components and high-frequency components can be obtained after the decomposition of the wavelet packet with N layers. Let the orthogonal wavelet function be
Where:
From the above equation it is clear that when
Where the wavelet packet coefficients recursive formula is:
The reconstruction formula for wavelet packets is:
Function family {
According to the wavelet packet theory, the use of wavelet packet analysis of the signal should first choose the appropriate wavelet filter, set the depth of wavelet packet decomposition for n, n layers of wavelet packet decomposition of the signal, the extraction of wavelet packet coefficients of the nth layer of each band, and finally reconstruct the wavelet packet coefficients. The signal’s wavelet packet analysis process is depicted in Figure 2.

Flowchart of wavelet packet decomposition
When the wavelet packet decomposition of the signal, the energy of the signal is preserved in the form of wavelet packet coefficients. When the computer hardware system fails, the energy of the output signal will change accordingly, using wavelet packet decomposition of the signal, the change of the signal energy is manifested in the wavelet coefficients of the wavelet packet of each frequency band wavelet coefficients change. Wavelet packet energy changes in the frequency bands can reflect the band coefficients have changed. Therefore, the wavelet packet energy in the frequency bands contains a large amount of feature information. When the simulation of computer hardware system failure, wavelet packet of a certain frequency band or several frequency band energy value will change, these changes indicate that the computer hardware system may be some components have failed [22]. The use of wavelet packet decomposition for simulated computer hardware system fault feature extraction does not require knowledge of the model structure of the simulated computer hardware system, as can be seen from the analysis. The fault state of the circuit can be characterized in terms of the energy change of each frequency band of the wavelet packet.
From the above, it can be seen that wavelet packets for fault feature extraction can be used to characterize the changes in the failure modes of the analog computer hardware system in terms of the changes in the energy of each frequency band. Wavelet packet for fault feature extraction can be divided into the following steps: Apply the excitation voltage to the analog computer hardware system, select the acquisition node, and acquire the signal Select the mother wavelet function and set the number of wavelet packet decomposition layers to Use wavelet packet to decompose the signal in Reconstruct the decomposition coefficients of each frequency band of the Calculate the total energy Construct the eigenvector, taking the energy of each frequency band of layer Normalization. Normalization of the eigenvectors obtained in step (5) can avoid the calculation error caused by the fact that each eigenvalue is not of an order of magnitude due to an eigenvalue being too large. Let the total signal energy be Where:
Genetic Algorithm Modeling Discussion. First set up a hypothetical environment for the model, i.e., genetic modeling in a particular environment. Suppose there is an existing gene
After evolution, a new population is created. Based on the above hypothetical environment, the
The environment used in the above evolutionary model is a specific environment, and in order to reflect the variable complexity of the environment, the pre-evolutionary relationship of the population to the environment can be described as
Ditto for population evolution in relation to the corresponding environment under the combined effect of fitness
In practice, genetic algorithms obtain evolved new populations by discrete computation. For the sample space
With the help of probabilistic view one can optimize the genetic model as:
The model’s description of fitness, i.e., the degree to which a population
In the above model, the relationship between the environment and the fitness of the population is represented. To show that the environment is not a single fixed environment,
After
Adaptation is not the only measure when
Thus the entire process is a summation of each adaptive adjustment of the population:
The overall fitness of the population is:
In summary, after the detailed analysis of the population’s single adaptation to the changing adjustment of the environment and the overall adaptation adjustment throughout the evolutionary stage, the model about the evolutionary adaptation of the population is:
The explanation of the parameters and notation in Eq. will not be repeated, as they are all described earlier.
Coding scheme
Biological inheritance relies on gene realization. And the genetic algorithm, as a bionic technology, cannot directly recognize individual characteristic information by itself. This is similar to the computer not directlyrecognizing Chinese characters, English letters, and so on. We need to convert all the information into binary code for computer recognition through the conversion mechanism. Similarly, in order for the genetic algorithm to recognize the samples to be input, the coding scheme needs to be developed beforehand. The coding scheme is formulated based on a detailed analysis of the actual problem to simplify operations and improve efficiency.
Population size
In the genetic algorithm, it is necessary to choose the appropriate population size for the actual problem. Usually, there is a certain misunderstanding of the population size, that is, a larger population size is conducive to achieving full training of the network and obtaining better genetic optimization results. In fact, large-scale population participation in network training will lead to a greater cost of the system, resulting in a decline in efficiency. However, if we are conservative and choose a smaller population size, from the actual effect of the algorithm sample selection, the population performance will be very homogeneous, and may not be able to complete the optimal convergence for network training. In general, the population size needs to be targeted to make a choice, will not repeat here, you can refer to the population size selection related research.
Initial population
After selecting the appropriate population size, it is necessary to determine the initial population. Similar to the input samples of BP neural network, as well as the input of the genetic algorithm, two aspects need to be noted when making the selection. Therefore, it is necessary to ensure its rich characteristics. And the distribution of individuals in the population can exactly make up for its lack of homogeneous traits, even if the population is dispersed throughout the search space. Experiments have shown that the search cost of the genetic algorithm will increase a lot if that distribution situation is satisfied. Therefore, the practice of utilizing time for space is not suitable for operation. In this paper, we utilize the golden section method to find the initial population, so that the initial population is more convenient for the execution of the algorithm.
Degree of adaptation
According to the bionic principle, fitness is used to measure the ability of an individual in an algorithm to adapt. In the biological world, the organisms that are able to better fit into the environment in which they live have survived. Similarly, in genetic algorithms, the same is true for individuals in a population. In the process of biological evolution, history has shown that all evolution follows the rule that organisms evolve towards an environment to which they are better adapted. By analogy to genetic algorithms, a population that simulates biological evolution will also converge towards an objective function based on the actual laws of biological evolution. Let the fitness function be
Then the relationship between the two is:
Crossover operator
The crossover operator is what enables the genetic algorithm to continuously produce new individuals. The initial population just acts as an ancestor and according to the algorithm, the evolution continues and the new individuals generated according to the crossover operator will keep on joining the new population and participating in the calculation. In organisms, reproduction of the next generation is based on the corresponding genetic laws such as genetic inheritance. Therefore, individuals that combine with each other according to the agreed rules exchange genes with each other to realize inheritance and produce two new individuals. The new individuals continue to participate in the population computation, and in this way, the population is continuously updated until it converges to an optimal solution.
The specific steps for implementing this crossover operator to simulate biological reproduction of offspring are as follows:
Let, the number of individuals to be crossed be
Let {
Let individuals
Two paired individuals exchange only some of their genes, and below find the new gene at the point of exchange:
Two new individuals are obtained after gene replacement:
Mutation operator
In the biological world, mutations in the genes of organisms due to sudden changes in the environment around the organisms. Mutations are caused to individual organisms. Analogous to biological mutation, individual mutation in genetic algorithms is also similar. The mutation operator acts on the genes of an individual, causing a change in the characteristics of the individual and resulting in a new individual. Similar to the crossover operator above, when individuals exchange genes with each other, they only exchange part of each other’s genes. In this case, the mutation operator also triggers only a partial mutation.
The steps in which individual mutation occurs are as follows.
Let, the number of individuals to be mutated be
Let {
Let
Note that
We found that BP networks can be applied in the fault diagnosis of computer hardware systems. The advantages of the BP algorithm’s simplicity and plasticity are also reflected in the fault diagnosis model of the BP network, but the diagnosis results of the BP neural network alone are not perfect, and often tend to fall into local minima. To summarize its cause, we finally placed the landing point on the backward transmission of the network. BP algorithm is based on the gradient method, and the gradient descent method itself is very susceptible to the influence of the local minima ah, often make the results fall into the local minima, which is the crux of the problem of the BP network in fault diagnosis is not ideal. The biggest advantage of the genetic algorithm is that it only needs a fitness function without other auxiliary information, and it is not subject to the limitations of function differentiability and function continuity, so that it will not fall into the local optimum, and can accurately achieve the global optimum. At the same time, the search of genetic algorithms always spreads over the entire solution space, so it is easier to obtain the global optimal solution. In conclusion, the emergence of genetic algorithms has given a new perspective to the training of neural networks.
In this paper, genetic algorithm is used to optimize the initial weights and thresholds of BP network with this method. The training process of neural network weights can be viewed as a function optimization problem, and the basic way to adjust it is to repeat adjustments and gradually seek the optimal solution. The overall distribution of the neural network weights contains all the knowledge of the neural network, and the traditional method is often used to determine a change in the rules, once the rules are determined and will not be changed, the distribution of the weights of the entire network is also determined. Gradient descent is a common method that has been widely used in BP networks. The initial weights play a crucial role for the whole BP network, if the initial weights are not set well, coupled with the original training process, some of the parameters are selected by experience, then the poor settings will cause the network is difficult to converge, or convergence is slow or even fall into the local optimum, which will affect the weight distribution of the whole network. Using genetic algorithms to optimize the connection weights of BP networks can effectively solve the above problems, and the evolutionary process can be expressed as follows: Encode the weights and randomly generate a set of distributions which correspond to a set of connection weights of the neural network. Input the training samples, calculate the value of the error function, and combine it with the fitness function to screen the advantages and disadvantages of the connection weights, and select the individuals among them with greater fitness. Use crossover, mutation and other operations to evolve the current population and, as a result, generate a new population for the next generation. Repeat steps 2)-3) to evolve the weights initially determined by the BP network until the training target is satisfied.
Since a 3-layer BP network is chosen in this paper, the following settings are made first:

GA-BP algorithm flow chart
Initialize the population
According to the fitness function, each individual is ranked by its outcome and then selected according to the following probability:
Where,
Fuzzy dynamic regulation
Place the new individuals into the population and compute the fitness function of the new individuals.
Calculate the error sum of squares of the BP network and continue if the error allowance is satisfied, otherwise go to lesser step 3).
Take the optimized initial value of the genetic algorithm as the initial weights of the BP network and input the samples to start the training, and stop when the accuracy load is required.
After the above steps, the optimization of BP network by GA is basically completed.
In this section, the data of a computer hardware system is utilized for experiments, and F1~F9 are used as the codes for different fault types of the computer hardware system, and the different fault types of the computer hardware system are compared with the codes as shown in Table 1. As the computer hardware system has different values of action currents in different fault modes, the extracted fault eigenvalues are also different.
Different fault types are compared to the code
| Code | Type |
|---|---|
| F1 | Energized insertion |
| F2 | Battery exhaustion |
| F3 | Virus attack |
| F4 | Insurance burn |
| F5 | CMOS error |
| F6 | BIOS error |
| F7 | Fan damage |
| F8 | Chip burn |
| F9 | Pin oxidation |
In this paper, db3 wavelet basis is used to reconstruct the signal components of the original computer hardware system fault sample data after three-layer wavelet packet decomposition and single subband reconstruction to obtain the third layer of eight wavelet packet coefficients. As the overall action curve of the A, B and C phase currents of the computer hardware system is more consistent, the following wavelet packet decomposition process is described in detail, mainly taking the normal action current data as an example. The wavelet packet reconstruction diagram of A-phase current in normal state is shown in Fig. 4. In the figure, S3,0 represents the single subband reconstruction signal of wavelet packet decomposition node 1, S3,1 represents the single subband reconstruction signal of decomposition node 2, S3,2, S3,3…S3,7, and so on.

A phase a phase current wavelet packet reconstruction in normal state
The wavelet packet energy spectrum of the computer hardware system in normal state and different failure modes is shown in Fig. 5, and the specific energy values are shown in Table 2. Observed as a whole, the wavelet packet energy values of all states in band 1 are very high, the phenomenon is due to the computer hardware system in the early stage of the 1DQJ suction up, 1DQJF also suction up, 2DQJ turn the pole when the action current curve rises abruptly to form a spike caused by the wavelet packet in the local current change is obvious, that is, there is an inrush signal of the place of the sensitivity of the stronger. The next band 2 energy value size are roughly ranked in the second place, is due to the action curve back behind the process of convergence to a stable value of the change compared to other stages of the process is a little larger, and the last band 3-7 energy value are relatively small, is due to the conversion stage of the computer hardware system current has been converted to a stable state.

A small wave packet energy spectrum of a phase current in different states
Small wave packet signal energy values in different states
| Type | E3, 0 | E3, 1 | E3, 2 | E3, 3 | E3, 4 | E3, 5 | E3, 6 | E3, 7 | |
|---|---|---|---|---|---|---|---|---|---|
| F1 | A phase | 20.89497 | 1.90092 | 0.53784 | 0.57775 | 0.631 | 0.06302 | 0.63374 | 0.56613 |
| B phase | 20.29716 | 1.83883 | 0.49647 | 0.92937 | 0.38465 | 0.53339 | 0.00735 | 0.19315 | |
| C phase | 20.36814 | 2.03094 | 0.6404 | 1.20884 | 0.285 | 0.38776 | 0.8191 | 0.76402 | |
| F2 | A phase | 21.74152 | 2.49463 | 0.55227 | 0.7002 | 0.06078 | 0.21492 | 0.06117 | 0.41162 |
| B phase | 22.05262 | 2.80149 | 0.54056 | 0.82839 | 0.09295 | 0.01334 | 0.51159 | 0.09916 | |
| C phase | 21.35739 | 2.22552 | 0.3658 | 0.54142 | 0.30538 | 0.00799 | 0.29674 | 0.36698 | |
| F3 | A phase | 52.9085 | 2.64749 | 0.64554 | 1.45001 | 0.59247 | 0.35469 | 0.63881 | 0.40664 |
| B phase | 51.44517 | 2.24069 | 1.12016 | 1.18453 | 0.1002 | 0.32647 | 0.69766 | 0.73913 | |
| C phase | 51.50044 | 2.11677 | 0.60058 | 0.86984 | 0.05935 | 0.44582 | 0.83782 | 0.26125 | |
| F4 | A phase | 23.78691 | 2.01025 | 0.35526 | 0.99227 | 0.04609 | 0.08815 | 0.61194 | 0.47845 |
| B phase | 20.89412 | 2.09448 | 0.32138 | 0.79022 | 1.00049 | 0.66932 | 0.75864 | 0.92088 | |
| C phase | 19.18094 | 1.81479 | 0.18836 | 0.25097 | 0.06462 | 0.09428 | 0.26034 | 0.42114 | |
| F5 | A phase | 25.44712 | 1.36955 | 1.07982 | 1.09213 | 0.68519 | 0.03638 | 0.16046 | 0.4368 |
| B phase | 21.22982 | 1.59993 | 1.05251 | 1.27646 | 0.10855 | 0.6158 | 0.21551 | 0.24565 | |
| C phase | 24.47241 | 1.81635 | 0.55027 | 1.07477 | 0.13796 | 0.09511 | 0.51013 | 0.34002 | |
| F6 | A phase | 22.14241 | 0.71841 | 0.41587 | 1.17691 | 0.45951 | 0.18965 | 0.30486 | 0.49869 |
| B phase | 22.16743 | 0.59275 | 1.51896 | 1.55474 | 0.36249 | 0.33495 | 0.07684 | 0.63297 | |
| C phase | 21.64248 | 1.05406 | 1.49921 | 1.28476 | 0.71865 | 0.48852 | 0.51629 | 0.34018 | |
| F7 | A phase | 11.47209 | 2.85734 | 0.91163 | 1.42704 | 1.08527 | 0.57577 | 0.26386 | 0.32958 |
| B phase | 11.55484 | 2.4755 | 0.38902 | 1.56322 | 0.4103 | 0.14025 | 0.90733 | 0.6437 | |
| C phase | 11.70625 | 2.37743 | 0.51093 | 1.14821 | 0.38942 | 0.09546 | 0.90041 | 0.41444 | |
| F8 | A phase | 21.94349 | 2.91297 | 0.50958 | 0.37141 | 0.11686 | 0.23509 | 0.11704 | 0.02484 |
| B phase | 21.44111 | 2.54994 | 0.30436 | 0.37427 | 0.3814 | 0.61512 | 0.49593 | 0.84916 | |
| C phase | 20.85718 | 1.98473 | 0.6785 | 1.60634 | 0.45874 | 0.69275 | 0.14515 | 0.81491 | |
| F9 | A phase | 15.61011 | 1.96101 | 0.2859 | 0.50719 | 0.28264 | 0.09245 | 0.13466 | 0.31414 |
| B phase | 11.74552 | 1.69799 | 0.76886 | 0.63888 | 0.55513 | 0.61363 | 0.66487 | 0.7758 | |
| C phase | 15.57689 | 1.04778 | 0.47912 | 0.69852 | 0.40221 | 0.15222 | 0.26568 | 0.13442 | |
Specifically to each different state of the computer hardware system, the distribution of its wavelet packet energy value has a certain difference, for the larger difference between the fault characteristics, can be directly screened out from it, for example, F3 (virus attack), the energy value of its band 1 is as high as 50, compared to other faults have a significant difference. For other fault features with smaller differences, it is necessary to identify them with the help of other fault diagnosis methods. The energy values of wavelet packet signals in different states are shown in Table 2.
In order to verify the diagnostic performance of the optimized computer hardware system fault diagnosis model and reflect the optimization effect of GA-BP network fault diagnosis model. The steps to design the verification experiment are as follows: Analyze the influence of genetic algorithm parameters on its optimization effect through experiments, and select the optimal parameters according to the experimental results to ensure the best optimization effect on the GA-BP network fault diagnosis model. After determining the parameters of the genetic algorithm, the computer hardware system fault diagnosis experiment. In order to reduce the experimental error, the fault data used in the experiment and the computer hardware system fault diagnosis model parameters are all the same as in the previous section of the experiment, to verify the optimization effect of the genetic algorithm. Compare the diagnosis correct rate of GA-BP network fault diagnosis model before and after optimization, and complete the verification analysis.
The initial population size of the genetic algorithm determines the optimization effect of the computer hardware system fault diagnosis model, the population size is set too low, the algorithm may fall into the “precocious” and thus cause no solution, the population size is set too large, it will result in the complexity of the structure of the population relationship to increase the amount of computation, resulting in a reduction in the search speed. In order to avoid the above problems, the initial number of populations of the genetic algorithm, using the experimental method to determine the population value range from 10, in turn, plus 5 for the experiment. When choosing the initial population number, not only need to pay attention to the training error, but also to choose the population value with a smaller number of iterations, in order to achieve to meet the error requirements at the same time, to improve the processing efficiency of the network. The corresponding training parameters for different initial populations are shown in Table 3. Observing the data in the table, it is found that the difference in the number of training times is not very large with the change in the number of populations, indicating that the effect of the initial number of populations on the training efficiency is not very obvious in this model. Observing the trend of error change, it can be found that the error with the increase of the number of populations shows the change rule of decreasing and then increasing, in the initial population number of 30, the error is the lowest, and the number of training times is also within the acceptable range, so determine the initial population number of the genetic algorithm is 30.
Different initial population corresponding training parameters
| Initial population (number) | Training step | error |
|---|---|---|
| 10 | 25 | 0.0345 |
| 15 | 24 | 0.0269 |
| 20 | 19 | 0.0278 |
| 25 | 22 | 0.0209 |
| 30 | 20 | 0.0178 |
| 35 | 25 | 0.0252 |
| 40 | 28 | 0.0268 |
The crossover mutation process of chromosomes determines the diversity of the population in the genetic algorithm. Therefore the selection of crossover probability Pc and mutation probability Pm also has a certain impact on the training effect, and there is no uniform rule for the selection of the two, which are generally selected in the selected value interval. The selection of both parameters should not be too large or too small, choose 0.02 to 0.08 as the variation probability Pm interval, choose 0.4 to 0.8 as the crossover probability Pc interval, in turn, different crossover probability of variation experiments, Pc and Pm are taken to different values when the error performance of network training is shown in Table 4. Analyzing the data in the table, it can be seen that the influence of the variance probability on the training error is large, and the error is low in the interval of 0.04 to 0.06, and the training effect is excellent.
The error performance of network training in different values of Pc and Pm
| Error | Pc | |||||
|---|---|---|---|---|---|---|
| 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | ||
| Pm | 0.02 | 0.158 | 0.0145 | 0.1021 | 0.0208 | 0.0577 |
| 0.03 | 0.01266 | 0.0333 | 0.1047 | 0.0772 | 0.0685 | |
| 0.04 | 0.033 | 0.0224 | 0.0304 | 0.0148 | 0.035 | |
| 0.05 | 0.0735 | 0.1385 | 0.0392 | 0.0574 | 0.0749 | |
| 0.06 | 0.0083 | 0.0462 | 0.0065 | 0.0294 | 0.0263 | |
| 0.07 | 0.0258 | 0.1356 | 0.0634 | 0.0017 | 0.0026 | |
| 0.08 | 0.099 | 0.0018 | 0.0619 | 0.0024 | 0.0352 | |
And the effect of cross probability training error has a high degree of randomness, and the error under different cross probabilities does not show an obvious pattern of change. The running parameters of the genetic algorithm are shown in Table 5. According to the data in the table, the crossover probability and variance probability corresponding to the lowest value of the training error are selected, i.e., the value of crossover probability is determined to be 0.3, and the value of variance probability is 0.05.
The genetic algorithm runs the parameters
| Parameter name | Parameter setting |
|---|---|
| Population size | 32 |
| Maximum evolutionary frequency | 48 |
| Selection probability | 0.92 |
| Cross probability | 0.3 |
| Mutation probability | 0.05 |
In the experiment to verify the diagnostic performance of the optimized computer hardware system fault diagnostic model, in order to reduce the impact of experimental variables on the diagnostic results, the experimental design of GA-BP network fault diagnostic model parameters and experimental data are consistent with the previous section, the optimized computer hardware system fault diagnostic model parameters are shown in Table 6.
The model parameters of the computer hardware system fault diagnosis
| Parameter name | Parameter setting |
|---|---|
| Error threshold | 0.001 |
| Learning efficiency | 0.02 |
| Network topology | 7-9-3 |
| Implicit layer activation function | logsig |
| Output layer activation function | purelin |
| Training function | Trainlm |
| Maximum iteration number | 1000 |
The GA-BP network fault diagnosis model is constructed in Matlab according to the parameters in Table 6, and still 70% of the total sample data is used as training data, and the remaining 30% of the data is used as test data for computer hardware system fault diagnosis experiments, and the training error of the optimized computer hardware system fault diagnosis model is shown in Figure 6. From the training error graph, it can be clearly seen that the number of iterations of the optimized GA-BP network fault diagnosis model has been reduced, and the convergence speed has been significantly accelerated. The model converges to complete the training process after 16 iterations, and the training error of the optimized GA-BP network fault diagnostic model decreases rapidly in the 1~10 iterations of the model training, which indicates that the GA-BP network fault diagnostic model has a higher learning rate, although the speed of error decrease also slows down in the subsequent training. However, in general, the convergence speed of the GA-BP network fault diagnosis model improved, the number of iterations decreased, and the error decreased. The final error stays around 0.003, which is lower compared to the pre-optimization model, indicating that the optimized GA-BP network fault diagnostic model has higher accuracy in identifying computer hardware system faults.

The error diagnosis model training error of the optimized computer hardware system
The BP network fault diagnosis model optimized by genetic algorithms shows the effectiveness of genetic algorithms by reducing the number of iterations by nearly one-third while obtaining lower errors.
From the training results, the optimized GA-BP network fault diagnosis model shows better learning efficiency, reduces the number of iterations, and decreases errors. However, the training results do not fully reflect the performance of the optimized model. Therefore, further optimization of the GA-BP network fault diagnosis model is needed. Fault diagnosis experiments are designed as follows: 100 groups of fault data are randomly selected and input into the optimized GA-BP network fault diagnosis model after normalization, fault diagnosis experiments are carried out, and diagnostic results are plotted to compare the diagnostic results with the confusion matrix in order to analyze the diagnostic performance of the diagnostic results of GA-BP network fault diagnostic model are shown in Figure 7. From the figure, it can be clearly seen that in 100 groups of fault data, only 4 groups of data were misdiagnosed, and the diagnostic accuracy of the optimized GA-BP network fault diagnosis model was 96%. The highest diagnostic accuracy is for fault type 1, fault type 3, fault type 4 and fault type 5, with 100% diagnostic accuracy. In fault type 2, 2 sets of faults 2 were misdiagnosed as fault 1, and 2 faults 2 were misdiagnosed as fault 3, with a diagnostic accuracy of 80%, respectively. Overall, the GA-BP network fault diagnosis model has a high diagnosis rate.

Diagnostic model of GA-BP network fault diagnosis model
Faulty maintenance strategies include three types, namely, regular maintenance, maintenance on a case-by-case basis, and after-the-fact maintenance.
Computer failure in the process of use but does not affect the use of the task to be implemented after the end of the implementation of the maintenance is called after-the-fact maintenance, the strategy can save maintenance costs, easy to operate, the disadvantage is that the rigid and unpredictable. Depending on the maintenance is focused on analyzing the causes of failure, based on test data to develop a maintenance plan, before the computer hardware damage to its overhaul, this strategy can make the hardware to get the maximum degree of application, the disadvantage is that it requires a higher level of technical requirements and capital investment. Regular maintenance is planned to determine the maintenance time interval, in the specified time interval overhaul hardware strategy, this strategy can improve computer uptime, the disadvantage is that the economic cost is higher. The comprehensive closeness index for each failure type is used to provide a corresponding maintenance strategy for each failure type.
Aiming at the current problem of not being able to effectively diagnose computer hardware systems, the study designed a GA-BP neural network fault diagnosis model. The research conclusions drawn are as follows: In the experiment of the error of network training when Pc and Pm take different values respectively. It has been found that the influence of variance probability on the training error is large, and the error value is low in the range of 0.04 to 0.06, indicating that the model training is good. In the GA-BP network fault diagnosis model diagnostic results experiment, it was found that after using the GA-BP network fault diagnostic model designed in this paper for computer hardware system fault diagnosis, only 4 groups of fault data in 100 groups of data were misdiagnosed, and the diagnostic accuracy rate was 96%. Synthesize the characteristics of regular maintenance, depending on the situation maintenance and aftermath maintenance, and carry out targeted fault repair for different computer system hardware failures.
