Railway switch machine multi-noise robust diagnosis method based on sound signal
By preprocessing the sound signal and converting it to grayscale, and combining it with an improved convolutional neural network, the problem of accuracy in fault diagnosis of railway switch machines in noisy environments was solved, and high-precision fault classification in noisy environments was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN UNIV OF TECH
- Filing Date
- 2023-04-10
- Publication Date
- 2026-06-26
Smart Images

Figure CN116434776B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of rail transit fault diagnosis technology, specifically relating to a robust multi-noise diagnosis method for railway switch machines based on sound signals. Background Technology
[0002] With the rapid development of China's railways and the continuous expansion of railway operating mileage, railways have become the preferred mode of transportation. The railway signaling system is a highly complex system with stringent safety and security requirements. All components, including software and hardware infrastructure, work together to maintain the safe and efficient operation of trains. Switch machines are crucial foundational equipment in the railway signaling system. Specifically, switch machines are used to switch tracks and control train routes; their reliable, safe, and efficient operation directly affects train safety and railway transportation efficiency. However, due to the complexity of switch machine components and the harsh outdoor working environment, malfunctions may occur during operation. Once a malfunction occurs, it can lead to low train operating efficiency or even serious accidents. Investigations show that switch machine malfunctions are a major cause of train delays. Therefore, fault diagnosis of switch machines is an urgent problem to be solved.
[0003] In recent years, researchers have proposed diagnostic methods based on sound signals. After extracting features from the signals, they input them into support vector machines for classification. However, the feature extraction process is cumbersome and does not take into account the impact of noise on the signals. Summary of the Invention
[0004] The purpose of this invention is to provide a robust multi-noise diagnostic method for railway switch machines based on sound signals, which solves the problem of fault diagnosis of railway switch machines based on sound signals under the influence of noise.
[0005] The technical solution adopted in this invention is: a robust multi-noise diagnostic method for railway switch machines based on sound signals, and the specific operation steps are as follows:
[0006] Step 1: Collect the sound signals of the switch machine under different operating conditions, preprocess the sound signals to obtain sound signals of multiple complete operating cycles, and use them as the raw dataset;
[0007] Step 2: The signal of the original dataset is divided into left and right channels; channel separation is performed on the original dataset.
[0008] Step 3: Due to different operating states, the signal lengths in the dataset may vary. Therefore, the data lengths are standardized by using the longest signal as the standard and padding the shorter signals with zeros.
[0009] Step 4: Add noise to the signal to obtain a new audio signal dataset C;
[0010] Step 5: Standardize the audio signal dataset C from Step 4 and convert it into a grayscale image;
[0011] Step 6: Improve the convolutional neural network to simulate multi-sensor joint diagnosis and classify sound signals;
[0012] Step 7: Input the grayscale image into the improved convolutional neural network from Step 6. After training, a fault diagnosis model with high accuracy can be obtained.
[0013] The invention is further characterized in that,
[0014] In step 1, the sound signal is preprocessed by trimming the collected sound signal according to the operating cycle of the switch machine, which includes pulling in and extending.
[0015] The method for adding noise to the signal in step 4 is as follows:
[0016] Step 4.1: Let the signal dataset be A, which contains n data points, A = {a1, a2, ..., a...} n The collected noise signals are randomly trimmed and placed into a noise dataset B, which contains m data points, B = {b1, b2, ..., bm}. m};Artificially simulated dataset C;
[0017] Step 4.2: Traverse set A, retrieve one signal data, and denote it as a. i The frequency is x;
[0018] Step 4.3: Randomly select a noise signal from set B, denoted as b. j The frequency is y. Using the resample function, b is reduced to... j Frequency adjustment and a i same;
[0019] b j =resample(b j (x,y)
[0020] Step 4.4: In a i Randomly select a position and place b j Superimposed on signal a i superior;
[0021] a i =a i +b j
[0022] Step 4.5: Repeat steps 4.3 and 4.4 three to four times, cyclically adding noise;
[0023] Step 4.6: Place a iAdd it to set C, which is initially set to empty.
[0024] C.insert(a i );
[0025] Perform steps 4.2-4.5 on each signal data to obtain a new audio signal dataset C.
[0026] Step 5 is as follows:
[0027] After standardizing the sound signal data obtained in step 4, it is converted into a grayscale image; the amplitude values corresponding to each time point are extracted according to the time series and stored in the array signal, and then converted into a two-dimensional matrix matrix using the reshape function, where length and width represent the length and width of the matrix, respectively.
[0028] matrix=reshape(signal,length,width)
[0029] Then, based on the maximum and minimum values of the matrix, it is normalized to a value between 0 and 255; min represents the minimum value in the current matrix, and max represents the maximum value in the current matrix.
[0030]
[0031] Finally, the matrix is converted into a grayscale image using the mat2gray function.
[0032] image = mat2gray(matrix).
[0033] Step 6 improves the convolutional neural network by adding an input channel to allow signals from different audio channels to be input into the convolutional neural network for joint diagnosis. The parameters of the convolutional layers are adjusted: the first convolutional parameters for the two channels are 5*5 and 4*4, respectively; the second convolutional parameters are 3*3 and 3*3; the pooling layer parameters are all 2*2. Channel attention modules and spatial attention modules are added after the convolutional and pooling layers, with the spatial attention module corresponding to a 7*7 convolutional kernel and a padding value of 3. After passing through the attention modules, the data from the two channels are linearly merged, and a Linear array is used in the fully connected layer for multi-class classification.
[0034] The beneficial effects of this invention are as follows: Considering non-contact and robustness, this invention fully extracts information from sound signals, converts them into grayscale images, and uses convolutional neural networks to classify fault types. Furthermore, the convolutional neural network is improved by increasing the number of input channels to correspond to the left and right channels of the sound signal, simulating multi-sensor joint diagnosis to extract more features. An attention module is added after the convolutional pooling layer to improve the model's robustness. The effectiveness and accuracy of this invention are verified through experimental comparison with existing classification methods (support vector machines, nearest neighbor algorithms).
[0035] The present invention presents a robust multi-noise diagnostic method for railway switch machines based on sound signals. While considering non-contact and robustness, it ensures the accuracy of fault classification. By comparing support vector machines and nearest neighbor algorithms, the superiority of this classification method (model) in noisy environments is verified. Attached Figure Description
[0036] Figure 1 This is a flowchart of the robust multi-noise diagnostic method for railway switch machines based on sound signals, according to the present invention.
[0037] Figure 2 This is a data type illustration of the robust multi-noise diagnostic method for railway switch machines based on sound signals according to the present invention.
[0038] Figure 3 This is a diagram showing the noise-added effect of the robust multi-noise diagnostic method for railway switch machines based on sound signals, as described in this invention.
[0039] Figure 4 This is a structural diagram of the improved convolutional neural network for the robust multi-noise diagnostic method of railway switch machines based on sound signals, as described in this invention.
[0040] Figure 5 This is a diagram showing the experimental results of the robust multi-noise diagnostic method for railway switch machines based on sound signals according to the present invention. Detailed Implementation
[0041] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0042] See appendix Figure 1 The present invention provides a robust multi-noise diagnostic method for railway switch machines based on sound signals, comprising the following steps:
[0043] Step 1: Collect the sound signals of the switch machine under different operating conditions, and trim them according to the movement mode of the switch machine (pulling in or extending). Each signal cycle is between 5 and 9 seconds, as shown in the attached diagram. Figure 2As shown, a total of 10 different sound signals (aj) are displayed, where e represents the sound signal under normal operation, and the other 9 are fault signals; for example, a represents abnormal switch motor power supply, b represents unstable switch motor power supply, c represents insufficient traction force, and so on. It can be seen that the lengths of the different types of signals are significantly different.
[0044] Step 2: The original dataset signal is divided into left and right channels, and channel separation is performed on the original dataset;
[0045] Step 3: The operating state of the switch machine is different, and the cycle is of different lengths, which leads to the signal lengths in the data set being different. The longest signal is used as the standard, and the shorter signals are padded with zeros.
[0046] Step 4: Add noise to the signal;
[0047] Step 4.1: Set the original signal dataset as A, A = {a1, a2, ... a3}. n The collected noise data is randomly cropped and then placed into a noise dataset B, where B = {b1, b2, ..., bb}. m}; Artificially simulated dataset C,
[0048] Step 4.2: Traverse set A, retrieve one signal data, and denote it as a. i The frequency is x;
[0049] Step 4.3: Randomly select a noise signal from set B, denoted as b. j With frequency y, using a resampling function, b j Frequency adjustment and a i same.
[0050] b j =resample(b j (x,y)
[0051] Step 4.4: In a i Randomly select a position in the middle and place b j Superimposed on signal a i superior;
[0052] Step 4.4.1, obtain a i Given the length len(a), get b. j Length len(b);
[0053] Step 4.4.2, if len(a) > len(b):
[0054] s = floor(ranf(len(a) - len(b))
[0055] rand() is used to generate random numbers within a certain range, floor() is used to round down, and s represents the position where the audio begins to be superimposed;
[0056] a i ((s+1):(s+len(b)))=b j +a i ((s+1):(s+len(b)))
[0057] Step 4.4.3, if len(a) <len(b):
[0058] s = floor(rand(len(b) - len(a))
[0059] rand() is used to generate random numbers within a certain range, floor() is used to round down, and s represents the position where the audio begins to be superimposed;
[0060] b j ((s+1):(s+len(a)))=b j +a i ((s+1):(s+len(ba)))
[0061] a i =b j ((s+1):(s+len(a)))
[0062] Step 4.5: Repeat steps 4.3 and 4.4 three to four times, cyclically adding noise;
[0063] Step 4.6: Place a i Add to set C;
[0064] C.insert(a i )
[0065] Step 4.7: Repeat steps 4.2 to 4.6 to add noise to all signals and put them into set C;
[0066] Step 5: After standardizing the sound signal, convert it into a grayscale image;
[0067] Step 5.1: Traverse set C and retrieve the signal data;
[0068] Step 5.2: Extract the amplitude values corresponding to each time point according to the time series, store them in the array signal, and then use the reshape function to convert them into a two-dimensional matrix matrix, where length and width represent the length and width of the matrix, respectively;
[0069] matrix=reshape(signal,length,width)
[0070] Step 5.3: Then, based on the maximum and minimum values of the matrix, normalize it to a value between 0 and 255. `min` represents the minimum value in the current matrix, and `max` represents the maximum value in the current matrix.
[0071]
[0072] Step 5.4: Convert the matrix into a grayscale image using the mat2gray function;
[0073] image = mat2gray(matrix)
[0074] Step 5.5: Repeat steps 5.1 to 5.3 until all signals are converted to grayscale images; the results of noise reduction processing of the original signals and conversion to grayscale images are shown in the attached figure. Figure 3 As shown in the image: The original signal is displayed. After four groups of noise are randomly added, the changes in the audio signal and the corresponding grayscale image are observed. The four groups of noise, from top to bottom, are: two groups of music songs with durations of 2 seconds and 6 seconds respectively, and two groups of conversation noise, each with a duration of 4 seconds. Figure 3 It is clear that adding noise affects the original signal.
[0075] Step 6: Improve the convolutional neural network to simulate multi-sensor joint diagnosis and classify sound signals:
[0076] As attached Figure 4 As shown, to address the issue of railway sound signals, the input of the convolutional neural network was improved by increasing the number of input channels to correspond to inputs from different sensors, simulating multi-sensor joint diagnosis. During the experiment, the convolutional layer parameters were adjusted multiple times, ultimately determining the first-layer convolutional parameters for the two channels to be 5*5 and 4*4, and the second-layer parameters to be 3*3 and 3*3. The pooling layer parameters were all 2*2. After the convolutional and pooling layers, channel attention modules and spatial attention modules were added to filter weak information. The spatial attention module corresponds to a 7*7 convolutional kernel with a padding value of 3. Finally, after passing through the attention modules, the data from the two channels (extracted features) were linearly merged, and the sound signal was classified using a Linear algorithm in a fully connected layer.
[0077] Step 7: Input the dataset for model training;
[0078] Step 7.1, sort the grayscale images according to different fault categories (see attached). Figure 2As shown in the image), place them in the corresponding folder. Signals collected in the same folder and within the same period should have the same prefix when named (for example: fault type a, the images corresponding to different channels should be 0-0(left).png and 0-0(right).png (the first 0 represents fault type a, the second 0 represents the first group of signals, and left and right represent signal channels)).
[0079] Step 7.2: After the model reads the images, it divides them into training and test sets according to a certain ratio. In the experiment, 1212 sets of sound signals and a total of 2424 grayscale images were used and divided into training and test sets in an 8:2 ratio.
[0080] Step 7.3: The size of the model's BATCH_SIZE can be selected through multiple tests. In the experiment, the BATCH_SIZE used was 10.
[0081] Step 7.4: After each iteration, record the accuracy and loss value, save the model parameters, and select the result with the highest accuracy as the final result. In the experiment, we performed a total of 20 iterations, and the accuracy changes are shown in the attached figure. Figure 5 As shown, the model accuracy reached its maximum value of 96.2% for the first time when it was iterated to the 11th time, and then basically stabilized, which can be used as the final fault diagnosis model.
Claims
1. A robust multi-noise diagnostic method for railway switch machines based on sound signals, characterized in that, The specific steps are as follows: Step 1: Collect the sound signals of the switch machine under different operating conditions, preprocess the sound signals to obtain sound signals of multiple complete operating cycles, and use them as the raw dataset; Step 2: The signal of the original dataset is divided into left and right channels; channel separation is performed on the original dataset. Step 3: Due to different operating states, the signal lengths in the dataset may vary. Therefore, the data lengths are standardized by using the longest signal as the standard and padding the shorter signals with zeros. Step 4: Add noise to the signal to obtain a new audio signal dataset C; Step 5: Standardize the audio signal dataset C from Step 4 and convert it into a grayscale image; Step 6: Improve the convolutional neural network to simulate multi-sensor joint diagnosis and classify sound signals; In step 6, the convolutional neural network is improved by adding an input channel to allow signals from different audio channels to be input into the convolutional neural network for joint diagnosis. The parameters of the convolutional layers are adjusted: the first layer parameters for the two channels are 5*5 and 4*4, respectively; the second layer parameters are 3*3 and 3*3; the pooling layer parameters are all 2*2; and a channel attention module and a spatial attention module are added after the convolutional and pooling layers. The spatial attention module corresponds to a 7*7 convolutional kernel with a padding value of 3. After passing through the attention module, the two channels of data are linearly merged, and multi-classification is performed using Linear in the fully connected layer; Step 7: Input the grayscale image into the improved convolutional neural network from Step 6. After training, a fault diagnosis model with high accuracy can be obtained.
2. The robust multi-noise diagnostic method for railway switch machines based on sound signals according to claim 1, characterized in that, In step 1, the preprocessing of the sound signal involves trimming the collected sound signal according to the operating cycle of the switch machine, which includes pulling in and extending.
3. The robust multi-noise diagnostic method for railway switch machines based on sound signals according to claim 2, characterized in that, The specific method for adding noise to the signal in step 4 is as follows: Step 4.1: Set the signal dataset to A, which contains n data points. The collected noise signals are randomly trimmed and placed into a noise dataset B, which contains m data points. ; Step 4.2: Traverse the signal dataset A, extract one signal data point, and set it as... The frequency is x; Step 4.3: Randomly select a noise signal from the noise dataset B, and let it be... The frequency is y, and the resampling function is used. ,Will Frequency adjustment and same; Step 4.4: In Randomly select a position in the middle and... Superimposed on signal superior; Step 4.5: Repeat steps 4.3 and 4.4 three to four times, cyclically adding noise; Step 4.6: [The sentence is incomplete and requires more context to be translated accurately.] Add it to the sound signal dataset C, which is initially set to an empty set. Perform steps 4.2-4.5 on each signal data to obtain a new audio signal dataset C.
4. The robust multi-noise diagnostic method for railway switch machines based on sound signals according to claim 3, characterized in that, Step 5 is as follows: After standardizing the sound signal data obtained in step 4, it is converted into a grayscale image; the amplitude values corresponding to each time point are extracted according to the time series and stored in the array signal, and then converted into a two-dimensional matrix matrix using the reshape function, where length and width represent the length and width of the matrix, respectively. Then, based on the maximum and minimum values of the matrix, it is normalized to a value between 0 and 255. min represents the minimum value in the current matrix, and max represents the maximum value in the current matrix. Finally passed mat2gray The function will convert the matrix matrix Convert to grayscale image : 。