Ship temperature sensor step type fault false alarm identification method

Through the multiple technical combination of waveform analysis, measurement learning and frequency domain feature attention, the discriminant formula and waveform modeling method are designed, and the accuracy of step-type fault false alarm recognition in the ship temperature sensor monitoring system is solved, and the difference is achieved Accurate identification of type fault false alarms reduces false alarm rates and maintenance costs, and improves system reliability.

CN119202871APending Publication Date: 2024-12-27CHINESE PEOPLES LIBERATION ARMY UNIT 92942
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311366931.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing ship temperature sensor monitoring system is difficult to distinguish between real faults and instantaneous temperature fluctuations when facing step-type fault false alarms, resulting in unnecessary maintenance and losses of the system, and the traditional threshold alarm mechanism is not very accurate in identification.

Method used

Using multiple technologies such as waveform analysis, measurement learning, frequency domain feature attention, etc., design discriminant formulas and waveform modeling methods, identify and classify fault false alarm signals through ternary networks and ResNet18 models, and combine frequency domain features and measurement learning. The results are weighted out, and the accuracy of false alarms of different types of faults is finally realized.

Benefits of technology

It significantly improves the accuracy of identification of step-type fault false alarms in ship temperature sensors, reduces false alarm rates, reduces unnecessary intervention and maintenance costs, and improves the reliability and economicality of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202871A_ABST
    Figure CN119202871A_ABST
Patent Text Reader

Abstract

The invention provides a ship temperature sensor step type fault false alarm identification method, which comprises the step of acquiring a fault false alarm signal, and further comprises the following steps of: performing waveform analysis on the fault false alarm signal, and designing a fault false alarm discrimination method; random sample processing is carried out by combining a fault false alarm discrimination method; constructing a metric learning model based on the ternary network; constructing a measurement module for fault classification; constructing a frequency domain attention assistance module, and taking a frequency domain measurement result as a weighted item of a final result; and outputting a final classification result. According to the invention, by designing the combination of a discriminant formula, a waveform modeling mode, a random sample generation method, a metric learning method and a frequency domain feature attention assistance module, different types of step type fault false alarms can be accurately identified, so that the reliability and accuracy of a ship monitoring system are improved; and a new thought is provided for a subsequent ship temperature sensor step type fault false alarm identification method based on waveform analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of ship temperature sensor fault identification, in particular to a ship temperature sensor step fault false alarm identification method. Background Art

[0002] Ship temperature sensors play a vital role in modern ship monitoring systems, used to monitor and maintain the temperature status of ships. However, due to environmental conditions and the characteristics of the sensors themselves, these sensors may experience step-type fault false alarms, which may lead to unnecessary maintenance and losses of the system. Therefore, developing an efficient step-type fault false alarm identification method is crucial to improving the reliability of ship monitoring systems and reducing maintenance costs. Traditional ship temperature sensor monitoring systems usually rely on threshold alarm mechanisms, triggering alarms when temperature values ​​exceed or fall below a predetermined threshold. This method performs poorly in the face of step-type fault false alarms because it is difficult to distinguish between real faults and instantaneous temperature fluctuations. In the prior art, there are various signal processing techniques for fault diagnosis, such as peak detection, wavelet analysis, and machine learning techniques such as support vector machines. However, these methods still have some limitations, such as low recognition accuracy for different types of fault false alarms, and insufficient signal waveform modeling to cope with complex situations. Summary of the invention

[0003] In order to solve the above technical problems, the present invention proposes a method for identifying false alarms of step faults of ship temperature sensors. By designing a combination of a discrimination formula, a waveform modeling method, a random sample generation method, a metric learning method and a frequency domain feature attention auxiliary module, different types of step fault false alarms can be accurately identified, thereby improving the reliability and accuracy of the ship monitoring system, and providing a new idea for the subsequent method for identifying false alarms of step faults of ship temperature sensors based on waveform analysis.

[0004] The present invention provides a method for identifying a step-type fault false alarm of a ship temperature sensor, comprising obtaining a fault false alarm signal, and further comprising the following steps:

[0005] Step 1: Perform waveform analysis on the fault false alarm signal and design a fault false alarm discrimination method;

[0006] Step 2: Perform random sampling in combination with the fault false alarm discrimination method;

[0007] Step 3: Construct a metric learning model based on a ternary network for fault waveform recognition;

[0008] Step 4: Build a metric module for fault classification;

[0009] Step 5: Construct a frequency domain attention auxiliary module and use the frequency domain measurement results as the weighted items of the final results;

[0010] Step 6: Output the final classification results.

[0011] Preferably, the fault false alarm distinguishing method includes a distinguishing method for Type I fault and a distinguishing method for Type II fault.

[0012] In any of the above schemes, it is preferred that the Type I fault is caused by a sudden change in the alarm switch quantity inside the monitoring system, and this abnormal state is identified by time domain analysis.

[0013] In any of the above schemes, it is preferred that the method for determining the type I fault is to confirm the generation of a false alarm when the following two conditions are met at the same time:

[0014] 1) Whether the sensor state is 1 at time t;

