Neural network model-based cable length measurement method and system
By introducing a neural network model into the TDR cable length measurement technology, combining the type of cable insulation material, temperature and humidity data and TDR measurement results, the problem of low measurement accuracy in complex environments in the existing technology is solved, and more accurate cable length measurement is achieved.
Patent Information
- Application Number
- CN202411735701.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-05-06
AI Technical Summary
The existing TDR cable length measurement technology has low measurement accuracy in temperature and humidity changing environments, especially in complex environments with large errors, making it difficult to effectively combine environmental factors.
Using a neural network model-based cable length measurement method, the pre-trained neural network model is input to output more accurate cable length by obtaining cable insulation material type, ambient temperature and humidity data, as well as the pulse reflection time difference measured by TDR.
By combining TDR and neural network models, adapting to the nonlinear relationship between input variables, the accuracy of cable length measurement is improved, and the impact of environmental factors such as temperature and humidity on the measurement results is reduced.
Smart Images

Figure CN119934982A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cable length measurement, and in particular to a cable length measurement method and system based on a neural network model. Background Art
[0002] In the application scenario of long-distance cables, accurately measuring the length of the cable is crucial for the acceptance of waste cables, fault location and monitoring. Time domain reflectometry (TDR) is a commonly used technology for measuring cable length and fault location. TDR measures the length of the cable by sending electrical pulses into the cable and detecting the time difference of the returned reflected signal.
[0003] However, the measurement accuracy of TDR will be significantly affected by environmental factors such as temperature and humidity, because temperature and humidity will change the dielectric constant of the cable, thereby affecting the propagation speed of the pulse signal.
[0004] In the traditional TDR measurement process, factors such as temperature and humidity changes are not fully considered, which often leads to deviations in the measurement results. For application scenarios with high accuracy requirements, the current TDR measurement technology needs to be further improved. Existing technologies mainly rely on linear correction or correction through empirical formulas to deal with the influence of temperature and humidity, but the effect is not ideal, especially in complex environments where the error is large. Therefore, there is an urgent need for a cable length measurement method that can effectively combine environmental factors to improve measurement accuracy. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a cable length measurement method and system based on a neural network model to achieve more accurate cable length measurement.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0007] A cable length measurement method based on a neural network model comprises the following steps:
[0008] S1. Obtain the type of cable insulation material of the cable to be tested, the temperature data and humidity data of the measuring environment, and perform TDR measurement on the cable to be tested to obtain the measured pulse reflection time difference;
[0009] S2, inputting the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference into a pre-trained neural network model to obtain the cable length of the cable to be tested;
[0010] The training data of the neural network model is obtained by performing TDR measurements on cables of different lengths and different insulation material types at different temperatures and humidity.
[0011] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0012] A cable length measurement system based on a neural network model comprises a measurement terminal and a temperature sensor, a humidity sensor, a pulse generator, and a pulse signal receiving device that are communicatively connected to the measurement terminal. The measurement terminal comprises a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: A cable length measurement system based on a neural network model
[0013] S1. Obtain the type of cable insulation material of the cable to be tested, the temperature data and humidity data of the measuring environment, and perform TDR measurement on the cable to be tested to obtain the measured pulse reflection time difference;
[0014] S2, inputting the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference into a pre-trained neural network model to obtain the cable length of the cable to be tested;
[0015] The training data of the neural network model is obtained by performing TDR measurements on cables of different lengths and different insulation material types at different temperatures and humidity.
[0016] The beneficial effects of the present invention are as follows: a cable length measurement method and system based on a neural network model of the present invention combines the time domain reflectometry TDR with the neural network model, and adapts to the nonlinear relationship between input variables, including the influence of temperature, humidity and cable insulation material type on the propagation speed of the pulse signal, by training the neural network model, and finally outputs the precise cable length, thereby achieving more accurate measurement of the cable length. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of a cable length measurement method based on a neural network model according to an embodiment of the present invention;
[0018] Figure 2 A structural diagram of a cable length measurement system based on a neural network model according to an embodiment of the present invention;
[0019] Figure 3 A neural network model structure diagram of a cable length measurement method based on a neural network model according to an embodiment of the present invention;
[0020] Description of labels:
[0021] 1. A cable length measurement system based on a neural network model; 2. A measurement terminal; 3. A processor; 4. A memory; 5. A temperature sensor; 6. A humidity sensor; 7. A pulse generator; 8. A pulse signal receiving device. DETAILED DESCRIPTION
[0022] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0023] Please refer to Figure 1 as well as Figure 3 , a cable length measurement method based on a neural network model, comprising the steps of:
[0024] S1. Obtain the type of cable insulation material of the cable to be tested, the temperature data and humidity data of the measuring environment, and perform TDR measurement on the cable to be tested to obtain the measured pulse reflection time difference;
[0025] S2, inputting the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference into a pre-trained neural network model to obtain the cable length of the cable to be tested;
[0026] The training data of the neural network model is obtained by performing TDR measurements on cables of different lengths and different insulation material types at different temperatures and humidity.
[0027] From the above description, it can be seen that the beneficial effects of the present invention are: a cable length measurement method based on a neural network model of the present invention combines time domain reflectometry TDR with a neural network model, and adapts to the nonlinear relationship between input variables by training the neural network model, including the influence of temperature, humidity and cable insulation material type on the propagation speed of the pulse signal, and finally outputs the precise cable length to achieve more accurate measurement of the cable length.
[0028] Furthermore, the neural network model adopts a multi-layer perceptron neural network structure, including an input layer, a hidden layer and an output layer;
[0029] The input layer includes four input nodes, corresponding to the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference respectively;
[0030] The hidden layer has two layers and uses the ReLU activation function;
[0031] The output layer includes a node corresponding to the output of the cable length.
[0032] From the above description, it can be seen that the model architecture using a multi-layer perceptron neural network structure can adapt to the complexity of nonlinear relationships to a certain extent, and effectively capture the effects of temperature and humidity on the propagation speed of pulse signals and cable length.
[0033] Furthermore, the neural network model uses mean square error as a loss function and is optimized using the Adam optimizer;
[0034] The mean square error is defined as:
[0035]
[0036] In the formula, is the cable length output by the neural network model, y i is the actual cable length, and N is the number of samples.
[0037] From the above description, we can see that using mean square error (MSE) as the loss function and optimizing with Adam optimizer can minimize the error between the predicted result and the actual value. Using Adam optimizer for optimization can perform hyperparameter tuning on the model during the training process, including the number of hidden layer nodes, learning rate, etc., to ensure the generalization ability of the model.
[0038] Furthermore, the following steps are included between step S1 and step S2:
[0039] S11. Normalize the cable insulation material type, the temperature data, the humidity data, and the pulse reflection time difference.
[0040] From the above description, it can be seen that the input data is preprocessed and input into the neural network in a normalized or standardized form to reduce the training difficulty caused by different data scales.
[0041] Furthermore, the neural network model is trained using the TensorFlow deep learning framework;
[0042] During the training process, the training data is divided into several data sets according to a preset data volume, and input into the neural network model for training in batches.
[0043] From the above description, we can see that the TensorFlow deep learning framework is used for training. At the same time, during the model training process, the data is divided into small batch data sets and input into the model batch by batch for training. The advantage of small batch training is that it can improve training efficiency and avoid oscillation problems caused by gradient noise.
[0044] Please refer to Figure 2A cable length measurement system based on a neural network model comprises a measurement terminal and a temperature sensor, a humidity sensor, a pulse generator, and a pulse signal receiving device that are communicatively connected to the measurement terminal. The measurement terminal comprises a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: A cable length measurement system based on a neural network model
[0045] S1. Obtain the type of cable insulation material of the cable to be tested, the temperature data and humidity data of the measuring environment, and perform TDR measurement on the cable to be tested to obtain the measured pulse reflection time difference;
[0046] S2, inputting the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference into a pre-trained neural network model to obtain the cable length of the cable to be tested;
[0047] The training data of the neural network model is obtained by performing TDR measurements on cables of different lengths and different insulation material types at different temperatures and humidity.
[0048] From the above description, it can be seen that the beneficial effects of the present invention are: a cable length measurement system based on a neural network model of the present invention combines time domain reflectometry TDR with a neural network model, and adapts to the nonlinear relationship between input variables by training the neural network model, including the influence of temperature, humidity and cable insulation material type on the propagation speed of the pulse signal, and finally outputs the precise cable length to achieve more accurate measurement of the cable length.
[0049] Furthermore, the neural network model adopts a multi-layer perceptron neural network structure, including an input layer, a hidden layer and an output layer;
[0050] The input layer includes four input nodes, corresponding to the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference respectively;
[0051] The hidden layer has two layers and uses the ReLU activation function;
[0052] The output layer includes a node corresponding to the output of the cable length.
[0053] From the above description, it can be seen that the model architecture using a multi-layer perceptron neural network structure can adapt to the complexity of nonlinear relationships to a certain extent, and effectively capture the effects of temperature and humidity on the propagation speed of pulse signals and cable length.
[0054] Furthermore, the neural network model uses mean square error as a loss function and is optimized using the Adam optimizer;
[0055] The mean square error is defined as:
[0056]
[0057] In the formula, is the cable length output by the neural network model, y i is the actual cable length, and N is the number of samples.
[0058] From the above description, we can see that using mean square error (MSE) as the loss function and optimizing with Adam optimizer can minimize the error between the predicted result and the actual value. Using Adam optimizer for optimization can perform hyperparameter tuning on the model during the training process, including the number of hidden layer nodes, learning rate, etc., to ensure the generalization ability of the model.
[0059] Furthermore, the following steps are included between step S1 and step S2:
[0060] S11. Normalize the cable insulation material type, the temperature data, the humidity data, and the pulse reflection time difference.
[0061] From the above description, it can be seen that the input data is preprocessed and input into the neural network in a normalized or standardized form to reduce the training difficulty caused by different data scales.
[0062] Furthermore, the neural network model is trained using the TensorFlow deep learning framework;
[0063] During the training process, the training data is divided into several data sets according to a preset data volume, and input into the neural network model for training in batches.
[0064] From the above description, we can see that the TensorFlow deep learning framework is used for training. At the same time, during the model training process, the data is divided into small batch data sets and input into the model batch by batch for training. The advantage of small batch training is that it can improve training efficiency and avoid oscillation problems caused by gradient noise.
[0065] The invention discloses a cable length measurement method and system based on a neural network model, which are suitable for measuring the cable length.
[0066] Please refer to Figure 1 and Figure 3 , Embodiment 1 of the present invention is:
[0067] A cable length measurement method based on a neural network model comprises the following steps:
[0068] S1. Obtain the type of cable insulation material of the cable to be tested, the temperature data and humidity data of the measurement environment, and perform TDR measurement on the cable to be tested to obtain the pulse reflection time difference.
[0069] Time Domain Reflectometry (TDR) is a measurement method based on the propagation characteristics of electromagnetic waves. TDR sends an electrical pulse signal to the cable. When the signal propagates in the cable and encounters a reflection point such as a resistance change, an open circuit or a short circuit, a reflection signal is generated. The TDR system records the time difference between the original pulse signal and the reflected signal to calculate the location of the reflection point and the cable length. The TDR principle is based on the following formula:
[0070]
[0071] Among them, l represents the length of the cable, v represents the propagation speed of the signal, and △t represents the round-trip time difference of the pulse. The propagation speed of the signal v is affected by the dielectric constant of the cable insulation material and is also closely related to factors such as temperature and humidity.
[0072] To better understand the working principle of TDR measurement, the following derivation formula can be used:
[0073] The propagation velocity v can be calculated from the dielectric constant and is expressed as:
[0074]
[0075] Where c is the speed of light in a vacuum and ε is the dielectric constant of the cable insulation.
[0076] The calculation formula for the cable length L is:
[0077]
[0078] Among them, changes in environmental factors such as temperature and humidity will affect the measurement results by changing the value of ε. The accuracy of cable length measurement depends largely on the accuracy and precise calibration of the ε value.
[0079] In the TDR measurement process, the factors that affect the measurement accuracy mainly include:
[0080] Dielectric constant of cable insulation material: Different insulation materials have different dielectric constants, and the signal propagation speed in the cable also changes accordingly, which directly affects the measurement accuracy of TDR.
[0081] Temperature: Changes in temperature will cause changes in the dielectric constant of the cable material, which in turn affects the propagation speed of the pulse signal. As the temperature rises, the molecules and electric dipoles (molecules or atomic groups with charge distribution) in the material will gain higher energy, thereby increasing the speed of movement. At high temperatures, the vibration frequency of molecules or electric dipoles increases, and the degree of polarization under the electric field will change, causing the dielectric constant to change.
[0082] Humidity: Humidity may change the dielectric constant of the insulating material by penetrating into the insulating material or attaching to the surface of the cable. Humidity penetrates into the material or attaches to the surface of the material through water molecules. The relative dielectric constant of water is high (about 80), which is much higher than the dielectric constant of general cable insulation materials (usually 2 to 5). Therefore, the introduction of moisture will significantly increase the overall dielectric constant of the material, resulting in deviations in the propagation speed of the signal.
[0083] Therefore, in this embodiment, data such as temperature and humidity, cable insulation material type, TDR pulse reflection time difference, etc. are collected, so that the cable length can be obtained by using a neural network model in the subsequent process, thereby significantly improving the measurement accuracy.
[0084] S11. Normalize the cable insulation material type, the temperature data, the humidity data, and the pulse reflection time difference.
[0085] Normalize or standardize the data to ensure that the numerical range of each input feature is consistent. This helps to speed up model convergence and reduce training error. For example, use normalization to scale features to between [0,1].
[0086] S2, inputting the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference into a pre-trained neural network model to obtain the cable length of the cable to be tested;
[0087] The training data of the neural network model is obtained by performing TDR measurements on cables of different lengths and different insulation material types at different temperatures and humidity.
[0088] Please refer to Figure 3 In this embodiment, the neural network model adopts a multi-layer perceptron neural network structure, including an input layer, a hidden layer and an output layer;
[0089] The input layer includes four input nodes, corresponding to the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference respectively;
[0090] The hidden layer is two layers, each of which contains at least one node, and the ReLU activation function is used to increase the fitting ability of the model. In this embodiment, the number of nodes in the hidden layer is selected to be 128, which is a trade-off between the complexity of the model and the computing resources. Too few nodes may lead to underfitting, while too many nodes will increase the computational burden and may lead to overfitting. The choice of the number of layers is based on the complex relationship between nonlinear features. The two hidden layers have a high nonlinear fitting ability, which is suitable for capturing the complex effects of multidimensional factors such as temperature, humidity and cable materials on the signal propagation speed.
[0091] The output layer includes a node corresponding to the output of the cable length.
[0092] This network structure can adapt to the complexity of nonlinear relationships to a certain extent and effectively capture the effects of temperature and humidity on the propagation speed of pulse signals and cable length.
[0093] The training of the neural network model is explained below.
[0094] In this embodiment, the training data and test data are collected in the following manner:
[0095] 1. Multiple temperature and humidity combination experiments: Set up different temperature and humidity environments in the laboratory, simulate the propagation characteristics of cables under different conditions, and collect sample data of multiple cable lengths.
[0096] 2. Different cable material types: Collect data on a variety of cable insulation materials to ensure that the neural network can adapt to cables with different insulation materials.
[0097] Preprocess the data, including normalization or standardization, to ensure that the numerical range of each input feature is consistent. This helps to speed up model convergence and reduce training error. For example, use normalization to scale features to between [0,1].
[0098] Model training uses a moderate learning rate (such as 0.001) to balance the training speed and stability of the model. Too high a learning rate will cause the model to jump over the optimal solution during training, while too low a learning rate will make the training time too long.
[0099] The neural network model uses mean square error as the loss function and is optimized using the Adam optimizer;
[0100] The mean square error is defined as:
[0101]
[0102] In the formula, is the cable length output by the neural network model, y i is the actual cable length, and N is the number of samples.
[0103] The neural network model is trained using the TensorFlow deep learning framework;
[0104] During the training process, the training data is divided into several data sets according to a preset data volume, and input into the neural network model for training in batches.
[0105] In this embodiment, the neural network model is trained by deep learning frameworks such as TensorFlow, using mean square error (MSE) as the loss function, and optimized by Adam optimizer. During the model training process, the data is divided into small batch data sets (such as 64 samples per batch) and input into the model batch by batch for training. The advantage of small batch training is that it can improve training efficiency while avoiding oscillation problems caused by gradient noise. During the training process, the model is hyper-parameter tuned, including the number of hidden layer nodes, learning rate, etc., to ensure the generalization ability of the model.
[0106] The model is evaluated using the holdout method or cross-validation method. When the error on the test set is less than a specific threshold, it indicates that the model has achieved the accuracy requirements for practical applications.
[0107] From then on, the neural network model was established.
[0108] Please refer to Figure 2 , Embodiment 2 of the present invention is:
[0109] A cable length measurement system 1 based on a neural network model comprises a measurement terminal 2 and a temperature sensor 5, a humidity sensor 6, a pulse generator 7, and a pulse signal receiving device 8 which are communicatively connected to the measurement terminal. The measurement terminal 2 comprises a processor 3, a memory 4, and a computer program stored in the memory 4 and executable on the processor 3. When the processor 3 executes the computer program, the cable length measurement system based on the neural network model implements the steps of the cable length measurement method based on the neural network model in the first embodiment above.
[0110] In this embodiment, the measurement terminal 2 is connected to the following hardware devices.
[0111] Temperature sensor 5, humidity sensor 6: high-precision temperature and humidity sensors, used to measure the temperature and humidity information of the external environment in real time.
[0112] Pulse generator 7: A signal generator used to generate TDR pulse signals, which requires a stable pulse waveform and adjustable frequency and voltage.
[0113] Pulse signal receiving device 8: A high-sensitivity receiving device used to receive the pulse reflection signal and accurately calculate the time difference.
[0114] The measurement terminal 2 (data processing unit) is equipped with a neural network inference chip (such as TPU) or an embedded CPU, which is responsible for real-time processing of TDR measurement data and calling the neural network model to calculate the cable length.
[0115] The hardware circuit is connected to the neural network model interface through the embedded system, and the measured temperature and humidity and TDR time difference data are input into the neural network model to finally calculate the cable length.
[0116] Application Process
[0117] 1. Start the system and perform self-test to ensure that the sensor and signal generator are working properly.
[0118] 2. Collect current environmental data through temperature and humidity sensors and input the type of cable insulation material.
[0119] 3. Send a TDR pulse signal to the cable and record the reflection time difference.
[0120] 4. Temperature and humidity, TDR time difference and cable insulation material type are used as inputs and passed into the neural network model.
[0121] 5. The model outputs the cable length measurement results.
[0122] In summary, the present invention provides a cable length measurement method and system based on a neural network model, which combines the time domain reflectometry TDR with the neural network model. By training the neural network model, it adapts to the nonlinear relationship between input variables, including the influence of temperature, humidity and cable insulation material type on the propagation speed of the pulse signal, and finally outputs the precise cable length to achieve more accurate measurement of the cable length.
[0123] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A cable length measurement method based on a neural network model, characterized in that: Includes steps: S1. Obtain the type of cable insulation material of the cable to be tested, the temperature data and humidity data of the measuring environment, and perform TDR measurement on the cable to be tested to obtain the measured pulse reflection time difference; S2, inputting the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference into a pre-trained neural network model to obtain the cable length of the cable to be tested; The training data of the neural network model is obtained by performing TDR measurements on cables of different lengths and different insulation material types at different temperatures and humidity.
2. A cable length measurement method based on a neural network model according to claim 1, characterized in that: The neural network model adopts a multi-layer perceptron neural network structure, including an input layer, a hidden layer and an output layer; The input layer includes four input nodes, corresponding to the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference respectively; The hidden layer has two layers and uses the ReLU activation function; The output layer includes a node corresponding to the output of the cable length.
3. The cable length measurement method based on a neural network model according to claim 1 is characterized in that: The neural network model uses mean square error as the loss function and is optimized using the Adam optimizer; The mean square error is defined as: In the formula, is the cable length output by the neural network model, y i is the actual cable length, and N is the number of samples.
4. The cable length measurement method based on a neural network model according to claim 1 is characterized in that: The steps between step S1 and step S2 include: S11. Normalize the cable insulation material type, the temperature data, the humidity data, and the pulse reflection time difference.
5. The cable length measurement method based on a neural network model according to claim 1 is characterized in that: The neural network model is trained using the TensorFlow deep learning framework; During the training process, the training data is divided into several data sets according to a preset data volume, and input into the neural network model for training in batches.
6. A cable length measurement system based on a neural network model, comprising a measurement terminal and a temperature sensor, a humidity sensor, a pulse generator, and a pulse signal receiving device connected to the measurement terminal in communication, wherein the measurement terminal comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: S1. Obtain the type of cable insulation material of the cable to be tested, the temperature data and humidity data of the measuring environment, and perform TDR measurement on the cable to be tested to obtain the measured pulse reflection time difference; S2, inputting the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference into a pre-trained neural network model to obtain the cable length of the cable to be tested; The training data of the neural network model is obtained by performing TDR measurements on cables of different lengths and different insulation material types at different temperatures and humidity.
7. A cable length measurement system based on a neural network model according to claim 6, characterized in that: The neural network model adopts a multi-layer perceptron neural network structure, including an input layer, a hidden layer and an output layer; The input layer includes four input nodes, corresponding to the cable insulation material type, the temperature data, the humidity data and the pulse reflection time difference respectively; The hidden layer has two layers and uses the ReLU activation function; The output layer includes a node corresponding to the output of the cable length.
8. A cable length measurement system based on a neural network model according to claim 6, characterized in that: The neural network model uses mean square error as the loss function and is optimized using the Adam optimizer; The mean square error is defined as: In the formula, is the cable length output by the neural network model, y i is the actual cable length, and N is the number of samples.
9. A cable length measurement system based on a neural network model according to claim 6, characterized in that: The steps between step S1 and step S2 include: S11. Normalize the cable insulation material type, the temperature data, the humidity data, and the pulse reflection time difference.
10. A cable length measurement system based on a neural network model according to claim 6, characterized in that: The neural network model is trained using the TensorFlow deep learning framework; During the training process, the training data is divided into several data sets according to a preset data volume, and input into the neural network model for training in batches.
Citation Information
Cited By
Silicon dioxide film thickness measuring method and system based on multilayer perceptron
CN121140646A
Double-reference cable length measuring method based on time-to-digital converter
CN121230658A