Meter box electronic lock abnormality detection method and system based on control algorithm
Patent Information
- Application Number
- CN202611251636.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-09-18
AI Technical Summary
但附加传感器不仅增加硬件成本与安装复杂度,且易受环境噪声干扰,在室外计量箱温湿度剧烈变化的场景下稳定性不足
[0013] This invention transforms motor current timing data into a load coupling trajectory and constructs a trajectory reference domain, allowing the system to quantitatively assess the deviation between each locking action and normal operating conditions. The calculation of the trajectory consistency index effectively captures subtle anomalies, avoiding the problems of noise interference and high false positive rates associated with traditional threshold methods. Joint analysis of energy deviation and morphological deviation features further enhances the reliability of fault criteria, ensuring robustness of detection results. When the trajectory consistency index is below the judgment threshold, by extracting the deviation trajectory segment and analyzing its energy and morphological characteristics, different fault types such as wear, jamming, and poor lubrication can be distinguished based on the correlation between energy increases and morphological jitter. The temporal position of the deviation trajectory segment can be precisely mapped to the corresponding link in the transmission chain; for example, a bolt extension segment corresponds to a bolt jamming gear segment, and a gear fault corresponds to a gear fault. Users can identify the faulty component without additional disassembly, significantly reducing maintenance and troubleshooting costs. The trajectory reference domain is constructed based on the statistical envelope range of multiple normal locking data and has adaptive update capabilities. Over time, the reference domain dynamically adapts to baseline drift caused by normal wear and aging of the mechanical system, ensuring that detection accuracy does not degrade during long-term monitoring. The comparison between the detected trajectory and the reference domain does not rely on a fixed threshold, but is based on statistical characteristics. This effectively avoids false alarms caused by non-fault factors such as load fluctuations and temperature changes, improving the algorithm's robustness to different operating conditions. The entire method relies solely on the motor current signal, requiring no additional sensors, resulting in low installation and deployment costs and high versatility. Both data acquisition and calculation processes are lightweight designs that can be embedded in the metering box's local processor in real time, without requiring high computing power.
Smart Images