[0015] 2) Whether the sensor state is 0 at other times other than time t;

[0016] The formula is

[0017]

[0018] Among them, δ(t) is the sensor state at time t, and t0 is the time when the type I fault signal appears.

[0019] In any of the above schemes, it is preferred that the Type II fault is caused by a short-term abnormal fluctuation of the analog quantity.

[0020] In any of the above schemes, it is preferred that the method for determining the type II fault is to confirm the generation of a false alarm when the following two conditions are met at the same time:

[0021] 1) The variable value of the simulated quantity has a sharp decline and rise process;

[0022] 2) The variable value of the analog quantity triggers the minimum threshold alarm point;

[0023] The formula is

[0024]

[0025] Among them, p(t) is the variable value of the analog quantity at time t, Δt1 is the continuous decrease time of the variable value in the type I fault signal, and Δt2 is the continuous increase time of the variable value in the type II fault signal.

[0026] In any of the above schemes, it is preferred that step 2 includes randomly generating a large number of fault false alarm signals as positive samples according to the discrimination formula of type I and type II faults, and selecting normal signals as negative samples, and selecting positive and negative sample pairs as data sets of the fault false alarm signal discrimination model, wherein type I fault false alarm signals are marked as category 1, type II fault false alarm signals are marked as category 2, and normal signals are marked as category 0.

[0027] In any of the above schemes, it is preferred that step 3 includes selecting a triplet network as the basic network architecture of the metric learning model, and fault samples and normal samples as positive and negative sample pairs; selecting resnet18 as the feature extraction module; and the metric module selects the k-nearest neighbor algorithm based on Pearson similarity and the integrated algorithm of distance similarity to calculate the similarity between samples.

[0028] In any of the above schemes, preferably, step 4 includes the following sub-steps:

[0029] Step 41: Use the k-nearest neighbor algorithm based on Pearson similarity to calculate the category score at each spatial position, and select the maximum category score of the entire image;

[0030] Step 42: Determine the image category using a k-nearest neighbor-based distance similarity score;

[0031] Step 43: Use the weighted sum of the category score and the distance similarity score to determine the category of the image.

[0032] In any of the above solutions, preferably, the formula of the k-nearest neighbor algorithm based on Pearson similarity is:

[0033]

[0034] Among them, S(·) is the Pearson similarity, x i is the local descriptor of the query sample, y j is the local feature descriptor of the support sample, i is the dimension index in the query feature vector, j is the dimension index in the support feature vector, and x i and j The average value of and They are and The second norm of .

[0035] In any of the above solutions, preferably, the formula for distance similarity based on k nearest neighbors is:

[0036]

[0037]

[0038] Among them, f(q,c) is the similarity between the query image q and the class c, k is the number of nearest neighbors, is m r The hth nearest neighbor in class c, m r is the rth local descriptor of q, is m r The nearest neighbor of , r is the dimension index in the query feature vector.

[0039] In any of the above solutions, preferably, the method for identifying type I faults is to use Fourier transform to convert type I faults into frequency domain, and the conversion formula is:

[0040]

[0041] Where p is the imaginary unit, ω is the angular frequency, x(t) is the original time signal, and e -pωt is a complex exponential term, and dt is a microelement.

[0042] In any of the above schemes, it is preferred that the method for identifying the type II fault is to retain the time domain waveform characteristics and use the waveform image to perform fault identification.

[0043] In any of the above schemes, preferably, step 5 includes the following sub-steps:

[0044] Step 51: In the data processing stage, the original time domain signal image and type I fault waveform image are converted from time domain to frequency domain using the numpy.fft() function;

[0045] Step 52: After feature extraction by the resnet18 network, the cosine similarity of the frequency domain features is calculated;

[0046] Step 53: After softmax, a rough label of the classification is obtained, and the weighted sum of the rough label and the result of the metric classification is taken as the final classification result.

[0047] The present invention proposes a method for identifying false alarms of step-type faults of ship temperature sensors, which adopts a combination of multiple technologies, including waveform analysis, metric learning, frequency domain feature attention, etc., and can significantly improve the recognition accuracy of false alarms of step-type faults of ship temperature sensors. By designing a discriminant formula and a waveform modeling method, different types of false alarms can be effectively distinguished, unnecessary intervention and maintenance costs caused by false alarms can be reduced, and the reliability and economy of the system can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 The present invention is a flow chart of a preferred embodiment of a method for identifying false alarms of step-type faults of ship temperature sensors according to the present invention.

[0049] Figure 2 It is a schematic diagram of an embodiment of a Type I fault waveform of a method for identifying false alarms of step faults of a ship temperature sensor according to the present invention.

[0050] Figure 3 It is a schematic diagram of an embodiment of a type II fault waveform of a method for identifying false alarms of step faults of a ship temperature sensor according to the present invention.

[0051] Figure 4 It is a schematic diagram of an embodiment of the resnet18 structure of the ship temperature sensor step fault false alarm identification method according to the present invention.

[0052] Figure 5 The figure is a schematic diagram of an embodiment of the measurement module structure of the method for identifying false alarms of step-type faults of ship temperature sensors according to the present invention. DETAILED DESCRIPTION

