An angular measurement sensor sensitive component detection system and method
By constructing pulse anomaly detection and angle correction models, the problem of pulse loss or repetition of photoelectric angular sensors in dynamic environments is solved, and high-precision and high-reliability measurement is achieved, and it is suitable for industrial automation, automotive electronics, aerospace and other fields.
Patent Information
- Application Number
- CN202411394858.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-10-08
AI Technical Summary
The prior art is difficult to effectively detect and correct the pulse loss or repetition of photoelectric angular sensors in dynamic environments, resulting in a decrease in measurement accuracy and reliability, and it is impossible to cope with the nonlinear impact of ambient temperature and electromagnetic noise.
By constructing a pulse abnormality detection model and an angle correction detection model, using the preset pulse time interval threshold to judge pulse abnormality, obtain the number of lost or repeated pulses, and correct the measurement results through the regression network to ensure measurement accuracy and reliability.
It realizes high-precision and high-reliability measurement of photoelectric angular sensors in dynamic environments, effectively avoiding the nonlinear influence of ambient temperature and electromagnetic noise, and ensuring the stable performance of the sensor under complex conditions.
Smart Images

Figure CN118936369B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sensor testing, and more specifically, to a detection system and method for a sensitive component of an angular measurement sensor. Background Art
[0002] An angular position sensor is a key device for measuring the rotation angle and is widely used in various fields such as industrial automation, automotive electronics, aerospace, and precision instruments. It can be classified into an optoelectronic angular position sensor, a capacitive angular position sensor, an inductive angular position sensor, and a magnetic angular position sensor according to different sensitive components. Among them, the optoelectronic angular position sensor is widely favored due to its advantages such as fast response and low power consumption. However, in actual applications, due to factors such as environmental changes, electromagnetic interference, and the sensor itself, the measurement accuracy and stability of the optoelectronic angular position sensor may deviate. If this deviation is not effectively detected and adjusted, it may lead to a decline in the performance of the application device and even cause system failures. Therefore, it is necessary to ensure the high measurement accuracy and reliability of the angular position sensor.
[0003] Currently, traditional angular position sensor testing methods usually focus on the detection of overall performance, making it difficult to deeply detect the minute changes in the internal sensitive components of the sensor and relying on static calibration methods to adjust minute changes. However, static calibration cannot cope with dynamic environmental changes, which causes cumulative errors in the angular position sensor. Of course, there are also some related improved technical documents. For example, the patent with the authorization announcement number CN111256735B discloses a method and device for processing optoelectronic encoder data. Although the above method can solve the measurement errors caused by water droplets or dust, through research and practical application of the above method and the existing technology, it is found that the above method and the existing technology have at least the following partial defects:
[0004] (1) Lack of an anomaly detection mechanism, unable to determine whether pulse loss or pulse repetition occurs during the measurement of the angular position sensor. Furthermore, it is difficult to avoid the non-linear effects brought by environmental temperature and electromagnetic noise as much as possible.
[0005] (2) Unable to accurately and automatically obtain the number of pulse losses or repetitions based on the discovery of pulse anomalies. Further, unable to correct the measurement result of the angular position sensor according to the number of pulse losses or repetitions. Therefore, it is difficult to continuously ensure the high measurement accuracy and high reliability of the angular position sensor under dynamic environmental change conditions. Summary of the Invention
[0006] In order to overcome the above-mentioned defects of the prior art, embodiments of the present invention provide a detection system and method for a sensitive component of an angular measurement sensor.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] An angular measurement sensor sensitive component detection system, the system comprising:
[0009] A data acquisition module, configured to obtain a set of original pulse signals collected by an angular measurement sensor during a measurement time; the set of original pulse signals includes M original measurement pulses collected during the measurement time, and M is an integer greater than zero;
[0010] A pulse detection module, configured to, when it is determined that there is a pulse abnormality in the set of original pulse signals according to a preset pulse time interval threshold, obtain pulse feature data and input the pulse feature data into a pre-trained pulse abnormality detection model to obtain the number of lost pulses or repeated pulses that occur during the measurement time, where the pulse abnormality includes pulse loss or pulse repetition;
[0011] A measurement correction module, configured to input the number M of original measurement pulses, the number of lost pulses, and the number of repeated pulses into a pre-trained angle correction detection model together to obtain a true rotation angle measurement value of the angular measurement sensor.
[0012] Further, before it is determined that there is a pulse abnormality in the set of original pulse signals, it includes:
[0013] Taking every two adjacent original measurement pulses in the set of original pulse signals as a group of measurement pulse pairs to obtain N groups of measurement pulse pairs, where N is an integer greater than zero;
[0014] Taking one original measurement pulse in each group of measurement pulse pairs as a first measurement pulse, and taking the other original measurement pulse in each group of measurement pulse pairs as a second measurement pulse;
[0015] Respectively extracting the timestamps of the first measurement pulse and the second measurement pulse, calculating the timestamp difference between the first measurement pulse and the second measurement pulse, and taking the timestamp difference as the pulse time interval Ti;
[0016] Comparing the pulse time interval Ti with a preset pulse time interval threshold Td, where Td > 0;
[0017] If Ti > Td, it is determined that there is a pulse abnormality of pulse loss in the set of original pulse signals, and the corresponding measurement pulse pair is marked as a pulse loss data pair;
[0018] If Ti = Td, it is determined that there is no pulse abnormality in the set of original pulse signals;
[0019] If Ti < Td, it is determined that there is a pulse abnormality of pulse repetition in the set of original pulse signals, and the corresponding measurement pulse pair is marked as a pulse repetition data pair.
[0020] Further, the pulse feature data includes the number G of pulse loss data pairs, the number H of pulse repetition data pairs, the pulse time interval ratio of each pulse loss data pair, and the pulse time interval ratio of each pulse time interval, where G and H are integers greater than zero.
[0021] Further, the pulse feature data acquisition logic includes:
[0022] a1: Count all pulse loss data pairs to obtain the number G of pulse loss data pairs;
[0023] a2: Extract the pulse time interval Ti of the g-th pulse loss data pair, where g is an integer greater than zero;
[0024] a3: Calculate the ratio of the pulse time interval Ti of the g-th pulse loss data pair to the preset pulse time interval threshold Td to obtain the pulse time interval ratio of the g-th pulse loss data pair, let g = g + 1, and return to step a2;
[0025] a4: Repeat the above a2 - a3 until G = g, then end the loop to obtain the pulse time interval ratio of each pulse loss data pair.
[0026] Further, the pulse feature data acquisition logic further includes:
[0027] b1: Count all pulse repetition data pairs to obtain the number H of pulse repetition data pairs;
[0028] b2: Extract the pulse time interval Ti of the h-th pulse repetition data pair, where h is an integer greater than zero;
[0029] b3: Calculate the ratio of the pulse time interval Ti of the h-th pulse repetition data pair to the preset pulse time interval threshold Td to obtain the pulse time interval ratio of the h-th pulse repetition data pair, let h = h + 1, and return to step b2;
[0030] b4: Repeat the above b2 - b3 until H = h, then end the loop to obtain the pulse time interval ratio of each pulse time interval.
[0031] Further, the training logic of the pulse anomaly detection model is as follows:
[0032] Obtain historical pulse anomaly training data, and divide the historical pulse anomaly training data into a pulse anomaly training set and a pulse anomaly test set. The historical pulse anomaly training data includes pulse feature data and its corresponding number of lost pulses or repeated pulses;
[0033] Construct a first regression network, use the pulse feature data in the pulse anomaly training set as the input data of the first regression network, and use the number of missing pulses or duplicate pulses in the pulse anomaly training set as the output data of the first regression network, and train the first regression network to obtain an initial pulse anomaly detection network;
[0034] Use the pulse anomaly test set to verify the model of the initial pulse anomaly detection network, and output the initial pulse anomaly detection network with an error less than or equal to the preset first test error threshold as a pre-trained pulse anomaly detection model.
[0035] Further, the training logic of the angle correction detection model is as follows:
[0036] Obtain historical angle correction training data, divide the historical angle correction training data into an angle correction training set and an angle correction test set, and the historical angle correction training data includes angle correction feature data and its corresponding true rotation angle measurement value;
[0037] Among them, the angle correction feature data includes the original measured number of pulses M, the number of missing pulses, and the number of duplicate pulses;
[0038] Among them, the generation logic of the true rotation angle measurement value in the historical angle correction training data is as follows:
[0039] Extract the original measured number of pulses M, the number of missing pulses, and the number of duplicate pulses in the angle correction feature data;
[0040] Input the original measured number of pulses M, the number of missing pulses, and the number of duplicate pulses into a pre-constructed mathematical calculation model to obtain the true rotation angle measurement value;
[0041] Among them, the expression of the mathematical calculation model is as follows:
[0042] ;
[0043] In the formula: is the true rotation angle measurement value, is the original measured number of pulses M, is the number of missing pulses, is the number of duplicate pulses, is the resolution, is the circumferential angle, and the value is 360 degrees;
[0044] Construct a second regression network, use the angle correction feature data in the angle correction training set as the input data of the second regression network, and use the true rotation angle measurement value in the angle correction training set as the output data of the second regression network, and train the second regression network to obtain an initial angle correction detection network;
[0045] The initial angle correction detection network is model verified by using angle correction detection, and an initial angle correction detection network that is less than or equal to a second test error threshold is output as a trained angle correction detection model.
[0046] A method for detecting a sensitive component of an angle measurement sensor, the method comprising:
[0047] During the measurement time, an original pulse signal set collected by the angle measurement sensor is obtained; the original pulse signal set includes M original measurement pulses collected during the measurement time, where M is an integer greater than zero;
[0048] When a pulse anomaly is determined to occur in the original pulse signal set according to a preset pulse time interval threshold, pulse feature data is obtained and input into a pre-trained pulse anomaly detection model to obtain the number of lost pulses or repeated pulses occurring during the measurement time period, wherein the pulse anomaly includes pulse loss or pulse repetition;
[0049] The original measured pulse number M, the number of lost pulses and the number of repeated pulses are input into the pre-trained angle correction detection model to obtain the real rotation angle measurement value of the angle measurement sensor.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] The present application discloses a detection system and method for sensitive components of an angular measurement sensor, comprising: obtaining an original pulse signal set collected by the angular measurement sensor; when a pulse anomaly is determined to occur in the original pulse signal set according to a preset pulse time interval threshold, pulse feature data is obtained, and the pulse feature data is input into a pre-trained pulse anomaly detection model to obtain the number of lost pulses or repeated pulses occurring during the measurement time period; the original measurement pulse number M, the number of lost pulses, and the number of repeated pulses are input into a pre-trained angle correction detection model to obtain the actual rotation angle measurement value occurring in the angular measurement sensor; based on the above content, the present invention can determine whether pulse loss or pulse repetition occurs during the measurement of the angular position sensor, and thus can avoid the nonlinear effects caused by ambient temperature and electromagnetic noise as much as possible; in addition, by accurately and automatically obtaining the number of pulse losses or repetitions based on the discovery of pulse anomalies, and further, correcting the measurement result of the angular position sensor according to the number of pulse losses or repetitions, it is beneficial to continuously ensure that the angular position sensor has high measurement accuracy and high reliability under dynamic environmental changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A module diagram of a sensitive component detection system of an angle measurement sensor provided by the present invention;
[0053] Figure 2 A flow chart of a method for detecting a sensitive component of an angle measurement sensor provided by the present invention;
[0054] Figure 3 A schematic diagram of the structure of an electronic device provided by the present invention;
[0055] Figure 4 A schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] Example 1
[0058] See also Figure 1 As shown, this embodiment discloses a detection system for a sensitive component of an angle measurement sensor, including:
[0059] The data acquisition module 110 is used to acquire an original pulse signal set collected by the angle measurement sensor during the measurement time; the original pulse signal set includes M original measurement pulses collected during the measurement time, where M is an integer greater than zero;
[0060] It should be understood that: for angle measurement sensors (i.e., photoelectric angle sensors), in addition to the measurement errors caused by water droplets or dust, the measurement errors caused by ambient temperature and electromagnetic noise are more obvious, and angle measurement sensors (i.e., photoelectric angle sensors) are also more susceptible to the influence of ambient temperature and electromagnetic noise; but for this type of influence, most existing methods solve the measurement error problem caused by ambient temperature and electromagnetic noise by training a linear model with ambient temperature and electromagnetic noise as input and measurement error as output; but the problem is that such models are linear models, but the measurement errors caused by ambient temperature and electromagnetic noise are nonlinear problems. To further explain, the measurement errors caused by ambient temperature and electromagnetic noise do not present a linear development mode, which leads to inaccurate error detection results of the existing linear models mentioned above, and further, it is impossible to avoid the nonlinear influence caused by ambient temperature and electromagnetic noise as much as possible, and further, it is impossible to ensure that under the influence of ambient temperature and electromagnetic noise, the angle measurement sensor (i.e., photoelectric angle sensor) can still maintain a high measurement accuracy.
[0061] The pulse detection module 120 is configured to obtain pulse feature data and input the pulse feature data into a pre-trained pulse anomaly detection model to obtain the number of missing pulses or repeated pulses that occur during the measurement time when it is determined that there is a pulse anomaly in the original pulse signal set according to a preset pulse time interval threshold. The pulse anomaly includes pulse loss or pulse repetition.
[0062] In implementation, before determining that there is a pulse anomaly in the original pulse signal set, it includes:
[0063] Taking every two adjacent original measurement pulses in the original pulse signal set as a group of measurement pulse pairs to obtain N groups of measurement pulse pairs, where N is an integer greater than zero.
[0064] It should be noted that: Each group of measurement pulse pairs allows for repeated original measurement pulses. By way of example, assume that there are 4 original measurement pulses in the original pulse signal set, namely Z1, Z2, Z3, and Z4. Therefore, when taking every two adjacent original measurement pulses in the original pulse signal set as a group of measurement pulse pairs, measurement pulse pairs Y1, Y2, and Y3 are obtained. Among them, Y1 contains Z1 and Z2, Y2 contains Z2 and Z3, and Y3 contains Z2 and Z3. Then 3 groups of measurement pulse pairs are obtained, and among them, there are repeated original measurement pulses in every two adjacent groups of measurement pulse pairs.
[0065] Taking one original measurement pulse in each group of measurement pulse pairs as the first measurement pulse and the other original measurement pulse in each group of measurement pulse pairs as the second measurement pulse.
[0066] Respectively extracting the timestamps of the first measurement pulse and the second measurement pulse, calculating the timestamp difference between the first measurement pulse and the second measurement pulse, and taking the timestamp difference as the pulse time interval Ti.
[0067] Comparing the pulse time interval Ti with a preset pulse time interval threshold Td, where Td > 0.
[0068] If Ti > Td, it is determined that there is a pulse anomaly of pulse loss in the original pulse signal set, and the corresponding measurement pulse pair is marked as a pulse loss data pair.
[0069] If Ti = Td, it is determined that there is no pulse anomaly in the original pulse signal set.
[0070] If Ti < Td, it is determined that there is a pulse anomaly of pulse repetition in the original pulse signal set, and the corresponding measurement pulse pair is marked as a pulse repetition data pair.
[0071] Among them, the pulse feature data includes the number G of pulse loss data pairs, the number H of pulse repetition data pairs, the pulse time interval ratio of each pulse loss data pair, and the pulse time interval ratio of each pulse time interval, where G and H are integers greater than zero;
[0072] In a specific embodiment, the pulse feature data acquisition logic includes:
[0073] a1: Count all pulse loss data pairs to obtain the number G of pulse loss data pairs;
[0074] a2: Extract the pulse time interval Ti of the g-th pulse loss data pair, where g is an integer greater than zero;
[0075] a3: Calculate the ratio of the pulse time interval Ti of the g-th pulse loss data pair to the preset pulse time interval threshold Td to obtain the pulse time interval ratio of the g-th pulse loss data pair, let g = g + 1, and return to step a2;
[0076] Exemplarily, assume that there is 1 pulse loss data pair, which is U1. Among them, U1 includes a first measurement pulse and a second measurement pulse, and the timestamps of the first measurement pulse and the second measurement pulse are 0 seconds and 0.00010 seconds respectively. Then the pulse time interval Ti of U1 is 0.00010 seconds. If the preset pulse time interval threshold Td is assumed to be 0.00005 seconds, then the pulse time interval ratio of U1 is 2, which means that the actual time interval is twice the preset value. Therefore, it can be inferred that a pulse may be lost during the measurement period. Furthermore, it can be understood that by using the pulse time interval ratio as pulse feature data, it can provide important data support for accurately predicting the number of lost pulses or repeated pulses;
[0077] a4: Repeat the above a2 - a3 until G = g, end the loop, and obtain the pulse time interval ratio of each pulse loss data pair;
[0078] In another specific embodiment, the pulse feature data acquisition logic further includes:
[0079] b1: Count all pulse repetition data pairs to obtain the number H of pulse repetition data pairs;
[0080] b2: Extract the pulse time interval Ti of the h-th pulse repetition data pair, where h is an integer greater than zero;
[0081] b3: Calculate the ratio of the pulse time interval Ti of the h-th pulse repetition data pair to the preset pulse time interval threshold Td to obtain the pulse time interval ratio of the h-th pulse repetition data pair, let h = h + 1, and return to step b2;
[0082] b4: Repeat the above b2 - b3 until H = h, then end the loop to obtain the pulse time interval ratios for each pulse time interval.
[0083] In implementation, the training logic of the pulse anomaly detection model is as follows:
[0084] Obtain historical pulse anomaly training data, and divide the historical pulse anomaly training data into a pulse anomaly training set and a pulse anomaly test set. The historical pulse anomaly training data includes pulse feature data and its corresponding number of lost pulses or repeated pulses.
[0085] It should be noted that: the pulse feature data, the number of lost pulses or repeated pulses in the historical pulse anomaly training data are actually collected and recorded by technicians according to experimental data or historical data.
[0086] Construct a first regression network. Use the pulse feature data in the pulse anomaly training set as the input data of the first regression network, and use the number of lost pulses or repeated pulses in the pulse anomaly training set as the output data of the first regression network. Train the first regression network to obtain an initial pulse anomaly detection network.
[0087] Use the pulse anomaly test set to verify the model of the initial pulse anomaly detection network, and output the initial pulse anomaly detection network with an error less than or equal to a preset first test error threshold as a pre - trained pulse anomaly detection model.
[0088] It should be noted that: the first regression network is a specific one among algorithm models such as decision tree regression, random forest regression, support vector machine regression, polynomial regression, LSTM neural network, or RNN neural network.
[0089] The measurement correction module 130 is used to input the original measured pulse number M, the number of lost pulses, and the number of repeated pulses into the pre - trained angle correction detection model together to obtain the true rotation angle measurement value of the angle measurement sensor.
[0090] Specifically, the training logic of the angle correction detection model is as follows:
[0091] Obtain historical angle correction training data, and divide the historical angle correction training data into an angle correction training set and an angle correction test set. The historical angle correction training data includes angle correction feature data and its corresponding true rotation angle measurement value.
[0092] Among them, the angle correction feature data includes the original measured pulse number M, the number of lost pulses, and the number of repeated pulses.
[0093] It should be noted that the angle correction feature data in the historical angle correction training data is actually collected and recorded by technicians based on experimental data or historical data;
[0094] Among them, the generation logic of the true rotation angle measurement value in the historical angle correction training data is as follows:
[0095] Extract the original measurement pulse number M, the lost pulse number, and the repeated pulse number in the angle correction feature data;
[0096] Input the original measurement pulse number M, the lost pulse number, and the repeated pulse number into a pre-constructed mathematical calculation model to obtain the true rotation angle measurement value;
[0097] Among them, the expression of the mathematical calculation model is as follows:
[0098] ;
[0099] In the formula: is the true rotation angle measurement value, is the original measurement pulse number M, is the lost pulse number, is the repeated pulse number, is the resolution, is the circumferential angle, with a value of 360 degrees;
[0100] It should be noted that in the application of angular position sensors and encoders, the resolution (PPR, Pulses Per Revolution) is a key parameter, which represents the number of pulses output by the sensor per revolution; it determines the minimum angle change that the sensor can measure and affects the measurement accuracy and details; therefore, the resolution The specific value is determined according to the specific model and specifications of the angular position sensor;
[0101] Construct a second regression network, use the angle correction feature data in the angle correction training set as the input data of the second regression network, and use the true rotation angle measurement value in the angle correction training set as the output data of the second regression network, and train the second regression network to obtain an initial angle correction detection network;
[0102] Use angle correction detection to verify the model of the initial angle correction detection network, and output the initial angle correction detection network with an error less than or equal to the second test error threshold as the trained angle correction detection model;
[0103] It should be noted that similar to the first regression network, the second regression network is a specific one among algorithm models such as decision tree regression, random forest regression, support vector machine regression, polynomial regression, LSTM neural network, or RNN neural network;
[0104] By analyzing and acquiring the number of lost pulses or repeated pulses of the angle measurement sensor, the present invention can deeply detect slight changes in sensitive components inside the angle measurement sensor, and predict the actual rotation angle measurement value based on the acquired slight changes. Compared with the prior art, the present invention can dig out the nonlinear effects caused by ambient temperature and electromagnetic noise. Furthermore, it can ensure that under the influence of ambient temperature and electromagnetic noise, the angle measurement sensor (i.e., the photoelectric angle position sensor) can still maintain a high measurement accuracy, and can continuously ensure that the angle position sensor has high measurement accuracy and high reliability under dynamic environmental changes.
[0105] Example 2
[0106] See also Figure 2 As shown, this embodiment discloses a method for detecting a sensitive component of an angle measurement sensor, the method comprising:
[0107] S201: During a measurement period, an original pulse signal set collected by the angle measurement sensor is obtained; the original pulse signal set includes M original measurement pulses collected during the measurement period, where M is an integer greater than zero;
[0108] It should be understood that: for angle measurement sensors (i.e., photoelectric angle sensors), in addition to the measurement errors caused by water droplets or dust, the measurement errors caused by ambient temperature and electromagnetic noise are more obvious, and angle measurement sensors (i.e., photoelectric angle sensors) are also more susceptible to the influence of ambient temperature and electromagnetic noise; but for this type of influence, most existing methods solve the measurement error problem caused by ambient temperature and electromagnetic noise by training a linear model with ambient temperature and electromagnetic noise as input and measurement error as output; but the problem is that such models are linear models, but the measurement errors caused by ambient temperature and electromagnetic noise are nonlinear problems. To further explain, the measurement errors caused by ambient temperature and electromagnetic noise do not present a linear development mode, which leads to inaccurate error detection results of the existing linear models mentioned above, and further, it is impossible to avoid the nonlinear influence caused by ambient temperature and electromagnetic noise as much as possible, and further, it is impossible to ensure that under the influence of ambient temperature and electromagnetic noise, the angle measurement sensor (i.e., photoelectric angle sensor) can still maintain a high measurement accuracy.
[0109] S202: When it is determined that a pulse anomaly occurs in the original pulse signal set according to a preset pulse time interval threshold, pulse feature data is obtained and input into a pre-trained pulse anomaly detection model to obtain the number of lost pulses or repeated pulses occurring during the measurement time period, wherein the pulse anomaly includes pulse loss or pulse repetition;
[0110] In implementation, before it is determined that a pulse anomaly appears in the original pulse signal set, it includes:
[0111] Taking every two adjacent original measurement pulses in the original pulse signal set as a group of measurement pulse pairs, obtaining N groups of measurement pulse pairs, where N is an integer greater than zero;
[0112] It should be noted that: Each group of measurement pulse pairs is allowed to have duplicate original measurement pulses. By way of example, it is assumed that there are 4 original measurement pulses in the original pulse signal set, namely Z1, Z2, Z3, and Z4. Therefore, when taking every two adjacent original measurement pulses in the original pulse signal set as a group of measurement pulse pairs, measurement pulse pairs Y1, Y2, and Y3 are obtained, where Y1 includes Z1 and Z2, Y2 includes Z2 and Z3, and Y3 includes Z2 and Z3. Then, 3 groups of measurement pulse pairs are obtained, and among them, there are duplicate original measurement pulses in every two adjacent groups of measurement pulse pairs;
[0113] Taking one of the original measurement pulses in each group of measurement pulse pairs as the first measurement pulse, and taking the other original measurement pulse in each group of measurement pulse pairs as the second measurement pulse;
[0114] Respectively extracting the timestamps of the first measurement pulse and the second measurement pulse, calculating the timestamp difference between the first measurement pulse and the second measurement pulse, and taking the timestamp difference as the pulse time interval Ti;
[0115] Comparing the pulse time interval Ti with a preset pulse time interval threshold Td, where Td > 0;
[0116] If Ti > Td, it is determined that a pulse anomaly of pulse loss appears in the original pulse signal set, and the corresponding measurement pulse pair is marked as a pulse loss data pair;
[0117] If Ti = Td, it is determined that no pulse anomaly appears in the original pulse signal set;
[0118] If Ti < Td, it is determined that a pulse anomaly of pulse repetition appears in the original pulse signal set, and the corresponding measurement pulse pair is marked as a pulse repetition data pair;
[0119] Wherein, the pulse feature data includes the number G of pulse loss data pairs, the number H of pulse repetition data pairs, the pulse time interval ratio of each pulse loss data pair, and the pulse time interval ratio of each pulse time interval. G and H are integers greater than zero;
[0120] In a specific implementation manner, the pulse feature data acquisition logic includes:
[0121] a1: Counting all pulse loss data pairs to obtain the number G of pulse loss data pairs;
[0122] a2: Extract the pulse time interval Ti of the g-th pulse loss data pair, where g is an integer greater than zero;
[0123] a3: Calculate the ratio of the pulse time interval Ti of the g-th pulse loss data pair to the preset pulse time interval threshold Td to obtain the pulse time interval ratio of the g-th pulse loss data pair, let g = g + 1, and return to step a2;
[0124] Exemplarily, assume there is 1 pulse loss data pair, which is U1. Among them, U1 includes a first measurement pulse and a second measurement pulse, and the timestamps of the first measurement pulse and the second measurement pulse are 0 second and 0.00010 second respectively. Then the pulse time interval Ti of U1 is 0.00010 second. If the preset pulse time interval threshold Td is assumed to be 0.00005 second, then the pulse time interval ratio of U1 is 2, which indicates that the actual time interval is twice the preset value. Therefore, it can be inferred that a pulse may be lost during the measurement period. Furthermore, it can be understood that by using the pulse time interval ratio as the pulse feature data, it can provide important data support for accurately predicting the number of lost pulses or repeated pulses;
[0125] a4: Repeat the above a2 - a3 until G = g, then end the loop to obtain the pulse time interval ratio of each pulse loss data pair;
[0126] In another specific embodiment, the pulse feature data acquisition logic includes:
[0127] b1: Count all pulse repetition data pairs to obtain the number H of pulse repetition data pairs;
[0128] b2: Extract the pulse time interval Ti of the h-th pulse repetition data pair, where h is an integer greater than zero;
[0129] b3: Calculate the ratio of the pulse time interval Ti of the h-th pulse repetition data pair to the preset pulse time interval threshold Td to obtain the pulse time interval ratio of the h-th pulse repetition data pair, let h = h + 1, and return to step b2;
[0130] b4: Repeat the above b2 - b3 until H = h, then end the loop to obtain the pulse time interval ratio of each pulse time interval;
[0131] In implementation, the training logic of the pulse anomaly detection model is as follows:
[0132] Obtain historical pulse anomaly training data, and divide the historical pulse anomaly training data into a pulse anomaly training set and a pulse anomaly test set. The historical pulse anomaly training data includes pulse feature data and its corresponding number of lost pulses or repeated pulses;
[0133] It should be noted that the pulse feature data, the number of missing pulses, or the number of repeated pulses in the historical pulse anomaly training data are actually collected and recorded by technicians based on experimental data or historical data;
[0134] Construct a first regression network, use the pulse feature data in the pulse anomaly training set as the input data of the first regression network, and use the number of missing pulses or the number of repeated pulses in the pulse anomaly training set as the output data of the first regression network, and train the first regression network to obtain an initial pulse anomaly detection network;
[0135] Use the pulse anomaly test set to verify the model of the initial pulse anomaly detection network, and output the initial pulse anomaly detection network with an error less than or equal to the preset first test error threshold as a pre-trained pulse anomaly detection model;
[0136] It should be noted that the first regression network is a specific one among algorithm models such as decision tree regression, random forest regression, support vector machine regression, polynomial regression, LSTM neural network, or RNN neural network.
[0137] S203: Input the original measured pulse number M, the number of missing pulses, and the number of repeated pulses into the pre-trained angle correction detection model together to obtain the true rotation angle measurement value of the angle measurement sensor;
[0138] Specifically, the training logic of the angle correction detection model is as follows:
[0139] Obtain historical angle correction training data, and divide the historical angle correction training data into an angle correction training set and an angle correction test set. The historical angle correction training data includes angle correction feature data and its corresponding true rotation angle measurement value;
[0140] Among them, the angle correction feature data includes the original measured pulse number M, the number of missing pulses, and the number of repeated pulses;
[0141] It should be noted that the angle correction feature data in the historical angle correction training data are actually collected and recorded by technicians based on experimental data or historical data;
[0142] Among them, the generation logic of the true rotation angle measurement value in the historical angle correction training data is as follows:
[0143] Extract the original measured pulse number M, the number of missing pulses, and the number of repeated pulses from the angle correction feature data;
[0144] Input the original measured pulse number M, the number of missing pulses, and the number of repeated pulses into a pre-constructed mathematical calculation model to obtain the true rotation angle measurement value;
[0145] The mathematical calculation model is expressed as follows:
[0146] ;
[0147] Where: is the actual rotation angle measurement value, is the original measured pulse number M, is the number of lost pulses, is the number of repetitive pulses, is the resolution, is the circular angle, the value is 360 degrees;
[0148] It should be noted that in the application of angular position sensors and encoders, resolution (PPR, Pulses Per Revolution) is a key parameter, which indicates the number of pulses output by the sensor per rotation; it determines the minimum angle change that the sensor can measure, affecting the accuracy and details of the measurement; therefore, the resolution The specific value of is determined according to the specific model and specifications of the angular position sensor;
[0149] Constructing a second regression network, taking the angle correction feature data in the angle correction training set as input data of the second regression network, and taking the real rotation angle measurement value in the angle correction training set as output data of the second regression network, training the second regression network, and obtaining an initial angle correction detection network;
[0150] Using angle correction detection to perform model verification on the initial angle correction detection network, and outputting an initial angle correction detection network that is less than or equal to a second test error threshold as a trained angle correction detection model;
[0151] It should be noted that: like the first regression network, the second regression network is a specific one of the algorithm models such as decision tree regression, random forest regression, support vector machine regression, polynomial regression, LSTM neural network or RNN neural network;
[0152] By analyzing and acquiring the number of lost pulses or repeated pulses of the angle measurement sensor, the present invention can deeply detect slight changes in sensitive components inside the angle measurement sensor, and predict the actual rotation angle measurement value based on the acquired slight changes. Compared with the prior art, the present invention can dig out the nonlinear effects caused by ambient temperature and electromagnetic noise. Furthermore, it can ensure that under the influence of ambient temperature and electromagnetic noise, the angle measurement sensor (i.e., the photoelectric angle position sensor) can still maintain a high measurement accuracy, and can continuously ensure that the angle position sensor has high measurement accuracy and high reliability under dynamic environmental changes.
[0153] Example 3
[0154] Please refer to Figure 3 As shown, this embodiment publicly provides an electronic device, including a memory, a processor, and a computer program stored on the memory and running on the processor. When the processor executes the computer program, it implements the angular measurement sensor sensitive component detection method provided by each of the above methods.
[0155] Since the electronic device introduced in this embodiment is the electronic device used to implement an angular measurement sensor sensitive component detection method in an embodiment of the present application, based on the angular measurement sensor sensitive component detection method introduced in the embodiment of the present application, those skilled in the art can understand the specific implementation manners and various variations of the electronic device in this embodiment. Therefore, the specific implementation of how this electronic device implements the method in the embodiment of the present application will not be described in detail here. As long as those skilled in the art implement the electronic device used for an angular measurement sensor sensitive component detection method in an embodiment of the present application, it falls within the scope of protection of the present application.
[0156] Example 4
[0157] Please refer to Figure 4 As shown, a computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the above-mentioned angular measurement sensor sensitive component detection method.
[0158] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data for software simulation to obtain a formula that is closest to the actual situation. The preset parameters, weights, and threshold selections in the formulas are set by those skilled in the art according to the actual situation.
[0159] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired or wireless network. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that contains one or more collections of available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0160] Those of ordinary skill in the art will appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0161] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0162] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only one way, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0163] The unit described as the separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In addition, in each embodiment of the present invention, each functional unit may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0165] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
[0166] Finally: The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An angular measurement sensor sensitive component detection system, characterized in that The system includes: A data acquisition module, configured to obtain a set of original pulse signals collected by an angular measurement sensor during a measurement time period; the set of original pulse signals includes M original measurement pulses collected during the measurement time period, and M is an integer greater than zero; A pulse detection module, configured to, when it is determined that a pulse anomaly occurs in the set of original pulse signals according to a preset pulse time interval threshold, obtain pulse feature data and input the pulse feature data into a pre-trained pulse anomaly detection model to obtain the number of missing pulses or repeated pulses that occur during the measurement time period, where the pulse anomaly includes pulse loss or pulse repetition; Wherein, the pulse feature data includes the number G of pulse loss data pairs, the number H of pulse repetition data pairs, the pulse time interval ratio of each pulse loss data pair, and the pulse time interval ratio of each pulse time interval, and G and H are integers greater than zero; Wherein, the pulse feature data acquisition logic includes: a1: Count all pulse loss data pairs to obtain the number G of pulse loss data pairs; a2: Extract the pulse time interval Ti of the gth pulse loss data pair, where g is an integer greater than zero; a3: Calculate the ratio of the pulse time interval Ti of the gth pulse loss data pair to the preset pulse time interval threshold Td to obtain the pulse time interval ratio of the gth pulse loss data pair, and let g = g + 1, and return to step a2; a4: Repeat the above a2 - a3 until G = g, end the loop, and obtain the pulse time interval ratio of each pulse loss data pair; A measurement correction module, configured to input the number M of original measurement pulses, the number of missing pulses, and the number of repeated pulses into a pre-trained angle correction detection model to obtain the true rotation angle measurement value of the angular measurement sensor.
2. The detection system for a sensitive component of an angular measurement sensor according to claim 1, wherein Before it is determined that a pulse anomaly occurs in the set of original pulse signals, it includes: Taking every two adjacent original measurement pulses in the set of original pulse signals as a group of measurement pulse pairs to obtain N groups of measurement pulse pairs, where N is an integer greater than zero; Taking one original measurement pulse in each group of measurement pulse pairs as the first measurement pulse, and taking the other original measurement pulse in each group of measurement pulse pairs as the second measurement pulse; Respectively extract the timestamps of the first measurement pulse and the second measurement pulse, calculate the timestamp difference between the first measurement pulse and the second measurement pulse, and use the timestamp difference as the pulse time interval Ti; Compare the pulse time interval Ti with a preset pulse time interval threshold Td, where Td > 0; If Ti > Td, it is determined that a pulse anomaly of pulse loss occurs in the set of original pulse signals, and mark the corresponding measurement pulse pair as a pulse loss data pair; If Ti = Td, it is determined that no pulse anomaly occurs in the set of original pulse signals; If Ti < Td, it is determined that a pulse anomaly of pulse repetition occurs in the set of original pulse signals, and mark the corresponding measurement pulse pair as a pulse repetition data pair.
3. The detection system for a sensitive component of an angle measurement sensor according to claim 2, characterized in that, The pulse feature data acquisition logic further includes: b1: Count all pulse repetition data pairs to obtain the number H of pulse repetition data pairs; b2: Extract the pulse time interval \(T_i\) of the \(h\)-th pulse repetition data pair, where \(h\) is an integer greater than zero; b3: Calculate the ratio of the pulse time interval \(T_i\) of the \(h\)-th pulse repetition data pair to the preset pulse time interval threshold \(T_d\) to obtain the pulse time interval ratio of the \(h\)-th pulse repetition data pair, let \(h = h + 1\), and return to step b2; b4: Repeat the above b2 - b3 until \(H = h\), then end the loop to obtain the pulse time interval ratio of each pulse time interval.
4. The detection system for a sensitive component of an angular measurement sensor according to claim 3, characterized in that, The training logic of the pulse anomaly detection model is as follows: Obtain historical pulse anomaly training data, and divide the historical pulse anomaly training data into a pulse anomaly training set and a pulse anomaly test set. The historical pulse anomaly training data includes pulse feature data and its corresponding number of lost pulses or repeated pulses; Construct a first regression network, use the pulse feature data in the pulse anomaly training set as the input data of the first regression network, and use the number of lost pulses or repeated pulses in the pulse anomaly training set as the output data of the first regression network, and train the first regression network to obtain an initial pulse anomaly detection network; Use the pulse anomaly test set to verify the model of the initial pulse anomaly detection network, and output the initial pulse anomaly detection network with an error less than or equal to the preset first test error threshold as the pre-trained pulse anomaly detection model.
5. The detection system for the sensitive component of an angular measurement sensor according to claim 4, wherein The training logic of the angle correction detection model is as follows: Obtain historical angle correction training data, and divide the historical angle correction training data into an angle correction training set and an angle correction test set. The historical angle correction training data includes angle correction feature data and its corresponding true rotation angle measurement value; Among them, the angle correction feature data includes the original measured pulse number \(M\), the number of lost pulses, and the number of repeated pulses; Among them, the generation logic of the true rotation angle measurement value in the historical angle correction training data is as follows: Extract the original measured pulse number \(M\), the number of lost pulses, and the number of repeated pulses from the angle correction feature data; Input the original measured pulse number \(M\), the number of lost pulses, and the number of repeated pulses into a pre-constructed mathematical calculation model to obtain the true rotation angle measurement value; Among them, the expression of the mathematical calculation model is as follows: ; Wherein: is the measured value of the true rotation angle, is the original measured pulse number M, is the number of lost pulses, is the number of repeated pulses, is the resolution, is the circumferential angle, with a value of 360 degrees; Construct a second regression network, use the angle correction feature data in the angle correction training set as the input data of the second regression network, and use the true rotation angle measurement value in the angle correction training set as the output data of the second regression network, and train the second regression network to obtain an initial angle correction detection network; Use the angle correction detection to verify the model of the initial angle correction detection network, and output the initial angle correction detection network with an error less than or equal to the second test error threshold as the trained angle correction detection model.
6. A detection method for a sensitive component of an angle measurement sensor, characterized in that, It is implemented based on the angle measurement sensor sensitive component detection system according to any one of claims 1 to 5. The method includes: During the measurement time, obtain the original pulse signal set collected by the angle measurement sensor; the original pulse signal set includes \(M\) original measured pulses collected during the measurement time, and \(M\) is an integer greater than zero; When it is determined that there is a pulse anomaly in the original pulse signal set according to a preset pulse time interval threshold, pulse feature data will be obtained and input into a pre-trained pulse anomaly detection model to obtain the number of missing pulses or repeated pulses that occur during the measurement time. The pulse anomaly includes pulse loss or pulse repetition. The original measured pulse number M, the number of missing pulses, and the number of repeated pulses are all input into a pre-trained angle correction detection model to obtain the true rotational angle measurement value of the angular measurement sensor.
7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method for detecting the sensitive component of the angular measurement sensor according to claim 6.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed, it implements the method for detecting the sensitive component of the angular measurement sensor according to claim 6.
Citation Information
Patent Citations
A data processing method, apparatus, and photoelectric encoder for photoelectric encoders.
CN111256735B
Method, circuit, equipment and medium for measuring angle of coded disc of photoelectric encoder
CN113739828A
Method And Apparatus For Real-Time Pulse Parameter Estimator
US20080298514A1