Figure CN122778124A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic lock technology for metering boxes, and in particular to an anomaly detection method and system for electronic locks for metering boxes based on control algorithms. Background Technology
[0002] Electronic locks for metering boxes are widely used in the field of electricity metering, and their reliability directly affects electricity management and anti-theft effectiveness. Existing methods for detecting anomalies in electronic locks mostly rely on monitoring single electrical parameter thresholds, such as setting an upper limit for the peak current of the drive motor or an extreme value for the completion time of the locking action. When the measured value exceeds the preset range, an alarm is triggered. This approach can only identify extreme conditions such as severe overload or complete jamming, and cannot detect early anomalies such as progressive wear of the transmission mechanism, lubrication failure, or small foreign object jamming. Some systems introduce vibration sensors or acoustic emission sensors to assist in detection, judging faults by analyzing the frequency domain characteristics of mechanical vibration or noise during the locking process. However, adding sensors not only increases hardware costs and installation complexity, but is also susceptible to environmental noise interference and lacks stability in scenarios with drastic temperature and humidity changes in outdoor metering boxes. Furthermore, the correspondence between vibration signals and mechanical fault types requires establishing a mapping model based on a large amount of prior knowledge, resulting in poor applicability to different lock models. Current technologies for determining the location of faults usually rely on manual experience to disassemble and inspect each component, lacking quantitative means to directly correlate electrical measurement parameters with mechanical transmission chain links. The dynamic changes in motor current during locking operations are essentially a reflection of load torque fluctuations. However, current methods do not fully utilize the mechanical state information contained in the current timing waveform and fail to establish a causal relationship between current characteristics and the degradation mechanism of transmission components. Therefore, how to extract early fault symptoms from single-loop current signals and accurately map them to specific mechanical components without additional hardware investment has become an urgent problem to be solved in this field. Summary of the Invention
[0003] This invention provides a method and system for detecting anomalies in electronic locks of metering boxes based on control algorithms, which can solve the problems in the prior art.
[0004] A first aspect of the present invention provides a method for detecting anomalies in electronic locks of metering boxes based on control algorithms, comprising: Collect current timing data of the electronic lock drive motor of the metering box during the locking operation process, divide the current timing data into time windows, calculate the coupling coefficient of the current amplitude characteristics and current change rate characteristics of each time window, and arrange the coupling coefficients in time sequence to form a load coupling trajectory. Multiple load coupling trajectories corresponding to multiple locking actions under normal working conditions are collected, and the statistical envelope range of each load coupling trajectory at each time point is calculated. The trajectory reference domain is constructed based on the statistical envelope range. Construct the load coupling trajectory to be detected for the locking actions during operation, and calculate the trajectory consistency index between the load coupling trajectory to be detected and the trajectory reference domain; When the trajectory consistency index is lower than the trajectory deviation judgment threshold, the deviation trajectory segment of the load coupling trajectory to be detected that exceeds the trajectory reference domain is extracted, and the energy deviation characteristics and morphological deviation characteristics of the deviation trajectory segment relative to the corresponding segment of the trajectory reference domain are calculated. The fault type is determined based on the correlation between energy deviation characteristics and morphological deviation characteristics. The fault location is obtained by mapping the temporal position of the deviation trajectory segment to the mechanical transmission chain. The output is a detection result containing the fault location and fault type.
[0005] The current time-series data is segmented into time windows, and the coupling coefficient between the current amplitude characteristics and the current rate of change characteristics in each time window is calculated. The coupling coefficients are then arranged in time sequence to form the load coupling trajectory, which includes: The current time series data is divided into segments according to time windows to obtain current data segments for each time window. The upper and lower envelopes of the current values within the current data segments are calculated. The average of the upper and lower envelopes is taken as the current amplitude feature. The current difference sequence is obtained by performing point-by-point difference operation on the current values within the current data segments as the current rate of change feature. The current amplitude characteristics and current rate of change characteristics are transformed in the frequency domain to obtain the amplitude frequency domain component and the rate of change frequency domain component, respectively. The joint probability distribution and marginal probability distribution of the amplitude frequency domain component and the rate of change frequency domain component are calculated. The mutual information is calculated based on the joint probability distribution and the marginal probability distribution as the coupling coefficient of each time window. The coupling coefficient sequence is decomposed into multi-level time-frequency components. The instantaneous frequency and instantaneous amplitude of each time-frequency component are extracted to construct a time-frequency feature matrix. The time-frequency feature matrix is then dimensionally reduced and reconstructed to obtain a denoised coupling coefficient sequence. The denoised coupling coefficient sequence is then connected in time sequence to form a load coupling trajectory.
[0006] Calculate the statistical envelope range of each load coupling trajectory at each time point, and construct the trajectory reference domain based on the statistical envelope range, including: Extract multiple coupling coefficient values corresponding to multiple load coupling trajectories at each time point, calculate the local density distribution of multiple coupling coefficient values at each time point, identify the number of peaks in the local density distribution at each time point, and classify each time point into single-peak time points and multi-peak time points based on the number of peaks. For multiple coupling coefficient values at a single-peak time point, calculate the weighted center value and dispersion. Based on the weighted center value and dispersion, determine the single-channel envelope boundary at the single-peak time point. For multiple coupling coefficient values at a multi-peak time point, identify the coupling coefficient value clusters corresponding to each peak and calculate the cluster boundary of each coupling coefficient value cluster. Use the cluster boundary of each coupling coefficient value cluster as the multi-channel envelope boundary at the multi-peak time point. Calculate the morphological difference degree of the envelope boundary between adjacent time points, generate a transitional envelope boundary between adjacent time points based on the morphological difference degree, connect the single-channel envelope boundary, multi-channel envelope boundary and transitional envelope boundary in the time dimension to form the statistical envelope range of each time point, and construct the trajectory reference domain based on the statistical envelope range of each time point.
[0007] The calculation of the trajectory consistency index between the load-coupled trajectory to be detected and the trajectory reference domain includes: At each time point, it is determined whether the coupling coefficient value of the load coupling trajectory to be detected is within the statistical envelope range of the corresponding time point in the trajectory reference domain. The time points within the statistical envelope range are marked as conforming time points and the number of conforming time points is counted. The time points outside the statistical envelope range are marked as deviating time points and the temporal position and coupling coefficient value of the deviating time points are extracted. Calculate the coupling coefficient values at each deviation time point and the spatial distance between the trajectory reference domain and the boundary of the statistical envelope range at the corresponding time point, and construct a deviation degree sequence based on the spatial distance; Identify the locking action stage where the deviation point is located based on the temporal position of the deviation point, assign stage weights to the deviation degree sequence of different locking action stages, and obtain the stage weighted deviation degree by weighted combination of the deviation degree sequence and the stage weights. The trajectory matching degree is calculated based on the number of matching time points and the total number of time points of the coupled trajectory of the load to be detected. A trajectory consistency index is constructed based on the trajectory matching degree and the stage-weighted deviation.
[0008] Extracting the deviation trajectory segments of the load coupling trajectory to be detected that exceed the trajectory reference domain, and calculating the energy deviation characteristics and morphological deviation characteristics of the deviation trajectory segments relative to the corresponding segments in the trajectory reference domain, including: Identify the deviation time points in the load coupling trajectory to be detected that exceed the trajectory reference domain, merge consecutive deviation time points into deviation trajectory segments, and extract the time range and deviation coupling coefficient sequence of the deviation trajectory segments; Based on the time range, extract the reference coupling coefficient sequence for the corresponding time period in the trajectory reference domain, and calculate the temporal position of the deviation trajectory segment in the locking cycle; The deviation integral value and the reference integral value are obtained by performing time-domain integration on the deviation coupling coefficient sequence and the reference coupling coefficient sequence, respectively. The deviation integral value and the reference integral value are calculated as the energy deviation degree. The extreme value features of the rate of change are extracted from the deviation coupling coefficient sequence and the reference coupling coefficient sequence to obtain the deviation extreme value features and the reference extreme value features respectively. The deviation value between the deviation extreme value features and the reference extreme value features is calculated as the morphological deviation degree. The stage weight coefficient is determined based on the temporal position. The energy deviation is multiplied by the stage weight coefficient to obtain the energy deviation feature, and the morphological deviation is multiplied by the stage weight coefficient to obtain the morphological deviation feature.
[0009] The fault type is determined based on the correlation between energy deviation characteristics and morphological deviation characteristics. The fault location is obtained by mapping the temporal position of the deviation trajectory segment to the mechanical transmission chain. The output includes detection results containing the fault location and fault type: The ratio of energy deviation features to morphological deviation features is calculated as the deviation feature ratio, and the weighted sum of energy deviation features and morphological deviation features is calculated as the deviation comprehensive index. A fault discrimination matrix is constructed based on the numerical range of the deviation characteristic ratio and the magnitude level of the deviation comprehensive index. The matrix cells corresponding to the deviation characteristic ratio and the deviation comprehensive index are found in the fault discrimination matrix, and the fault types labeled in the matrix cells are extracted. Extract the timing start position of the deviation trajectory segment in the locking cycle, identify the corresponding mechanical transmission chain node based on the timing start position in the locking cycle, and use the node identifier of the transmission node as the fault location. Search for co-occurrence records of fault type and node identifier in historical fault records, count the number of co-occurrence records as the co-occurrence count, and when the co-occurrence count exceeds the preset association judgment threshold, combine the fault type and fault location to generate detection results and output them.
[0010] A second aspect of the present invention provides an anomaly detection system for electronic locks of metering boxes based on a control algorithm, comprising: The load coupling unit is used to collect the current timing data of the electronic lock drive motor of the metering box during the locking operation process, divide the current timing data into time windows, calculate the coupling coefficient of the current amplitude characteristics and current change rate characteristics of each time window, and arrange the coupling coefficients in time sequence to form a load coupling trajectory. The reference domain construction unit is used to collect multiple load coupling trajectories corresponding to multiple locking actions under normal working conditions, calculate the statistical envelope range of each load coupling trajectory at each time point, and construct the trajectory reference domain based on the statistical envelope range. The trajectory comparison unit is used to construct the load coupling trajectory to be detected based on the locking actions during operation, and to calculate the trajectory consistency index between the load coupling trajectory to be detected and the trajectory reference domain. The deviation feature extraction unit is used to extract the deviation trajectory segment of the load coupling trajectory to be detected that exceeds the trajectory reference domain when the trajectory consistency index is lower than the trajectory deviation judgment threshold, and to calculate the energy deviation feature and morphological deviation feature of the deviation trajectory segment relative to the corresponding segment of the trajectory reference domain. The fault diagnosis unit is used to determine the fault type based on the correlation between energy deviation characteristics and morphological deviation characteristics, obtain the fault location by mapping the temporal position of the deviation trajectory segment to the mechanical transmission chain, and output the detection results containing the fault location and fault type.
[0011] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0012] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0013] This invention transforms motor current timing data into a load coupling trajectory and constructs a trajectory reference domain, allowing the system to quantitatively assess the deviation between each locking action and normal operating conditions. The calculation of the trajectory consistency index effectively captures subtle anomalies, avoiding the problems of noise interference and high false positive rates associated with traditional threshold methods. Joint analysis of energy deviation and morphological deviation features further enhances the reliability of fault criteria, ensuring robustness of detection results. When the trajectory consistency index is below the judgment threshold, by extracting the deviation trajectory segment and analyzing its energy and morphological characteristics, different fault types such as wear, jamming, and poor lubrication can be distinguished based on the correlation between energy increases and morphological jitter. The temporal position of the deviation trajectory segment can be precisely mapped to the corresponding link in the transmission chain; for example, a bolt extension segment corresponds to a bolt jamming gear segment, and a gear fault corresponds to a gear fault. Users can identify the faulty component without additional disassembly, significantly reducing maintenance and troubleshooting costs. The trajectory reference domain is constructed based on the statistical envelope range of multiple normal locking data and has adaptive update capabilities. Over time, the reference domain dynamically adapts to baseline drift caused by normal wear and aging of the mechanical system, ensuring that detection accuracy does not degrade during long-term monitoring. The comparison between the detected trajectory and the reference domain does not rely on a fixed threshold, but is based on statistical characteristics. This effectively avoids false alarms caused by non-fault factors such as load fluctuations and temperature changes, improving the algorithm's robustness to different operating conditions. The entire method relies solely on the motor current signal, requiring no additional sensors, resulting in low installation and deployment costs and high versatility. Both data acquisition and calculation processes are lightweight designs that can be embedded in the metering box's local processor in real time, without requiring high computing power. Attached Figure Description
[0014] Figure 1 This is a flowchart illustrating an anomaly detection method for electronic locks of metering boxes based on control algorithms. Figure 2Construct an operation flowchart for the trajectory reference domain; Figure 3 This is a schematic diagram of real-time monitoring and consistency determination of the load coupling trajectory of an electronic lock. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0017] Figure 1 This is a flowchart illustrating the abnormal detection method for electronic locks of metering boxes based on control algorithms, according to an embodiment of the present invention.
[0018] The abnormal detection methods for electronic locks of metering boxes based on control algorithms include: Collect current timing data of the electronic lock drive motor of the metering box during the locking operation process, divide the current timing data into time windows, calculate the coupling coefficient of the current amplitude characteristics and current change rate characteristics of each time window, and arrange the coupling coefficients in time sequence to form a load coupling trajectory. Multiple load coupling trajectories corresponding to multiple locking actions under normal working conditions are collected, and the statistical envelope range of each load coupling trajectory at each time point is calculated. The trajectory reference domain is constructed based on the statistical envelope range. Construct the load coupling trajectory to be detected for the locking actions during operation, and calculate the trajectory consistency index between the load coupling trajectory to be detected and the trajectory reference domain; When the trajectory consistency index is lower than the trajectory deviation judgment threshold, the deviation trajectory segment of the load coupling trajectory to be detected that exceeds the trajectory reference domain is extracted, and the energy deviation characteristics and morphological deviation characteristics of the deviation trajectory segment relative to the corresponding segment of the trajectory reference domain are calculated. The fault type is determined based on the correlation between energy deviation characteristics and morphological deviation characteristics. The fault location is obtained by mapping the temporal position of the deviation trajectory segment to the mechanical transmission chain. The output is a detection result containing the fault location and fault type.
[0019] In one embodiment, a Hall current sensor or a shunt resistor is connected in series in the power supply circuit of the drive motor. When the electronic lock receives a locking command to start the drive motor, it synchronously triggers the data acquisition module to record the current signal. The current sensor converts the real-time current into an analog voltage signal, which is then conditioned and digitally sampled by an analog-to-digital converter at a sampling frequency of 1kHz to 10kHz. From the start of the locking action to the stop of the motor, the current values are continuously collected and arranged in chronological order to form a complete current timing data sequence that records the entire process of the drive motor starting, driving, and braking.
[0020] The current time-series data is segmented into time windows, and the coupling coefficient between the current amplitude characteristics and the current rate of change characteristics in each time window is calculated. The coupling coefficients are then arranged in time sequence to form the load coupling trajectory, which includes: The current time series data is divided into segments according to time windows to obtain current data segments for each time window. The upper and lower envelopes of the current values within the current data segments are calculated. The average of the upper and lower envelopes is taken as the current amplitude feature. The current difference sequence is obtained by performing point-by-point difference operation on the current values within the current data segments as the current rate of change feature. The current amplitude characteristics and current rate of change characteristics are transformed in the frequency domain to obtain the amplitude frequency domain component and the rate of change frequency domain component, respectively. The joint probability distribution and marginal probability distribution of the amplitude frequency domain component and the rate of change frequency domain component are calculated. The mutual information is calculated based on the joint probability distribution and the marginal probability distribution as the coupling coefficient of each time window. The coupling coefficient sequence is decomposed into multi-level time-frequency components. The instantaneous frequency and instantaneous amplitude of each time-frequency component are extracted to construct a time-frequency feature matrix. The time-frequency feature matrix is then dimensionally reduced and reconstructed to obtain a denoised coupling coefficient sequence. The denoised coupling coefficient sequence is then connected in time sequence to form a load coupling trajectory.
[0021] After acquiring the current timing data of the drive motor, the original current sequence is segmented according to a preset time window length. Each time window corresponds to a local current waveform of the motor during a certain stage of the locking action. For the current data segment within each time window, the upper and lower envelopes are extracted. The upper envelope is obtained by interpolation by connecting the local maxima points within the data segment, and the lower envelope is obtained by interpolation by connecting the local minima points. The average values of the upper and lower envelopes at each sampling point are taken, and the resulting average sequence is the current amplitude characteristic of that time window. This characteristic reflects the average load level and fluctuation center position of the motor during that stage, effectively suppressing the interference of high-frequency noise on amplitude estimation.
[0022] A point-by-point differential operation is performed on the current values within the current data segment, that is, the difference between the current values of adjacent sampling points is calculated to obtain a current difference sequence, which is used as the current rate of change characteristic. The positive or negative sign of the current difference sequence reflects the rising or falling trend of the current, and its absolute value reflects the drasticness of the current change. When the motor drive mechanism experiences jamming or transmission abnormalities, the current rate of change characteristic often shows a significant abrupt change at a specific moment, therefore this characteristic is highly sensitive to mechanical faults.
[0023] Frequency domain transformations are performed on the current amplitude characteristic sequence and the current rate of change characteristic sequence, mapping the two signals from the time domain to the frequency domain, yielding the amplitude frequency domain component and the rate of change frequency domain component. The frequency domain transformation can be implemented using Discrete Fourier Transform or Short-Time Fourier Transform, resulting in the amplitude spectrum and phase spectrum corresponding to each frequency component. The amplitude frequency domain component describes the energy distribution of the current amplitude characteristic at different frequencies, while the rate of change frequency domain component describes the oscillation characteristics of the current rate of change characteristic at different frequencies. Together, these two frequency domain components constitute a multidimensional frequency domain description of the motor load state.
[0024] After obtaining the amplitude and rate of change frequency components, their joint probability distribution and individual marginal probability distributions are calculated. The joint probability distribution characterizes the probability that both frequency components simultaneously take specific values at various frequency points, while the marginal probability distributions describe their respective independent probability distribution characteristics. Based on the joint and marginal probability distributions, the mutual information is calculated as the coupling coefficient for this time window. The mutual information I is calculated as follows: ; Where A represents the random variable of the amplitude frequency domain component, B represents the random variable of the rate of change frequency domain component, p(a, b) is the joint probability distribution of the two, and p(a) and p(b) are their respective marginal probability distributions. The larger the mutual information I, the higher the statistical dependence between the current amplitude characteristic and the current rate of change characteristic, that is, the tighter the coupling between the two, which usually corresponds to a relatively stable mechanical load of the motor under normal driving conditions; when the coupling between the two decreases, the value of I decreases, which often indicates that there is abnormal disturbance or loose parts in the mechanical transmission chain.
[0025] The coupling coefficient I values calculated for each time window are arranged in time sequence to form a coupling coefficient sequence. Since high-frequency random noise is inevitably mixed into the actual acquired current signal, noise-induced fluctuations also exist in the coupling coefficient sequence, requiring noise reduction processing to improve the reliability of subsequent trajectory analysis. The coupling coefficient sequence is then decomposed into multiple time-frequency components at different scales. Time-frequency decomposition can employ methods such as empirical mode decomposition or wavelet packet decomposition to decompose the coupling coefficient sequence into several levels of sub-components, each corresponding to an oscillation mode within a different frequency range.
[0026] Instantaneous frequency and instantaneous amplitude are extracted for each time-frequency component. The instantaneous frequency reflects the local oscillation rate of the component at each moment, and the instantaneous amplitude reflects the local energy intensity of the component at each moment. The instantaneous frequency and instantaneous amplitude sequences of each time-frequency component are aligned by time and concatenated to construct a time-frequency feature matrix. The rows of the time-frequency feature matrix correspond to time moments, and the columns correspond to the instantaneous frequency and instantaneous amplitude of each time-frequency component. Each row in the matrix completely describes the time-frequency structure of the coupling coefficient sequence at that moment.
[0027] The purpose of dimensionality reduction and reconstruction of the time-frequency feature matrix is to extract the main structural information from the high-dimensional time-frequency feature space while suppressing redundant components caused by noise. Dimensionality reduction can be achieved using methods such as principal component analysis, retaining the principal components that contribute most to the main changes in the coupling coefficient sequence while discarding noise components with extremely low energy proportions. During reconstruction, based on the retained principal components, the time-frequency feature matrix is mapped back to the time-domain representation of the coupling coefficient sequence, resulting in the denoised coupling coefficient sequence. The denoised sequence retains the main trends and characteristic changes of the original coupling coefficient sequence while effectively removing high-frequency random disturbances, making the subsequent construction of the load coupling trajectory more robust.
[0028] The noise-reduced coupling coefficient sequence is concatenated in time sequence to form the final load coupling trajectory. This trajectory, with time as the horizontal axis and the coupling coefficients corresponding to each time window as the vertical axis, fully describes the dynamic evolution of the coupling relationship between the current amplitude and current rate of change characteristics of the drive motor throughout a single locking action. Different locking action stages (such as motor start-up, transmission acceleration, latch extension, and braking at position) exhibit different morphological characteristics on the load coupling trajectory, providing a physically meaningful feature carrier for subsequent trajectory reference domain construction and anomaly detection. When wear, jamming, or loosening occurs in a certain link of the mechanical transmission chain, the coupling relationship between the current amplitude and current rate of change characteristics within the corresponding time window will deviate, manifesting as local morphological abrupt changes or amplitude anomalies on the load coupling trajectory, thus providing a basis for subsequent fault location and type judgment.
[0029] like Figure 2 As shown, Figure 2 This is a flowchart illustrating the trajectory reference domain construction operation in an embodiment of the present invention.
[0030] Calculate the statistical envelope range of each load coupling trajectory at each time point, and construct the trajectory reference domain based on the statistical envelope range, including: Extract multiple coupling coefficient values corresponding to multiple load coupling trajectories at each time point, calculate the local density distribution of multiple coupling coefficient values at each time point, identify the number of peaks in the local density distribution at each time point, and classify each time point into single-peak time points and multi-peak time points based on the number of peaks. For multiple coupling coefficient values at a single-peak time point, calculate the weighted center value and dispersion. Based on the weighted center value and dispersion, determine the single-channel envelope boundary at the single-peak time point. For multiple coupling coefficient values at a multi-peak time point, identify the coupling coefficient value clusters corresponding to each peak and calculate the cluster boundary of each coupling coefficient value cluster. Use the cluster boundary of each coupling coefficient value cluster as the multi-channel envelope boundary at the multi-peak time point. Calculate the morphological difference degree of the envelope boundary between adjacent time points, generate a transitional envelope boundary between adjacent time points based on the morphological difference degree, connect the single-channel envelope boundary, multi-channel envelope boundary and transitional envelope boundary in the time dimension to form the statistical envelope range of each time point, and construct the trajectory reference domain based on the statistical envelope range of each time point.
[0031] Under normal operating conditions, for the multiple load coupling trajectories generated by multiple locking actions, it is necessary to extract the corresponding set of coupling coefficient values at each time point along the time dimension. Specifically, for each time point, the coupling coefficient value at that time point is extracted from all load coupling trajectories involved in the modeling, forming a sample set composed of multiple values. Due to the influence of factors such as the degree of mechanical wear, differences in spring preload, and changes in ambient temperature and humidity on different locking actions, the coupling coefficient values at the same time point often exhibit complex statistical characteristics that are not simple normal distributions. Therefore, the envelope range cannot be simply determined by adding or subtracting a certain number of standard deviations from the mean. Instead, it is necessary to first perform local density distribution analysis on the sample set at each time point.
[0032] The local density distribution is calculated using kernel density estimation. A probability density function is fitted to multiple coupling coefficient numerical samples at each time point to obtain a continuous density curve. The number of peaks on the density curve is identified by detecting the number of maxima: if the density curve has only one maximum, the time point is classified as a single-peak time point; if the density curve has two or more independent maximums, the time point is classified as a multi-peak time point. The multi-peak phenomenon typically corresponds to the drive motor having two or more typical operating states at that time point. For example, a spring mechanism may be in a fully compressed or partially compressed state at a certain moment, resulting in the coupling coefficient values being distributed across two different numerical intervals at that moment.
[0033] For a sample set classified as a single-peak time point, weighted centrality and dispersion are calculated. The weighted centrality is calculated by weighting the probability density values of each sample point on the kernel density estimation curve, thus averaging the sample values. This ensures that values in higher-density regions contribute more to the centrality, avoiding excessive influence from sparse outliers on the centrality estimate. Dispersion, expressed as weighted standard deviation, measures the dispersion of the sample set around the weighted centrality. Let the weighted centrality be μ. w The weighted standard deviation is σ wThen the single-channel envelope boundary at the single-peak time point is defined by the upper boundary U. s =μ w +k·σ w With lower boundary L s =μ w -k·σ w The values are jointly determined, where k is the coverage coefficient, set according to the confidence level requirements, and typically chosen to ensure that the envelope range covers more than 95% of the normal samples. The single-channel envelope boundary represents the range of normal coupling coefficient values at that point in time as a continuous interval.
[0034] For a sample set classified as a multi-peak time point, it is necessary to identify the coupling coefficient numerical clusters corresponding to each peak. The identification method is based on the location of the minimum points between the maxima on the density curve. The sample set is segmented according to the values corresponding to the minimum points, and samples falling within the same density peak interval are grouped into the same coupling coefficient numerical cluster. For each coupling coefficient numerical cluster, the weighted central value and weighted standard deviation of the samples within the cluster are calculated, and the cluster boundaries of each coupling coefficient numerical cluster, i.e., the upper and lower boundaries of each cluster, are determined accordingly. The cluster boundaries of all coupling coefficient numerical clusters together constitute the multi-channel envelope boundary of the multi-peak time point, with each channel corresponding to the interval range of a coupling coefficient numerical cluster. The multi-channel envelope boundary can accurately reflect the objective situation of multiple normal working states at that time point, avoiding the incorrect inclusion of numerical intervals between different working states into the normal range, thus preventing a decrease in anomaly detection sensitivity.
[0035] After calculating the single-channel or multi-channel envelope boundaries at each time point, it is necessary to address the continuity of envelope boundaries between adjacent time points. When the number of envelope channels differs between adjacent time points, or when there are significant jumps in the position of the envelope boundaries, directly stitching the envelope boundaries of each time point together in the time dimension will cause abrupt discontinuities in the trajectory reference domain, leading to misjudgments. To solve this problem, the morphological difference degree of the envelope boundaries between adjacent time points is calculated. The morphological difference degree comprehensively considers the difference in the number of envelope channels between adjacent time points and the magnitude of change in the upper and lower boundary values of the corresponding channels. Let the adjacent time points t... m With t m+1 The morphological difference between them is D m Its calculation comprehensively reflects the contributions of both changes in the number of channels and boundary value jumps. When D m When the difference exceeds the preset threshold, at t m With t m+1 Several transition time points are inserted between the points, and transition envelope boundaries are generated at these transition time points. The transition envelope boundaries are smoothly transitioned between the envelope boundaries of adjacent time points using linear interpolation or cubic spline interpolation, so that the trajectory reference domain maintains continuity and smoothness in the time dimension.
[0036] By sequentially connecting the single-channel envelope boundary, multi-channel envelope boundary, and transition envelope boundary in the time dimension, a statistical envelope range covering the entire locking action time range is formed. This statistical envelope range may exhibit a single-channel or multi-channel structure at different time points, collectively constituting a dynamic reference region that varies with time, namely the trajectory reference domain. The trajectory reference domain not only provides a reasonable range of normal coupling coefficient values at each time point, but also accommodates the normal variation patterns of the drive motor under different operating states through its multi-channel structure, while ensuring the smooth continuity of the reference domain in the time dimension through the transition envelope boundary. In the subsequent anomaly detection process, the coupling coefficient values of the load coupling trajectory under test at each time point are compared with the corresponding positions in the trajectory reference domain to determine whether they fall within the envelope range, thereby achieving accurate identification of abnormal states of the metering box electronic lock drive motor.
[0037] Calculating the morphological difference degree of the envelope boundary between adjacent time points, and generating a transitional envelope boundary between adjacent time points based on the morphological difference degree, includes: Extract the envelope boundary point set of adjacent time points, identify the branch topology of each envelope boundary point set to obtain the number of branches and the branch position of each envelope boundary point set, calculate the change in the number of branches and the offset of the branch position between the envelope boundary point sets of adjacent time points, and calculate the morphological difference degree based on the change in the number of branches and the offset of the branch position. The transition mode type is determined based on the change value of the number of branches. The morphological difference with a negative change value of the number of branches corresponds to the convergence transition mode and the branch position of the disappearing branch is recorded. The morphological difference with a positive change value of the number of branches corresponds to the expansion transition mode and the branch position of the newly added branch is recorded. The morphological difference with a zero change value of the number of branches corresponds to the deformation transition mode. For the convergent transition mode, a contraction transition path is constructed based on the branch position of the disappearing branch and the number of transition time points. For the expansion transition mode, an expansion transition path is constructed based on the branch position of the newly added branch and the number of transition time points. For the deformation transition mode, a smooth transition path is constructed based on the branch position offset and the number of transition time points. The transition envelope boundary is generated by interpolation at each transition time point along the corresponding transition path.
[0038] In constructing the trajectory reference domain, the envelope boundaries between adjacent time points may exhibit different topological morphologies. Directly performing linear interpolation between adjacent time points often fails to accurately reflect the structural evolution of the envelope boundaries. Therefore, it is necessary to first quantify the morphological differences between the envelope boundaries of adjacent time points, and then select an appropriate transition generation strategy based on the type of difference.
[0039] After extracting the envelope boundary point sets for each of two adjacent time points, branch topology identification is performed on each envelope boundary point set. Branch topology refers to the fact that at a certain time point, the envelope boundary may form multiple independent continuous segments due to multi-peak distribution or the existence of local extrema; each segment is a branch. The identification process is achieved through connectivity analysis of the envelope boundary point sets: the alternation pattern of minimum and maximum points is detected along the longitudinal coordinate sequence of the envelope boundary; continuous intervals forming complete peak or trough structures between adjacent extrema are identified as branches; and the start and end positions of each branch are recorded as branch position descriptions. After performing the above identification for each of two adjacent time points, the number of branches and the set of branch positions are obtained for each.
[0040] Let the number of branches at the previous time point be N1, and the number of branches at the next time point be N2. Then, the change in the number of branches, ΔN, is defined as ΔN = N2 - N1. The branch position offset is obtained by averaging the differences between the center positions of the branches corresponding to their numbers at the two time points, reflecting the degree of drift of the overall envelope boundary in the positional dimension. Morphological difference F d The calculation combines the change in the number of branches and the branch position offset, and is specifically expressed as follows: ,in The mean of the offset of the center positions of all corresponding branches is given. α and β are the weighting coefficients for the change in the number of branches and the position offset, respectively, and are pre-calibrated based on the topological sensitivity of the actual motor current envelope. Morphological difference F d The larger the value, the more drastic the structural changes of the envelope boundary between adjacent time points, requiring a more refined transition strategy.
[0041] The transition modes are classified into three categories based on the sign of ΔN. When ΔN < 0, it is determined to be a convergent transition mode, indicating that several branches disappear from the previous time point to the next time point; in this case, the branch positions of the disappeared branches are recorded, i.e., the position intervals corresponding to branches that existed at the previous time point but did not exist at the next time point. When ΔN > 0, it is determined to be an expanding transition mode, indicating that several new branches appear from the previous time point to the next time point; in this case, the branch positions of the new branches are recorded, i.e., the position intervals corresponding to branches that existed at the next time point but did not exist at the previous time point. When ΔN = 0, it is determined to be a deformation transition mode, indicating that the number of branches is the same at both time points, but the positions of each branch have shifted, and the overall envelope boundary has undergone continuous deformation in shape.
[0042] For a convergent transition mode, let P be the number of transition time points that need to be inserted between two adjacent time points, and let c be the branch center position of the vanishing branch. disWhen constructing the shrinking transition path, the amplitude of the vanishing branch at each transition time point is gradually reduced to zero according to a linear or nonlinear decay function. Specifically, the amplitude decay coefficient γ of the vanishing branch at the p-th transition time point (p = 1, 2, ..., P) is... p Satisfying γ p =1-p / (P+1), which makes the disappearing branch smoothly shrink from the complete form to disappearing within the transition interval, while retaining the continuous interpolation results of the remaining branches, and superimposing the two parts to form the envelope boundary at the transition time point.
[0043] For the expansion transition mode, the branch center position of the newly added branch is c. add When constructing the extended transition path, the amplitude of the new branch at each transition time point is gradually increased from zero to the target amplitude according to a linear or nonlinear growth function. The amplitude growth coefficient η of the new branch at the p-th transition time point is... p Satisfying η p =p / (P+1), which allows the newly added branch to smoothly expand from nothing to a complete form within the transition interval. Similarly, it is superimposed with the continuous interpolation results of the other branches to form the envelope boundary at this transition time point.
[0044] For the deformation transition mode, the position offset of each branch is There is no disappearance or addition of branches; only continuous interpolation in the position and shape dimensions is required. When constructing a smooth transition path, for each pair of branches corresponding to the numbers at two consecutive time points, piecewise cubic spline interpolation is performed on their upper and lower boundary curves at each transition time point. This ensures that the position center and amplitude shape of the branches monotonically and smoothly transition from the state of the previous time point to the state of the next time point with the transition time point number. The offset of the interpolation result of each branch in the position dimension at the p-th transition time point is... This ensures a linear and uniform distribution of the overall translation.
[0045] After interpolation is performed at each transition time point, the generated envelope boundary point set is arranged in temporal order, forming a complete trajectory reference domain boundary sequence together with the envelope boundaries at the original time points. This processing method effectively avoids the problem of discontinuous jumps in the reference domain caused by abrupt changes in the topology of the envelope boundary between adjacent time points, enabling the trajectory reference domain to continuously and smoothly cover the reasonable variation space of the load coupling trajectory under normal working conditions. In the subsequent calculation of the consistency index between the load coupling trajectory to be detected and the trajectory reference domain, the existence of the transition envelope boundary ensures the sensitivity of the consistency index to trajectory deviations within continuous time periods, avoiding misjudgments or omissions caused by topological jumps in the reference domain boundary.
[0046] like Figure 3 As shown, Figure 3This diagram illustrates the real-time monitoring and consistency determination of the load coupling trajectory of the electronic lock according to the present invention. When the trajectory to be detected breaks through the envelope range in a specific action interval, causing the consistency index to fall below the set deviation judgment threshold, the deviation segment of the trajectory will be displayed and an abnormal alarm will be triggered. This provides core data support and judgment basis for subsequent extraction of energy and shape deviation features and location of mechanical transmission chain faults.
[0047] The calculation of the trajectory consistency index between the load-coupled trajectory to be detected and the trajectory reference domain includes: At each time point, it is determined whether the coupling coefficient value of the load coupling trajectory to be detected is within the statistical envelope range of the corresponding time point in the trajectory reference domain. The time points within the statistical envelope range are marked as conforming time points and the number of conforming time points is counted. The time points outside the statistical envelope range are marked as deviating time points and the temporal position and coupling coefficient value of the deviating time points are extracted. Calculate the coupling coefficient values at each deviation time point and the spatial distance between the trajectory reference domain and the boundary of the statistical envelope range at the corresponding time point, and construct a deviation degree sequence based on the spatial distance; Identify the locking action stage where the deviation point is located based on the temporal position of the deviation point, assign stage weights to the deviation degree sequence of different locking action stages, and obtain the stage weighted deviation degree by weighted combination of the deviation degree sequence and the stage weights. The trajectory matching degree is calculated based on the number of matching time points and the total number of time points of the coupled trajectory of the load to be detected. A trajectory consistency index is constructed based on the trajectory matching degree and the stage-weighted deviation.
[0048] After obtaining the coupling trajectory of the load to be detected, it is necessary to quantitatively evaluate its overall consistency with the trajectory reference domain. Each time point on the coupling trajectory of the load to be detected is traversed sequentially, and the coupling coefficient value corresponding to that time point is compared with the upper and lower boundaries of the statistical envelope range of the trajectory reference domain at the same time point. If the coupling coefficient value falls between (and including) the upper and lower boundaries of the statistical envelope range, the time point is marked as a conforming time point, and the number of conforming time points is accumulated. If the coupling coefficient value exceeds the upper boundary of the statistical envelope range or falls below the lower boundary, the time point is marked as a deviating time point, and the temporal position index of the deviating time point in the entire trajectory and the corresponding coupling coefficient value are recorded, forming a set of deviating time points. This point-by-point judgment process can accurately locate the difference between the trajectory to be detected and the reference domain to each sampling time point, providing basic data for subsequent deviation quantification.
[0049] For each deviation point in the set of deviation time points, the spatial distance between its coupling coefficient value and the boundary of the statistical envelope of the trajectory reference domain at that time point is calculated. Specifically, if the coupling coefficient value of the deviation time point is higher than the upper boundary of the statistical envelope, the spatial distance is the difference between the coupling coefficient value and the upper boundary; if it is lower than the lower boundary, the spatial distance is the difference between the lower boundary and the coupling coefficient value. All deviation time points are arranged in chronological order, and the spatial distances corresponding to each deviation time point constitute a deviation degree sequence. The larger the value in the deviation degree sequence, the more severe the deviation between the detected trajectory and the reference domain at that time point, meaning that the difference between the load state and the normal operating state of the drive motor at that time point is more significant. The deviation degree sequence as a whole reflects the distribution of the deviation amplitude of the detected trajectory within the deviation interval and is the core input for subsequent weighted calculations.
[0050] The locking operation process can be divided into several functional stages in terms of timing, such as the start-up acceleration stage, the stable transmission stage, the latch engagement stage, and the braking and stopping stage. The mechanical load characteristics corresponding to different stages differ significantly, and the current response modes of the drive motor also differ fundamentally in each stage. Based on the timing position index of the deviation point, each deviation point is assigned to its corresponding locking operation stage. Stage weights are assigned to different locking operation stages, with the weight reflecting the stage's importance to overall fault diagnosis. Generally, the latch engagement stage and the stable transmission stage are more sensitive to fault diagnosis and are therefore assigned higher stage weights; the start-up acceleration stage and the braking and stopping stage have relatively lower stage weights due to their larger normal fluctuation range. Let the stage weight of the j-th locking operation stage be w. j The average spatial distance of all deviations from the time point during this stage is Then the stage weighted deviation E w Calculate as follows: ; The process involves summing all locking action phases that contain deviations from the specified time point. If a phase does not contain any deviations from the specified time point, then that phase affects E. w The contribution is zero. Stage-weighted deviation E w By comprehensively considering both the spatial magnitude of the deviation and the importance of the stage in which the deviation occurs, it can more accurately reflect the actual impact of the deviation of the detected trajectory on the locking function, and avoid treating slight deviations occurring in low-sensitivity stages as the same as significant deviations occurring in high-sensitivity stages.
[0051] After performing a phase-weighted calculation of the deviation degree, the trajectory matching degree is further calculated. Let the total number of time points of the load coupling trajectory to be detected be Q, and the number of matching time points be Q_1. c Then the trajectory matching degree R is defined as: ; The value of R ranges from [0, 1]. A value closer to 1 indicates a higher degree of overall coverage and agreement between the detected trajectory and the trajectory reference domain; a value closer to 0 indicates a larger proportion of deviation points and poorer overall consistency. The trajectory agreement R characterizes the overall compliance of the detected trajectory from a macroscopic proportional perspective. However, relying solely on R cannot distinguish between "slight deviations at a large number of time points" and "extreme deviations at a small number of time points," two situations that are fundamentally different in nature in terms of fault characteristics. Therefore, it is necessary to combine R with the stage-weighted deviation E. w Jointly construct a trajectory consistency index.
[0052] Trajectory Consistency Index The trajectory fit R and the stage-weighted deviation E w This decision is made jointly. Considering that trajectory consistency reflects the uniformity of the proportional dimension, while stage-weighted deviation reflects the intensity of deviation in the amplitude dimension, and that the two differ in units and numerical ranges, it is necessary to first determine E... w Perform normalization. Let the normalized stage-weighted deviation be... The mean of the envelope width at each time point is calculated using the reference domain. As a normalization benchmark, then: ; Based on this, the trajectory consistency index Defined as: ; Where λ is the deviation penalty coefficient, used to adjust the inhibitory strength of the stage-weighted deviation on the trajectory consistency index. When When it is large, the exponential decay term makes A significant reduction, reflecting the severe impact of high-intensity deviations on consistency; when When approaching zero, As it approaches R, the trajectory consistency index is mainly determined by the coverage ratio of time points. The value range is (0, 1]. A higher value indicates a stronger consistency between the load coupling trajectory and the trajectory reference domain, and a more normal operating state of the drive motor. The calculated value... When compared with the preset trajectory deviation judgment threshold, When the deviation falls below this threshold, the detected trajectory is deemed to have significantly deviated, triggering subsequent processes for extracting the deviated trajectory segment and analyzing fault features. This trajectory consistency index construction method takes into account both the breadth and depth of the deviation coverage, as well as the functional sensitivity of the locking stage in which the deviation occurs, providing a comprehensive and accurate quantitative characterization of the abnormal state of the metering box electronic lock.
[0053] Extracting the deviation trajectory segments of the load coupling trajectory to be detected that exceed the trajectory reference domain, and calculating the energy deviation characteristics and morphological deviation characteristics of the deviation trajectory segments relative to the corresponding segments in the trajectory reference domain, including: Identify the deviation time points in the load coupling trajectory to be detected that exceed the trajectory reference domain, merge consecutive deviation time points into deviation trajectory segments, and extract the time range and deviation coupling coefficient sequence of the deviation trajectory segments; Based on the time range, extract the reference coupling coefficient sequence for the corresponding time period in the trajectory reference domain, and calculate the temporal position of the deviation trajectory segment in the locking cycle; The deviation integral value and the reference integral value are obtained by performing time-domain integration on the deviation coupling coefficient sequence and the reference coupling coefficient sequence, respectively. The deviation integral value and the reference integral value are calculated as the energy deviation degree. The extreme value features of the rate of change are extracted from the deviation coupling coefficient sequence and the reference coupling coefficient sequence to obtain the deviation extreme value features and the reference extreme value features respectively. The deviation value between the deviation extreme value features and the reference extreme value features is calculated as the morphological deviation degree. The stage weight coefficient is determined based on the temporal position. The energy deviation is multiplied by the stage weight coefficient to obtain the energy deviation feature, and the morphological deviation is multiplied by the stage weight coefficient to obtain the morphological deviation feature.
[0054] After the trajectory consistency index falls below the trajectory deviation judgment threshold, refined feature extraction is required for the portion of the load coupling trajectory deviating from the trajectory reference domain to support subsequent fault type identification. The method for identifying deviation time points is as follows: The coupling coefficient value of the load coupling trajectory at each time point is compared with the upper and lower envelope boundaries of the trajectory reference domain at that time point. If the coupling coefficient at a certain time point exceeds the upper boundary or falls below the lower boundary, that time point is marked as a deviation time point. Temporally adjacent deviation time points are merged into one deviation trajectory segment. If there are normal time points between two deviation time points that do not exceed a preset tolerance interval, they can also be merged into the same deviation trajectory segment to avoid splitting the same physical event into multiple segments due to a brief fall back into the reference domain. After merging, the start and end times corresponding to each deviation trajectory segment are recorded to form a time range. Simultaneously, the coupling coefficient sequence of the load coupling trajectory to be detected within this time range is extracted as the deviation coupling coefficient sequence.
[0055] Based on the time range of the deviation segment, the corresponding time period is located in the trajectory reference domain, and the reference coupling coefficient sequence within that time period is extracted. The reference coupling coefficient sequence can be taken as the center value of the statistical envelope range of the trajectory reference domain at each time point within that time period (i.e., the mean value of the upper and lower envelope boundaries), to represent the typical coupling coefficient trend of this stage under normal working conditions. Simultaneously, the temporal position of the deviation segment within the locking cycle is calculated. Specifically, the offset of the starting time of the deviation segment relative to the starting time of the entire locking action is divided by the total duration of the locking action to obtain the normalized temporal position. This position is used for table lookup or interpolation calculation of subsequent stage weight coefficients. The locking action is typically divided into a starting stage, an acceleration stage, a constant speed transmission stage, a deceleration stage, and a locking-in stage. The mechanical load characteristics of different stages differ significantly; therefore, accurate positioning of the temporal position is a prerequisite for assigning stage weight coefficients.
[0056] The energy deviation is calculated using the time-domain integration method. The deviation coupling coefficient sequence is integrated over its time domain to obtain the deviation integral value S. dev The reference coupling coefficient sequence is integrated in the time domain over the same time range to obtain the reference integral value S. ref The time-domain integration employs a trapezoidal numerical integration method, accumulating segment by segment with the time interval between adjacent time points as the step size. The energy deviation ΔS is defined as the difference between the deviation integral value and the reference integral value, i.e., ΔS = S dev -S ref When ΔS > 0, it indicates that the overall coupling coefficient of the deviation segment is higher than the reference level, corresponding to an abnormally high current amplitude or rate of change, usually related to faults such as mechanical jamming or drive chain overload. When ΔS < 0, it indicates that the overall coupling coefficient of the deviation segment is lower than the reference level, corresponding to an abnormally low current amplitude or rate of change, usually related to faults such as drive chain breakage, tripping, or drive failure. The absolute value of the energy deviation reflects the severity of the fault; the larger the value, the more significant the deviation between the actual load state and the normal state.
[0057] The morphological deviation is calculated based on the comparison of extreme value features of the rate of change. Extreme value features of the rate of change are extracted from the deviation coupling coefficient sequence. Specifically, the first-order difference between adjacent time points in the deviation coupling coefficient sequence is calculated, local maxima and local minima in the difference sequence are identified, and their amplitudes and locations are recorded to form a set of deviation extreme value features. The same method is used to extract a set of reference extreme value features from the reference coupling coefficient sequence. The morphological deviation ΔF is quantified by comparing the difference between the deviation extreme value feature set and the reference extreme value feature set. It is calculated by taking the absolute value of the amplitude difference between corresponding extreme points (matched by position) in the two sets and then averaging the results. If the deviation extreme value feature set contains an extreme point that is not present in the reference extreme value feature set, the largest difference value is used as a penalty. The morphological deviation reflects the change in the fluctuation pattern of the coupling coefficient sequence. For example, the appearance of a sudden spike in a smooth transition phase under normal conditions, or the disappearance of characteristic fluctuations present under normal conditions, will lead to a higher morphological deviation. Morphological deviation is highly sensitive to identifying transient impact faults (such as gear tooth breakage and bearing pitting), while energy deviation is more sensitive to continuous overload or open circuit faults, and the two complement each other.
[0058] The stage weighting coefficient is determined based on the temporal position of the deviation trajectory segment. The locking action is divided into several functional stages, and a corresponding weighting coefficient ω is preset for each stage. s The weighting coefficient reflects the degree of impact of each stage on the overall locking performance. For example, the locking-in stage is a critical step in the locking action; any abnormalities occurring during this stage directly affect the locking reliability of the lock, thus it is assigned a higher weighting coefficient. Conversely, the brief current fluctuations during the starting stage are significantly affected by the motor's starting characteristics, having a relatively smaller impact on the locking result, and are therefore assigned a lower weighting coefficient. The corresponding stage is located based on the normalized time sequence position at the start of the deviation trajectory segment, and the weighting coefficient ω for that stage is obtained. s Energy deviation characteristic E feat By combining the energy deviation ΔS with the stage weighting coefficient ω s Multiplying them together gives E feat =ω s ·ΔS; morphological deviation characteristic F feat By combining the morphological deviation ΔF with the stage weighting coefficient ω s Multiplying them together gives F feat =ω s • ΔF. The purpose of introducing stage weighting coefficients is to ensure that the magnitude of the eigenvalues not only reflects the absolute degree of deviation, but also the fault sensitivity of the location where the deviation occurs, thereby enabling priority response to anomalies in critical stages in subsequent fault type identification.
[0059] When multiple deviation segments exist during a single locking action, the energy deviation characteristics and morphological deviation characteristics of each segment are calculated separately. These characteristics are then arranged chronologically to form energy deviation characteristic sequences and morphological deviation characteristic sequences, which are used for subsequent fault type correlation analysis. Through this process, the energy and morphological information of the deviation segments are quantified and weighted, providing structured feature inputs for accurately distinguishing different fault types such as jamming, overload, circuit breakage, and impact.
[0060] The fault type is determined based on the correlation between energy deviation characteristics and morphological deviation characteristics. The fault location is obtained by mapping the temporal position of the deviation trajectory segment to the mechanical transmission chain. The output includes detection results containing the fault location and fault type: The ratio of energy deviation features to morphological deviation features is calculated as the deviation feature ratio, and the weighted sum of energy deviation features and morphological deviation features is calculated as the deviation comprehensive index. A fault discrimination matrix is constructed based on the numerical range of the deviation characteristic ratio and the magnitude level of the deviation comprehensive index. The matrix cells corresponding to the deviation characteristic ratio and the deviation comprehensive index are found in the fault discrimination matrix, and the fault types labeled in the matrix cells are extracted. Extract the timing start position of the deviation trajectory segment in the locking cycle, identify the corresponding mechanical transmission chain node based on the timing start position in the locking cycle, and use the node identifier of the transmission node as the fault location. Search for co-occurrence records of fault type and node identifier in historical fault records, count the number of co-occurrence records as the co-occurrence count, and when the co-occurrence count exceeds the preset association judgment threshold, combine the fault type and fault location to generate detection results and output them.
[0061] After calculating the energy deviation characteristics and morphological deviation characteristics, it is necessary to further establish the correlation between the two to achieve accurate fault type identification. Calculate the energy deviation characteristic E. feat Deviation from morphological feature F feat The ratio of the two values is used to obtain the deviation ratio ρ, i.e., ρ = E. feat / F feat The deviation characteristic ratio reflects the relative strength of energy change and morphological change in the current deviation behavior: when ρ is large, it indicates that there is significant abnormal energy accumulation at the current amplitude level, while the waveform morphological change is relatively gentle, usually corresponding to drive motor overload or transmission chain jamming faults; when ρ is small, it indicates that the fluctuation at the morphological level is more prominent, while the energy change amplitude is limited, usually corresponding to mechanical clearance abnormalities or local loosening faults; when ρ is close to 1, it indicates that the two types of deviation characteristics grow synchronously, often corresponding to compound faults or severe structural damage.
[0062] At the same time, a weighted sum of energy deviation characteristics and morphological deviation characteristics is calculated as a comprehensive deviation index. ,Right now Where ω1 is the weighting coefficient for energy deviation characteristics and ω2 is the weighting coefficient for morphological deviation characteristics, both pre-calibrated based on statistical analysis of historical fault samples, satisfying ω1 + ω2 = 1. Deviation Comprehensive Index A comprehensive measure of the overall deviation of the current locking action, used to classify the severity of the fault. The range of values is divided into three levels: mild, moderate, and severe. The boundary values for each level are determined by statistical analysis of historical data.
[0063] The fault discrimination matrix uses the numerical range of deviation from the characteristic ratio ρ as the row dimension and the deviation from the comprehensive index as the index. The magnitude levels are column-dimensional, forming a two-dimensional lookup table structure. Each cell in the matrix corresponds to one or more possible fault types, for example, when ρ is in the high value range and... When the severity level is high, the matrix unit is labeled "transmission chain jamming"; when ρ is in the low value range and When it is at a mild level, it is marked as "excessive mechanical clearance"; when ρ is in the median range and When the severity is moderate, it is labeled as "insufficient spring preload," etc. The currently calculated ρ is then compared with... The corresponding numerical range and amplitude level are located respectively. The corresponding matrix cell is found in the fault discrimination matrix, and the fault type marked in the cell is extracted as the preliminary fault type determination result of this detection.
[0064] After determining the fault type, it is necessary to further locate the mechanical transmission chain node where the anomaly occurred. The timing start position t of the deviation trajectory segment within the complete locking cycle needs to be extracted. s This position is based on the initiation time of the locking action and is indicated by a time window number. The locking cycle is pre-divided into several time segments according to the motor drive characteristics and the structural features of the mechanical transmission chain. Each time segment corresponds to a transmission node in the mechanical transmission chain. For example, the initial segment of the locking cycle corresponds to the meshing node between the motor output shaft and the reduction gear, the middle segment corresponds to the connection node between the transmission rod and the lock tongue, and the final segment corresponds to the contact node between the lock tongue and the lock hole. Based on t... s Within the timing segment of the locking cycle, identify the corresponding mechanical transmission chain node and extract the node identifier ID. node This serves as the fault location output. The node identifier uses a predefined coding system to uniquely identify each transmission node in the mechanical transmission chain of the metering box's electronic lock, facilitating rapid location by subsequent maintenance personnel.
[0065] Before outputting the final detection results, the rationality of the association between fault type and fault location needs to be historically verified. This is done in the historical fault record database, using the current fault type and node identifier ID. node Using these as search criteria, find historical records in which both conditions appear simultaneously, and count the number of co-occurrence records as the co-occurrence frequency C. co The historical fault record database stores all confirmed fault events throughout the entire lifecycle of the equipment. Each record includes fields such as fault type, fault location node identifier, and occurrence time. When C co Exceeding the preset correlation determination threshold θ co If the combination of the current fault type and fault location has sufficient historical co-occurrence support, the correlation between the two is determined to be reliable, and the final detection result is generated and output by combining the fault type and fault location.
[0066] When C co Not exceeding θ co When this occurs, it indicates that the combination of the current fault type and fault location is relatively rare in historical records, potentially indicating a risk of misjudgment. Two handling strategies can be adopted in this case: First, mark the current detection result as "low confidence" and output it with a prompt message for manual review by maintenance personnel; second, backtrack the fault discrimination matrix to check for other candidate fault types, and perform co-occurrence verification on each candidate type, selecting the combination with the highest co-occurrence frequency exceeding a threshold as the final output. If all candidate combinations do not exceed θ... co The combination with the highest co-occurrence frequency will be output as the low-confidence result, and the current detection record will be written into the historical fault record database for subsequent statistical analysis.
[0067] The final output detection results include the fault location (identified by node ID). node The values are represented by the fault type (indicated by the fault type name labeled in the matrix cell), along with the deviation characteristic ratio ρ and the deviation comprehensive index. and the number of co-occurrences C co This includes auxiliary diagnostic information. Test results can be reported to the maintenance platform through the metering box management system. Maintenance personnel can then develop targeted repair plans based on the fault location and type, achieving accurate location and type identification of mechanical faults in the metering box's electronic lock, effectively improving the metering box's maintenance efficiency and equipment reliability.
[0068] A second aspect of the present invention provides an anomaly detection system for electronic locks of metering boxes based on a control algorithm, comprising: The load coupling unit is used to collect the current timing data of the electronic lock drive motor of the metering box during the locking operation process, divide the current timing data into time windows, calculate the coupling coefficient of the current amplitude characteristics and current change rate characteristics of each time window, and arrange the coupling coefficients in time sequence to form a load coupling trajectory. The reference domain construction unit is used to collect multiple load coupling trajectories corresponding to multiple locking actions under normal working conditions, calculate the statistical envelope range of each load coupling trajectory at each time point, and construct the trajectory reference domain based on the statistical envelope range. The trajectory comparison unit is used to construct the load coupling trajectory to be detected based on the locking actions during operation, and to calculate the trajectory consistency index between the load coupling trajectory to be detected and the trajectory reference domain. The deviation feature extraction unit is used to extract the deviation trajectory segment of the load coupling trajectory to be detected that exceeds the trajectory reference domain when the trajectory consistency index is lower than the trajectory deviation judgment threshold, and to calculate the energy deviation feature and morphological deviation feature of the deviation trajectory segment relative to the corresponding segment of the trajectory reference domain. The fault diagnosis unit is used to determine the fault type based on the correlation between energy deviation characteristics and morphological deviation characteristics, obtain the fault location by mapping the temporal position of the deviation trajectory segment to the mechanical transmission chain, and output the detection results containing the fault location and fault type.
[0069] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0070] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0071] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting anomalies in electronic locks of metering boxes based on control algorithms, characterized in that, include: Collect current timing data of the electronic lock drive motor of the metering box during the locking operation process, divide the current timing data into time windows, calculate the coupling coefficient of the current amplitude characteristics and current change rate characteristics of each time window, and arrange the coupling coefficients in time sequence to form a load coupling trajectory. Multiple load coupling trajectories corresponding to multiple locking actions under normal working conditions are collected, and the statistical envelope range of each load coupling trajectory at each time point is calculated. The trajectory reference domain is constructed based on the statistical envelope range. Construct the load coupling trajectory to be detected for the locking actions during operation, and calculate the trajectory consistency index between the load coupling trajectory to be detected and the trajectory reference domain; When the trajectory consistency index is lower than the trajectory deviation judgment threshold, the deviation trajectory segment of the load coupling trajectory to be detected that exceeds the trajectory reference domain is extracted, and the energy deviation characteristics and morphological deviation characteristics of the deviation trajectory segment relative to the corresponding segment of the trajectory reference domain are calculated. The fault type is determined based on the correlation between energy deviation characteristics and morphological deviation characteristics. The fault location is obtained by mapping the temporal position of the deviation trajectory segment to the mechanical transmission chain. The output is a detection result containing the fault location and fault type.
2. The method according to claim 1, characterized in that, The current time-series data is segmented into time windows, and the coupling coefficient between the current amplitude characteristics and the current rate of change characteristics in each time window is calculated. The coupling coefficients are then arranged in time sequence to form the load coupling trajectory, which includes: The current time series data is divided into segments according to time windows to obtain current data segments for each time window. The upper and lower envelopes of the current values within the current data segments are calculated. The average of the upper and lower envelopes is taken as the current amplitude feature. The current difference sequence is obtained by performing point-by-point difference operation on the current values within the current data segments as the current rate of change feature. The current amplitude characteristics and current rate of change characteristics are transformed in the frequency domain to obtain the amplitude frequency domain component and the rate of change frequency domain component, respectively. The joint probability distribution and marginal probability distribution of the amplitude frequency domain component and the rate of change frequency domain component are calculated. The mutual information is calculated based on the joint probability distribution and the marginal probability distribution as the coupling coefficient of each time window. The coupling coefficient sequence is decomposed into multi-level time-frequency components. The instantaneous frequency and instantaneous amplitude of each time-frequency component are extracted to construct a time-frequency feature matrix. The time-frequency feature matrix is then dimensionally reduced and reconstructed to obtain a denoised coupling coefficient sequence. The denoised coupling coefficient sequence is then connected in time sequence to form a load coupling trajectory.
3. The method according to claim 1, characterized in that, Calculate the statistical envelope range of each load coupling trajectory at each time point, and construct the trajectory reference domain based on the statistical envelope range, including: Extract multiple coupling coefficient values corresponding to multiple load coupling trajectories at each time point, calculate the local density distribution of multiple coupling coefficient values at each time point, identify the number of peaks in the local density distribution at each time point, and classify each time point into single-peak time points and multi-peak time points based on the number of peaks. For multiple coupling coefficient values at a single-peak time point, calculate the weighted center value and dispersion. Based on the weighted center value and dispersion, determine the single-channel envelope boundary at the single-peak time point. For multiple coupling coefficient values at a multi-peak time point, identify the coupling coefficient value clusters corresponding to each peak and calculate the cluster boundary of each coupling coefficient value cluster. Use the cluster boundary of each coupling coefficient value cluster as the multi-channel envelope boundary at the multi-peak time point. Calculate the morphological difference degree of the envelope boundary between adjacent time points, generate a transitional envelope boundary between adjacent time points based on the morphological difference degree, connect the single-channel envelope boundary, multi-channel envelope boundary and transitional envelope boundary in the time dimension to form the statistical envelope range of each time point, and construct the trajectory reference domain based on the statistical envelope range of each time point.
4. The method according to claim 3, characterized in that, Calculating the morphological difference degree of the envelope boundary between adjacent time points, and generating a transitional envelope boundary between adjacent time points based on the morphological difference degree, includes: Extract the envelope boundary point set of adjacent time points, identify the branch topology of each envelope boundary point set to obtain the number of branches and the branch position of each envelope boundary point set, calculate the change in the number of branches and the offset of the branch position between the envelope boundary point sets of adjacent time points, and calculate the morphological difference degree based on the change in the number of branches and the offset of the branch position. The transition mode type is determined based on the change value of the number of branches. The morphological difference with a negative change value of the number of branches corresponds to the convergence transition mode and the branch position of the disappearing branch is recorded. The morphological difference with a positive change value of the number of branches corresponds to the expansion transition mode and the branch position of the newly added branch is recorded. The morphological difference with a zero change value of the number of branches corresponds to the deformation transition mode. For the convergent transition mode, a contraction transition path is constructed based on the branch position of the disappearing branch and the number of transition time points. For the expansion transition mode, an expansion transition path is constructed based on the branch position of the newly added branch and the number of transition time points. For the deformation transition mode, a smooth transition path is constructed based on the branch position offset and the number of transition time points. The transition envelope boundary is generated by interpolation at each transition time point along the corresponding transition path.
5. The method according to claim 1, characterized in that, The calculation of the trajectory consistency index between the load-coupled trajectory to be detected and the trajectory reference domain includes: At each time point, it is determined whether the coupling coefficient value of the load coupling trajectory to be detected is within the statistical envelope range of the corresponding time point in the trajectory reference domain. The time points within the statistical envelope range are marked as conforming time points and the number of conforming time points is counted. The time points outside the statistical envelope range are marked as deviating time points and the temporal position and coupling coefficient value of the deviating time points are extracted. Calculate the coupling coefficient values at each deviation time point and the spatial distance between the trajectory reference domain and the boundary of the statistical envelope range at the corresponding time point, and construct a deviation degree sequence based on the spatial distance; Identify the locking action stage where the deviation point is located based on the temporal position of the deviation point, assign stage weights to the deviation degree sequence of different locking action stages, and obtain the stage weighted deviation degree by weighted combination of the deviation degree sequence and the stage weights. The trajectory matching degree is calculated based on the number of matching time points and the total number of time points of the coupled trajectory of the load to be detected. A trajectory consistency index is constructed based on the trajectory matching degree and the stage-weighted deviation.
6. The method according to claim 1, characterized in that, Extracting the deviation trajectory segments of the load coupling trajectory to be detected that exceed the trajectory reference domain, and calculating the energy deviation characteristics and morphological deviation characteristics of the deviation trajectory segments relative to the corresponding segments in the trajectory reference domain, including: Identify the deviation time points in the load coupling trajectory to be detected that exceed the trajectory reference domain, merge consecutive deviation time points into deviation trajectory segments, and extract the time range and deviation coupling coefficient sequence of the deviation trajectory segments; Based on the time range, extract the reference coupling coefficient sequence for the corresponding time period in the trajectory reference domain, and calculate the temporal position of the deviation trajectory segment in the locking cycle; The deviation integral value and the reference integral value are obtained by performing time-domain integration on the deviation coupling coefficient sequence and the reference coupling coefficient sequence, respectively. The deviation integral value and the reference integral value are calculated as the energy deviation degree. The extreme value features of the rate of change are extracted from the deviation coupling coefficient sequence and the reference coupling coefficient sequence to obtain the deviation extreme value features and the reference extreme value features respectively. The deviation value between the deviation extreme value features and the reference extreme value features is calculated as the morphological deviation degree. The stage weight coefficient is determined based on the temporal position. The energy deviation is multiplied by the stage weight coefficient to obtain the energy deviation feature, and the morphological deviation is multiplied by the stage weight coefficient to obtain the morphological deviation feature.
7. The method according to claim 1, characterized in that, The fault type is determined based on the correlation between energy deviation characteristics and morphological deviation characteristics. The fault location is obtained by mapping the temporal position of the deviation trajectory segment to the mechanical transmission chain. The output includes detection results containing the fault location and fault type: The ratio of energy deviation features to morphological deviation features is calculated as the deviation feature ratio, and the weighted sum of energy deviation features and morphological deviation features is calculated as the deviation comprehensive index. A fault discrimination matrix is constructed based on the numerical range of the deviation characteristic ratio and the magnitude level of the deviation comprehensive index. The matrix cells corresponding to the deviation characteristic ratio and the deviation comprehensive index are found in the fault discrimination matrix, and the fault types labeled in the matrix cells are extracted. Extract the timing start position of the deviation trajectory segment in the locking cycle, identify the corresponding mechanical transmission chain node based on the timing start position in the locking cycle, and use the node identifier of the transmission node as the fault location. Search for co-occurrence records of fault type and node identifier in historical fault records, count the number of co-occurrence records as the co-occurrence count, and when the co-occurrence count exceeds the preset association judgment threshold, combine the fault type and fault location to generate detection results and output them.
8. An abnormality detection system for an electronic lock on a metering box based on a control algorithm, used to implement the method as described in any one of claims 1-7, characterized in that, include: The load coupling unit is used to collect the current timing data of the electronic lock drive motor of the metering box during the locking operation process, divide the current timing data into time windows, calculate the coupling coefficient of the current amplitude characteristics and current change rate characteristics of each time window, and arrange the coupling coefficients in time sequence to form a load coupling trajectory. The reference domain construction unit is used to collect multiple load coupling trajectories corresponding to multiple locking actions under normal working conditions, calculate the statistical envelope range of each load coupling trajectory at each time point, and construct the trajectory reference domain based on the statistical envelope range. The trajectory comparison unit is used to construct the load coupling trajectory to be detected based on the locking actions during operation, and to calculate the trajectory consistency index between the load coupling trajectory to be detected and the trajectory reference domain. The deviation feature extraction unit is used to extract the deviation trajectory segment of the load coupling trajectory to be detected that exceeds the trajectory reference domain when the trajectory consistency index is lower than the trajectory deviation judgment threshold, and to calculate the energy deviation feature and morphological deviation feature of the deviation trajectory segment relative to the corresponding segment of the trajectory reference domain. The fault diagnosis unit is used to determine the fault type based on the correlation between energy deviation characteristics and morphological deviation characteristics, obtain the fault location by mapping the temporal position of the deviation trajectory segment to the mechanical transmission chain, and output the detection results containing the fault location and fault type.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.