[0053] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0054] Embodiment 1

[0055] like Figure 1 As shown, step 100 is executed to obtain a fault false alarm signal.

[0056] Step 110 is executed to perform waveform analysis on the fault false alarm signal and design a fault false alarm identification method, wherein the fault false alarm identification method includes a method for identifying type I faults and a method for identifying type II faults.

[0057] The type I fault is caused by a sudden change in the alarm switch quantity inside the monitoring system. This abnormal state is identified by time domain analysis. The method for distinguishing the type I fault is to confirm the generation of a false alarm when the following two conditions are met at the same time:

[0058] 1) Whether the sensor state is 1 at time t;

[0059] 2) Whether the sensor state is 0 at other times other than time t;

[0060] The formula is

[0061]

[0062] Among them, δ(t) is the sensor state at time t, and t0 is the time when the type I fault signal appears.

[0063] The type II fault is caused by short-term abnormal fluctuations in the analog quantity. The method for determining the type II fault is to confirm the generation of a false alarm when the following two conditions are met at the same time:

[0064] 1) The variable value of the simulated quantity has a sharp decline and rise process;

[0065] 2) The variable value of the analog quantity triggers the minimum threshold alarm point;

[0066] The formula is

[0067]

[0068] Among them, p(t) is the variable value of the analog quantity at time t, Δt1 is the continuous decrease time of the variable value in the type I fault signal, and Δt2 is the continuous increase time of the variable value in the type II fault signal.

[0069] Execute step 120, perform random sampling in combination with the fault false alarm discrimination method, randomly generate a large number of fault false alarm signals as positive samples according to the discrimination formula of type I and type II faults, and select normal signals as negative samples, and select positive and negative sample pairs as data sets of the fault false alarm signal discrimination model, wherein type I fault false alarm signals are marked as category 1, type II fault false alarm signals are marked as category 2, and normal signals are marked as category 0.

[0070] Execute step 130 to construct a metric learning model based on a ternary network for fault waveform recognition. The ternary network is selected as the basic network architecture of the metric learning model, and the fault samples and normal samples are used as positive and negative sample pairs. Resnet18 is selected as the feature extraction module. The metric module selects the k-nearest neighbor algorithm based on Pearson similarity and the integrated algorithm of distance similarity to calculate the similarity between samples.

[0071] Execute step 140 to construct a metric module for fault classification, including the following sub-steps:

[0072] Execute step 141, use the k-nearest neighbor algorithm based on Pearson similarity to calculate the category score at each spatial position, and select the maximum category score of the entire image. The formula of the k-nearest neighbor algorithm based on Pearson similarity is:

[0073]

[0074] Among them, S(·) is the Pearson similarity x i is the local descriptor of the query sample, y j is the local feature descriptor of the support sample, i is the dimension index in the query feature vector, j is the dimension index in the support feature vector, and x i and j The average value of and They are and The second norm of .

[0075] Execute step 142 to determine the image category using a distance similarity score based on k nearest neighbors. The formula for distance similarity based on k nearest neighbors is:

[0076]

[0077]

[0078] Among them, f(q,c) is the similarity between the query image q and the class c, k is the number of nearest neighbors, is m r The hth nearest neighbor in class c, m r is the rth local descriptor of q, is m r The nearest neighbor of , r is the dimension index in the query feature vector.

[0079] Execute step 143, use the weighted sum of the category score and the distance similarity score to determine the image category. The method for identifying type I faults is to use Fourier transform to convert type I faults into frequency domain, and the conversion formula is:

[0080]

[0081] Where p is the imaginary unit used to represent the complex exponential term, ω is the angular frequency, representing the frequency component in the frequency domain, x(t) is the original time signal, and e -pωt is a complex exponential term, representing the component of the signal in the frequency domain, and dt is a micro-element, indicating a slight change in time during the integration process.

[0082] The method for identifying type II faults is to retain the time domain waveform features and use the waveform image to perform fault identification.

[0083] Execute step 150 to construct a frequency domain attention auxiliary module, and use the frequency domain measurement result as a weighted item of the final result, including the following sub-steps:

[0084] Execute step 151, in the data processing stage, convert the original time domain signal image and the type I fault waveform image from the time domain to the frequency domain using the numpy.fft() function;

[0085] Execute step 152, after feature extraction through the resnet18 network, calculate the cosine similarity of the frequency domain features;

[0086] Execute step 153, obtain the rough label of the classification after softmax, and take the weighted sum of the rough label and the result of the metric classification as the final classification result.

[0087] Execute step 160 to output the final classification result.

[0088] Embodiment 2

[0089] A method for identifying false alarms of step-type faults of ship temperature sensors based on waveform analysis, comprising:

[0090] 1. Design the discrimination formulas for two types of ship temperature sensor step fault false alarms (Type I fault and Type II fault), including:

[0091] like Figure 2 As shown in the figure, for type I faults, a sudden change in the alarm switch quantity inside the monitoring system will cause a false alarm. Model description: Within the scope of investigation, at time, the variable value is 1, and at other times the variable value is 0. The model formula is:

[0092]

