A method for capturing subway environmental noise data
By combining sliding window and A-weighting algorithm with dynamic threshold, the problem of accuracy and efficiency in capturing subway environmental noise data is solved. It achieves efficient and accurate capture of train passing noise data in high background noise environments, eliminates abnormal interference, and is applicable to different equipment and conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHIJIAZHUANG TIEDAO UNIV
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies struggle to efficiently and accurately capture noise data as trains pass by when monitoring subway environmental noise, especially in high background noise environments. The data volume is large, manual processing is inefficient, and accuracy is low.
The root mean square value of the noise signal is calculated using a sliding window algorithm and an A-weighting algorithm. The noise frequency band when the train passes is identified by a dynamic threshold algorithm. Complete noise data is obtained through filtering and boundary correction to eliminate abnormal transient interference.
It enables efficient and accurate capture of train noise data under different environmental and equipment conditions, ensuring data purity and reliability, reducing manual intervention, and is applicable to different sampling conditions.
Smart Images

Figure CN122084094A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of noise detection technology, and in particular to a method for capturing subway environmental noise data. Background Technology
[0002] Subway environmental noise has become one of the most prominent complaints from residents, and its monitoring results are an important basis for conducting noise assessments and developing control measures. Noise assessments should not only focus on the continuous impact of indicators such as the equivalent continuous A-weighted sound level on residents, but also pay attention to the instantaneous noise when trains pass by, to reflect the momentary interference during train operation and provide a basis for targeted remediation.
[0003] However, in actual monitoring, the extraction of noise data from train passing events faces many challenges: on the one hand, the background noise level of road traffic is high, making it difficult to directly identify train noise segments; on the other hand, monitoring usually covers a long period of time (such as 8 hours or 24 hours) and the sampling frequency is high, resulting in a large data scale. If manual experience is still relied upon for extraction, it will not only be inefficient but also have low accuracy. Summary of the Invention
[0004] The purpose of this invention is to provide a method for capturing subway environmental noise data, which can efficiently and accurately obtain complete noise data of the train passing section, providing reliable support for noise analysis and control.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for capturing subway environmental noise data includes: Collect ambient noise including the sound of a train passing by, and filter the ambient noise to obtain a first noise signal; The root mean square value of each frequency band in the first noise signal is calculated by the sliding window algorithm, and the A-weighted sound pressure level of the first noise signal is calculated by the root mean square value of each frequency band using the A-weighted algorithm. The A-weighted sound pressure level is calculated using a dynamic threshold algorithm to obtain a dynamic threshold; the dynamic threshold is the noise frequency band threshold when a train passes. The second noise signal is obtained by filtering out the continuous indices of the first noise signal whose A-weighted sound pressure square is greater than the dynamic threshold, merging the continuous indices and filtering out noise frequency bands less than 1 second. The start and end times of the second noise signal are corrected based on the peak value of the second noise signal to obtain a third noise signal; the third noise signal is a mixture of noise generated by the train and environmental noise when the train passes by.
[0006] Compared with existing technologies, the subway environmental noise data interception method provided by this invention has the following beneficial effects: By introducing sliding window, A-weighting, and dynamic threshold algorithms into the environmental noise analysis, the noise peaks caused by train passage can be accurately identified, and the start and end times of the passing sections can be automatically determined and captured. This reduces manual intervention, improves data processing efficiency, and the data is adjustable, making it suitable for different environments, equipment, and sampling conditions, thus achieving consistency and stability of the captured data. At the same time, by filtering the original noise signal and the processed signal, abnormal transient interference can be effectively eliminated, and possible short-term abnormal noise around the peak can be automatically removed, ensuring the purity and reliability of the captured data. Attached Figure Description
[0007] Figure 1 A flowchart of a method provided in an embodiment of the present invention; Figure 2 A comparison diagram of the original noise and the original noise filtered at 20Hz, provided for an embodiment of the present invention; Figure 3 This is a schematic diagram of a windowing signal provided in an embodiment of the present invention; Figure 4 This invention provides a sound pressure map of the time period during which a vehicle passes through, extracted by thresholding. Figure 5a This is a time-frequency diagram of the third noise level in the vehicle passage section 1 provided in an embodiment of the present invention; Figure 5b This is a time-frequency diagram of the third noise level in the vehicle passage section 2 provided in an embodiment of the present invention; Figure 6a For the vehicle passage segment 1 provided in this embodiment of the invention, the number of peak values of the instantaneous energy curve is greater than 10; Figure 6b The vehicle passage segment 2, in which the peak value of the instantaneous energy curve provided in this embodiment of the invention is greater than 10. Detailed Implementation
[0008] To facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first threshold and the second threshold are merely used to distinguish different thresholds and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" are not necessarily different.
[0009] It should be noted that in this invention, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0010] The embodiments of the present invention will now be described in further detail with reference to the accompanying drawings.
[0011] like Figure 1 As shown in the figure, this invention provides a method for intercepting subway environmental noise data. The main process of the method is described as follows: Step S1: Collect ambient noise including the sound of a train passing by, and filter the ambient noise to obtain a first noise signal.
[0012] The environmental noise was collected at multiple locations, including near railway tracks, inside sensitive buildings, and in outdoor areas along the subway line. The subway environmental noise was collected during both daytime and nighttime periods, and the sampling frequency was high to fully record sound signals in the frequency range of 20–20,000 Hz.
[0013] High-pass filtering is applied to ambient noise to remove interference in the frequency band below 20Hz, ensuring that effective acoustic frequency components are preserved, such as... Figure 2 As shown.
[0014] Step S2: Calculate the root mean square (RMS) value of each frequency band in the first noise signal using a sliding window algorithm, and then calculate the A-weighted sound pressure level of the first noise signal using an A-weighted algorithm on the RMS values of each frequency band. Specifically, this includes the following steps: Step S21: Introduce the Hanning window function, multiply the first noise by the Hanning window function to obtain the windowed signal.
[0015] The Hanning window function is introduced to reduce edge effects and spectral leakage caused by signal segment truncation. The Hanning window function is expressed by the following equation: ;
[0016] In the formula, w [ n ] indicates that the window function is in the first position. n The weights of each sample point; n The index of the sample point for the window function, ranging from 1 to... N ; N This indicates the window length, which is the total number of sampling points included in the window function.
[0017] Multiplying the first noise by the Hanning window function yields the windowed signal, expressed by the following formula: ;
[0018] In the formula, x w [ n The symbol represents the signal after applying the Hanning window to the first noise signal, i.e., the signal after weighting by the window function. x [ n] represents the first noise signal sequence; K This represents the normalization constant, used to adjust the amplitude of the window function to ensure that the amplitude of the windowed signal is consistent with the original signal, such as... Figure 3 As shown.
[0019] Step S22: The root mean square value of each frequency band in the windowed signal is calculated after the windowed signal is filtered by the frequency band filter.
[0020] The frequency band filter is a 1 / 3 octave band filter, used to extract the components of the signal in different frequency bands, helping to identify and evaluate noise characteristics. The calculated result is the... j Center frequency f c ( j ) and the corresponding signals x j [ n ].
[0021] The root mean square value for each frequency band is calculated using the following formula: ;
[0022] In the formula, RMS j For the first j The root mean square value of the segment; N The length of the signal or the total number of sampling points; n Indicates the index position of each sampling point in the signal, from 1 to... N Perform a traversal.
[0023] Step S23: The root mean square value of each frequency band in the windowed signal is converted into a sound pressure level by A-weighting, and the A-weighted sound pressure of the first noise signal is calculated based on the sound pressure level of each frequency band.
[0024] The weighting factor for A is shown in Table 1.
[0025] Table 1 Weighting Factors Center frequency Weighting factor Center frequency Weighting factor Center frequency Weighting factor Center frequency Weighting factor 6.3 -85.4 50 -30.2 400 -4.8 3150 1.2 8 -77.8 63 -26.2 500 -3.2 4000 1.0 10 -70.4 80 -22.5 630 -1.9 5000 0.5 12.5 -63.4 100 -19.1 800 -0.8 6300 -0.1 16 -56.7 125 -16.1 1000 0 8000 20 -50.5 160 -13.4 1250 0.6 10000 -2.5 25 -44.7 200 -10.9 1600 1.0 12500 -4.3 31.5 -39.4 250 -8.6 2000 1.2 16000 -6.6 40 -34.6 315 -6.6 2500 1.3 20000 -9.3 The root mean square value of each frequency band in the windowed signal is converted into sound pressure level after A-weighting, and is expressed by the following formula: ;
[0026] In the formula, a y ( j ) indicates the first j A-weighted sound pressure level in each frequency band; 20 μ Pa is the reference sound pressure level; w i ( j ) indicates the first j A-weighting factor for each frequency band.
[0027] The A-weighted sound pressure level of the first noise signal is calculated based on the sound pressure level of each frequency band, and is expressed by the following formula: ; In the formula, a x ( j ) is the first j Linear amplitude of each frequency band; a w The weighted sound pressure amplitude of the first noise signal A at all center frequencies within the sliding window; n band This represents the total number of frequency bands in the filter. The square of the weighted sound pressure of the first noise signal A within the sliding window is used for threshold detection.
[0028] Step S3: Calculate the A-weighted sound pressure using a dynamic threshold algorithm to obtain the dynamic threshold.
[0029] The dynamic threshold is the noise frequency threshold when a train passes. First, based on a fixed window length and step size, a small-time-scale moving average is applied to the squared sequence of A-weighted sound pressure calculated by the sliding window. Specifically, the window length is set to a fixed value (e.g., C = 0.1 s), the step size is set to a fixed value (e.g., step = 0.1 s), and the sliding window moves gradually along the time axis. The corresponding A-weighted sound pressure squared value is calculated for the signal within each sliding window, thus forming a sound pressure energy sequence discretely sampled at fixed time intervals. Since this energy sequence may experience local fluctuations due to transient disturbances or random noise between adjacent sliding windows, a small-time-scale moving average operation is introduced without changing the window step size to average the sound pressure squared values within several adjacent time windows, thereby smoothing the energy sequence. By using a moving average, high-frequency jitter caused by transient noise or local abrupt changes can be effectively suppressed, making the change trend of sound pressure energy over time more continuous and stable. This enhances the smoothness of the energy curve during the sliding window movement and provides a more reliable criterion for subsequent dynamic threshold discrimination and accurate interception of vehicle noise sections.
[0030] Small-scale moving average operations are represented by the following formula: ; ;
[0031] In the formula, The weighted square of the sound pressure after a small-scale moving average operation; L Δ represents the length of the moving average window; movmean represents the moving average function; △ t smoothThis represents the time length corresponding to the moving average. This value should be greater than step. For example, when step = 0.1s, Δ t smooth Take 0.5s.
[0032] For the smoothed A-weighted sound pressure squared sequence Background noise statistical modeling is performed, using the median to statistically analyze the sound pressure level squared sequence, yielding the background sound pressure level squared value bg, which characterizes the background noise energy level in the subway environment. The median absolute deviation (MAD) of the sound pressure level squared sequence relative to the background sound pressure level squared value is further calculated to characterize the typical fluctuation amplitude of background noise over time. By introducing the statistical characteristics of the median and median absolute deviation being insensitive to transient high-energy noise, a robust estimation of the background noise before and after a train passes is achieved, providing a reliable basis for the subsequent adaptive setting of dynamic thresholds. Specifically, this is expressed by the following formula: ;
[0033] In the formula, bg is the background value (median) of the smoothed A-weighted sound pressure squared sequence; MAD is the median absolute deviation of the sequence relative to bg, used to characterize the fluctuation amplitude of background noise.
[0034] The dynamic threshold of the first noise signal, calculated based on bg and MAD, is expressed by the following formula: Threshold=bg+ k MAD;
[0035] in, k The threshold factor is used, where threshold is the threshold value when the train passes. Threshold. The sound pressure signal during the period of vehicle passage is extracted using a threshold. Figure 4 As shown.
[0036] Step S4: Filter out the first noise signal whose A-weighted sound pressure level square is greater than the dynamic threshold ( The continuous index of the second noise signal is obtained by merging the continuous indexes and filtering out noise frequency bands less than 1 second. The start and end times of the second noise signal are then corrected according to the peak value of the second noise signal to obtain the third noise signal.
[0037] The third noise signal is a mixture of noise generated by the train and ambient noise as the train passes. When correcting the noise signal of a continuous segment where the train passes, it is first necessary to locate the peak value of that segment of noise signal, and then adjust the start and end boundaries of the signal based on the peak value. The peak value is determined using the following formula: ;
[0038] In the formula, apeak This indicates the maximum value of the noise signal within that time period; t segment Indicates the time index of the current signal segment.
[0039] Based on the peak value and correction factor of the second noise signal λ Boundary correction is applied to the start and end times of the second noise signal, with correction coefficients... λ Set at 1%~5%, it can be expressed by the following formula: ;
[0040] In the formula, t start Indicates the start time of the noise signal when the train passes. t end Indicates the end time of the noise signal when the train passes; bg start This indicates the background noise level to the left of the noise signal segment when the train passes; bg end This indicates the background noise level to the right of the noise signal segment when a train passes; λ This represents the correction factor.
[0041] At the determined start time of the vehicle passage t start and end time t end Based on this, local minimum values of the smoothed A-weighted sound pressure squared value are searched within a time range of 2 seconds before and after the noise segment, and these are used as the corrected start and end times to ensure a smooth transition between the noise segment boundary and the background noise. The time-frequency diagram of the third noise signal is as follows. Figure 5a and Figure 5b As shown.
[0042] Step S5: Verify the third noise signal.
[0043] Specifically, a short-time Fourier transform is performed on the third noise signal to obtain its time-frequency diagram, which is derived from the following formula: ;
[0044] In the formula, p [ n [ ] represents the discrete sampled values of the vehicle passage signal; n w[ is the discrete-time sampling point number; n - m [] is a windowing function; m This is the index of the sliding window's position on the timeline. N The number of points in the Fast Fourier Transform; S ( f,tThe time-frequency representation of the train passing noise signal is used to characterize the energy distribution of the signal at different times and frequencies. f For frequency variables; t It is a time variable; j The imaginary unit satisfies j 2 =-1; e -j2πfn / N This represents the complex exponential basis function in the Fourier transform, used to map a time-domain signal to the frequency domain.
[0045] The time-frequency results S ( f,t The energy is integrated along the frequency direction to obtain the instantaneous energy curve E(t). This instantaneous energy curve is used to characterize the change of train noise energy over time, and its calculation method is as follows: ;
[0046] After smoothing the instantaneous energy curve E(t) to reduce the impact of local random fluctuations on peak detection, significant peaks in the instantaneous energy curve are extracted, defined as follows: Peaks={t i |E(t i ) is a local maximum and its convexity is greater than 0.2·E. max};
[0047] In the formula, t i This represents the time position corresponding to the i-th peak. E max This represents the maximum value of the instantaneous energy curve.
[0048] When the number of detected peaks is less than 10, the instantaneous energy curve is determined to correspond to abnormal strong noise interference or atypical train passing conditions, and is then removed.
[0049] Define the moment when the instantaneous energy curve reaches its maximum value. t max for: t max =argmaxE ( t ); The maximum value of the instantaneous energy curve t max Centered on the data, remove data within the time range of Δt, i.e.: [t start ,t end ]=[t max -Δt,t max +Δt];
[0050] Where Δt represents the preset time rejection window length. When it is set to 0.5 s, it can cover the main duration of abnormally strong transient noise, while being significantly shorter than the overall duration of train passing noise, thereby avoiding excessive truncation of the effective train noise segment.
[0051] After removing the data, return to step S3. If the number of peak values of the instantaneous energy curve is still less than 10, terminate the process and output a time-frequency diagram showing no train passage. If the number of peak values of the instantaneous energy curve reaches or exceeds 10, terminate the process and output a time-frequency diagram showing train passage. Figure 6a and Figure 6b As shown. When the number of peak values in the instantaneous energy curve is less than the preset threshold of 10, it is determined that the current signal is still subject to abnormally strong noise interference, and data within a preset time window is removed centered on the maximum instantaneous energy value. Then, the above steps are repeated. The process is performed iteratively until the number of peak values in the instantaneous energy curve reaches or exceeds the preset threshold, or the maximum number of iterations is reached. If the peak value requirement is not met within the maximum number of iterations, it is determined that the signal does not contain a valid train passing event, and the output is a no-train-passing time-frequency diagram; otherwise, a train-passing time-frequency diagram and the corresponding start and end times are output. t start , t end .
[0052] The train's departure and arrival times are as follows: t start , t end The duration of train passage is defined as: .
[0053] The above description of the embodiments is only used to provide a detailed introduction to the technical solutions of this application. However, the description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention, and should not be construed as a limitation of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this invention should be covered within the protection scope of this invention.
Claims
1. A subway environmental noise data intercepting method, characterized in that, The method comprises the following steps: Collecting environmental noise containing train passing sound, filtering the environmental noise to obtain a first noise signal; Calculating the root mean square value of each frequency band in the first noise signal by a sliding window algorithm, and calculating the A-weighted sound pressure of the first noise signal by using an A-weighting algorithm on the root mean square value of each frequency band; Calculating the A-weighted sound pressure by using a dynamic threshold algorithm to obtain a dynamic threshold; The dynamic threshold is the noise frequency band threshold when the train passes; Screening the continuous index of the A-weighted sound pressure of the first noise signal whose square is greater than the dynamic threshold, merging the continuous index and filtering out the noise frequency band less than 1s to obtain a second noise signal; According to the peak value of the second noise signal, the start and end time of the second noise signal is boundary corrected to obtain a third noise signal; the third noise signal is the mixture of the noise generated by the train and the environmental noise when the train passes.
2. The subway environmental noise data intercepting method according to claim 1, wherein, The calculation of the root mean square value of each frequency band in the first noise signal by the sliding window algorithm, and the calculation of the A-weighted sound pressure of the first noise signal by using the A-weighting algorithm on the root mean square value of each frequency band, specifically includes: Introducing the Hanning window function, multiplying the first noise by the Hanning window function to obtain a windowed signal; The root mean square value of each frequency band in the windowed signal is calculated after the windowed signal is filtered by a 1 / 3 octave filter; After A-weighting the root mean square value of each frequency band in the windowed signal, the sound pressure level is converted, and the A-weighted sound pressure of the first noise signal is calculated according to the sound pressure level of each frequency band.
3. The method of claim 1, wherein, The calculation of the A-weighted sound pressure by using the dynamic threshold algorithm to obtain the dynamic threshold, specifically includes: On the basis of fixed sliding window length and step, the A-weighted sound pressure square sequence calculated by sliding window is processed by small time scale moving average to obtain the smoothed weighted sound pressure square; According to the smoothed weighted sound pressure square, the median amplitude of the first noise signal and the median absolute deviation of the first noise signal are calculated; According to the amplitude of the first noise signal and the median absolute deviation of the first noise signal, the dynamic threshold of the first noise signal is calculated.
4. The method of claim 1, wherein, The correction of the second noise signal according to the peak value of the second noise signal to obtain the third noise signal, specifically includes: Positioning the peak value of the second noise signal; According to the peak value of the second noise signal and a correction coefficient After obtaining the third noise signal, it further includes verifying the third noise signal, specifically: The start and end time of the second noise signal is corrected with a boundary correction coefficient Performing short-time Fourier transform on the third noise signal to obtain a time-frequency graph of the third noise signal; Set to 1%~5%.
5. The method of claim 1, wherein, Integrating the time-frequency graph along the frequency direction to obtain an instantaneous energy curve; Detecting the number of peaks of the instantaneous energy curve, when the number of peaks of the instantaneous energy curve is less than 10, determining that the instantaneous energy curve is noise and eliminating it; when the number of peaks of the instantaneous energy curve reaches 10, determining that the instantaneous energy curve is the third noise signal, and outputting the time-frequency graph of the third noise signal.