Power optical fiber fault prediction method based on OTDR-cnn-k-means cooperation
Patent Information
- Application Number
- CN202511716121.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2045-11-21
AI Technical Summary
[0003]现有电力光纤故障检测主要依赖OTDR设备,通过分析背向散射信号获取光纤损耗分布,但传统OTDR方法存在显著缺陷:其一,原始信号受噪声(如瑞利散射噪声、环境电磁干扰)影响大,直接用于故障判断易出现误检;其二,故障特征提取依赖人工经验或简单阈值法,对轻微衰减、隐性故障的识别能力弱;其三,单独采用CNN模型进行故障预测时,样本分布不均衡会导致模型泛化能力下降,而单独k-means聚类难以有效挖掘故障特征的深层关联,无法满足高精度预测需求
[0060]本公开的实施例提供的技术方案可以包括以下有益效果:基于OTDR设备发射光脉冲,获取高分辨率光纤背向散射信号,通过小波降噪技术抑制瑞利散射噪声与变电站电磁干扰,显著提升信号质量;采用k-means聚类算法对预处理后的信号样本进行智能划分,通过自适应确定聚类数、优化初始中心,解决故障样本稀缺导致的分布失衡问题,为CNN模型提供均衡、高质量的训练数据;设计深度CNN模型,通过多层卷积与最大池化操作逐层提取故障深层特征(如断裂信号的尖峰特征、接头衰减的渐变特征),结合全连接层与Softmax激活函数,实现故障类型与位置的初步预测;构建OTDR-CNN-k-means协同优化机制,基于预测误差动态调整小波降噪阈值、k-means聚类参数及CNN模型权重,通过迭代优化持续提升预测性能,确保在复杂电磁环境、长距离传输等工况下,故障预测的精准性与鲁棒性。
Smart Images