[0093] The judgment rules are defined as follows:

[0094] if (the variable value at that moment is 1) & (the variable value for a period of time before and after is 0),

[0095] then(the moment is a false alarm point);

[0096] like Figure 3 As shown in the figure, for type II faults, the analog quantity that triggers the alarm has a short-term abnormal fluctuation, and the fluctuation value triggers the alarm threshold, which will cause a false alarm. Model description: Within the investigation range, before and after the time, the variable value has a drastic drop and rise process, and the variable value triggers the lowest threshold alarm point. The model formula is:

[0097]

[0098] The judgment rules are defined as follows:

[0099] if (the slope of the period before the moment is <0) & (the slope of the period after the moment is >0) & (the variable value at the moment is < the alarm threshold),

[0100] then(the time is the false alarm point).

[0101] 2. Design a waveform modeling method for two types of fault false alarms, including:

[0102] Type I fault is a displacement type unit impulse signal as shown in formula (1). The spectrum of the time domain signal is an integer (displayed as a straight line). Based on this characteristic, the type I fault is converted to the frequency domain to identify the fault characteristics. In the conversion process, Fourier transform is used, and the conversion formula is:

[0103]

[0104] Where p is the imaginary unit used to represent the complex exponential term, ω is the angular frequency, representing the frequency component in the frequency domain, x(t) is the original time signal, and e -pωt is a complex exponential term, representing the component of the signal in the frequency domain, and dt is a micro-element, indicating a slight change in time during the integration process.

[0105] This frequency domain feature helps to identify false alarms of type I faults;

[0106] The signal waveform of type II fault is relatively complex. The time domain waveform characteristics are retained and the waveform image is used to identify the fault.

[0107] 3. Design a random sample generation method for fault false alarm signals, including:

[0108] According to the discrimination formula of type I and type II faults, we randomly generate a large number of fault false alarm signals as positive samples, select normal signals as negative samples, and select positive and negative sample pairs as the data set of the fault false alarm signal discrimination model. These samples are marked as category 1 (type I fault false alarm), category 2 (type II fault false alarm) and category 0 (normal signal).

[0109] 4. Design a fault waveform recognition method based on metric learning, including:

[0110] The Triplet Network is selected as the basic network architecture of the metric learning model, and the fault samples and normal samples are used as positive and negative sample pairs. In addition, resnet18 is selected as Figure 4 The feature extraction module shown in the figure is used to obtain meaningful feature representation. The measurement module selects the k-nearest neighbor algorithm based on Pearson similarity and the integrated algorithm of distance similarity to calculate the similarity between samples, thereby realizing the recognition of fault waveforms.

[0111] 5. If Figure 5 As shown, a measurement module for fault classification is designed, including:

[0112] The k-nearest neighbor algorithm based on Pearson similarity is used to calculate the category score at each spatial position, and the maximum category score of the entire image is selected. In order to further enhance the classification accuracy, the distance similarity score based on the k-nearest neighbor is used to further determine the image category. The weighted sum of the two scores is used to finally determine the image category. The weighting parameter is set as a learnable parameter.

[0113] The formula of the k-nearest neighbor algorithm based on Pearson similarity is as follows:

[0114]

[0115] Among them, S(·) represents the Pearson similarity, xi is the local descriptor of the query sample, y j is the local feature descriptor of the support sample, i is the dimension index in the query feature vector, j is the dimension index in the support feature vector, and x i and j The average value of and They are and The second norm of .

[0116] The distance similarity calculation formula based on k nearest neighbors is as follows:

[0117]

[0118]

[0119] Among them, f(q,c) is the similarity between the query image q and the class c, k is the number of nearest neighbors, is m r The hth nearest neighbor in class c, m r is the rth local descriptor of q, is m r The nearest neighbor of , r is the dimension index in the query feature vector.

[0120] 6. Design a frequency domain feature attention auxiliary module, including:

[0121] In the data processing stage, the original time domain signal image and type I fault waveform image are converted from time domain to frequency domain using the numpy.fft() function. After feature extraction through the resnet18 network, the cosine similarity of the frequency domain features is calculated first, and the rough labels of the classification are obtained after softmax. The weighted sum of the rough labels and the results of the metric classification is used as the final classification result. This frequency domain feature attention auxiliary module helps to improve the classification performance.

[0122] Embodiment 3

[0123] The present invention provides a method for identifying false alarms of step faults of ship temperature sensors based on waveform analysis. By designing a discrimination formula, a waveform modeling method, a random sample generation method, a metric learning method and a combination of a frequency domain feature attention auxiliary module, different types of step fault false alarms can be accurately identified, thereby improving the reliability and accuracy of the ship monitoring system, and providing a new idea for the subsequent method for identifying false alarms of step faults of ship temperature sensors based on waveform analysis.

[0124] In order to solve the above problems, the present application proposes a method for identifying false alarms of step-type faults of ship temperature sensors based on waveform analysis, which includes the following steps. The technical solution of the present invention is as follows:

[0125] S1: According to the waveform analysis of the fault false alarm signal, two fault false alarm discrimination formulas are designed, specifically:

