Fault diagnosis method and system based on machine learning, medium and equipment
The data is expanded through the reverse coding logical forest algorithm, combined with ecosystem optimization and self-coding neural networks, and the cross-honeypot optimization algorithm, and solved the problem of insufficient data in traditional fault diagnosis, improved the accuracy and efficiency of fault diagnosis, and avoided Local optimal problem.
Patent Information
- Application Number
- CN202411451076.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional machine learning-based fault diagnosis methods are difficult to train models with good generalization capabilities when there is insufficient data, resulting in limited data sets in the model training and verification stages, affecting the accuracy and reliability of fault diagnosis.
Data expansion is performed using reverse coding logic forest algorithm, multi-layer neural network is built as feature extraction model, and neural network parameters are optimized through ecosystem optimization algorithm, combining self-coding neural networks that can adaptively adjust dimensions and cross-honeypot optimization The algorithm's extreme learning machine model is used to perform feature dimensionality reduction and classifier training.
It improves the quality and effect of model training, ensures the accuracy and reliability of fault diagnosis, avoids local optimal problems, and improves the accuracy and efficiency of equipment fault diagnosis.
Smart Images

Figure CN119167094A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of equipment fault diagnosis, and in particular to a fault diagnosis method, system, medium and equipment based on machine learning. Background Art
[0002] With the continuous improvement of industrial automation and intelligence, the reliability and stability of equipment are becoming more and more important to ensure production efficiency and quality. However, the operating environment of equipment in reality is complex and changeable, and the equipment itself may also fail due to various factors such as material fatigue, improper operation, and insufficient maintenance. Therefore, fault diagnosis technology came into being.
[0003] At present, traditional fault diagnosis methods mainly rely on manual experience and simple data analysis, which is not only time-consuming and labor-intensive, but also difficult to meet the fault diagnosis needs of large-scale and complex systems.
[0004] In this context, machine learning technology has been introduced into the field of equipment fault diagnosis due to its powerful capabilities in data processing and pattern recognition. By learning the fault characteristics and normal operation modes in historical data, machine learning models can automatically identify potential fault signals, thereby achieving early fault prediction and accurate fault location. This method can not only greatly improve the efficiency and accuracy of fault diagnosis, but also provide data support for preventive maintenance, thereby improving the operating efficiency and safety of equipment.
[0005] However, this traditional diagnostic method is difficult to effectively train a model with good generalization ability when there is insufficient data, resulting in limited data sets in the model training and verification stages, affecting the accuracy and reliability of fault diagnosis. Summary of the invention
[0006] In order to solve or partially solve the technical problem that fault judgment is limited due to training data, the first aspect of the present invention discloses a fault diagnosis method based on machine learning, the method comprising:
[0007] The sensor parameter samples collected during device operation are divided into a training sample set and a test sample set; wherein a sensor parameter sample contains multiple types of features;
[0008] Performing data expansion on the training sample set based on the inverse coding logical forest algorithm to obtain an expanded sample set;
[0009] Constructing a multi-layer neural network as a feature extraction model, using the training sample set and its expanded sample set to train the feature extraction model, and using an ecosystem optimization algorithm to iteratively optimize the parameters in all neural networks; the parameters include but are not limited to: weights, biases;
[0010] Inputting the extracted features into a feature dimensionality reduction model to train the feature dimensionality reduction model; wherein the feature dimensionality reduction model is an autoencoding neural network that can adaptively adjust the dimension;
[0011] Inputting the data after feature dimension reduction into the classifier to train the classifier and obtain the final classifier model; wherein the classifier adopts an extreme learning machine model, and a cross honeypot optimization algorithm is used to adjust the weight and bias of the extreme learning machine model during the training process;
[0012] After the training of each model is completed, the data of the equipment to be tested is used as input, and the equipment fault diagnosis is performed in sequence through the trained feature extraction model, the trained feature dimension reduction model, and the final classifier model.
[0013] A second aspect of the present invention provides a fault diagnosis system based on machine learning, the system comprising:
[0014] The acquisition module is used to collect sensor parameter samples during device operation and divide them into training sample sets and test sample sets; wherein a sensor parameter sample contains multiple types of features;
[0015] A data expansion module, used for performing data expansion on the training sample set based on a reverse-coded logical forest algorithm to obtain an expanded sample set;
[0016] A construction module, for constructing a multi-layer neural network as a feature extraction model, using the training sample set and its expanded sample set to train the feature extraction model, and using an ecosystem optimization algorithm to iteratively optimize parameters in all neural networks; the parameters include but are not limited to: weights, biases;
[0017] An input module, used to input the extracted features into a feature dimensionality reduction model to train the feature dimensionality reduction model; wherein the feature dimensionality reduction model is an autoencoding neural network that can adaptively adjust the dimension;
[0018] A classification training module is used to input the data after feature dimension reduction into the classifier to train the classifier and obtain the final classifier model; wherein the classifier adopts an extreme learning machine model, and a cross honeypot optimization algorithm is used to adjust the weight and bias of the extreme learning machine model during the training process;
[0019] The fault diagnosis module is used to take the data of the equipment to be tested as input after the training of each model is completed, and perform equipment fault diagnosis through the trained feature extraction model, the trained feature dimension reduction model, and the final classifier model in sequence.
[0020] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the program is used by a processor to execute the steps of any one of the methods described in the first aspect.
[0021] A fourth aspect of the present invention provides a fault diagnosis device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the program.
[0022] Through one or more technical solutions of the present invention, the present invention has the following beneficial effects or advantages:
[0023] The present invention provides a fault diagnosis method, system, medium and equipment based on machine learning. On the basis of the original training data, the training sample set is expanded by a reverse-coded logical forest algorithm, thereby solving the problem of weak model generalization ability and low precision caused by insufficient data in traditional equipment fault diagnosis, ensuring that the generated data samples are similar to the original data distribution, improving the quality and effect of model training, and ensuring the accuracy and reliability of fault diagnosis.
[0024] Furthermore, an ecosystem-based optimization algorithm is used to optimize the neural network parameters in the feature extraction model, simulating the survival mechanisms of organisms in nature, such as competition, symbiosis, and adaptation to changes, thereby optimizing the weights and bias parameters of the neural network, ensuring network performance while avoiding the local optimal problems common in traditional neural network training.
[0025] Furthermore, the use of an autoencoding neural network with adaptive dimensionality can dynamically adjust according to different data sets to find the optimal feature representation, effectively improving the efficiency and effectiveness of subsequent model training and optimizing the feature processing process.
[0026] Furthermore, an extreme learning machine classification method based on a cross-honeypot optimization algorithm is proposed. By simulating the cross-interaction between honeypots, the optimal parameter combination is found, and adaptive switching between global search and local fine-tuning is performed, which effectively avoids the overfitting and local optimal problems of the extreme learning machine and improves the accuracy of equipment fault diagnosis.
[0027] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0029] Figure 1 A flow chart of a fault diagnosis method based on machine learning according to an embodiment of the present invention is shown;
[0030] Figure 2 A specific network structure diagram of a feature extraction model according to an embodiment of the present invention is shown;
[0031] Figure 3 A schematic diagram of a fault diagnosis system based on machine learning according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0032] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0033] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0034] First, as Figure 1 As shown, the fault diagnosis method based on machine learning provided by the embodiment of the present invention at least includes the following steps:
[0035] S101, collecting sensor parameter samples during device operation and dividing them into a training sample set and a test sample set.
[0036] The parameter samples of this embodiment are sensor parameter data collected when the device is running. The data is in vector format and stored in json format.
[0037] In one embodiment, a sensor parameter sample contains multiple types of features, including: temperature, pressure, vibration frequency, current, voltage, power, speed, noise level, lubricating oil temperature and lubricating oil pressure. The above are just examples. In actual applications, the number of types may reach dozens or even hundreds.
[0038] Furthermore, the collected parameter samples are labeled, and the labeling method of the present invention is manual labeling, but it does not form a limitation. The labeling categories include but are not limited to: "normal", "overheating fault", "abnormal pressure" and "other faults".
[0039] S102, performing data expansion on the training sample set based on the reverse-coding logical forest algorithm to obtain an expanded sample set.
[0040] Since the acquisition, labeling and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor generalization of the model and affect the accuracy of the model, in this embodiment, a logical forest algorithm based on reverse coding is used for data expansion, and then the corresponding decoder is used to reversely generate data samples to ensure that the generated data samples are similar to the original parameter sample distribution.
[0041] During the data expansion process, the following steps are implemented:
[0042] S1021, from the training sample set The feature subset F is selected from the multiple types of features contained in the sample k .
[0043] Among them, in the training sample set D, x i is the i-th sensor parameter sample, including several characteristics: temperature, pressure, vibration frequency, current, voltage, power, speed, noise level, lubricating oil temperature and lubricating oil pressure; y i is the label category of the i-th sensor parameter sample; n is the number of samples in the training sample set before data expansion.
[0044] In one embodiment, it is necessary to select a feature subset F from k Specifically, the importance score is calculated for each feature in the sample, and the k features with the highest scores are selected as the feature subset F k Features in .
[0045] Therefore, the feature subset F k for:
[0046]
[0047] Among them, f j is the feature subset F k The jth feature in .
[0048] S1022, using the first encoder to transform the feature subset F k Mapping from the original feature space to a low-dimensional latent space, so that each feature has a corresponding latent space vector.
[0049] Specifically, a first encoder is trained through the inverse encoding operation, where the first encoder can be defined as:
[0050] Z i =E φ (x i )
[0051] Among them, Z i is the vector obtained by encoding the i-th sensor parameter sample, E φ () is the first encoder, which is used to map data points to a low-dimensional latent space.
[0052] The feature subset F k Input the first encoder E φ (), maps the original feature space to a low-dimensional latent space, so that a corresponding latent space vector is generated for each feature in the latent space, making the expanded data richer in each feature dimension. Specifically, for each feature f j ∈F k , there is a corresponding latent space vector z j For example, the latent space vector z1 corresponds to f1, the latent space vector z2 corresponds to f2, and so on. k ∈Z j . Z j is the feature subset F k A vector obtained by encoding any sensor parameter sample in .
[0053] S1023, feature subset F k The latent space vector corresponding to each feature in is input into the first decoder to obtain the intermediate training sample x′ i .
[0054] Among them, the first decoder is expressed as:
[0055] x′ i =f θ (z1,z2,…,z k )
[0056] Among them, x′ i is composed of the feature subset F k The latent space vectors corresponding to each feature in jointly decode the intermediate training samples generated, f θ () is the first decoder function, z1,z2,…,z k They are feature subsets F k The features f1,f2,…,f k The corresponding latent space vectors. At this time, the intermediate training sample x′ i With feature subset F k The distribution is similar.
[0057] S1024, using the mapping function Z′ of the logical forest i =LF(x′ i ) Process the intermediate training sample x′ i , generate the corresponding latent space vector Z′ i , and then use the second decoder to inverse map to obtain the expanded training sample x″ i , so that the expanded training sample x″ i With the i-th sensor parameter sample x i The distribution is similar.
[0058] In this embodiment, the mapping function of the logical forest is regarded as the second encoder. Correspondingly, the second decoder is expressed as:
[0059] x″ i =D θ (Z′ i )
[0060] Among them, D θ () is the second decoder function, from which the expanded training sample x″ can be obtained i .
[0061] In one embodiment, when generating the corresponding latent space vector Z′ i Afterwards, a fine-grained local perturbation strategy is adopted to train the intermediate sample x′ i The corresponding latent space vector Z′ i Add a small perturbation parameter δ to obtain the new latent space vector Z″ i .
[0062] Among them, the new latent space vector Z″ i It is expressed as:
[0063] Z″ i =Z′ i +δ
[0064] Z″ i is the new latent space vector, δ=λ″·G ψ (x′ i ,c),Generation of local information based on device characteristics,G ψ It is a generator function based on device characteristics. The disturbance parameter δ generated by it is related to the device characteristics c. λ″ is a coefficient that controls the disturbance intensity and can be preset manually.
[0065] Furthermore, the second decoder is used to inversely map the new latent space vector Z″ i Get the expanded training sample x″ i .
[0066] Decode the new latent space vector Z″i After that, we can get the new data point after disturbance:
[0067] x i =D θ (z″ i )
[0068] Repeat the above steps S1021 to S1024 until the number of newly generated samples reaches a preset value.
[0069] In this technical solution, since the intermediate training sample x i ′ is actually more inclined to feature subset F k In order to make it more inclined to the original data, the mapping function Z of the logical forest is used i ' Combined with the corresponding decoder, data expansion is performed again. Since the logical forest enhances the representativeness and diversity of data points by integrating multiple decision trees when generating data points, and since each tree attempts to capture different features in the data set, the data points generated by the entire forest can better approximate the overall characteristics of the original data set.
[0070] S103, constructing a multi-layer neural network as a feature extraction model, using the training sample set and its expanded sample set to train the feature extraction model, and using the ecosystem optimization algorithm to iteratively optimize the parameters in all neural networks.
[0071] The parameters in the neural network include but are not limited to: weights and biases.
[0072] See below Figure 2 , introduces the specific network structure of the feature extraction model.
[0073] In the feature extraction model, it includes: input layer, at least two hidden layers, and output layer.
[0074] The number of neurons in the input layer is set according to the number of types and features of the input data. In one embodiment, the number of features in the sensor parameter samples collected during device operation is 50, so the number of neurons is set to 50. Of course, you can also refer to the feature subset F k The number of features in setting.
[0075] The number of neurons in at least two hidden layers gradually increases. In at least two hidden layers, the number of neurons in the first hidden layer is the same as the number of neurons in the input layer, and the number of neurons in the last hidden layer is less than the number of neurons in the output layer. For example, the hidden layer example is 2 layers, and the number of neurons in the first hidden layer is the same as the number of neurons in the input layer, which is 50. The second hidden layer includes 80 neurons. In practical applications, the hidden layer example is: a fully connected layer, but it is not limited. The number of neurons in the output layer is set to 100.
[0076] The process of iteratively optimizing the parameters of all neural networks using the ecosystem optimization algorithm includes the following steps:
[0077] S1031, generate an ecosystem including Ng individuals.
[0078] Among them, Ng ≥ 1 and is a positive integer. This ecosystem is constructed by referring to the parameter set contained in all neural networks in the feature extraction model. An individual represents a parameter set in the neural network. The parameter set of the i-th individual is: P i ={w i ,b i}, where i∈Ng, w i and b i Represent the weight and bias of the neural network respectively.
[0079] S1032, using a nonlinear function that combines ecological and genetic factors, calculates the initial fitness F of the i-th individual i .
[0080] Among them, the initial fitness of the i-th individual is F i Determined by its performance on a specific task, it is evaluated by a nonlinear function f() that takes into account a variety of ecological and genetic factors, expressed as:
[0081] F i =f(P i ,E,G)
[0082] Among them, E represents environmental variables, G represents genetic factors, and P i is the parameter set of the i-th individual, including the weight w i and bias b i , F i is the initial fitness of the ith individual.
[0083] In one embodiment, the environmental variable is set to 0.3 to simulate the effect of the initial environment on individual fitness.
[0084] In one embodiment, the nonlinear function f() is calculated using factors such as environmental variables (E), genetic factors (G), and individual parameter sets (including weights w and biases b), and can be expressed as:
[0085] f(P i ,E,G)=Sig(κ·L(w i ,b i )+λ·E+μ·G(w i ,b i )+v·D(w i ,bi ,E))
[0086] Among them, w i and b i Represent the weight and bias of the i-th individual, G(w i ,b i ) is the genetic factor function, L(w i ,b i ) is the inverse of the loss function, D(w i ,b i ,E) is a nonlinear function that describes the dynamic interaction between the i-th individual and the environmental variables, Sig() is the Sigmoid activation function, and κ, λ, μ, and v are weight coefficients used to balance the contribution of various factors to fitness.
[0087] Furthermore, the genetic factor function G(w i ,b i ) Considering the diversity and complexity of parameters, the calculation method can be expressed as:
[0088]
[0089] Among them, ρ and θ are weight coefficients used to adjust the contribution of each item; w ij is the weight of the jth neuron in the i-th layer; b ij is the bias of the jth neuron in the i-th layer; n′ represents the number of neurons; Var(w i ,b i ) represents the variance of weights and biases, which is used to measure the diversity of parameters.
[0090] And, the environmental interaction function D(w i ,b i ,E) Simulate the interaction between individual parameters and the environment, which can be expressed as:
[0091]
[0092] Among them, η is the weight coefficient, E k represents the kth element of the environment variable, m represents the total number of elements in the environment variable, and x kj Represents the environment variable E k The associated input features, is the hyperbolic tangent function.
[0093] And, the performance evaluation function L(w i ,b i ) Based on the performance of the neural network on a specific task, considering that the better the performance is, the smaller the loss function value is, the present invention uses the negative value of the loss function or its reciprocal to represent the performance, which can be expressed as:
[0094]
[0095] in, represents the loss function, and Y is the true label; It is the model prediction, obtained by the preset Softmax function.
[0096] S1033, based on the initial fitness F of the i-th individual i and the intensity of its interaction with other individuals in the ecosystem ij , calculate the first actual fitness F of the i-th individual after considering the interaction strength i ′.
[0097] Among them, the first actual fitness F i 'It is mainly used to determine its survival ability in the ecosystem. Individuals with higher fitness will have a greater chance of reproducing offspring.
[0098] Specifically, the calculation of the first fitness is based on the current state of the individual and its interaction with other individuals in the ecosystem. ij is the interaction intensity between individuals i and j, and the fitness function of the i-th individual at this time can be expressed as:
[0099]
[0100] Among them, F i ′ is the actual fitness of the ith individual after considering ecological interactions; α is the weight adjustment coefficient, representing the degree of influence of interactions between individuals; c′ ij and s′ ij is the ecological interaction parameter after adaptive adjustment; F j is the initial fitness of the jth individual. In one embodiment, α is set to 0.5.
[0101] Furthermore, c′ ij and s′ ij The adaptive adjustment is based on the ecological network status evaluation φ, that is, the competition intensity c′ ij and symbiotic strength s′ ij Perform adaptive adjustment, the adjustment method can be expressed as:
[0102] s′ ij =c ij ·θ′(φ,Δφ)
[0103] s′ ij =s ij ·ψ(φ,Δφ)
[0104] Among them, c ijis the competition intensity before adaptive adjustment, s ij The symbiotic strength before adaptive adjustment, θ′ and ψ are the adaptive functions for adjusting the competition and symbiotic strengths, respectively, φ is the performance feedback function, and Δφ represents the change in φ, i.e., the difference between the current evaluation and the previous evaluation.
[0105] Furthermore, the performance feedback function φ evaluates the overall state of the current ecological network based on the performance of the neural network on the validation set. In one embodiment, the calculation method of the performance feedback function φ can be expressed as:
[0106] φ=w1F accuracy (P)-w2F complexity (C)+w3F diversity (D′)-w4F time (T)
[0107] Among them, w1, w2, w3, and w4 are weight coefficients used to balance the contribution of different indicators; and,
[0108] The component functions are:
[0109] Accuracy function F accuracy (P): F accuracy (P) = log(1 + P)
[0110] Complexity function F complexity (C):
[0111] Diversity function F diversity (D′):
[0112] Time function F time (T): F time (T) = log(1 + T)
[0113] Among them, P is the accuracy, C is the network complexity, which is proportional to the parameter quantity in this embodiment; D′ is the data diversity index, which is proportional to the variance of the data features; T is the training time, which is proportional to the number of iterations.
[0114] Furthermore, the ecological interaction intensity S ij It refers to the degree of mutual influence between two individuals i and j in the ecosystem, including the competition intensity c ij and symbiotic strength s ij , which can be expressed as:
[0115] S ij =λ′c ij +(1-λ′)s ij
[0116] Wherein, λ′ is a strength adjustment balancing factor, which is used to adjust the relative importance of competition and symbiosis. In one embodiment, λ′ is set to 0.6.
[0117] Furthermore, the competition intensity C ij According to resource requirements and overlap, the calculation method can be expressed as:
[0118]
[0119] Among them, c ij is the competition intensity between individuals i and j, and Represents the demand of individuals i and j for the rth resource, R is the total number of resource categories, and the exponential function The role of is to smooth the impact of demand differences between individuals, ensuring that even small demand differences are reflected in the intensity of competition.
[0120] And, the symbiotic strength s ij It reflects the degree of mutual cooperation between two individuals, measured by the efficiency of their shared resources, and can be expressed as:
[0121]
[0122] Among them, s ij is the symbiotic strength between the i-th individual and the j-th individual.
[0123] S1034, based on the first actual fitness F of the i-th individual i ′, calculate the probability of the i-th individual being selected.
[0124] Among them, the natural selection process is simulated based on the probability of individuals being selected, which can select individuals with higher fitness for reproduction and eliminate individuals with lower fitness.
[0125] Among them, the calculation method of the probability of individual i (that is, the i-th individual) being selected can be expressed as:
[0126]
[0127] Among them, Fv(P i ) is the probability that individual i is selected.
[0128] S1035, according to the probability of each individual being selected, select the parent individual for regeneration and reproduction from Ng individuals: P i ′ and P j ′, and calculate the corresponding offspring P according to the crossover formula k .
[0129] In this embodiment, regeneration and reproduction are performed through probability to simulate the genetic variation process of organisms. Individuals with higher fitness produce offspring through crossover and mutation operations in the genetic algorithm. The crossover formula is:
[0130] P k =γP i ′+(1-γ)P j '
[0131] Among them, γ is the crossover coefficient, which determines the fusion ratio of the parental genetic information; P i ′ and P j ' is specifically a parameter set of a parent individual with a higher fitness, which is a parent individual ranked first in probability. In one embodiment, γ is set to 0.7.
[0132] S1036, consider the effect of mutation parameters on offspring P k The influence of k .
[0133] In this embodiment, the mutation operation is implemented by adding a random perturbation ΔP, whose size is controlled by the mutation rate μ′, which has an impact on the offspring P k The impact can be expressed as:
[0134] P′ k =P k +μ′ΔP
[0135] Among them, P k Specifically, it is a parameter set of the offspring individuals; μ′ is the mutation rate, which controls the amplitude of the mutation operation. In one embodiment, the mutation rate μ′ is set to 0.1.
[0136] Furthermore, the role of the genetic variation perturbation ΔP is to increase the diversity of the population. The calculation method of this perturbation term can be expressed as:
[0137] ΔP=ζ·(U-0.5)
[0138] Where ΔP is the random perturbation in the mutation operation, ζ is the perturbation amplitude control coefficient, and U is a random vector with the same dimension as P, whose elements are drawn from the uniform distribution U(0,1). In one embodiment, ζ is set to 0.05 to control the amplitude of the mutation.
[0139] S1037, consider the relationship type between the i-th individual and the j-th individual for the first actual fitness F i ′, and the second actual fitness F of the i-th individual is obtained. i ″.
[0140] In this embodiment, ecological interactions between individuals, such as competition and symbiosis, are simulated, and these interactions will affect the fitness and survival of individuals. Specifically, the present invention sets an ecological interaction matrix I, where element I ij Represents the type of relationship between individuals i and j. The relationship will affect the fitness update of the individuals, and the impact can be expressed as:
[0141]
[0142] Where I represents the ecological interaction matrix, and the element I ij represents the relationship type between the i-th individual and the j-th individual in the ecological interaction matrix;
[0143] S1038, considering the degree of environmental change to the second actual fitness F i ″, and the final fitness F of the i-th individual is obtained i ″′.
[0144] In this embodiment, the impact of environmental changes on the ecosystem, such as changes in resources, new adaptive challenges, etc., is simulated to force individuals to adapt to the new environment, leading to further optimization of parameters within the ecosystem.
[0145] Specifically, environmental changes are simulated by modifying the environmental complexity coefficient ε, thereby affecting the fitness calculation of individuals. The impact caused by the degree of environmental change can be expressed as:
[0146] F i ″′=F i ″·(1+εΔE)
[0147] Among them, ε is the environmental complexity coefficient, which is preset by humans, and ΔE is the environmental change factor, which describes the degree of environmental change from the previous generation to the current generation. Its calculation method can be expressed as:
[0148]
[0149] S1039, using the final fitness F i ″′, update the parameter set of the i-th individual.
[0150] In this embodiment, the parameters of the neural network are updated according to the fitness and ecological dynamics of the individuals in the ecosystem to reflect the evolution of the biological individuals in the ecosystem.
[0151] Specifically, based on the final fitness F i ″′, update the individual parameters, the update method is:
[0152]
[0153] in, is the updated parameter set of the ith individual, η′ is the learning rate, representing the step length of parameter update, G i The gradient pointing to the direction with the largest increase in fitness. In one embodiment, η is set to 0.01.
[0154] Since the optimization of model parameters in traditional fault diagnosis methods may adopt relatively simple and direct methods, such as gradient descent method, it is easy to fall into local optimum. Therefore, the technical solution in this embodiment adopts a neural network parameter optimization method based on ecosystem optimization to simulate the survival mechanism of competition, symbiosis and adaptation of organisms in nature, thereby optimizing the weights and bias parameters of the neural network, avoiding the common local optimum problem in traditional neural network training while ensuring network performance.
[0155] S104, inputting the extracted features into a feature dimensionality reduction model to train the feature dimensionality reduction model.
[0156] Among them, the feature dimensionality reduction model is an autoencoding neural network that can adaptively adjust dimensions. It can be dynamically adjusted on different data sets to find the best feature representation, thereby optimizing the efficiency and effectiveness of subsequent model training.
[0157] Specifically, the autoencoding neural network includes a third encoder and a third decoder.
[0158] The process of inputting the extracted features into the feature dimensionality reduction model and training the feature dimensionality reduction model specifically includes the following steps:
[0159] S1041, using the third encoder to extract the feature e x Mapped to the hidden layer representation e h :e h =f e (e x θ e ), and use the third decoder to represent the hidden layer e h Reconstructed into output features
[0160] Prior to this, the parameters of the autoencoder neural network are initialized, including the weights and biases of the third encoder and the third decoder. Specifically, the autoencoder is composed of the third encoder and the third decoder, and the parameters of the third encoder and the third decoder are θ e and θ d In one embodiment, the parameters are initialized randomly.
[0161] Furthermore, the feature-extracted data is input into the third encoder for transformation to obtain a compressed feature representation, which is then reconstructed by the third decoder to restore the original data as much as possible. Specifically, the third encoder uses the features extracted from the feature extraction model as input data e x , mapped to the hidden layer representation e h , the third decoder tries to represent e from the hidden layer h Reconstruct the output feature e x , which can be expressed as:
[0162] e h =f e (e x θ e )
[0163]
[0164] Among them, θ e and θ d represent the third encoder parameter and the third decoder parameter respectively, f e and f d They are the forward propagation functions of the third encoder and the third decoder respectively.
[0165] S1042, based on hidden layer representation h Determine the information entropy function H(e h ).
[0166] S1043, determine output feature e x And the extracted features e x The reconstruction error between
[0167] In S1042 to S1043, for each round of training, the algorithm evaluates the reconstruction error and information entropy, and dynamically adjusts the dimension of the hidden layer based on these indicators to minimize the dimension while retaining the most information.
[0168] Specifically, the information entropy function H(e h ) to measure the information content of the hidden layer representation, and the reconstruction error To measure the reconstruction quality, it can be expressed as:
[0169]
[0170]
[0171] Among them, H(e h ) is used to measure the hidden layer representation e h The information content, p(e hi ) represents the hidden layer representation e hThe probability distribution of the i-th element in .
[0172] In one embodiment, p(e hi ) by e h Normalized to estimate, it can be expressed as:
[0173]
[0174] Among them, exp() represents the exponential function, which is used to ensure that all probability values are positive, and normalization is used to ensure that the sum of probabilities is 1.
[0175] S1044, to maximize H(e h ) as the target, and update the third encoder parameter θ in combination with the back propagation algorithm e and the third decoder parameter θ d , get the updated third encoder parameter θ′ e and the updated third decoder parameter θ′ d .
[0176] In this embodiment, the overall loss function L() is used to combine the reconstruction error and information entropy. The overall loss function L() is used to maximize H(e) while keeping the reconstruction error small. h ) as the target, the hidden layer dimension can be adjusted in an adaptive manner. Among them, the overall loss function L() can be expressed as:
[0177]
[0178] Wherein, α′ and β′ are coefficients for weighing reconstruction error and information entropy. In one embodiment, α′ and β′ are set to 0.2 and 0.8 respectively.
[0179] Specifically, the hidden layer is a fully connected layer, and each neuron is connected to all neurons in the previous and next layers. In the process of using the overall loss function L() to adaptively adjust the hidden layer, the parameters of the fully connected layer are automatically adjusted by optimizing the reconstruction error and information entropy in the overall loss function L(): The reconstruction error part is responsible for ensuring the accuracy of the reconstruction of the input data after passing through the fully connected layer, thereby maintaining the main features of the input data. The information entropy part is responsible for controlling the feature representation in the hidden layer to contain as much information as possible, thereby avoiding the loss of too many valuable features when compressing data in the fully connected layer. The adaptive adjustment process is reflected in the activation of neurons and the adjustment of weights in the fully connected layer. The network structure, such as the number of neurons, remains unchanged during the training process, but by optimizing the loss function, the output of the fully connected layer will dynamically adjust the dimension of the representation as the input data changes to improve the performance of the model.
[0180] Further, the third encoder parameter θ is updated by the back propagation algorithm e and the third decoder parameter θ d , which can be expressed as:
[0181]
[0182] Among them, θ e is the third encoder parameter before update, θ′ e is the updated third encoder parameter. d is the third decoder parameter before updating, θ′ d is the updated third decoder parameter, and n is the learning rate. In one embodiment, the learning rate n is set to 0.001.
[0183] S1045, based on the updated third encoder parameter θ′ e , update the forward propagation function of the third encoder to: f e (e x θ′ e )=Sig(W e e x +b e ); and based on the updated third decoder parameter θ′ d , update the forward propagation function of the third decoder to: f d (e h θ′ d )=Sig(W d e h +b d ), where W e and W d are the weight matrices of the third encoder and the third decoder, respectively, and b e and b d is the bias term, and Sig() is the Sigmoid nonlinear activation function.
[0184] Repeat the above steps until the preset maximum number of iterations is reached to obtain a trained feature dimension reduction model. In one embodiment, the maximum number of iterations is set to 1000 times.
[0185] In this technical solution, considering that the existing technology may lack a flexible and efficient feature processing mechanism when processing complex sensor data, the model cannot fully mine and utilize the effective information in the data. Therefore, this technical solution adjusts the internal dimensions of the autoencoder neural network through an adaptive mechanism, so that the autoencoder neural network can dynamically adjust the internal dimensions according to different data sets, such as the number of neurons in the hidden layer or the dimension of the feature representation, so as to find the optimal feature representation, effectively improve the efficiency and effect of subsequent model training, and optimize the feature processing process.
[0186] Specifically, when adjusting different data sets, the input data is first analyzed to evaluate the complexity of the data and the feature dimension requirements. Then, the internal dimensions of the autoencoder neural network are dynamically adjusted according to the characteristics of the data, such as increasing or decreasing the number of neurons in the hidden layer, or changing the degree of compression of the feature space. This adjustment mechanism is based on evaluation indicators and is gradually adjusted through a feedback mechanism until the optimal dimension that can fully extract and represent the data features is found.
[0187] S105, inputting the data after feature dimension reduction into the classifier to train the classifier and obtain the final classifier model.
[0188] In this embodiment, the data after feature dimension reduction is input into the classifier for classifier training, wherein the classifier adopts an extreme learning machine model. Based on this, this embodiment proposes an extreme learning machine classification algorithm based on a cross-honeypot optimization algorithm, which simulates the process of honeypot cross-interaction and uses a cross-honeypot optimization algorithm to adjust the weights and biases of the extreme learning machine model during the training process, and can adaptively switch between global search and local fine adjustment, avoiding overfitting and local optimal problems in traditional algorithms.
[0189] During the training process, the cross-honeypot optimization algorithm is used to adjust the weights and biases of the extreme learning machine model, which specifically includes the following steps:
[0190] S1051, randomly initialize the weights and biases of the extreme learning machine model.
[0191] Among them, the weight of the input to the hidden layer of the extreme learning machine model is W∈R m′×d , where m′ is the dimension of the input feature, d is the number of neurons in the hidden layer, and the bias vector of the hidden layer is b∈R d .
[0192] In one embodiment, the initial weight and initial bias are randomly initialized, which is expressed as:
[0193] W (0) =rand(m′,d)
[0194] b (0) =rand(d)
[0195] Among them, rand() represents random initialization, W (0) is the initial weight, b (0) is the initial bias.
[0196] S1052, using the initialized weights and biases as honeypots; each honeypot contains a weight and its bias.
[0197] S1053, each honeypot updates its individual parameters by exchanging information with other honeypots to explore a new parameter space.
[0198] In this embodiment, the cross-interaction process between honeypots is simulated to explore the parameter space and find the optimal combination of weight and bias parameters. i and Ps j For any two honeypots, each honeypot updates its parameters to explore new parameter space by exchanging information with other honeypots. i For example, the parameter update rule is:
[0199]
[0200] Among them, Ps i and Ps j are the i-th honeypot and the j-th honeypot respectively, α e and β e are the learning rate in the exploration phase, It is the average parameter value of all current honeypots and is used to guide the search direction.
[0201] S1054, using the performance evaluation formula to evaluate the honeypot P i performance.
[0202] In each iteration, the performance of the current honeypot (i.e., parameter combination) is evaluated, and the honeypots with better performance are incentivized to increase their probability of being adopted in subsequent iterations, thereby guiding the algorithm to evolve towards a better solution.
[0203] Specifically, evaluate each honeypot Ps i The performance of is evaluated using the performance evaluation formula, which can be expressed as:
[0204]
[0205] Among them, L(Ps i ) is the performance evaluation value, N is the total number of training samples and expansion samples, x n is the feature vector of the nth sample, y n is the corresponding true label, f() is the output function of the extreme learning machine model, l loss is the loss function. In one embodiment, the loss function is a cross entropy loss.
[0206] S1055, honeypot Ps based on performance evaluation value and incentive formula i Provide incentives to increase honeypot Ps i The probability of being adopted in the next iteration.
[0207] In this embodiment, based on the performance evaluation, the honeypot with better performance is incentivized, that is, the probability of its parameters being adopted in the next iteration is increased. The incentive formula is:
[0208]
[0209] in, is the probability value after the stimulus, is the probability value before excitation, γ′ is the excitation intensity parameter, L(Ps i ) is the loss value of the i-th honeypot.
[0210] Furthermore, the calculation method of the excitation intensity parameter γ′ can be expressed as:
[0211]
[0212] Among them, γ0 is the reference value of γ′, L min and L max They are the best and worst loss values among all current honeypots respectively.
[0213] In one embodiment, the learning rate α of the exploration phase is dynamically adjusted according to the performance improvement during the iteration process. e and β e , in order to speed up the convergence and avoid falling into the local optimum.
[0214] The learning rate α in the exploration phase e and β e The adjustment method is:
[0215]
[0216] Among them, δ′ is an adjustment factor based on performance improvement, t represents the current number of iterations, and α e (t) is the learning rate of the exploration phase of the previous iteration, β e (t) is the learning rate of the exploration phase of the previous iteration, α e (t+1) is the learning rate of the exploration phase of the current iteration, β e (t+1) is the learning rate of the exploration phase of the current iteration.
[0217] Furthermore, the calculation of the adjustment factor δ′ is related to the speed of improvement of the loss function in consecutive iterations and can be expressed as:
[0218]
[0219] Where ρ′ is the adjustment rate parameter, L (t) and L (t-1)are the loss values of the current iteration and the previous iteration respectively. In one embodiment, ρ′ is set to 0.2.
[0220] S1056, performing algorithm iteration based on the post-excitation probability value until the iteration ends, and using the weight and bias of the last iteration as the final weight and final bias of the extreme learning machine model.
[0221] In this embodiment, the algorithm iteration stops when the maximum number of iterations is reached, and the optimal parameter combination of the last iteration is used as the weight and bias of the extreme learning machine model to obtain the final classifier model.
[0222] In the existing fault diagnosis methods, there may be overfitting and local optimal problems in the model training process, especially when the parameter adjustment and optimization strategies are not advanced enough, which seriously affects the performance and stability of the model. Based on this, in this technical solution, an extreme learning machine classification algorithm based on a cross-honeypot optimization algorithm is proposed. By simulating the cross-interaction between honeypots, the optimal parameter combination is found, and adaptive switching between global search and local fine adjustment is performed, which effectively avoids the overfitting and local optimal problems of the extreme learning machine and improves the accuracy of equipment fault diagnosis.
[0223] Specifically, global search refers to the algorithm exploring a larger solution space in order to find the possible optimal solution and avoid falling into the local optimal situation. When the global search finds a relatively good solution, the algorithm will enter the local fine adjustment stage. At this time, it will conduct a more detailed search and optimization in the neighborhood of the current solution, and adjust some key parameters to further improve the performance of the model.
[0224] When the algorithm is in the early stages of searching, it will conduct a global search to explore the entire solution space and simulate extensive interactions between honeypots. This stage focuses on expanding the search scope and finding potential optimal solutions. As the search progresses, when a better solution is found, the algorithm will gradually transition to local fine-tuning based on fitness or performance. The interactions between honeypots become more intensive, focusing mainly on fine-tuning parameters in the neighborhood of the current solution. This switch is adaptive, automatically adjusting the strategy based on the performance of the current model or the progress of the search, without the need for human intervention.
[0225] S106, after the training of each model is completed, the data of the device to be tested is used as input, and the device fault diagnosis is performed in sequence through the trained feature extraction model, the trained feature dimension reduction model, and the final classifier model.
[0226] After the model training is completed, the new data is used as the input of the model.
[0227] Specifically, a feature vector after dimension reduction is obtained through a trained feature extraction and dimension reduction model, and the feature vector after dimension reduction is input into a trained final classifier for equipment fault diagnosis.
[0228] In one embodiment, the diagnosed equipment fault categories include four categories: "normal", "overheating fault", "abnormal pressure" and "other faults".
[0229] In the embodiments of the present invention, the following effects can be achieved:
[0230] 1. Through refined data processing, feature extraction and optimization algorithms, the accuracy of equipment fault diagnosis is improved, and different types of faults can be identified more accurately.
[0231] 2. The adaptive mechanism of data expansion and feature dimension reduction enhances the model’s generalization ability for unknown data, enabling the model to maintain high diagnostic efficiency even when faced with new or rare fault types.
[0232] 3. The ecosystem optimization algorithm and the cross-honeypot-based optimization strategy improve the efficiency of parameter optimization, shorten the model training time, and avoid the local optimal problem in conventional training methods.
[0233] In the second aspect, based on the inventive concept provided by the embodiment of the first aspect, the embodiment of the present invention further provides a fault diagnosis system based on machine learning, see Figure 3 , the system includes:
[0234] The acquisition module 301 is used to collect sensor parameter samples when the device is running and divide them into a training sample set and a test sample set; wherein a sensor parameter sample contains multiple types of features;
[0235] A data expansion module 302 is used to perform data expansion on the training sample set based on a reverse-coded logical forest algorithm to obtain an expanded sample set;
[0236] A construction module 303 is used to construct a multi-layer neural network as a feature extraction model, use the training sample set and its extended sample set to train the feature extraction model, and use an ecosystem optimization algorithm to iteratively optimize the parameters in all neural networks; the parameters include but are not limited to: weights, biases;
[0237] An input module 304 is used to input the extracted features into a feature dimensionality reduction model to train the feature dimensionality reduction model; wherein the feature dimensionality reduction model is an autoencoder neural network that can adaptively adjust the dimension;
[0238] The classification training module 305 is used to input the data after feature dimension reduction into the classifier to train the classifier and obtain the final classifier model; wherein the classifier adopts the extreme learning machine model, and the cross honeypot optimization algorithm is used to adjust the weight and bias of the extreme learning machine model during the training process;
[0239] The fault diagnosis module 306 is used to take the data of the device to be tested as input after the training of each model is completed, and perform equipment fault diagnosis through the trained feature extraction model, the trained feature dimension reduction model, and the final classifier model in sequence.
[0240] It should be noted that the machine learning-based fault diagnosis system provided in the embodiment of the present invention, wherein the specific manner in which each module performs operations has been described in detail in the method embodiment provided in the above-mentioned first aspect, and the specific implementation process can refer to the method embodiment provided in the above-mentioned first aspect, and will not be elaborated in detail here.
[0241] In the third aspect, based on the same inventive concept as the machine learning-based fault diagnosis system method provided in the embodiment of the first aspect mentioned above, the embodiment of the present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0242] In the fourth aspect, based on the same inventive concept as the machine learning-based fault diagnosis system method provided in the embodiment of the first aspect mentioned above, the embodiment of the present invention also discloses a fault diagnosis device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the methods described above when executing the program.
[0243] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0244] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A fault diagnosis method based on machine learning, characterized in that: The method comprises: The sensor parameter samples collected during device operation are divided into a training sample set and a test sample set; wherein a sensor parameter sample contains multiple types of features; Performing data expansion on the training sample set based on the inverse coding logical forest algorithm to obtain an expanded sample set; Constructing a multi-layer neural network as a feature extraction model, using the training sample set and its expanded sample set to train the feature extraction model, and using an ecosystem optimization algorithm to iteratively optimize the parameters in all neural networks; the parameters include but are not limited to: weights, biases; Inputting the extracted features into a feature dimensionality reduction model to train the feature dimensionality reduction model; wherein the feature dimensionality reduction model is an autoencoding neural network that can adaptively adjust the dimension; Inputting the data after feature dimension reduction into the classifier to train the classifier and obtain the final classifier model; wherein the classifier adopts an extreme learning machine model, and a cross honeypot optimization algorithm is used to adjust the weight and bias of the extreme learning machine model during the training process; After the training of each model is completed, the data of the equipment to be tested is used as input, and the equipment fault diagnosis is performed in sequence through the trained feature extraction model, the trained feature dimension reduction model, and the final classifier model.
2. The method according to claim 1, characterized in that The reverse coding-based logical forest algorithm performs data expansion on the training sample set to obtain an expanded sample set, specifically including: From the training sample set The feature subset F is selected from the multiple types of features contained in the sample k ; where x i is the i-th sensor parameter sample, feature subset F k Contains k features: The feature subset F is transformed into k Mapping from the original feature space to a low-dimensional latent space so that each feature has a corresponding latent space vector; The feature subset F k The latent space vector corresponding to each feature in is input into the first decoder to obtain the intermediate training sample x′ i ; where x′ i =f θ (z1,z2,…,z k ), f θ () is the first decoder function, z1,z2,…,z k are the feature subsets F k The features f1,f2,…,f k The corresponding latent space vectors, the intermediate training samples x′ i With feature subset F k The distribution is similar; Mapping function Z′ using the logical forest i =LF(x′ i ) Process the intermediate training sample x′ i , generate the corresponding latent space vector Z′ i , and then use the second decoder to inverse map to obtain the expanded training sample x′ i , so that the expanded training sample x″ i With the i-th sensor parameter sample x i The distribution is similar; where x″ i =D θ (Z′ i ), D θ () is the second decoder function.
3. The method according to claim 2, characterized in that The generated latent space vector Z i 'Afterwards, the method further comprises: In the intermediate training sample x′ i The corresponding latent space vector Z′ i Add the perturbation parameter δ to get the new latent space vector Z″ i ; Among them, Z″ i =Z′ i +δ,Z″ i is the new latent space vector, δ=λ″·G ψ (x′ i ,c),G ψ is a generator function based on device characteristics, the disturbance parameter δ generated by it is related to the device characteristics c, and λ″ is a coefficient that controls the intensity of the disturbance; The expanded training sample x″ is obtained by inverse mapping using the second decoder i , specifically comprising: using the second decoder to inversely map the new latent space vector Z″ i Get the expanded training sample x″ i ; where x″ i =D θ (z″ i ).
4. The method according to claim 1, characterized in that In the feature extraction model, it includes: an input layer, at least two hidden layers, and an output layer; The input layer sets the number of neurons according to the number of type characteristics of the input data; The number of neurons in the at least two hidden layers gradually increases; in the at least two hidden layers, the number of neurons in the first hidden layer is the same as the number of neurons in the input layer, and the number of neurons in the last hidden layer is less than the number of neurons in the output layer; The ecosystem optimization algorithm is used to iteratively optimize the parameters in all neural networks, specifically including: Generate an ecosystem containing Ng individuals; where Ng ≥ 1 and is a positive integer, an individual represents a parameter set in the neural network, and the parameter set of the i-th individual is: P i ={w i ,b i }, where i∈Ng, w i and b i Represent the weights and biases of the neural network respectively; The initial fitness F of the i-th individual is calculated using a nonlinear function that combines ecological and genetic factors. i ; Wherein, the nonlinear function is: F i =f(P i ,E,G), E represents environmental variables, G represents genetic factors, P i is the parameter set of the i-th individual; Based on the initial fitness F of the i-th individual i and the intensity of its interaction with other individuals in the ecosystem ij , calculate the first actual fitness F of the i-th individual after considering the interaction strength i ′; where the calculation formula is: F i ′=F i +α(∑ j≠i S ij F j +∑ j≠i (c′ ij -s′ ij )F j ), where α is the weight adjustment coefficient, representing the degree of interaction between individuals; c′ ij and s′ ij is the ecological interaction parameter after adaptive adjustment; F j is the initial fitness of the jth individual; Based on the first actual fitness F of the i-th individual i ′, calculate the probability of the i-th individual being selected; According to the probability of each individual being selected, the parent individual for regeneration and reproduction is selected from the Ng individuals: P i ′ and P j ′, and calculate the corresponding offspring P according to the crossover formula k ; Wherein, the crossover formula is: P k =γP′ i +(1-γ)P′ j ;γ is the crossover coefficient, which determines the fusion ratio of the parental genetic information; Consider the variation parameter for the offspring P k The influence of k ; Among them, the influence mode is: P′ k =P k +μ′ΔP; μ′ is the mutation rate, which controls the amplitude of the mutation operation, and ΔP is the random perturbation parameter; Consider the relationship type between the i-th individual and the j-th individual for the first actual fitness F i ′, and obtain the second actual fitness Fi″ of the i-th individual; wherein the influence mode is: F i =F i ′+∑ j≠1 I ij F j ′; I represents the ecological interaction matrix, element I ij represents the relationship type between the i-th individual and the j-th individual in the ecological interaction matrix; Considering the degree of environmental change on the second actual fitness F i ″, and obtain the final fitness F of the i-th individual i ″′; Among them, the influence mode is: F i ″′=F i ″·(1+εΔE), ε is the environmental complexity coefficient, ΔE is the environmental change factor, which describes the degree of environmental change from the previous generation to the current generation; Using the final fitness F i ″′, update the parameter set of the i-th individual; wherein the updating method is: is the updated parameter set of the i-th individual, η′ is the learning rate, representing the step length of parameter update, G i The gradient points in the direction with the largest increase in fitness.
5. The method according to claim 1, characterized in that In the autoencoding neural network, a third encoder and a third decoder are included; The step of inputting the extracted features into the feature dimensionality reduction model to train the feature dimensionality reduction model specifically includes: The third encoder is used to extract the feature e x Mapped to the hidden layer representation e h :e h =fe(e x θ e ), and use the third decoder to represent the hidden layer e h Reconstructed into output features Among them, θ e and θ d represent the third encoder parameter and the third decoder parameter respectively, f e and f d are forward propagation functions of the third encoder and the third decoder respectively; Based on the hidden layer representation e h Determine the information entropy function H(e h ): H(e h )=-∑ i p(e hi )log p(e hi ); where H(e h ) is used to measure the hidden layer representation e h The information content, p(e hi ) represents the hidden layer representation e h The probability distribution of the i-th element in ; Determine the output feature e x and the extracted feature e x The reconstruction error between To keep the reconstruction error small while maximizing H(e h ) as the target, and update the third encoder parameter θ in combination with the back propagation algorithm e and the third decoder parameter θ d , get the updated third encoder parameter θ′ e and the updated third decoder parameter θ′ d ; Based on the updated third encoder parameter θ′ e , update the forward propagation function of the third encoder to: e (e x θ e ′)=Sig(W e e x +b e ); and based on the updated third decoder parameter θ′ d , update the forward propagation function of the third decoder to: f d (e h θ′ d )=Sig(W d e h +b d ), where W e and W d are the weight matrices of the third encoder and the third decoder, respectively, and b e and b d is the bias term, and Sig() is the Sigmoid nonlinear activation function.
6. The method according to claim 1, characterized in that The cross-honeypot optimization algorithm is used to adjust the weight and bias of the extreme learning machine model during the training process, specifically including: Randomly initialize the weights and biases of the extreme learning machine model; wherein the weight of the input to the hidden layer of the extreme learning machine model is W∈R m×d , where m is the dimension of the input feature, d is the number of neurons in the hidden layer, and the bias vector of the hidden layer is b∈R d ; The initialized weights and biases are used as honeypots; each honeypot contains a weight and its bias; Each honeypot updates its own parameters by exchanging information with other honeypots to explore new parameter spaces: Ps i and Ps j are the i-th honeypot and the j-th honeypot respectively, α e and β e are the learning rate in the exploration phase, It is the average parameter value of all current honeypots, which is used to guide the search direction; Using performance evaluation formula Evaluation Honeypot P i performance; among them, L(Ps i ) is the performance evaluation value, N is the total number of training samples and expansion samples, x n is the feature vector of the nth sample, y n is the corresponding true label, f() is the output function of the extreme learning machine model, l loss is the loss function; Based on the performance evaluation value and incentive formula Ps to Honeypot i Provide incentives to increase honeypot Ps i The probability of being adopted in the next iteration; where, is the probability value after the stimulus, is the probability value before excitation, γ′ is the excitation intensity parameter, L(Ps i ) is the loss value of the i-th honeypot; The algorithm is iterated based on the post-excitation probability value until the iteration ends, and the weight and bias of the last iteration are used as the final weight and final bias of the extreme learning machine model.
7. The method according to claim 6, characterized in that The method further includes: dynamically adjusting the learning rate α in the exploration phase according to the performance improvement in the iterative process e and β e : Among them, δ′ is an adjustment factor based on performance improvement, t represents the current number of iterations, and α e (t) is the learning rate of the exploration phase of the previous iteration, β e (t) is the learning rate of the exploration phase of the previous iteration, α e (t+1) is the learning rate of the exploration phase of the current iteration, β e (t+1) is the learning rate of the exploration phase of the current iteration.
8. A fault diagnosis system based on machine learning, characterized in that: The system comprises: The acquisition module is used to collect sensor parameter samples during device operation and divide them into training sample sets and test sample sets; wherein a sensor parameter sample contains multiple types of features; A data expansion module, used for performing data expansion on the training sample set based on a reverse-coded logical forest algorithm to obtain an expanded sample set; A construction module, for constructing a multi-layer neural network as a feature extraction model, using the training sample set and its expanded sample set to train the feature extraction model, and using an ecosystem optimization algorithm to iteratively optimize parameters in all neural networks; the parameters include but are not limited to: weights, biases; An input module, used to input the extracted features into a feature dimensionality reduction model to train the feature dimensionality reduction model; wherein the feature dimensionality reduction model is an autoencoding neural network that can adaptively adjust the dimension; A classification training module is used to input the data after feature dimension reduction into the classifier to train the classifier and obtain the final classifier model; wherein the classifier adopts an extreme learning machine model, and a cross honeypot optimization algorithm is used to adjust the weight and bias of the extreme learning machine model during the training process; The fault diagnosis module is used to take the data of the equipment to be tested as input after the training of each model is completed, and perform equipment fault diagnosis through the trained feature extraction model, the trained feature dimension reduction model, and the final classifier model in sequence.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A fault diagnosis device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Engineering patrol robot positioning method based on multi-sensor data fusion
CN119803482A