Figure CN121791939B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power communication network monitoring and fault diagnosis technology, specifically to a power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration. Background Technology
[0002] As the core transmission medium of power communication systems, the operational stability of power optical fibers directly determines the communication reliability of smart grids. Fiber optic faults (such as breaks, abnormal attenuation, and loose connectors) can easily lead to data transmission interruptions, causing serious consequences such as grid dispatch failures and equipment monitoring malfunctions. Therefore, efficient and accurate fault prediction technology is crucial for the safe operation of power systems.
[0003] Current power fiber optic fault detection primarily relies on OTDR equipment, which analyzes backscattered signals to obtain fiber loss distribution. However, traditional OTDR methods have significant drawbacks: First, the raw signal is greatly affected by noise (such as Rayleigh scattering noise and environmental electromagnetic interference), making it prone to false detections when directly used for fault diagnosis. Second, fault feature extraction depends on manual experience or simple thresholding methods, resulting in weak identification capabilities for slight attenuation and latent faults. Third, when using a CNN model alone for fault prediction, imbalanced sample distribution leads to decreased model generalization ability, while k-means clustering alone is insufficient to effectively uncover deep correlations in fault features, failing to meet the requirements for high-precision prediction. Furthermore, existing technologies lack a collaborative mechanism for OTDR data processing, feature optimization, and intelligent prediction, resulting in low fault prediction accuracy and poor real-time performance, making it difficult to adapt to the fiber optic monitoring needs in complex power environments. Summary of the Invention
[0004] The purpose of this invention is to provide a power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration, so as to at least partially solve the problems existing in related technologies.
[0005] To achieve the above objectives, this disclosure provides a power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration, including:
[0006] Step S1: Transmit optical pulses into the power optical fiber using an OTDR (Optical Time Domain Reflectometer), and collect and record the backscattered signal obtained after reflection from the power optical fiber. ;
[0007] Step S2: Analyze the backscattered signal Preprocessing is performed by sequentially executing wavelet denoising and normalization operations to obtain a standardized signal. ;
[0008] Step S3: Use the k-means clustering algorithm to standardize the signal. Divide the samples into clusters, calculate sample similarity using a distance formula, iteratively update cluster centers, and optimize sample distribution;
[0009] Step S4: Input the clustered and optimized samples into the CNN model, extract fault features through convolution and pooling, and output the preliminary fault prediction results through a fully connected layer. ;
[0010] Step S5: Calculate the prediction error ,in, To label the actual faults, dynamically adjust the number of k-means clusters. With CNN model weights This leads to collaborative optimization.
[0011] Step S6: Output the final fault type and location information. If there is an error... ,in, If the preset threshold is used, the feedback is sent to step S2 for reprocessing.
[0012] Optionally, step S1 includes:
[0013] Step S11: The OTDR optical time domain reflectometer generates 5V~10V electrical pulses, which are converted into 1310nm or 1550nm optical pulses by the E / O light source. The output power is 10~20dBm and the pulse width is strictly controlled within 10~100μs.
[0014] Step S12, optical coupler guides the incident light pulse: an optical directional coupler with a coupling ratio of 90:10 is used to guide 90% of the incident light to the fiber under test, and 10% is reserved for the monitoring of reflected light;
[0015] In step S13, when the optical pulse is transmitted in the optical fiber, it collides with tiny particles of the material to generate Rayleigh scattered light; when it encounters interfaces such as joints or breaks, it generates Fresnel reflected light due to the sudden change in refractive index. These two signals provide core features for fault identification.
[0016] In step S14, the returned scattered and reflected light is separated through the 10% reflection channel of the coupler, with an isolation of ≥50dB.
[0017] Optionally, step S1 further includes:
[0018] Step S15: A photodetector with a responsivity ≥0.8A / W is used to convert the optical signal into a weak electrical signal using the photoelectric effect. Its dark current is ≤10nA, which effectively suppresses background noise and ensures that the converted signal truly reflects the state of the optical fiber.
[0019] Step S16: The electrical signal is amplified by 1000 to 10000 times by a low-noise amplifier, and then filtered out high-frequency noise such as electromagnetic interference by a low-pass filter with a cutoff frequency of 1MHz, so that the signal-to-noise ratio is ≥20dB and the signal quality is improved.
[0020] Step S17: The data acquisition unit synchronizes with the 100MHz master clock, converts the processed electrical signal into a digital signal at a preset sampling frequency, and stores it in chronological order as a backscatter signal sequence. This provides raw data for fault location;
[0021] Step S18, sampling frequency To avoid signal aliasing, a pulse width of 10~100μs is used to balance resolution and detection distance, and an acquisition duration of 1~5s is used to balance data reliability and real-time performance, ensuring that the acquired data is effectively adapted to subsequent analysis.
[0022] Optionally, step S2 includes:
[0023] Step S21, use the db4 wavelet to analyze the original signal. A five-level decomposition was performed, high-frequency coefficients were thresholded, fault characteristic correlation coefficients were preserved, and the denoised signal was reconstructed. ;
[0024] Step S22: Map the denoised signal to the [0, 1] interval to eliminate the influence of dimensions and obtain the standardized signal. .
[0025] Optionally, in step S21 The formula is ;
[0026] in, This represents the original signal after denoising. Represents wavelet coefficients Describe the wavelet basis functions;
[0027] In step S22 The formula is ;
[0028] in, This indicates the signal after normalization. This represents the original signal after denoising. This represents the minimum value of the denoised signal. This represents the maximum value of the signal after denoising.
[0029] Optionally, step S3 includes:
[0030] Step S31, randomly select 1 sample was used as the initial cluster center. ... ;
[0031] in, The number of fault types is set according to the number of fault types.
[0032] Step S32, calculate each sample The Euclidean distance from each cluster center is used to assign the sample to the nearest cluster. ;
[0033] Step S33: Iteratively update the cluster centers until the change in cluster centers is complete. Stop the iteration and output the optimized sample set. .
[0034] Optionally, the Euclidean distance formula in step S32 is: ;
[0035] in, Indicates sample With cluster center The distance between them Indicates sample The dth eigencomponent With cluster center The d-th component The square of the difference;
[0036] The cluster center formula in step S33 is: ;
[0037] in, As a sample, For the first Cluster centers, For feature dimension, For the first Clusters, This represents the number of samples within the cluster.
[0038] Optionally, step S4 includes:
[0039] Step S41: The CNN model includes an input layer, three convolutional layers, two max pooling layers, and an output layer;
[0040] Wherein, the input layer dimension is , The number of signal sampling points; the kernel sizes of the convolutional layers are respectively , , The number of output channels is 32, 64, and 128 respectively; the pooling kernel size of the two max-pooling layers is... Two fully connected layers, with 256 neurons each. , Number of fault types;
[0041] Step S42, the formula for calculating the convolutional layer is as follows: ;
[0042] in, This represents the pixel value in the i-th row and j-th column of the output feature map of the convolutional layer. The activation function performs a non-linear transformation on the convolution result, enhancing the network's expressive power. The parameters in the p-th row and q-th column of the first convolutional layer kernel (weights) are used to extract local patterns from the input features. Input feature map In the diagram, the pixel value corresponding to the convolution kernel position (p, q) is... The bias term of the first convolutional layer is used to adjust the offset of the convolution result and improve the model's fitting ability;
[0043] Activation function via ReLU Introducing nonlinearity, the pooling layer is calculated as follows: ;
[0044] in, For convolution kernel weights, For bias, For activation function, The kernel size is... The pooling kernel size;
[0045] Step S43, the output of the fully connected layer is ;
[0046] in, For pooling layer output, As weight, As a bias, the output layer obtains the fault type probability distribution through the Softmax function:
[0047] ;
[0048] The category with the highest probability is taken as the initial prediction result. The fault location is calculated by combining the OTDR signal delay:
[0049] ;
[0050] in, The speed at which light travels in an optical fiber. The time delay of the reflected signal at the fault point.
[0051] Optionally, step S5 includes:
[0052] Step S51, calculate the predicted value With real labels Mean square error:
[0053] ;
[0054] in, Indicates mean squared loss. Represents the total number of samples. This represents the true value of the i-th sample. The predicted value of the i-th sample, The square of the prediction error for the i-th sample;
[0055] Step S52, based on the error Dynamically adjust CNN weights and k-means cluster numbers when If the condition is met, output the final result; otherwise, return to step 2 for reprocessing.
[0056] Optionally, the CNN weight formula in step S52 is: ;
[0057] in, This indicates the model parameter values for the next iteration. This represents the model parameter values for the current round. Indicates the learning rate. This represents the loss function, used to quantify the deviation between the model's predicted values and the actual values. This indicates the loss function with respect to the current parameters. The partial derivative (gradient) of the loss function reflects the direction of change of the loss function at the current parameters;
[0058] The formula for adjusting the k-means cluster number is: ;
[0059] in, For learning rate, For the loss function, To adjust the step size, It is a symbolic function.
[0060] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: Based on the OTDR device emitting optical pulses, high-resolution optical fiber backscattered signals are obtained; wavelet denoising technology is used to suppress Rayleigh scattering noise and substation electromagnetic interference, significantly improving signal quality; a k-means clustering algorithm is used to intelligently divide the preprocessed signal samples, and the distribution imbalance caused by the scarcity of fault samples is solved by adaptively determining the number of clusters and optimizing the initial centers, providing balanced and high-quality training data for the CNN model; a deep CNN model is designed, and deep fault features (such as the peak features of fracture signals and the gradual features of joint attenuation) are extracted layer by layer through multi-layer convolution and max pooling operations, combined with fully connected layers and the Softmax activation function to achieve preliminary prediction of fault type and location; an OTDR-CNN-k-means collaborative optimization mechanism is constructed, which dynamically adjusts the wavelet denoising threshold, k-means clustering parameters, and CNN model weights based on the prediction error, and continuously improves prediction performance through iterative optimization, ensuring the accuracy and robustness of fault prediction under complex electromagnetic environments and long-distance transmission conditions. Attached Figure Description
[0061] Figure 1 This is a flowchart illustrating the structure of the OTDR data acquisition module.
[0062] Figure 2 This is a flowchart of the overall process for power fiber optic fault prediction based on OTDR-CNN-k-means collaboration. Detailed Implementation
[0063] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0064] In this disclosure, unless otherwise stated, directional terms such as "upper," "lower," "front," "rear," "left," and "right" are used for ease of description based on the drawing orientations of the corresponding figures, while "inner" and "outer" are defined based on the contours of the corresponding components themselves. Terms such as "first" and "second" used in this disclosure are used to distinguish one element from another and do not have sequential or importance implications. Furthermore, when the following description refers to the figures, unless otherwise indicated, the same numbers in different figures represent the same or similar elements.
[0065] This method addresses the complex operating conditions of power fiber optic cables (such as those supporting transmission lines and communication fibers in substations) in smart grids. It constructs a closed-loop technical system of "data acquisition-preprocessing-sample optimization-feature extraction-cooperative feedback." Through high-precision data acquisition and noise reduction preprocessing using OTDR, balanced sample distribution using k-means clustering, and deep mining of fault features using CNN, combined with collaborative feedback to dynamically adjust parameters, it effectively avoids the limitations of single technologies. This enables high-precision, real-time prediction of fault types and locations, providing reliable technical support for power fiber optic cable operation and maintenance decisions and ensuring the stable operation of smart grid communication links.
[0066] Based on the optical pulses emitted by the OTDR device, high-resolution fiber backscattered signals are acquired. Wavelet denoising technology is used to suppress Rayleigh scattering noise and substation electromagnetic interference, significantly improving signal quality. The k-means clustering algorithm is used to intelligently divide the preprocessed signal samples. By adaptively determining the number of clusters and optimizing the initial centers, the distribution imbalance caused by the scarcity of fault samples is solved, providing balanced and high-quality training data for the CNN model. A deep CNN model is designed to extract deep fault features (such as the spike features of fracture signals and the gradual features of joint attenuation) layer by layer through multi-layer convolution and max pooling operations. Combined with fully connected layers and the Softmax activation function, preliminary prediction of fault type and location is achieved. An OTDR-CNN-k-means collaborative optimization mechanism is constructed. Based on the prediction error, the wavelet denoising threshold, k-means clustering parameters, and CNN model weights are dynamically adjusted. Through iterative optimization, the prediction performance is continuously improved, ensuring the accuracy and robustness of fault prediction under complex electromagnetic environments and long-distance transmission conditions.
[0067] The technical solution of this invention includes five core modules: an OTDR data acquisition module, a signal preprocessing module, a k-means clustering optimization module, a CNN prediction module, and a collaborative feedback module. These modules are connected in series and form a closed loop through a feedback link. The specific steps are as follows:
[0068] Figure 1 Master Clock: Provides a synchronous clock signal for the entire module, ensuring timing consistency across all units, and maintaining the clock frequency. ;
[0069] Figure 1 Central controller: Receives the master clock signal and outputs control commands to the pulse generator to adjust the emission frequency and width of the optical pulse;
[0070] Figure 1 Medium pulse generator: Generates electrical pulse signals according to controller instructions, with an amplitude of 5V~10V, and the pulse width can be adjusted by the controller;
[0071] Figure 1E / O light source: converts electrical pulse signals into optical pulse signals, with a center wavelength of... or Output power ;
[0072] Figure 1 Optical directional coupler: Enables unidirectional transmission of optical signals and reception of reflected signals, with a coupling ratio of 90:10 (incident light: reflected light).
[0073] Figure 1 The fiber optic cable under test: the power fiber optic link to be monitored, with a length ranging from 1km to 100km;
[0074] Figure 1 Medium photodetector : Converts the optical signal returned from the optical fiber into an electrical signal, responsivity Dark current ;
[0075] Figure 1 Medium signal processing unit: amplifies electrical signals (amplification factor 1000x~10000x) and filters them (low-pass filter, cutoff frequency). )deal with;
[0076] Figure 1 middle Display: Real-time display of the processed backscattered signal waveform, facilitating manual observation of signal characteristics.
[0077] Figure 2 OTDR data acquisition: via Figure 1 The module shown acquires power fiber optic backscattered signal sequences. Output the original signal data;
[0078] Figure 2 Data preprocessing: Wavelet denoising and normalization operations are performed sequentially on the original signal to output a standardized signal. If the signal-to-noise ratio (SNR) of the preprocessed signal is less than 20 dB, return to the OTDR data acquisition module for re-acquisition.
[0079] Figure 2 Collaborative optimization and adjustment: Calculate the error e=|yŷ| between the preliminary prediction result ŷ and the true label y, and then dynamically adjust the k-means cluster number k and the CNN model weight ω based on the error. By coordinating and adapting the two, the sample distribution and feature extraction effect are optimized, connecting the prediction and feedback process, and providing key guarantees for the accurate output of fault information.
[0080] Figure 2 CNN Feature Extraction and Preliminary Prediction: Optimizing the Sample Set Inputting a CNN model, performing convolution, pooling, and fully connected operations, outputs preliminary fault prediction results. With position ;
[0081] Figure 2 k-means clustering optimization: Input standardized signal Initialize the number of clusters After sample allocation and center update iterations, an optimized sample set is output. ;
[0082] Figure 2 Mid-fault result output and feedback: Calculation of prediction error ,like Output the final fault type (e.g., fiber breakage, connector attenuation, bending loss, etc.) and location information; if The error signal is fed back to the k-means clustering optimization module and the data preprocessing module to adjust the number of clusters. By combining the wavelet denoising threshold with the subsequent steps, a closed-loop collaborative optimization is formed.
[0083] Please see Figure 1 and Figure 2 This disclosure provides a power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration, comprising:
[0084] Step S1: Transmit optical pulses into the power optical fiber using an OTDR (Optical Time Domain Reflectometer), and collect and record the backscattered signal obtained after reflection from the power optical fiber. ;
[0085] Step S2: Analyze the backscattered signal Preprocessing is performed by sequentially executing wavelet denoising and normalization operations to obtain a standardized signal. ;
[0086] Step S3: Use the k-means clustering algorithm to standardize the signal. Divide the samples into clusters, calculate sample similarity using a distance formula, iteratively update cluster centers, and optimize sample distribution;
[0087] Step S4: Input the clustered and optimized samples into the CNN model, extract fault features through convolution and pooling, and output the preliminary fault prediction results through a fully connected layer. ;
[0088] Step S5: Calculate the prediction error ,in, To label the actual faults, dynamically adjust the number of k-means clusters. With CNN model weights This leads to collaborative optimization.
[0089] Step S6: Output the final fault type and location information. If there is an error... ,in, If the preset threshold is used, the feedback is sent to step S2 for reprocessing.
[0090] Understandably, the prediction accuracy is high: wavelet denoising preprocessing reduces noise interference, k-means clustering optimizes sample distribution, CNN extracts deep fault features, and collaborative mechanism iterative optimization makes the fault type identification accuracy ≥98% and the location positioning error ≤±1m, which is significantly better than traditional methods.
[0091] High real-time performance: OTDR data acquisition and preprocessing time ≤3s, k-means clustering iterations ≤50 times, CNN model inference speed ≤0.5s / time, overall prediction latency ≤5s, meeting the real-time monitoring requirements of power fiber optics;
[0092] Strong anti-interference capability: Wavelet denoising effectively suppresses Rayleigh scattering noise and electromagnetic interference, and k-means and CNN work together to improve the robustness of the model. It still works stably under ambient temperature of -20℃~60℃ and electromagnetic interference intensity ≤100V / m.
[0093] Good generalization ability: The collaborative optimization mechanism dynamically adapts to the fault characteristics of different types of power optical fibers (such as G.652 and G.655 optical fibers), and can achieve multi-scenario adaptation without retraining the model;
[0094] Low operation and maintenance costs: Fault prediction is completed automatically without manual intervention, reducing the workload of operation and maintenance personnel, reducing the time and cost of troubleshooting, and providing technical support for the stable operation of the power system.
[0095] In one embodiment, step S1 includes:
[0096] Step S11: The OTDR optical time domain reflectometer generates 5V~10V electrical pulses, which are converted into 1310nm or 1550nm optical pulses by the E / O light source. The output power is 10~20dBm and the pulse width is strictly controlled within 10~100μs.
[0097] Step S12, optical coupler guides the incident light pulse: an optical directional coupler with a coupling ratio of 90:10 is used to guide 90% of the incident light to the fiber under test, and 10% is reserved for the monitoring of reflected light;
[0098] In step S13, when the optical pulse is transmitted in the optical fiber, it collides with tiny particles of the material to generate Rayleigh scattered light; when it encounters interfaces such as joints or breaks, it generates Fresnel reflected light due to the sudden change in refractive index. These two signals provide core features for fault identification.
[0099] In step S14, the returned scattered and reflected light is separated through the 10% reflection channel of the coupler, with an isolation of ≥50dB.
[0100] In one embodiment, step S1 further includes:
[0101] Step S15: A photodetector with a responsivity ≥0.8A / W is used to convert the optical signal into a weak electrical signal using the photoelectric effect. Its dark current is ≤10nA, which effectively suppresses background noise and ensures that the converted signal truly reflects the state of the optical fiber.
[0102] Step S16: The electrical signal is amplified by 1000 to 10000 times by a low-noise amplifier, and then filtered out high-frequency noise such as electromagnetic interference by a low-pass filter with a cutoff frequency of 1MHz, so that the signal-to-noise ratio is ≥20dB and the signal quality is improved.
[0103] Step S17: The data acquisition unit synchronizes with the 100MHz master clock, converts the processed electrical signal into a digital signal at a preset sampling frequency, and stores it in chronological order as a backscatter signal sequence. This provides raw data for fault location;
[0104] Step S18, sampling frequency To avoid signal aliasing, a pulse width of 10~100μs is used to balance resolution and detection distance, and an acquisition duration of 1~5s is used to balance data reliability and real-time performance, ensuring that the acquired data is effectively adapted to subsequent analysis.
[0105] In one embodiment, step S2 includes:
[0106] Step S21, use the db4 wavelet to analyze the original signal. A five-level decomposition was performed, high-frequency coefficients were thresholded, fault characteristic correlation coefficients were preserved, and the denoised signal was reconstructed. ;
[0107] Step S22: Map the denoised signal to the [0, 1] interval to eliminate the influence of dimensions and obtain the standardized signal. .
[0108] In one embodiment, in step S21 The formula is ;
[0109] in, This represents the original signal after denoising. Represents wavelet coefficients Describe the wavelet basis functions;
[0110] In step S22 The formula is ;
[0111] in, This indicates the signal after normalization. This represents the original signal after denoising. This represents the minimum value of the denoised signal. This represents the maximum value of the signal after denoising.
[0112] In one embodiment, step S3 includes:
[0113] Step S31, randomly select 1 sample was used as the initial cluster center. ... ;
[0114] in, The number of fault types is set according to the number of fault types.
[0115] Step S32, calculate each sample The Euclidean distance from each cluster center is used to assign the sample to the nearest cluster. ;
[0116] Step S33: Iteratively update the cluster centers until the change in cluster centers is complete. Stop the iteration and output the optimized sample set. .
[0117] In one embodiment, the Euclidean distance formula in step S32 is: ;
[0118] in, Indicates sample With cluster center The distance between them Indicates sample The dth eigencomponent With cluster center The d-th component The square of the difference;
[0119] The cluster center formula in step S33 is: ;
[0120] in, As a sample, For the first Cluster centers, For feature dimension, For the first Clusters, This represents the number of samples within the cluster.
[0121] In one embodiment, step S4 includes:
[0122] Step S41: The CNN model includes an input layer, three convolutional layers, two max pooling layers, and an output layer;
[0123] Wherein, the input layer dimension is , The number of signal sampling points; the kernel sizes of the convolutional layers are respectively , , The number of output channels is 32, 64, and 128 respectively; the pooling kernel size of the two max-pooling layers is... Two fully connected layers, with 256 neurons each. , Number of fault types;
[0124] Step S42, the formula for calculating the convolutional layer is as follows: ;
[0125] in, This represents the pixel value in the i-th row and j-th column of the output feature map of the convolutional layer. The activation function performs a non-linear transformation on the convolution result, enhancing the network's expressive power. The parameters in the p-th row and q-th column of the first convolutional layer kernel (weights) are used to extract local patterns from the input features. Input feature map In the diagram, the pixel value corresponding to the convolution kernel position (p, q) is... The bias term of the first convolutional layer is used to adjust the offset of the convolution result and improve the model's fitting ability;
[0126] Activation function via ReLU Introducing nonlinearity, the pooling layer is calculated as follows: ;
[0127] in, For convolution kernel weights, For bias, For activation function, The kernel size is... The pooling kernel size;
[0128] Step S43, the output of the fully connected layer is ;
[0129] in, For pooling layer output, As weight, As a bias, the output layer obtains the fault type probability distribution through the Softmax function:
[0130]
[0131] The category with the highest probability is taken as the initial prediction result. The fault location is calculated by combining the OTDR signal delay:
[0132] ;
[0133] in, The speed at which light travels in an optical fiber. The time delay of the reflected signal at the fault point.
[0134] In one embodiment, step S5 includes:
[0135] Step S51, calculate the predicted value With real labels Mean square error:
[0136] ;
[0137] in, Indicates mean squared loss. Represents the total number of samples. This represents the true value of the i-th sample. The predicted value of the i-th sample, The square of the prediction error for the i-th sample;
[0138] Step S52, based on the error Dynamically adjust CNN weights and k-means cluster numbers when If the condition is met, output the final result; otherwise, return to step 2 for reprocessing.
[0139] In one embodiment, the CNN weight formula in step S52 is: ;
[0140] in, This indicates the model parameter values for the next iteration. This represents the model parameter values for the current round. Indicates the learning rate. This represents the loss function, used to quantify the deviation between the model's predicted values and the actual values. This indicates the loss function with respect to the current parameters. The partial derivative (gradient) of the loss function reflects the direction of change of the loss function at the current parameters;
[0141] The formula for adjusting the k-means cluster number is: ;
[0142] in, For learning rate, For the loss function, To adjust the step size, It is a symbolic function.
[0143] Experimental parameter settings
[0144] OTDR device parameters: Center wavelength 1550 nm Pulse width Sampling frequency 2GHz, sampling duration The fiber under test is a G.652 single-mode fiber with a length of 50km;
[0145] Preprocessing parameters: wavelet basis function is db4, decomposition level is 5, and noise reduction threshold is [not specified]. ( (Number of sampling points), normalization range ;
[0146] k-means parameters: initial number of clusters (Corresponding to 5 types of faults: breakage, joint attenuation, bending loss, aging attenuation, and normal state), iteration termination condition ;
[0147] CNN model parameters: convolution kernel sizes are respectively , , Output channel count: 32, 64, 128; pooling kernel size: Step size 2; Number of neurons in the fully connected layer 256, 6 (5 types of faults + normal); Learning rate The number of iterations is 100, and the batch size is 32.
[0148] Coordination parameters: Adjust step size Error threshold .
[0149] Detailed calculation process:
[0150] Data preprocessing calculation: Assuming the original signal The maximum value is 1200, the minimum value is 200, and at a certain moment... Corresponding noise reduction signal
[0151] Then, normalized calculation:
[0152]
[0153] k-means clustering calculation: Select 5 initial cluster centers Calculate samples Distance from each center:
[0154]
[0155] Will Assigned to or (Randomly assigned when distances are equal), cluster centers are iteratively updated, after the first update. Until the termination condition is met.
[0156] CNN prediction calculation: Input to convolutional layer 1 is convolution kernel Step size 1, output is After activation:
[0157]
[0158] Pooling layer 1 output is After calculation by subsequent layers, the fully connected layer outputs...
[0159]
[0160] Softmax output:
[0161]
[0162] The fault type was determined to be bending loss, and the fault location was determined to be... .
[0163] Collaborative optimization calculation: If the actual fault type is bending loss, the prediction error Output the result; if there is an error Adjust the weights:
[0164]
[0165] Cluster number The process will be re-executed.
[0166] This invention has been described through embodiments. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of this invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, this invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this invention.
Claims
1. A power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration, characterized in that, include: Step S1: Transmit optical pulses into the power optical fiber using an OTDR (Optical Time Domain Reflectometer), and collect and record the backscattered signal obtained after reflection from the power optical fiber. ; Step S2, for the backscattered signal Preprocessing is performed by sequentially executing wavelet denoising and normalization operations to obtain a standardized signal. ; Step S3: Use the k-means clustering algorithm to standardize the signal. Divide the samples into clusters, calculate sample similarity using a distance formula, iteratively update cluster centers, and optimize sample distribution; Step S4: Input the clustered and optimized samples into the CNN model, extract fault features through convolution and pooling, and output preliminary fault prediction results through a fully connected layer. ; Step S5: Calculate the prediction error ,in, To label the actual faults, dynamically adjust the number of k-means clusters. With CNN model weights This leads to collaborative optimization. Step S5 includes: Step S51, calculate the predicted value With real labels Mean square error: ; in, Indicates mean squared loss. Represents the total number of samples. This represents the true value of the i-th sample. This represents the predicted value of the i-th sample. This represents the square of the prediction error for the i-th sample; Step S52, based on mean square loss Dynamically adjust CNN weights and k-means cluster numbers when If the condition is met, proceed to step S6; otherwise, return to step S2 for reprocessing. The CNN weight formula is ; in, This indicates the model parameter values for the next iteration. This represents the model parameter values for the current round. Indicates the learning rate. This represents the loss function, used to quantify the deviation between the model's predicted values and the actual values. This indicates the loss function with respect to the current parameters. The partial derivatives of the loss function reflect the direction of change of the loss function at the current parameters; The formula for adjusting the k-means cluster number is: ; in, For learning rate, For loss function, To adjust the step size, It is a symbolic function; Step S6: Output the final fault type and location information.
2. The power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration according to claim 1, characterized in that, Step S1 includes: Step S11: The OTDR optical time domain reflectometer generates 5V~10V electrical pulses, which are converted into 1310nm or 1550nm optical pulses by the E / O light source. The output power is 10~20dBm and the pulse width is strictly controlled within 10~100μs. Step S12, optical coupler guides the incident light pulse: an optical directional coupler with a coupling ratio of 90:10 is used to guide 90% of the incident light to the fiber under test, and 10% is reserved for the monitoring of reflected light; In step S13, when the optical pulse is transmitted in the optical fiber, it collides with tiny particles of the material to generate Rayleigh scattered light; when it encounters a joint or fracture interface, it generates Fresnel reflected light due to the sudden change in refractive index. These two signals provide core features for fault identification. In step S14, the returned scattered and reflected light is separated through the 10% reflection channel of the coupler, with an isolation of ≥50dB.
3. The power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration according to claim 2, characterized in that, Step S1 also includes: Step S15: A photodetector with a responsivity ≥0.8A / W is used to convert the optical signal into a weak electrical signal using the photoelectric effect. Its dark current is ≤10nA, which effectively suppresses background noise and ensures that the converted signal truly reflects the state of the optical fiber. Step S16: The electrical signal is amplified by 1000 to 10000 times by a low-noise amplifier, and then filtered out by a low-pass filter with a cutoff frequency of 1MHz to remove high-frequency electromagnetic interference noise, so that the signal-to-noise ratio is ≥20dB and the signal quality is improved. Step S17: The data acquisition unit synchronizes with the 100MHz master clock, converts the processed electrical signal into a digital signal at a preset sampling frequency, and stores it in chronological order as a backscatter signal sequence. This provides raw data for fault location; Step S18, sampling frequency To avoid signal aliasing, a pulse width of 10~100μs is used to balance resolution and detection distance, and an acquisition duration of 1~5s is used to balance data reliability and real-time performance, ensuring that the acquired data is effectively adapted to subsequent analysis.
4. The power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration according to claim 2, characterized in that, Step S2 includes: Step S21, use the db4 wavelet to analyze the original signal. A five-level decomposition is performed, high-frequency coefficients are thresholded, fault characteristic correlation coefficients are retained, and the original denoised signal is reconstructed. ; Step S22: Map the denoised signal to the [0, 1] interval to eliminate the influence of dimensions and obtain the standardized signal. .
5. The power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration according to claim 4, characterized in that, In step S21 The formula is ; in, This represents the original signal after denoising. Represents wavelet coefficients, Describe the wavelet basis functions; In step S22 The formula is ; in, This indicates the signal after normalization. This represents the original signal after denoising. This represents the minimum value of the denoised signal. This represents the maximum value of the signal after denoising.
6. The power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration according to claim 4, characterized in that, Step S3 includes: Step S31, randomly select 1 sample was used as the initial cluster center. ... ; in, The number of fault types is set according to the number of fault types. Step S32, calculate each sample The Euclidean distance from each cluster center is used to assign the sample to the nearest cluster. ; Step S33: Iteratively update the cluster centers until the change in cluster centers is complete. Stop the iteration and output the optimized sample set. .
7. The power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration according to claim 6, characterized in that, The Euclidean distance formula in step S32 is: ; in, Indicates sample With cluster center The distance between them Indicates sample The dth eigencomponent With cluster center The d-th component The square of the difference; The cluster center formula in step S33 is: ; in, As a sample, For the first Cluster centers, For feature dimension, For the first Clusters, This represents the number of samples within the cluster.
8. The power fiber optic fault prediction method based on OTDR-CNN-k-means collaboration according to claim 6, characterized in that, Step S4 includes: Step S41: The CNN model includes an input layer, three convolutional layers, two max pooling layers, and an output layer; Wherein, the input layer dimension is , The number of signal sampling points; the kernel sizes of the convolutional layers are respectively , , The number of output channels is 32, 64, and 128 respectively; the pooling kernel size of the two max-pooling layers is... Two fully connected layers, with 256 neurons each. , Number of fault types; Step S42, the formula for calculating the convolutional layer is as follows: ; in, This represents the pixel value in the i-th row and j-th column of the output feature map of the convolutional layer. This represents the activation function. This represents the parameter in the p-th row and q-th column of the first convolutional layer kernel, used to extract local patterns from the input features. Represents the input feature map In the diagram, the pixel value corresponding to the convolution kernel position (p, q) is... This represents the bias term of the first convolutional layer, used to adjust the offset of the convolution result and improve the model's fitting ability; Activation function via ReLU Introducing nonlinearity, the pooling layer is calculated as follows: ; in, For convolution kernel weights, For bias, For activation function, The kernel size is [size]. The pooling kernel size; Step S43, the output of the fully connected layer is ; in, For pooling layer output, As weight, As a bias, the output layer obtains the fault type probability distribution through the Softmax function: ; The category with the highest probability is taken as the initial prediction result. The fault location is calculated by combining the OTDR signal delay: ; in, The speed at which light travels in an optical fiber. The time delay of the reflected signal at the fault point.
Citation Information
Patent Citations
Fiber fault detection method based on firefly optimization algorithm
CN115833940A
Optical fiber fault detection system and method based on optical time domain reflection technology
CN120074664A