[0126] Type I faults usually involve a sudden change in the alarm switch quantity inside the monitoring system, which may lead to false alarms. For Type I faults, the state of the temperature sensor at time t is examined. If at this moment, the state of the sensor changes to 1 (indicating an alarm is triggered), and in the period before and after, the state of the sensor is 0 (indicating a normal state), then it is considered that a false alarm has occurred at this moment. The model formula is as follows:

[0127]

[0128] The judgment rules are defined as follows:

[0129] if (the variable value at that moment is 1) & (the variable value for a period of time before and after is 0),

[0130] then(the moment is a false alarm point);

[0131] This formula determines whether a false alarm occurs by checking the sensor status at time t and the status in a period of time before and after.

[0132] Type II faults usually involve short-term abnormal fluctuations in analog quantities, which may cause false alarms when the alarm threshold is triggered. For Type II faults, the state of the temperature sensor before and after time t is examined. If the slope is negative for a period of time before the moment, and positive for a period of time after the moment, and the value of the sensor at the moment is less than the alarm threshold, then we believe that a false alarm has occurred at the moment. The model formula is as follows:

[0133]

[0134] This formula determines whether a false alarm has occurred by checking the slope change and the sensor value before and after time t.

[0135] S2: Combine the above fault false alarm formula to generate random samples, specifically:

[0136] In order to train the fault false alarm discrimination model, a random sample generation method is used. The goal of this method is to construct a representative data set, including a large number of fault false alarm signals as positive samples, and select normal signals as negative samples. These samples will then be used to train and verify the fault false alarm discrimination model. In order to generate positive samples, type I and type II fault false alarm signals are first simulated. For type I faults, a sudden change in the alarm switch quantity is introduced inside the monitoring system to simulate the fault false alarm situation. For type II faults, short-term abnormal fluctuations of the simulated quantity are simulated to ensure that the fluctuation value triggers the alarm threshold.

[0137] By introducing these simulated fault conditions on the basis of known normal signals, a large amount of positive sample data can be generated, some of which represent type I fault false alarms and some of which represent type II fault false alarms. When constructing the data set, a certain number of negative samples need to be selected at the same time, representing the normal working conditions of the sensor. These normal signals are usually data from actual ship monitoring systems to ensure the authenticity and reliability of the data. Negative samples matching the number of positive samples are selected from the normal signals. The selection and collection process of these negative samples is based on normal sensor operation and there are no fault false alarms.

[0138] S3: Design a frequency domain attention auxiliary module and use the frequency domain measurement results as the weighted items of the final results. Specifically:

[0139] The frequency domain feature attention auxiliary module is one of the key components of the present invention. It converts the original time domain signal image and type I fault waveform image into the frequency domain in the data processing stage, and then extracts features through a deep neural network (ResNet18), and finally combines the frequency domain features and the results of metric classification to improve the classification performance. In the data processing stage, the patent uses the numpy.fft() function to convert the original time domain signal image and type I fault waveform image from the time domain to the frequency domain. This conversion process helps to extract the frequency domain features of the signal, which are usually able to better capture the characteristics of fault false alarms, especially in terms of the spectral distribution of the waveform. After conversion to the frequency domain, we send the signal image to the deep neural network ResNet18 for feature extraction. After obtaining the frequency domain features, we further perform cosine similarity calculation. By applying the softmax function, the similarity score is mapped to the probability distribution to obtain the rough label of the classification. Finally, the rough label and the metric classification result are weighted and summed according to a certain weight to obtain the final classification label. This method of comprehensively utilizing frequency domain features and metric learning results can improve classification performance, especially in complex situations, such as when there are similarities between different fault false alarms.

[0140] S4: Design a metric learning model based on a ternary network. Specifically:

[0141] Metric learning is used as a key technology to capture the similarities and differences between samples of different categories. This helps to achieve more accurate fault waveform recognition. The present invention selects a triplet network as the basic network architecture of the metric learning model. The triplet network is a deep neural network structure commonly used in metric learning, and its goal is to achieve better sample classification and clustering by learning the relative distance between samples. Among them, positive samples are fault samples, and negative samples are normal samples. Specifically, the present invention selects three samples from the data set: anchor samples (Anchor), positive samples (Positive), and negative samples (Negative). The anchor samples are samples to be classified, the positive samples are samples of the same category as the anchor samples (fault samples), and the negative samples are samples of different categories from the anchor samples (normal samples). By minimizing the distance between the anchor samples and the positive samples and maximizing the distance between the anchor samples and the negative samples, the triplet network can learn an effective metric space, thereby achieving better classification and recognition performance. In order to obtain meaningful feature representation, the present invention selects ResNet18 as the feature extraction module. The metric module then calculates the similarity between sample features to determine whether they belong to the same category.

[0142] S5: Design a metric module to enhance classification accuracy. Specifically:

[0143] The task of the measurement module is to calculate the similarity between samples to determine whether they belong to the same category. The present invention selects two different methods to calculate the similarity:

[0144] (1) The k-nearest neighbor algorithm based on Pearson similarity is a classic classification algorithm used to measure the similarity between samples. At each spatial position, the present invention uses Pearson similarity to compare the similarity between the query image (the image to be classified) and the sample images in each category. For each category c, its Pearson similarity score is calculated, and the formula is as follows:

