Cabin equipment state perception and fault diagnosis method based on k-means algorithm and bp neural network
By optimizing data through PCA dimensionality reduction and K-means algorithm, combined with BP neural network, the problems of data redundancy and low efficiency in the status perception and fault diagnosis of ship engine room equipment are solved, and efficient fault diagnosis is achieved.
Patent Information
- Application Number
- CN202211601072.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2042-12-12
AI Technical Summary
Existing technologies for the status perception and fault diagnosis of ship engine room equipment suffer from problems such as data redundancy, low data identification, and insufficient detection time and efficiency, especially in terms of data processing and fault diagnosis.
Principal component analysis (PCA) was used for data preprocessing to reduce the dimensionality to 3D; K-means algorithm was used to optimize data feature extraction, and one-hot encoding was used to convert the operating condition mode into dummy variables; iterative training was combined with BP neural network to achieve fault diagnosis.
It effectively simplifies data processing, improves data identification and diagnostic accuracy, significantly reduces diagnostic time, and enhances fault diagnosis efficiency.
Smart Images

Figure CN115879018B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the field of engine room equipment state perception extraction and fault diagnosis, in particular to an engine room equipment state perception and fault diagnosis method based on a K-means algorithm and a BP neural network. BACKGROUND
[0002] As an important transportation carrier traffic equipment, a ship provides great help for the transportation industry. Strengthening the development of the ship industry undoubtedly provides great help for economic exchanges, so the development of the ship has great significance. As a large carrier system, the engine room of the ship has the characteristics of complex structure, multi-physical field nonlinear coupling, high density of people flow and information flow, and variable operation environment. With the development of automation, integration and intelligence of the engine room, the modern high-tech ship engine room has evolved into a complex social technology system. Therefore, the engine room equipment parameter perception of the ship is extremely complex, and how to transmit multiple data perception to the interface and how to perform fault diagnosis on the basis of the data become important problems to be solved.
[0003] At present, the engine room equipment state perception extraction system of the ship is very perfect, and the fault diagnosis also has high development. However, the redundant data cannot be well processed, and the detection time and efficiency are not high enough. How to efficiently process the ship engine room perception data and quickly perform fault diagnosis still needs to be improved. As for the use of K-means algorithm and BP neural network for analysis and application, in the data preprocessing aspect, PCA is used to optimize the data, finally optimize the data, simplify the diagnosis steps and improve the efficiency, and no literature report is found.
[0004] At present, the engine room equipment state perception extraction system of the ship is very perfect, and the fault diagnosis also has high development. However, the redundant data cannot be well processed, and the detection time and efficiency are not high enough. How to efficiently process the ship engine room perception data and quickly perform fault diagnosis still needs to be improved. As for the use of K-means algorithm and BP neural network for analysis and application, in the data preprocessing aspect, PCA is used to optimize the data, finally optimize the data, simplify the diagnosis steps and improve the efficiency, and no literature report is found. SUMMARY
[0005] The application aims to provide an engine room equipment state perception and fault diagnosis method based on a K-means algorithm and a BP neural network, which can effectively solve the efficiency problem of current ship engine room equipment data acquisition and greatly improve the efficiency of fault diagnosis.
[0006] To achieve the above-mentioned purpose, the technical scheme adopted by the application is as follows:
[0007] Firstly, the method for preprocessing the ship engine room equipment data comprises:
[0008] Standardization of the collected ship data:
[0009]
[0010] Secondly, the correlation matrix of its coefficient is calculated:
[0011]
[0012] Finally, the eigenvalues λ of the correlation matrix are calculated p =(λ1,λ2,…,λ p ),i=1,2,…,p
[0013] The eigenvectors a i =(a i1 ,a i2 ,…,a ip ),i=1,2,…,p
[0014] The contribution rate z of each data is the proportion of its eigenvalue, which is shown in the following formula:
[0015]
[0016] The advantage of using principal component analysis PCA is unsupervised learning measured by variance, which is not limited by sample labels, can reduce the workload of index selection, and can optimize the number of retained or reduced data according to the data contribution rate and retain as much information as possible, that is, let the total variance of the data be as close as possible, and the discarded eigenvectors are considered to have little information and have little effect on the overall analysis results, thereby reducing the workload.
[0017] Second step, the optimized data feature extraction based on K-means algorithm makes the data processing more concise and has certain regularity, including:
[0018] K-means algorithm is a clustering algorithm. Clustering means that according to the similarity principle, data objects with high similarity are divided into the same cluster, and data objects with high dissimilarity are divided into different clusters. The biggest difference between clustering and classification is that the clustering process is unsupervised, that is, there is no prior knowledge of the data objects to be processed, while the classification process is supervised, that is, there is a training data set with prior knowledge. The specific steps are as follows:
[0019] K-means algorithm first needs to select K initialization clustering centers, calculate the distance of each data object to the K initialization clustering centers, and select the Euclidean distance, whose centroid is the mean value, and the formula is:
[0020]
[0021] The data objects are divided into the data set closest to the cluster center, and after all the data objects are divided, K data sets (i.e. K clusters) are formed.
[0022] Next, the mean of the data objects of each cluster is recalculated, and the mean is taken as a new cluster center.
[0023] Finally, the distance of each data object to the new K initialization cluster centers is calculated, and the division is re-performed.
[0024] After each division, the initialization cluster center needs to be recalculated, and the process is repeated until all the data objects cannot be updated to other data sets. The Euclidean distance of each data to the centroid is minimized.
[0025] A distortion function is defined to describe the convergence of the calculation as follows:
[0026]
[0027] Select c as an arbitrary value from 1 to k, so that J is minimized, and then repeat the above steps to select the most suitable c. That is, the c categories after K-means processing, and finally, according to the distance of the sample points to the c centroids, the sample points are classified, and the data is classified.
[0028] The third step is to encode the fault modes of the input working conditions, and the taken is to encode 5 different working conditions as one-hot encoding, into dummy variables, including:
[0029] The invention detects the faults of a ship engine room: normal working condition, high-pressure oil pump fault, injector nozzle fault, piston ring fault, exhaust valve fault, 5 main working conditions, which are changed into dummy variables according to one-hot encoding.
[0030] The fourth step is to perform BP neural network iterative training on the symptoms after K-means clustering analysis as input, and the working condition mode output matrix as the target vector, and the steps mainly include:
[0031] Step 1, network initialization. According to the system input, determine the network input layer node number n, the hidden layer node number l, and the output layer node number m, initialize the connection weights between the input layer, the hidden layer and the output layer neurons, ω ij , ω jk , initialize the hidden layer threshold a, the output layer threshold b, the given learning rate and the neuron excitation function.
[0032] Sigmoid excitation function:
[0033]
[0034] Step 2, hidden layer output calculation: according to input variable X, the connection weight ω between input layer and hidden layer ij And hidden layer threshold a, calculate hidden layer output H. Hidden function:
[0035]
[0036] Step 3, output layer output calculation: according to hidden layer output H, connection weight ω ik And threshold b, calculate BP neural network prediction output, output function:
[0037]
[0038] Step 4, error calculation: according to network prediction output O and expected output Y, calculate network prediction error E, formula is:
[0039]
[0040] Step 5, weight update: update network connection weight ω ij , ω ik , learning rate is η, formula is:
[0041] ω ij = ω ij + ηH j (1-H j )x i k=1mω jk e k
[0042] ω jk = ω jk + ηH j e k
[0043] Threshold update: update network node threshold a, b according to network prediction error e, formula is:
[0044]
[0045] b k = b k + ηe k
[0046] Step 6, judge whether the algorithm iteration is ended, if not, return to step 2.
[0047] The beneficial effects of the present application relative to the prior art are:
[0048] The present application effectively extracts data features, improves the diagnosis accuracy, and also reduces the diagnosis time, which is as follows:
[0049] 1. For the ship engine room data acquisition aspect still exist data redundant problem, the present application adopts principal component analysis (PCA) to carry out optimization processing, the original 13 dimension data is compressed to 3 dimensional data, and the 3 dimensional data represents more than 98% of the main content, the first step of complex data is pretreated.
[0050] 2. The traditional data recognition degree is not high, such as data accuracy is too high, the number of decimal places is too long, and too cumbersome. The present application adopts K-means algorithm to calculate the 3-dimensional data after pretreatment, converts complex data into simple data of several categories, and improves the recognition degree.
[0051] 3. The simplicity of BP neural network input data and output data will affect the calculation efficiency and error size of the algorithm, the present application studies five kinds of ship working conditions, uses one-hot encoding to convert different working conditions into dummy variables as the output of BP neural network, and the input data is processed by PCA and K-means. The processed data is imported into BP neural network for fault diagnosis, which not only improves the diagnosis accuracy, but also reduces the diagnosis time, greatly improves the efficiency of fault diagnosis. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 The specific operation steps of the present application are shown in the figure;
[0053] Figure 2 The variance contribution rate chart of the data processed by principal component analysis (PCA) is shown in the figure;
[0054] Figure 3 The flow chart of K-means algorithm is shown in the figure;
[0055] Figure 4 The centroid dimension data table after K-means processing is shown in the figure;
[0056] Figure 5 The data table after PCA processing is shown in the figure;
[0057] Figure 6 The flow chart of BP neural network algorithm is shown in the figure;
[0058] Figure 7 The iteration number chart of BP instance optimization algorithm is shown in the figure. DETAILED DESCRIPTION
[0059] To make the objectives, technical solutions, and advantages of this invention clearer, the embodiments of this invention will be described in further detail below with reference to the accompanying drawings. The technical solutions in the embodiments of this invention will be clearly and completely described. Obviously, the described examples are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, including models and algorithms applied in this field, all should fall within the scope of protection of this invention.
[0060] Example 1, refer to Appendix Figure 1 The method for cabin equipment status perception and fault diagnosis based on K-means algorithm and BP neural network adopts the following steps:
[0061] Methods for preprocessing ship engine room equipment data include:
[0062] The collected ship data is then standardized.
[0063]
[0064] Next, the correlation matrix of its coefficients is calculated:
[0065]
[0066] Finally, the eigenvalues λ of the correlation matrix are calculated. p =(λ1,λ2,…,λ) p ), i = 1, 2, ..., p
[0067] eigenvector a i =(a i1 ,a i2 ,…,a ip i = 1, 2, ..., p
[0068] The contribution rate z of each data point is the proportion of its eigenvalues, as shown in the following formula:
[0069]
[0070] The advantage of using Principal Component Analysis (PCA) is that it is an unsupervised learning method that measures information by variance, is not limited by sample labels, reduces the workload of indicator selection, optimizes the number of data to be retained or reduced in dimensionality based on the contribution rate of the data, and retains as much information as possible, that is, makes the total variance of the data as close as possible. The discarded feature vectors are considered to have little information content and have negligible impact on the overall analysis results, thereby reducing the workload.
[0071] Secondly, the optimized data feature extraction based on the K-means algorithm makes data processing simpler and more regular, including:
[0072] The K-means algorithm is a clustering algorithm. Clustering is a process of dividing data objects with high similarity into the same cluster and dividing data objects with high dissimilarity into different clusters according to the similarity principle. The biggest difference between clustering and classification is that the clustering process is an unsupervised process, that is, there is no prior knowledge of the data objects to be processed, while the classification process is a supervised process, that is, there is a training data set with prior knowledge. The specific steps are as follows:
[0073] (1) The K-means algorithm first needs to select K initialization cluster centers
[0074] (2) Calculate the distance of each data object to the K initialization cluster centers. The distance is selected as the Euclidean distance, and the centroid is the mean value, and the formula is:
[0075]
[0076] The data objects are divided into the nearest data set to the cluster center. After all the data objects are divided, K data sets (i.e. K clusters) are formed.
[0077] (3) Next, the mean value of the data objects in each cluster is recalculated, and the mean value is taken as the new cluster center.
[0078] (4) Finally, the distance of each data object to the new K initialization cluster centers is calculated, and the division is re-divided.
[0079] (5) After each division, the initialization cluster center needs to be recalculated, and the process is repeated until all data objects cannot be updated to other data sets. The Euclidean distance of each data to the centroid is minimized.
[0080] (6) A distortion function is defined to describe the convergence of the calculation as:
[0081]
[0082] Select c as an arbitrary value from 1 to k, so that J is minimized, and then repeat the above steps to select the most suitable c, that is, the c categories after K-means processing, and finally classify the sample points according to the distance between the c centroids, and the data is classified.
[0083] Finally, the fault modes of the input working conditions are encoded, and different 5 working conditions are one-hot encoded into dummy variables, including:
[0084] The invention detects the faults of a ship engine room, which are mainly divided into five types: normal working condition, high pressure oil pump fault, fuel injector nozzle fault, piston ring fault and exhaust valve fault. According to the one-hot encoding, the five working conditions are taken as the dummy variables, and then a sparse matrix is returned, and each column is a category in a feature containing a sample represented by 1 and not containing 0. One-hot is suitable for representing a small amount of unrelated data. In the invention, the five working conditions are respectively one-hot encoded as dummy variables: [1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]. It can be found that this coding form can well replace the original working condition and is easier to import into algorithm operation.
[0085] Then, the 8 kinds of cluster analysis signs of K-means are taken as input quantities, and the working condition mode output matrix is taken as a target vector to perform BP neural network iterative training, including:
[0086] The steps mainly include:
[0087] Network initialization. According to the system input, the number of network input layer nodes n, the number of hidden layer nodes l and the number of output layer nodes m are determined, the connection weights between input layer, hidden layer and output layer neurons are initialized, ω ij , ω jk , the hidden layer threshold value a and the output layer threshold value b are initialized, the learning rate and the neuron excitation function are given.
[0088] Sigmoid excitation function:
[0089]
[0090] Hidden layer output calculation: according to the input variable X, the connection weights ω ij between the input layer and the hidden layer and the hidden layer threshold value a, the hidden layer output H is calculated. Hidden function:
[0091]
[0092] Output layer output calculation: according to the hidden layer output H, the connection weights ω ik and the threshold value b, the BP neural network prediction output is calculated, and the output function is:
[0093]
[0094] Error calculation: according to the network prediction output O and the expected output Y, the network prediction error E is calculated, and the formula is:
[0095]
[0096] Weight update: update the network connection weights ωij , ω ik . Learning rate is η, formula is:
[0097] ω ij = ω ij + ηH j (1-H j )x i k = 1mω jk e k
[0098] ω jk = ω jk + ηH j e k
[0099] Threshold update: update network node threshold a, b according to network prediction error e. Formula is:
[0100]
[0101] b k = b k + ηe k
[0102] Determine whether the algorithm iteration is ended, if not, return to step 2.
[0103] Embodiment 2, the cabin equipment state perception and fault diagnosis method based on K-means algorithm and BP neural network, through the specific shipping working condition of the experimental ship, instantiation analysis is carried out, mainly including analyzing the specific data of the equipped super capacitor and battery, using PSO-BP algorithm for optimization, and instantiation is carried out to obtain the optimal data. The optimization parameters mainly include super capacitor voltage, battery capacity, low pass filter constant T, and the optimal data result is obtained after multiple iterations. The specific is as follows:
[0104] According to the specific cabin equipment operation parameters of an experimental ship, instantiation analysis is carried out, and the experimental verification result comparison of the process is carried out. The input ship data: the ship detection data with dimension 13 mainly includes vibration signal, temperature signal, pressure signal, diesel speed signal and effective power signal. The collected data is preliminarily processed by PCA, and the specific steps are as follows:
[0105] The collected ship data is standardized:
[0106]
[0107] Secondly, the correlation matrix of the coefficient is calculated:
[0108]
[0109] Finally, the eigenvalues of the correlation matrix λ p = (λ1, λ2, …, λ p ), i = 1, 2, …, p
[0110] The eigenvector a i = (a i1 , a i2 , …, a ip ), i = 1, 2, …, p
[0111] The contribution rate z of each data is the ratio of its eigenvalue, which is shown in the following formula:
[0112]
[0113] The unsupervised learning of principal component analysis measures information by variance, which is not limited by sample labels, can reduce the workload of index selection, and can optimize the number of retained or reduced dimension data according to the data contribution rate and retain as much information as possible, that is, the total variance of the data is as close as possible. The discarded eigenvectors are considered to have little information and have little effect on the overall analysis results, thereby reducing the workload.
[0114] Modeling is performed using sklearn, and PCA is imported for training. According to the horizontal coordinate, the dimension of the required data is input, and the vertical coordinate is the cumulative variance contribution rate. From the initial 1 to 80% or less, to the final 13 data contribution rate of 100%. After the following Figure 2 , it can be seen that when n = 3, the data can represent nearly 98% of the data contribution rate, and the subsequent data contribution rate is very low, which can be discarded. Finally, 3-dimensional data after dimensionality reduction is obtained, and the data covers most of the useful information, improving the efficiency of data state detection perception.
[0115] K-means processing is performed: the K-means algorithm optimizes data feature extraction, making data more concise and having certain regularity, including:
[0116] K-means algorithm is a clustering algorithm. Clustering means that data objects with high similarity are divided into the same cluster according to the similarity principle, and data objects with high dissimilarity are divided into different clusters. The biggest difference between clustering and classification is that the clustering process is unsupervised, that is, there is no prior knowledge of the data objects to be processed, while the classification process is supervised, that is, there is a training data set with prior knowledge. The specific steps are as follows:
[0117] (1) K-means algorithm first needs to select K initial cluster centers
[0118] (2) Calculate the distance of each data object to K initialization clustering centers, the distance is selected as Euclidean distance, and the centroid is the mean, the formula is:
[0119]
[0120] The data objects are divided into the nearest data set to the clustering center, and after all the data objects are divided, K data sets (i.e. K clusters) are formed.
[0121] (3) Next, the mean of each cluster of data objects is recalculated, and the mean is taken as the new clustering center.
[0122] (4) Finally, the distance of each data object to the new K initialization clustering centers is calculated, and the division is re-divided.
[0123] (5) After each division, the initialization clustering center needs to be recalculated, and the process is repeated until all data objects cannot be updated to other data sets. The Euclidean distance of each data to the centroid is minimized.
[0124] (6) A distortion function is defined to describe the convergence of the calculation as:
[0125]
[0126] As shown in Figure 3 , select c as any value from 1 to k, so that J is minimized, and then repeat the above steps to select the most suitable c, that is, the c categories after K-means processing, and finally classify the sample points according to the distance from the c centroid, and simplify the process of classifying data.
[0127] The K-means clustering is used to calculate the centroid, and the data dimension after PCA processing is (600, 3). After the calculation of each data to the clustering center c=3, the best classification of each data can be obtained.
[0128] According to the centroid obtained by K-means processing in Python, the data of the table is exported by using DataFrame, as shown in the table in the Figure 4 .
[0129] The specific PCA processing data dimension is (600, 3), and part of the data is shown in the table in the Figure 5 .
[0130] For example, in the first column of the data in the above-mentioned "PCA processing data dimension (600, 3)", 5 representative data [42.35151, 47.25646, -12.5155, 13.27895, 39.51235] are taken, which are optimized to a large extent after K-means clustering according to their corresponding data [0, 0, 1, 2, 0].
[0131] The fault mode of the input working condition is encoded, and different 5 working conditions are one-hot encoded, becoming a dummy variable, including:
[0132] The faults of the ship engine room detected by the application mainly include five types: normal working condition, high-pressure oil pump fault, fuel injector nozzle fault, piston ring fault and exhaust valve fault. According to one-hot encoding, they are used as dummy variables, and then a sparse matrix is returned, each column is a category in a feature containing a sample represented as 1 and not containing 0. One-hot is suitable for representing a small amount of unrelated data. In the application, the five working conditions are one-hot encoded as dummy variables: [1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]. It can be found that this encoding form can well replace the original working condition and is easier to import into algorithm operation.
[0133] Finally, it is imported into the BP neural network algorithm for fault diagnosis calculation.
[0134] The symptoms after K-means clustering analysis are used as input, and the working condition mode output matrix is used as the target vector. The BP neural network is iteratively trained, and the steps mainly include:
[0135] Step 1, network initialization. According to the system input, determine the network input layer node number n, the hidden layer node number l and the output layer node number m, initialize the connection weights between the input layer, the hidden layer and the output layer neurons, ω ij , ω jk , initialize the hidden layer threshold a, the output layer threshold b, and give the learning rate and the neuron excitation function.
[0136] Sigmoid excitation function:
[0137]
[0138] Step 2, hidden layer output calculation: according to the input variable X, the connection weights ω ij between the input layer and the hidden layer and the hidden layer threshold a, calculate the hidden layer output H. Hidden function:
[0139]
[0140] Step 3: Output layer output calculation: Based on the hidden layer output H, calculate the connection weights ω. ik Given a threshold b, calculate the predicted output of the BP neural network. The output function is:
[0141]
[0142] Step 4, Error Calculation: Based on the network's predicted output O and expected output Y, calculate the network prediction error E using the following formula:
[0143]
[0144] Step 5, Weight Update: Update the network connection weights ω based on the network prediction error e. ij ω ik The learning rate is η, and the formula is:
[0145] ω ij =ω ij +ηH j (1-H j )x i k=1mω jk e k
[0146] ω jk =ω jk +ηH j e k
[0147] Threshold Update: Update the network node thresholds a and b based on the network prediction error e. The formula is:
[0148]
[0149] b k =b k +ηe k
[0150] Step 6: Determine if the algorithm iteration has ended. If not, return to step 2. The specific process is as follows: Figure 6 As shown.
[0151] After optimization and testing, this invention selects the input layer, hidden layer, and output layer structure of the 3-7-5 network structure, and iteratively trains the BP neural network obtained through data processing.
[0152] According to the neural network curve, as shown Figure 7 As shown, the training results obtained are as follows: when the number of iterations is 12, the mean squared error can reach the target training error requirement, and the optimal number of iterations is 12.
[0153] With its original high-latitude detection data PCA dimensionality reduction, when K-means algorithm data processing optimization, to the last step of working condition coding, import BP neural network, greatly optimize the original data of redundant and can not be analyzed, and the optimization analysis of the best PCA dimensionality reduction dimension and neural network iteration times, improve the state perception efficiency of ship engine room equipment, also improve the simplicity of BP neural network data import, ultimately improve the efficiency of fault diagnosis.
Claims
1. A method for cabin equipment state perception and fault diagnosis based on K-means algorithm and BP neural network, characterized in that, It comprises the following steps: S1: Multi-source information collection is performed on the engine room equipment data of the ship; S2: Data preprocessing is performed, principal component analysis is performed on the data, and the data is simplified and reduced in dimension; S3: Feature extraction is performed, K-means algorithm is used for cluster analysis of the data, so that the data is more concise and has certain regularity; The input working condition fault mode is encoded, and the taken is to encode 5 different working conditions as one-hot encoding, which becomes a dummy variable; The symptom after K-means cluster analysis is taken as the input, and the working condition mode output matrix is taken as the target vector, and BP neural network iterative training is performed; S4: The obtained optimization data is trained based on the BP neural network, and the prediction result and the expected result are compared to obtain a conclusion; The specific steps of training the obtained optimization data based on the BP neural network are: Step 1, network initialization: according to the system input, determine the network input layer node number n, the hidden layer node number l, the output layer node number m, initialize the connection weight between the input layer, the hidden layer and the output layer neurons, ω ij , ω jk , initialize the hidden layer threshold value a, the output layer threshold value b, give the learning rate and the neuron excitation function; Sigmoid activation function: Step 2, hidden layer output calculation: according to input variable X, connection weight ω between input layer and hidden layer ij and hidden layer threshold a, calculate hidden layer output H; hidden function: Step 3, output layer output calculation: from the hidden layer outputs H, the connection weights ω ik and the threshold b, the BP neural network prediction output is calculated, the output function: Step 4, error calculation: according to the network prediction output O and the expected output Y, the network prediction error E is calculated, and the formula is: Step 5, weight update: update the network connection weight ω according to the network prediction error e ij , ω ik ; the learning rate is η, and the formula is: ω ij = ω ij + ηH j (1-H j ) x i k = 1 m ω jk e k ω jk = ω jk + ηH j e k Threshold update: update the network node threshold a, b according to the network prediction error e; the formula is: b k = b k + ηe k Step 6, judge whether the algorithm iteration is ended, if not, return to step 2.
2. The K-means algorithm and BP neural network-based cabin equipment state perception and fault diagnosis method according to claim 1, characterized in that, The specific steps of principal component analysis of the data are: First, the collected ship engine room data is standardized: Second, the correlation matrix of the coefficients is calculated: Finally, the eigenvalues λ of the correlation matrix are computed p = (λ1, λ2, …, λ p p), i = 1, 2, …, p Feature vector a i = (a i1 , a i2 , …, a ip ), i = 1, 2, …, p The contribution rate z of each data is the ratio of its eigenvalue as shown in the following formula: According to the data contribution rate, the number of retained or reduced data is determined, and the information amount is preserved as much as possible, that is, the total variance of the data is as close as possible.
3. The K-means algorithm and BP neural network-based cabin equipment state perception and fault diagnosis method according to claim 1, characterized in that: The step of using K-means algorithm to cluster analyze the data is: First, select K initialization cluster centers; Calculate the distance of each data object to the K initialization cluster centers, and the distance selects the Euclidean distance, and the centroid is the mean value, and the formula is: Divide the data objects into the nearest data set to the cluster center, and when all data objects are divided, K data sets are formed; Next, recalculate the mean value of each cluster of data objects, and take the mean value as the new cluster center; Finally, calculate the distance of each data object to the new K initialization cluster centers, and re-divide; After each division, the initialization cluster center needs to be recalculated, and the process is repeated until all data objects cannot be updated to other data sets; minimize the Euclidean distance of each data to the centroid; Define a distortion function to describe the convergence of the calculation, and the formula is: Select c as any value from 1 to k, so that J is minimized, and then repeat the above steps to select the most suitable c.
4. The K-means algorithm and BP neural network-based cabin equipment state perception and fault diagnosis method according to claim 1, characterized in that: The multi-source information includes vibration signal, temperature signal, pressure signal, diesel speed signal and effective power signal.
5. The K-means algorithm and BP neural network-based cabin equipment state perception and fault diagnosis method according to claim 1, characterized in that: The working condition mode output matrix includes one-hot encoding of normal working condition, high-pressure oil pump fault, injector nozzle fault, piston ring fault and exhaust valve fault.
6. The method of claim 5, wherein the method is characterized by: The one-hot encoding is used as a dummy variable, and then a sparse matrix is returned, each column is a category in a feature, containing a sample represented as 1, and not containing represented as 0; normal working condition, high-pressure oil pump fault, fuel injector nozzle fault, piston ring fault, exhaust valve fault are respectively one-hot encoded as dummy variables: [1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1].
Citation Information
Patent Citations
Ship equipment fault diagnosis method and equipment based on multi-dimensional feature knowledge extraction
CN112810772A
Planet gear fault diagnosis method based on differential evolution probability neural network
CN111504635A
Gearbox fault diagnosis method and device based on improved PSO-BP neural network
CN113188794A