[0145]

[0146] Among them, S(·) is the Pearson similarity, x i is the local descriptor of the query sample, y j is the local feature descriptor of the support sample, i is the dimension index in the query feature vector, j is the dimension index in the support feature vector, and x i and j The average value of and They are and The second norm of . .

[0147] (2) The distance similarity calculation based on k nearest neighbors is used to further determine the category of the image. We select the nearest k categories with the highest scores and then calculate the distance similarity between them. Specifically, for the query image q and category c, we can use the following formula to calculate the distance similarity between them. The distance similarity calculation formula based on k nearest neighbors is as follows:

[0148]

[0149]

[0150] Among them, f(q,c) is the similarity between the query image q and the class c, k is the number of nearest neighbors, For x i The hth nearest neighbor in class c, x i is the i-th local descriptor of q, For x i The nearest neighbor of .

[0151] S6: Get the final classification result. Specifically:

[0152] For each category, the two weighted similarity scores are added together to obtain the comprehensive score of the category. Then, the category with the highest comprehensive score is selected from all categories as the final classification result.

[0153] The use of multiple technology combinations, including waveform analysis, metric learning, and frequency domain feature attention, can significantly improve the recognition accuracy of ship temperature sensor step fault false alarms. By designing a discriminant formula and waveform modeling method, different types of false alarms can be effectively distinguished, reducing unnecessary intervention and maintenance costs caused by false alarms, and improving the reliability and economy of the system.

[0154] Embodiment 4

[0155] The present invention provides a method for identifying false alarms of step-type faults of ship temperature sensors based on waveform analysis.

[0156] The main steps of this method are:

[0157] Step 1: Design two types of fault false alarm discrimination formulas, and perform waveform analysis based on the fault false alarm signal. Type I faults are usually related to sudden changes in the alarm switch quantity inside the monitoring system, which may lead to false alarms. For such situations, the present invention proposes an accurate false alarm identification mechanism. Specifically, this mechanism examines the state of the temperature sensor at time t, where the sensor state is a binary value, 1 indicates an alarm trigger, and 0 indicates a normal state. The core idea of ​​the mechanism is that in a monitoring system, sudden state changes may cause false alarms, so time domain analysis is needed to identify this abnormal state. The model formula is:

[0158]

[0159] The judgment rules are defined as follows:

[0160] if (the variable value at that moment is 1) & (the variable value for a period of time before and after is 0)

[0161] then(the time is a false alarm point)

[0162] This formula is used to determine whether a false alarm occurs at time t. First, it checks whether the sensor state is 1 at time t, that is, whether the alarm is triggered. Then, it further verifies whether the state remains in the normal state (0) for a period of time before and after. Only when these two conditions are met at the same time, the occurrence of a false alarm is confirmed.

[0163] Type II faults usually involve short-term abnormal fluctuations in analog quantities, which may lead to false alarms when the alarm threshold is triggered. In order to deal with this situation, the present invention proposes another false alarm identification mechanism, which analyzes the state of the temperature sensor before and after time t. The characteristic of type II faults is that the value of the temperature sensor fluctuates violently in a short period of time, triggering the alarm threshold, but in fact no real fault occurs. Therefore, the task of the mechanism is to eliminate this false alarm by analyzing the changing trend of the sensor value. For type II faults, the model formula is as follows:

[0164]

[0165] The judgment rules are defined as follows:

[0166] if (the slope of the period before the moment is <0) & (the slope of the period after the moment is >0) & (the variable value at the moment is < the alarm threshold)

[0167] then(the time is a false alarm point)

[0168] This formula is used to determine whether a false alarm occurs at time t. First, it calculates the slope in the period before time t. If the slope is negative, it indicates a downward trend in temperature. Then, it checks whether the slope in the period after time t is positive, indicating an upward trend in temperature. Finally, it verifies whether the value of the sensor at time t is less than the alarm threshold. Only when these three conditions are met at the same time, the occurrence of a false alarm is confirmed.

[0169] The introduction of these two false alarm identification mechanisms enables the ship monitoring system to more reliably determine whether a false alarm has occurred, thereby reducing unnecessary maintenance and intervention and improving the efficiency and safety of the system.

[0170] Step 2: Randomly generate positive and negative samples and build a data set. Build a highly representative data set that includes a large number of fault false alarm signals as positive samples and selects normal signals as negative samples to ensure that the model has high accuracy and reliability in practical applications.

[0171] In the process of generating positive samples, this patent first simulates the false alarm signals of type I and type II faults so that the training model can accurately identify these two types of false alarms. For type I faults, the simulation process includes introducing a sudden change in the alarm switch quantity inside the monitoring system, which can simulate the false alarm situation of faults that may occur in the actual system. For type II faults, the simulation process involves short-term abnormal fluctuations in the simulated quantity to ensure that the fluctuation value triggers the alarm threshold, thereby simulating this type of false alarm situation. This method ensures the diversity and representativeness of the data set, so that the model can better identify different types of false alarm situations.

[0172] When constructing a dataset, it is crucial to select a certain number of negative samples to match the number of positive samples. These negative samples represent normal sensor working conditions, and their data usually comes from actual ship monitoring systems. This selection ensures the authenticity and reliability of negative samples, allowing the model to have a high generalization ability when facing real-world monitoring data. The selection and collection process of negative samples is based on normal sensor operation, and these samples do not have any fault false alarm conditions. This means that these negative samples represent the sensor output under normal operating conditions, and their characteristics and behaviors are significantly different from those of fault false alarm conditions. This balanced dataset construction method helps ensure that the model does not bias towards a certain category during training and validation, thereby improving the overall performance and reliability of the model.

[0173] Step 3: Design a frequency domain feature attention auxiliary module to assist the measurement model in classification from the frequency domain perspective.

[0174] In the data processing stage, this patent uses the numpy.fft() function to convert the original time domain signal image and type I fault waveform image from the time domain to the frequency domain. The main purpose of this conversion is to extract the frequency domain features of the signal. Frequency domain features usually contain the energy distribution information of the signal at different frequencies, which is of great significance for the identification of fault false alarms. Different types of fault false alarms may show different characteristics in the frequency domain, so frequency domain analysis can help the model better capture these characteristics. After obtaining the frequency domain features, the frequency domain feature attention auxiliary module sends the signal image to the deep neural network ResNet18 for feature extraction. Deep neural networks have achieved remarkable success in image processing. They can learn high-level representations of data, thereby improving the performance of the model. As a classic deep neural network architecture, ResNet18 can effectively extract image features. After the deep neural network extracts features, the frequency domain feature attention auxiliary module uses cosine similarity calculation to measure the similarity between different signal images. Through cosine similarity calculation, the similarity scores between signals can be obtained, which can be used to generate rough labels for classification. Applying the softmax function to map the similarity scores to probability distribution helps to determine the probability of each signal belonging to different categories. This approach provides an effective way to initially classify the signal, allowing the model to make further decisions at a higher level.

[0175] Finally, the frequency domain feature attention auxiliary module combines the generated classification coarse labels with the results of the metric learning module. The importance of this step is that it makes full use of two different aspects of information: frequency domain features and metric learning. Frequency domain features help the model better understand the frequency characteristics of the signal, while the metric learning module provides a deeper understanding of the time domain similarities between signals. By combining these two aspects of information, the model is able to make the final classification decision more accurately, especially in the face of similar fault false alarm situations. This method is particularly effective.

[0176] Step 4: Design a metric learning model based on a ternary network. Metric learning is a powerful technique that aims to capture the similarities and differences between samples of different categories, thereby improving the accuracy of classification. In the present invention, metric learning is applied to fault false alarm recognition to ensure that the model can reliably distinguish between faults and normal situations. The present invention selects a triplet network as the basic network architecture of the metric learning model, which is a deep neural network structure widely used in metric learning tasks in the field of deep learning. The goal of the triplet network is to achieve better sample classification and clustering effects by learning the relative distance between samples. In fault false alarm recognition, positive samples represent fault samples and negative samples represent normal samples. This setting helps the model learn how to effectively distinguish fault samples from normal samples. In each training iteration, three samples are selected from the data set: anchor samples, positive samples, and negative samples. Anchor samples are samples to be classified, positive samples are samples of the same category as anchor samples (i.e., fault samples), and negative samples are samples of different categories from anchor samples (i.e., normal samples). By minimizing the distance between the anchor sample and the positive sample and maximizing the distance between the anchor sample and the negative sample, the triplet network learns an effective metric space. This metric space makes similar samples closer in the feature space and dissimilar samples farther away, thus achieving better classification and recognition performance. By feeding the input signal into ResNet18, the model is able to learn a high-level representation of the signal. Afterwards, the metric module is responsible for calculating the similarity between sample features to determine whether they belong to the same category.

[0177] Step 5: Design a metric module to calculate the similarity between samples to determine whether they belong to the same category. The present invention selects two different but complementary methods to calculate the similarity, namely, the k-nearest neighbor algorithm based on Pearson similarity and the distance similarity calculation based on k-nearest neighbor.

[0178] The k-nearest neighbor algorithm based on Pearson similarity is a classic classification algorithm used to measure the similarity between samples. It uses Pearson similarity at each spatial location (x, y) to compare the similarity between the query image (the image to be classified) and the sample images in each category. Specifically, for each category c, the similarity between the query image and all sample images in that category is measured by calculating its Pearson similarity score. This can be expressed by the following formula:

[0179]

[0180] Among them, S(·) represents the Pearson similarity, x i is the local descriptor of the query sample, y jis the local feature descriptor of the support sample, i is the dimension index in the query feature vector, j is the dimension index in the support feature vector, and x i and j The average value of and They are and The second norm of .

[0181] The k-nearest-neighbor distance similarity calculation is used to further determine the category of the image. In this step, the nearest k categories with the highest scores are first selected, and then the distance similarity between them is calculated. Specifically, for the query image q and category c, the following formula can be used to calculate the distance similarity between them:

[0182]

[0183]

[0184]

[0185] Among them, f(q,c) is the similarity between the query image q and the class c, k is the number of nearest neighbors, For x i The hth nearest neighbor in class c, x i is the i-th local descriptor of q, For x i The nearest neighbor of .

[0186] The combination of these two methods enables the metric module to more comprehensively evaluate the similarity between the query image and each category, thus providing a more reliable basis for the final image classification. The k-nearest neighbor algorithm based on Pearson similarity is very effective in capturing the similarity of specific features, while the distance similarity calculation based on k-nearest neighbors further emphasizes the similarity related to the distance of the k nearest neighbors.

[0187] Step 6: Get the final classification result based on the above measurement results. For each category, add the two weighted similarity scores to get the comprehensive score of the category. This step ensures that the information of the k-nearest neighbor algorithm based on Pearson similarity and the distance similarity calculation based on k-nearest neighbors are considered at the same time. The category with the highest comprehensive score is selected from all categories as the final classification result. This is a simple and effective decision rule that ensures that the final classification result is based on the most confident comprehensive score.

[0188] In order to better understand the present invention, the above is described in detail in conjunction with the specific embodiments of the present invention, but it is not intended to limit the present invention. Any simple modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention. Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for identifying a step-type fault false alarm of a ship temperature sensor, comprising obtaining a fault false alarm signal, characterized in that: The following steps are also included: Step 1: Perform waveform analysis on the fault false alarm signal and design a fault false alarm discrimination method; Step 2: Perform random sampling in combination with the fault false alarm discrimination method; Step 3: Construct a metric learning model based on a ternary network for fault waveform recognition; Step 4: Build a metric module for fault classification; Step 5: Construct a frequency domain attention auxiliary module and use the frequency domain measurement results as the weighted items of the final results; Step 6: Output the final classification results.

2. The method for identifying false alarms of step-type faults of ship temperature sensors according to claim 1, characterized in that: The fault false alarm determination method includes a determination method for type I fault and a determination method for type II fault.

3. The method for identifying false alarms of step-type faults of ship temperature sensors according to claim 2, characterized in that: The type I fault is caused by a sudden change in the alarm switch quantity inside the monitoring system, and this abnormal state is identified through time domain analysis.

4. The method for identifying false alarms of step-type faults of ship temperature sensors according to claim 3, characterized in that: The method for judging type I fault is to confirm the occurrence of false alarm when the following two conditions are met at the same time: 1) Whether the sensor state is 1 at time t; 2) Whether the sensor state is 0 at other times other than time t; The formula is Among them, δ(t) is the sensor state at time t, and t0 is the time when the type I fault signal appears.

5. The method for identifying false alarms of step-type faults of ship temperature sensors according to claim 4, characterized in that: The type II fault is caused by short-term abnormal fluctuation of the analog quantity.

6. The method for identifying false alarms of step-type faults of ship temperature sensors according to claim 5, characterized in that: The method for judging type II fault is to confirm the occurrence of false alarm when the following two conditions are met at the same time: 1) The variable value of the simulated quantity has a sharp decline and rise process; 2) The variable value of the analog quantity triggers the minimum threshold alarm point; The formula is Among them, p(t) is the variable value of the analog quantity at time t, Δt1 is the continuous decrease time of the variable value in the type I fault signal, and Δt2 is the continuous increase time of the variable value in the type II fault signal.

7. The method for identifying false alarms of step-type faults of ship temperature sensors according to claim 6, characterized in that: The step 2 includes randomly generating a large number of fault false alarm signals as positive samples according to the discrimination formula of type I and type II faults, selecting normal signals as negative samples, and selecting positive and negative sample pairs as data sets of the fault false alarm signal discrimination model, wherein type I fault false alarm signals are marked as category 1, type II fault false alarm signals are marked as category 2, and normal signals are marked as category 0.

8. The method for identifying false alarms of step-type faults of ship temperature sensors according to claim 7, characterized in that: The step 3 includes selecting a triplet network as the basic network architecture of the metric learning model, and the fault samples and normal samples as positive and negative sample pairs; Select resnet18 as the feature extraction module; The measurement module selects the k-nearest neighbor algorithm based on Pearson similarity and the integrated algorithm of distance similarity to calculate the similarity between samples.

9. The method for identifying false alarms of step-type faults of ship temperature sensors according to claim 8, characterized in that: The step 4 includes the following sub-steps: Step 41: Use the k-nearest neighbor algorithm based on Pearson similarity to calculate the category score at each spatial position, and select the maximum category score of the entire image; Step 42: Determine the image category using a k-nearest neighbor-based distance similarity score; Step 43: Use the weighted sum of the category score and the distance similarity score to determine the category of the image.

10. The method for identifying false alarms of step-type faults of ship temperature sensors according to claim 9, characterized in that: The formula for the k-nearest neighbor algorithm based on Pearson similarity is: Among them, S(·) is the Pearson similarity, x i is the local descriptor of the query sample, y j is the local feature descriptor of the support sample, i is the dimension index in the query feature vector, j is the dimension index in the support feature vector, and x i and j The average value of and They are and The second norm of .