Proximity alarm system for protection of automated electrical control cabinets
By combining a data acquisition unit, a behavior analysis unit, and an alarm triggering unit, and using a multi-window sliding detection and a dual-threshold hierarchical triggering mechanism, the system achieves accurate identification and alarm for personnel approaching the electrical control cabinet, solving the problem of false alarms in existing technologies and improving the safety protection capability of the electrical control cabinet.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUJIAN YANYU AUTOMATION TECH CO LTD
- Filing Date
- 2026-04-08
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, personnel proximity warning systems for industrial site electrical control cabinets cannot comprehensively identify personnel based on their stationing status, facing posture, and movement trends. This leads to non-dangerous behaviors being misjudged as unauthorized approach, generating a large number of invalid alarms, which affects operational order and the reliability of safety protection.
The system employs a combination of data acquisition unit, behavior analysis unit, and alarm triggering unit. Through multi-window sliding detection, dwell time determination, orientation recognition, and movement trend analysis, combined with a dual-threshold hierarchical triggering mechanism, it accurately distinguishes between unauthorized and unauthorized approaching behavior and accidental passing behavior.
It reduced the false alarm rate, improved the accuracy and reliability of personnel proximity alarms for electrical control cabinets, adapted to different industrial site environments, enhanced the system's scenario adaptability and robustness, reduced safety hazards, and ensured the stable and safe operation of electrical control cabinets.
Smart Images

Figure CN121982845B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of safety protection technology for automated electrical control cabinets, and more specifically, to a proximity alarm system for the protection of automated electrical control cabinets. Background Technology
[0002] Safety protection for automated electrical control cabinets is a crucial technology, specifically applied to real-time early warning of unauthorized approach to control cabinets in industrial settings. The core principle is to improve alarm accuracy through behavioral feature analysis, meeting the reliability requirements of control cabinet safety protection. Currently, industrial sites use a distance threshold-based method for triggering personnel approach warnings. However, this method relies solely on real-time distance values and cannot comprehensively identify personnel's stationary status, facing posture, and movement trends. This leads to misjudging non-dangerous behaviors such as accidental passing by or harmless shaking as unauthorized approach, resulting in numerous invalid alarms. This disrupts normal on-site operations and reduces the reliability of safety warnings, making accurate early warning of unauthorized approach to control cabinets difficult. To address this technical problem, we offer a proximity alarm system for the protection of automated electrical control cabinets. Summary of the Invention
[0003] The purpose of this invention is to provide a proximity alarm system for the protection of automated electrical control cabinets, so as to solve the problems mentioned in the background art.
[0004] To achieve the above objectives, a proximity alarm system for the protection of automated electrical control cabinets is provided, including: a data acquisition unit, a behavior analysis unit, a status management unit, and an alarm triggering unit;
[0005] The data acquisition unit continuously collects the real-time distance value between the personnel and the front of the electrical control cabinet at a preset sampling frequency, generates a distance time series, and transmits it to the behavior analysis unit.
[0006] The behavior analysis unit performs sliding window segmentation analysis on the distance time series. For each sliding window, it calculates the standard deviation of the distance values within the sliding window. When the standard deviation is less than a preset stability threshold and the window duration exceeds a first preset duration, the window is marked as a stable dwell window. Within the stable dwell window, the local fluctuation variance of the distance values is calculated. When the local fluctuation variance is less than a preset attitude variance threshold, the current state is marked as attitude-oriented feature; otherwise, it is marked as non-attitude-oriented feature. At the same time, the behavior analysis unit backtracks to a preset historical window before the start time of the stable dwell window and calculates the linear regression slope of the distance values with respect to time within the preset historical window. When the linear regression slope is negative and the absolute value is greater than a preset approach slope threshold, it is marked as approach trend feature.
[0007] The state management unit maintains a behavioral state machine that includes a moving state, a stable facing state, and a stable non-facing state, and switches and maintains the state according to the marking results. An alarm trigger signal is generated and output to the alarm trigger unit if and only if the duration of the stable facing state exceeds a second preset duration and there are similar trend characteristics before the stable facing state.
[0008] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0009] This invention replaces the traditional single distance threshold triggering mode by combining multi-window sliding detection, dwell time determination, orientation recognition, and movement trend analysis. It can accurately distinguish between unauthorized unauthorized approach and non-dangerous behaviors such as accidental passing by or stationary, harmless shaking, reducing false alarm rates, avoiding invalid alarms from interfering with normal on-site operations, and improving the accuracy and reliability of personnel approach alarms for electrical control cabinets. It adopts a dual-threshold hierarchical triggering mechanism and dynamically adjusts the judgment parameters based on personnel behavior characteristics, which can adapt to different industrial on-site operating environments and personnel activity patterns, enhancing the system's scenario adaptability and robustness. It accurately identifies and responds promptly to unauthorized approach behavior to electrical control cabinets, strengthens the safety protection capabilities of electrical equipment, effectively reduces safety hazards caused by unauthorized approach, and ensures the stable and safe operation of automated electrical control cabinets. Attached Figure Description
[0010] Figure 1 This is an overall block diagram of the present invention.
[0011] The meanings of the labels in the diagram are as follows:
[0012] 1. Data acquisition unit; 2. Behavior analysis unit; 3. Status management unit; 4. Alarm triggering unit. Detailed Implementation
[0013] 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.
[0014] This invention provides a proximity alarm system for the protection of automated electrical control cabinets. Please refer to [link / reference]. Figure 1 As shown, it includes a data acquisition unit 1, a behavior analysis unit 2, a status management unit 3, and an alarm triggering unit 4;
[0015] Data acquisition unit 1 continuously collects real-time distance values between personnel and the front of the electrical control cabinet at a preset sampling frequency, generates a distance time series, and transmits it to behavior analysis unit 2;
[0016] Behavior analysis unit 2 performs sliding window segmentation analysis on the distance time series. For each sliding window, it calculates the standard deviation of the distance values within the sliding window. When the standard deviation is less than a preset stability threshold and the window duration exceeds a first preset duration, the window is marked as a stable dwell window. Within the stable dwell window, the local fluctuation variance of the distance values is calculated. When the local fluctuation variance is less than a preset attitude variance threshold, the current state is marked as attitude-oriented feature; otherwise, it is marked as non-attitude-oriented feature. At the same time, behavior analysis unit 2 backtracks to a preset historical window before the start time of the stable dwell window and calculates the linear regression slope of the distance values against time within the preset historical window. When the linear regression slope is negative and the absolute value is greater than a preset approach slope threshold, it is marked as approach trend feature.
[0017] State management unit 3 maintains a behavioral state machine that includes a moving state, a stable facing state, and a stable non-facing state, and switches and maintains the state according to the marking results. An alarm trigger signal is generated and output to alarm trigger unit 4 if and only if the duration of the stable facing state exceeds the second preset duration and there are approaching trend characteristics before the stable facing state.
[0018] Data acquisition unit 1 employs a TOF lidar ranging sensor. This sensor is fixedly installed at the center of the front of the automated electrical control cabinet, with its detection axis perpendicular to the cabinet panel and facing the protected area in front of the cabinet. The sensor is pre-calibrated at the factory to have a 90° fan-shaped coverage area, completely covering a personnel approach range of 0.2m to 5m directly in front of the cabinet, meeting the distance monitoring requirements for safety protection of electrical control cabinets in industrial settings. The sensor is configured with a preset fixed sampling frequency (the system default is 10Hz, which can be flexibly configured between 5Hz and 20Hz according to the on-site response speed requirements). After the system is powered on and initialized, it immediately emits modulated laser pulse signals at this sampling frequency to the fan-shaped monitoring area in front of the cabinet. When the laser pulse encounters a person's limbs or body within the monitoring area, it returns to the lidar's receiving probe according to the optical reflection principle. The sensor integrates a time-to-digital converter (TDC) to measure the flight time of the laser pulse from emission to reception in real time. And based on the principle of the constancy of the speed of light (speed of light) The value is 3×10 8 m / s), through the core ranging formula The real-time distance between the personnel and the front of the electrical control cabinet was calculated. The calculation process is completed using a 32-bit floating-point arithmetic unit, with a distance resolution of up to 0.01m, meeting the requirements for close-range monitoring. The sensor has a built-in RTC real-time clock module that generates an absolute timestamp at each sampling moment and binds it to the corresponding distance value to ensure the integrity of data transmission. The encapsulated data frames are stored in a FIFO buffer queue in the order of sampling time, forming a continuous and equally spaced distance time sequence. When the buffer queue reaches the set length or when each frame is encapsulated, the data acquisition unit 1 transmits the distance time sequence to the behavior analysis unit 2 in real time through the industrial communication interface for subsequent personnel behavior analysis and status determination.
[0019] After receiving the distance-time series transmitted in real time by the data acquisition unit 1, the behavior analysis unit 2 initiates a streaming segmentation analysis process based on a sliding window mechanism. This process uses a first sliding window of fixed time length as the basic analysis unit, and performs overlapping sliding with a preset fixed step size. The specific implementation method is as follows:
[0020] During the system power-on initialization phase, the behavior parsing unit 2 completes the configuration of the first sliding window's operating parameters. The first sliding window adopts a fixed duration design, with a default configuration of 3 seconds, which can be adjusted between 2 and 5 seconds depending on the application scenario. The sliding step size is 1 second by default, which can be adjusted between 0.5 and 2 seconds. After completing the parameter configuration, the behavior parsing unit 2 constructs a standardized time axis benchmark based on the millisecond-level timestamps in the distance time series, mapping each distance value to the corresponding moment on the time axis, thus providing a unified time series benchmark for sliding window positioning. Behavior analysis unit 2 initiates the execution mechanism of the first sliding window sliding forward unidirectionally along the time axis. The sliding process follows the rules of sequential advancement from the beginning of the sequence to the latest sampling end, a fixed sliding step size, and a unique forward sliding direction. During the first slide, the starting timestamp of the first sliding window is aligned with the first sampling timestamp of the distance time series. The window ending timestamp is the starting timestamp plus a preset fixed window duration (for example, if the first sampling timestamp of the distance time series is 14:30:00.000 and the fixed window duration is 3 seconds, then the window ending timestamp is 14:30:03.000). After completing the time series positioning of the first window, behavior analysis unit 2 immediately performs a fully automatic data segment extraction operation within the window. Through a timestamp interval traversal algorithm, it completely traverses the entire distance time series, filters and extracts all real-time distance values whose timestamps are greater than or equal to the window starting timestamp and less than or equal to the window ending timestamp. These distance values are stored in a dedicated data buffer for the window while maintaining the original sampling time sequence, forming the original distance data segment corresponding to the current first sliding window. This data segment contains all valid sampling points within the window, completely preserving the original distance change characteristics, ensuring the accuracy and reliability of subsequent standard deviation calculations. After the data segment of the first window is extracted and preprocessed, the first sliding window immediately advances along the time axis according to a preset fixed sliding step. The starting timestamp of the new window is the sum of the starting timestamp of the previous window and the sliding step (e.g., if the starting timestamp of the previous window is 14:30:00.000 and the sliding step is 1 second, then the starting timestamp of the new window is 14:30:01.000 and the ending timestamp is 14:30:04.000). And so on, the first sliding window slides forward along the time axis until the window covers the last real-time sampling moment of the distance time series, realizing full and complete segmented analysis of the entire distance time series.
[0021] During continuous sliding, because the fixed duration of the first sliding window is always greater than the preset sliding step, adjacent first sliding windows will inevitably overlap in a fixed time dimension on the time axis. This is the core technical feature of this module for achieving continuous behavior without breakage recognition. The formula for calculating the overlap duration is: overlap duration = fixed duration of the first sliding window - sliding step. Taking the system default parameters as an example, the first sliding window duration is 3 seconds and the sliding step is 1 second, then the fixed overlap duration of adjacent windows is 2 seconds. To more intuitively illustrate the overlapping sliding and data segment extraction process, an example is given using the actual operating parameters of the system:
[0022] Data acquisition unit 1 is configured with a sampling frequency of 10Hz, meaning it stably acquires 10 sets of "timestamp + real-time distance value" data per second. The first sliding window has a fixed duration of 3 seconds, and a single window can cover 3 × 10 = 30 distance sampling points. The sliding step size is 1 second, and the time interval covered by the first sliding window is... Extract 30 distance values within this interval as the first data segment. After the window slides forward in 1-second increments, the second sliding window covers the time interval of... Similarly, 30 distance values are extracted as the second data segment. At this point, the first window and the second window are in... The data completely overlaps within a 2-second interval from 14:30:01.000 to 14:30:03.000, sharing 20 distance sampling points within this interval. The third sliding window covers this interval. , and the second window in The interval overlaps for 2 seconds, and all subsequent adjacent windows maintain a fixed overlap duration of 2 seconds, achieving seamless overlapping coverage of the distance time series.
[0023] After each sliding motion and extraction of a new data segment, the behavior analysis unit 2 immediately sends the data segment to the subsequent standard deviation calculation module to perform a preliminary judgment of the stable dwell window. At the same time, it caches the calculation results of the previous window for time series comparison and feature verification. Whenever the data acquisition unit 1 adds a new set of real-time distance data, the behavior analysis unit 2 immediately drives the first sliding window to complete one step sliding, extraction of new data segments and preprocessing, without waiting for the entire distance time series to be acquired. This meets the rapid response requirements of real-time alarm for the protection of electrical control cabinets in industrial sites. In addition, the behavior analysis unit 2 has a built-in window end adaptive boundary calibration mechanism. For the remaining data at the end of the distance time series that is less than a fixed window duration, it automatically fills the window by aligning the end timestamp and completing the effective data, ensuring that the end data can also be completely parsed and that there is no omission of end behavior judgment.
[0024] After identifying the stable dwell window, the behavior analysis unit 2 preprocesses the corresponding time interval, distance value data, and timestamp sequence to verify the window duration standardization, data integrity, and temporal continuity, removing invalid outlier data points. Then, it initiates the second-level sliding window analysis process. Specifically, the behavior analysis unit 2 first automatically completes the standardized adaptive calibration of key operating parameters of the second sliding window based on the actual effective duration of the identified stable dwell window. The system defaults to a stable dwell window duration of 3 seconds; therefore, the fixed duration of the second sliding window is configured to 1 second (it can be dynamically adjusted within the range of 0.5 to 2 seconds based on the actual duration of the stable dwell window, always ensuring that the second sliding window duration is 1 / 3 to 1 / 2 of the stable dwell window duration, thus ensuring sensitivity for local fluctuation detection while avoiding the introduction of high-frequency random noise due to an excessively small window). Simultaneously, to achieve full coverage within the stable dwell window and avoid missing local fluctuation features, the sliding step size of the second sliding window is configured to 0.5 seconds (the step size is smaller than the second sliding window). (To ensure a fixed time overlap between adjacent second sliding windows, enabling continuous and dense sampling of local fluctuations), after parameter calibration, the behavior analysis unit 2 uses the start timestamp of the stable dwell window as the initial sliding start point of the second sliding window and the end timestamp of the stable dwell window as the termination sliding boundary of the second sliding window. Through a temporal hard constraint mechanism, the entire sliding trajectory of the second sliding window is completely confined within the time interval of the stable dwell window, never exceeding its temporal range, thus avoiding the introduction of invalid data from non-dwelling periods that could interfere with the judgment results. The second sliding window slides from the start to the end of the stable dwell window at a preset fixed step size of 0.5 seconds. Upon reaching a valid dwell position, based on the timestamp matching rule, all valid distance values covered by the second sliding window at that dwell position are extracted, forming an independent local analysis data subset. For each local analysis data subset, the behavior analysis unit 2 uses a sample unbiased variance algorithm to calculate the local fluctuation variance. The calculation formula is: ,in This represents the local variance of the current second sliding window. This represents the number of distance value sampling points within the local window. For the first in the local window A distance value, The local fluctuation variance is calculated using the arithmetic mean of the distance values within the local window. A smaller local fluctuation variance value indicates less distance fluctuation and more stable body posture between the person and the control cabinet within that local time period. A larger value indicates more severe distance fluctuation. After the second sliding window completes all sliding traversals within the entire stable dwell window, the behavior analysis unit 2 collects a set of local fluctuation variance sequences corresponding one-to-one with the sliding positions. This sequence completely records the distance fluctuation characteristics of each local time period within the stable dwell window. To avoid judgment bias caused by accidental noise interference from a single local window, the arithmetic mean of this local fluctuation variance sequence is calculated. Multi-position variance averaging significantly improves the stability and anti-interference capability of posture judgment. The core mean calculation formula is: ,in To represent the final local variance of the entire stable residence window, This represents the total number of effective sliding positions of the second sliding window within the stable dwell window. For the first To more intuitively illustrate the local fluctuation variance at each sliding position, and to provide an example of the actual system operation scenario, the following is a case study:
[0025] Data acquisition unit 1 has a sampling frequency of 10Hz and a stable dwell window duration of 3 seconds, containing 30 effective distance sampling points. The second sliding window duration is 1 second (containing 10 sampling points) with a sliding step size of 0.5 seconds. Within the 3-second stable dwell window, 5 effective sliding positions are completed, and the local fluctuation variances are calculated as 0.0025, 0.0031, 0.0028, 0.0030, and 0.0026 respectively. After averaging, the final local fluctuation variance is 0.0025 + 0.0031 + 0.0028 + 0.0030 + 0.0026 ÷ 5 = 0.0028. After completing the final local fluctuation variance calculation, behavior analysis unit 2 immediately retrieves the system's preset attitude variance threshold and performs a high-precision floating-point comparison between the final local fluctuation variance and the attitude variance threshold. A standardized judgment rule is then executed: if the final local fluctuation variance... If the distance fluctuation is less than the preset attitude variance threshold, it indicates that the distance fluctuation of the personnel within the entire stable dwelling window is minimal, and the body always remains facing the control cabinet without significant rotation or large swaying. This is a high-risk approach and stay behavior that requires key warning for the protection of the control cabinet. At this time, the behavior analysis unit 2 immediately standardizes and marks the personnel behavior state corresponding to the current stable dwelling window, clearly marking it as the facing attitude feature. The attitude marking result, along with the start and end timestamps of the stable dwelling window, the final local fluctuation variance value, the details of each local variance, and the attitude judgment basis, are synchronously cached in the behavior feature storage area as feature inputs for the state management unit.
[0026] After obtaining the final local fluctuation variance of the stable dwell window, behavior parsing unit 2 initiates the attitude-oriented and non-attitude-oriented quantization determination process. The final local fluctuation variance is compared with the preset attitude variance threshold. Based on the comparison result, the current state is marked as attitude-oriented or non-attitude-oriented. The specific implementation is as follows:
[0027] Behavior analysis unit 2 retrieves a preset attitude variance threshold from the non-volatile configuration storage area through the system's internal parameter reading interface. This threshold is the system's sole quantitative standard for determining whether a person is experiencing non-frontal body swaying. The system's default standard value is 0.005, which can be flexibly configured and adjusted within the range of 0.003 to 0.01 according to different application scenarios, protection levels, on-site interference conditions, and personnel activity patterns. The physical meaning of this threshold is as follows:
[0028] When the final local fluctuation variance is less than the threshold, the person only exhibits permissible minor fluctuations such as breathing and slight limb movements, which is a stable state facing the control cabinet. When the final local fluctuation variance is greater than or equal to the threshold, the person exhibits non-frontal body swaying beyond the normal range of minor movements, which is not considered a high-risk posture requiring warning. The behavior analysis unit 2 performs a high-precision numerical comparison between the final local fluctuation variance and the preset posture variance threshold. When the comparison result shows that the final local fluctuation variance is greater than or equal to the preset posture variance threshold, the quantitative result directly corresponds to a clear on-site behavioral characteristic, indicating that the person... During the continuous dwell time corresponding to the stable dwell window, the personnel do not maintain a static state with their bodies continuously facing the electrical control cabinet. Instead, they exhibit obvious non-frontal body swaying behavior. Such behaviors include turning the personnel left and right, standing sideways, turning their backs to the electrical control cabinet, large-scale head and torso swings, small-scale swaying movements, and ranging fluctuations caused by large-scale arm movements. These are all non-target behaviors that do not pose a direct intention to operate the electrical control cabinet or pose a safety threat, and do not require triggering subsequent alarm logic. To more intuitively present this judgment scenario, a detailed explanation is provided based on actual system operating parameters and on-site cases:
[0029] Data acquisition unit 1 uses a sampling frequency of 10Hz, acquiring 10 sets of distance data per second. The stable dwell window duration is 3 seconds, containing 30 effective distance sampling points. The second sliding window duration is 1 second, with a sliding step size of 0.5 seconds. Within this stable dwell window, sliding sampling is completed at 5 positions. The calculated local fluctuation variances are 0.0068, 0.0075, 0.0071, 0.0069, and 0.0073, respectively. After arithmetic averaging, the final local fluctuation variance is 0.0071. The currently used preset attitude variance threshold is 0.005, therefore 0.0071 is greater than or equal to 0.00. 5. The non-facing posture judgment condition is met. The actual scene corresponding to this numerical result is that when the staff is stably standing in front of the electrical control cabinet, they continuously perform actions such as turning left and right to check the surrounding equipment, turning to the side to adjust the tooling, and communicating with their back to the electrical control cabinet. This causes the distance value collected by the lidar to fluctuate significantly, and the local fluctuation variance exceeds the normal range allowed by the threshold. After completing the numerical comparison and the physical meaning judgment of the behavioral characteristics, the behavior analysis unit 2 immediately performs the behavior status marking operation according to the system's unified standardized feature coding rules, and clearly, uniquely and unambiguously marks the personnel behavior status corresponding to the current stable standing window as a non-facing posture feature.
[0030] After the behavior analysis unit 2 marks the stable residence window, it initiates the stable residence pre-behavior backtracking analysis process. It backtracks to a preset historical window before the start time of the stable residence window, calculates the linear regression slope of the distance value with respect to time within the window, and provides a quantitative basis for subsequent approach trend feature marking. The specific implementation method is as follows:
[0031] Behavior parsing unit 2 first retrieves the core timing parameters of the marked stable dwell window from the real-time behavior buffer, including the millisecond-level timestamp of the start of the stable dwell window. End timestamp Window validity period ,Will As the sole time-series anchor point, the backtracking rules are executed, and the system has a built-in configurable preset history window with a fixed duration. (The default configuration is 5 seconds), and the time interval of the preset history window is defined accordingly:
[0032] The end timestamp of the preset history window and the start timestamp of the stable dwell window. Completely overlapping, the default start timestamp of the history window is This forms a fixed-duration historical analysis interval, which is the preset historical window defined by the system. For example, if the start timestamp of the stable dwell window is 14:30:05:000 milliseconds and the preset historical window duration is 5 seconds, then the time interval of the preset historical window is from 14:30:00:000 milliseconds to 14:30:05:000 milliseconds. All behavioral data before the dwell period is locked. After the preset historical window time sequence is defined, the behavior analysis unit 2 starts the time-series matching data extraction mechanism, traversing the original distance time series transmitted by the data acquisition unit 1. It extracts all valid distance values within the window according to the filtering rule that the timestamp is greater than or equal to the start timestamp of the preset historical window and less than or equal to the end timestamp of the preset historical window. Simultaneously, it reorders the extracted distance values according to the original sampling time sequence, forming a historical distance data sequence. ,in The number of valid sampling points within the preset historical window is determined by the preset sampling frequency of the data acquisition unit. During the extraction process, data purification and preprocessing are started simultaneously. The behavior parsing unit 2 converts the absolute timestamps of the preset historical window into relative time series, taking the start time of the preset historical window as the time origin 0, and converts the absolute timestamp of each sampling point into a time value relative to the origin. (Unit: seconds), constructed based on relative time Independent variable, distance value The dependent variable is a univariate linear fitting model, and its mathematical expression is: ,in The slope of the linear regression (the core calculation result, directly reflecting the direction and rate of change of distance over time) A negative value indicates that the distance decreases over time, and personnel are moving closer to the electrical control cabinet. A positive value indicates that the distance increases over time and personnel move further away from the control cabinet. The larger the absolute value, the faster the speed of approaching / moving away. To obtain the optimal fitted line and accurately reflect the distance change trend, behavioral analysis unit 2 uses the least squares method to perform the fitting calculation, which is the linear fitting intercept. The specific calculation steps are as follows:
[0033] Calculate the mean of the relative time series. Mean of distance series from history Calculate the sum of squares of the deviations from the mean of the independent variable. It is used to measure the dispersion of a time series, and calculates the sum of the products of the deviations of the independent and dependent variables from the mean. This is used to measure the linear correlation between time and distance; the fourth step involves using the core formula. Calculate the linear regression slope To illustrate the process more intuitively, let's take a real-world example: the data acquisition unit has a sampling frequency of 10Hz, a preset historical window duration of 5 seconds, n=50 sampling points, a relative time t ranging from 0 seconds to 5 seconds, and a historical distance sequence gradually decreasing from an initial 3.25m to 1.12m. The calculated distance is... The final linear regression slope After the calculation is completed, behavior analysis unit 2 will calculate the linear regression slope. The system caches all data, including preset historical window time series parameters, historical distance sequences, fitting residuals, and calculation timestamps, into the behavioral feature library and writes them to the system operation log.
[0034] Behavioral analysis unit 2 calculates the linear regression slope Then, initiate the quantitative judgment process for approaching trend characteristics to determine... Is it less than 0 and If the absolute value of the slope is greater than a preset approach slope threshold, and both conditions are met simultaneously, it is marked as an approach trend feature. The specific implementation method is as follows:
[0035] Behavior analysis unit 2 retrieves the linear regression slope obtained from the previous step using the least squares fitting method from the internal floating-point calculation cache. ,when When the value is negative, the distance continuously decreases over time, and the representative keeps moving closer to the front of the control cabinet. When the value is positive, the distance increases continuously over time, indicating that the personnel are moving further away from the control cabinet. As the slope approaches zero, it indicates that the person remains stationary with no significant movement, only experiencing physiological swaying, while the absolute value of the slope... This directly corresponds to the speed at which people move. A larger value indicates a greater range of distance change per unit time, and a faster rate of active movement by the person. The smaller the value, the slower the movement, indicating only a slight, unintentional shuffling. Simultaneously, the behavior analysis unit 2 retrieves a preset approach slope threshold from the non-volatile Flash configuration memory via the system's internal industrial-grade parameter communication bus. System default standard threshold =0.10m / s, which can be flexibly configured within the range of 0.05m / s to 0.20m / s according to different on-site protection levels, normal personnel movement speed, and detection sensitivity requirements. Only when the personnel approach speed exceeds the minimum effective movement rate corresponding to this threshold is it considered a valid approach behavior with a clear intention to actively approach the control cabinet. Slow drifting, micro-movement in place, and passive movement below this speed are judged as invalid behaviors without a clear approach intention. This filters out weak movement interference without safety threats and avoids invalid feature marking. After completing the retrieval of the linear regression slope and approach slope threshold, behavior analysis unit 2 starts dual-condition rigid logic and judgment. The first condition is the slope sign orientation judgment: the positive or negative attribute of the linear regression slope k is determined by the built-in numerical sign detection algorithm. Whether it is less than 0, this condition is specifically used to lock the movement direction of "continuously shortening distance and moving closer to the control cabinet", directly excluding non-target behaviors such as personnel moving away, remaining stationary, and drifting without direction; the second condition is the slope absolute value rate threshold comparison: the absolute value of the linear regression slope is calculated by the hardware-level absolute value calculation module. Then Approaching the preset slope threshold Perform high-precision floating-point numerical comparison to determine Is it greater than Only when and Only when both conditions are met can the behavior analysis unit 2 determine that the distance between the person and the front of the electrical control cabinet shows a shortening trend during the preset historical window period before entering a stable dwell state. This means the person actively and intentionally moves closer to the electrical control cabinet and eventually enters a stable dwell state in front of it. This is a high-risk pre-emptive behavior that requires close attention for electrical control cabinet safety protection. To more intuitively and clearly present the correspondence between this judgment logic and real industrial site behavior, a detailed example is provided using system default parameters and actual scenarios: The data acquisition unit uses a 10Hz sampling frequency, the preset historical window duration is 5 seconds, and the linear regression slope is obtained through complete fitting calculation using the least squares method. First, the first condition check is executed: The direction requirement of "moving closer to the electrical control cabinet" is met; then the second condition is determined: the absolute value of the slope is calculated. Preset near slope threshold This satisfies the "active and rapid approach" speed requirement, fully meeting both conditions. The corresponding real-world scenario is a worker actively walking towards the control cabinet from a distance at a normal walking speed of approximately 0.43 m / s, and entering a stable, stationary state upon reaching the cabinet area, demonstrating a clear intention to approach. A typical counterexample is provided to further illustrate this: if the calculated linear regression slope... The sign is negative, which satisfies the direction condition, but the absolute value is negative. If the rate condition is not met, and the corresponding personnel only move slowly and slightly in place without any intention to approach, they will not be marked; if the slope... If the value is positive and does not meet the direction condition, the corresponding personnel should continue to move away from the control cabinet and should not be marked; if the slope is... If the value approaches 0, neither of the two conditions is met, and the corresponding personnel remain stationary and are not marked. When the dual conditions are met and the result is satisfactory, the behavior analysis unit 2 immediately performs the approach trend feature standardization marking operation. After marking is completed, the behavior analysis unit 2 synchronously stores the approach trend feature mark in the real-time behavior feature cache and the system permanent operation log. On the one hand, it is transmitted to the state management unit in real time through the low-latency industrial communication interface for the storage and retrieval of pre-features when the behavior state machine switches. On the other hand, it is permanently written to the local storage medium.
[0036] The behavioral state machine maintained internally by the state management unit 3 defines and solidifies three mutually exclusive states: moving state, stable oriented state, and stable non-oriented state. The system can only be in one of these states at any given time. The specific implementation method is as follows:
[0037] During the system power-on initialization phase, State Management Unit 3 first completes the basic configuration and resource initialization of the behavioral state machine, setting the initial default state of the state machine to the moving state. After initialization, State Management Unit 3 obtains the standardized behavioral feature data packet pushed in real time by Behavior Parsing Unit 2 through the real-time communication interface. The data packet includes the stable dwell window recognition result (present / absent), posture-oriented feature markers, non-posture-oriented feature markers, proximity trend feature markers, and a unified millisecond-level timestamp, ensuring that the state control sequence is completely aligned with the actual behavior sequence of personnel. State Management Unit 3 follows the preset rigid state switching and maintenance rules, based on... The behavior state machine is driven to perform state transition based on the real-time analysis of feature results. When the judgment result pushed by the behavior analysis unit 2 is that no valid stable dwell window is identified, regardless of whether the current behavior state machine is in the moving state, stable facing state, or stable non-facing state, the state management unit 3 immediately performs an unconditional forced state switch, directly switching the behavior state machine to the moving state. At the same time, the duration timer of the current state is immediately reset, and the duration of the moving state is re-measured from 0 milliseconds to ensure that once the personnel leave the stable dwell area and resume moving behavior, the system immediately returns to the basic standby state, avoiding misjudgment caused by invalid state lingering.
[0038] When the judgment result pushed by the behavior analysis unit 2 is that a valid stable dwell window has been successfully identified and a clear orientation feature mark is carried simultaneously, the state management unit 3 performs a high-risk target state switch, switching the behavior state machine from the current state (moving state or stable non-facing state) to a stable facing state. This state represents that the person is stably standing in front of the control cabinet and their body is continuously facing the cabinet. This is a high-risk violation behavior state that the system focuses on monitoring. The timer is immediately reset and the cumulative measurement of the duration of the stable facing state is started at the moment the switch is completed. At the same time, the pre-feature backtracking retrieval logic is triggered to traverse all historical feature data pushed by the behavior analysis unit 2 before the moment of this stable facing state switch, and check whether there is a close trend feature mark. If a valid close trend feature mark is found, the boolean flag bit in the pre-feature dedicated storage cache is set to True. If no mark is found, it is set to False. This flag bit will be persistently stored until the end of this stable facing state.
[0039] When the judgment result pushed by the behavior analysis unit 2 indicates that a valid stable dwell window has been successfully identified but is simultaneously carrying a clear non-oriented posture feature marker, the state management unit 3 performs a risk-free state switch, switching the behavior state machine to a stable non-oriented state. This state represents that although the person is stably staying in front of the control cabinet, there is non-oriented behavior, and there is no need to enter the alarm warning process. At the same time, the timer is reset and the duration measurement of the stable non-oriented state is started. Since this state is not an alarm target state, there is no need to perform the retrieval and storage operation of the trend feature. After the state switch is completed, if the behavior analysis unit 2 continues to push the same stable dwell identification result and posture feature marker, the state management unit 3 executes the state maintenance logic to maintain the current behavior state unchanged until a new feature result triggers a new round of state switch. To more intuitively present the entire process operation logic, an example is given in the context of an actual industrial scene:
[0040] The system initially enters a moving state, and the timer is reset to zero. At this time, behavior analysis unit 2 pushes "unidentified stable dwell window," and the state machine remains in the moving state, with the duration accumulating from 0 milliseconds to 3200 milliseconds (3.2 seconds). Behavior analysis unit 2 then pushes "identified stable dwell window + facing posture feature," and state management unit 3 immediately switches the state machine from the moving state to the stable facing state. The timer is reset to zero and begins measuring the duration of the stable facing state. Simultaneously, it backtracks and retrieves previous features, discovering that behavior analysis unit 2 had previously pushed "approaching trend feature marker," so it sets the boolean flag in the previous feature storage cache to True. For the next 3 seconds, behavior analysis unit 2 continuously pushes the same feature, and the state machine remains in the stable facing state, with the duration accumulating sequentially to 1800 milliseconds (1.8 seconds), 3500 milliseconds (3.5 seconds), and 5 seconds. 100 milliseconds (5.1 seconds); if the behavior analysis unit 2 pushes "identified stable dwell window + non-facing posture feature" at a certain moment, the state machine immediately switches to the stable non-facing state, the timer is cleared and re-measured; if the behavior analysis unit 2 subsequently pushes "unidentified stable dwell window", the state machine unconditionally switches back to the moving state. The entire state switching response delay is less than 10 milliseconds, the duration recording has no errors, and the storage of the previous feature marks is without loss or error. In addition, the state management unit 3 has a built-in state mutual exclusion hard protection mechanism, which prohibits the simultaneous activation of the moving state, stable facing state, and stable non-facing state through logic gate circuits and software dual constraints, ensuring the uniqueness of the state. At the same time, it is equipped with an automatic timing calibration mechanism, which uses the feature timestamp of the behavior analysis unit 2 as a reference to automatically correct the state switching time and timing start point, avoiding timing deviations caused by clock drift.
[0041] The specific implementation method is as follows:
[0042] The state management unit 3, relying on the real-time clock module, accumulates the duration of the current stable orientation state with minimum measurement accuracy. This duration is reset to zero and measurement begins the instant the behavioral state machine switches to the stable orientation state. The duration value is refreshed every 10 milliseconds and synchronously stored in the real-time state buffer. At the same time, it retrieves the second preset duration parameter from the system's non-volatile configuration memory. This parameter is a fixed duration preset by the system according to the electrical control cabinet safety protection specifications and industrial site management requirements (the default configuration is 3 seconds, which can be flexibly adjusted between 2 and 5 seconds depending on the protection level). It is the core time threshold for determining whether personnel are engaging in continuous unauthorized approach behavior, and initiates the first condition real-time judgment:
[0043] The real-time cumulative duration of the current stable facing state is compared with a second preset duration with high precision. It continuously checks whether the current duration exceeds the second preset duration. Only when the duration exceeds this threshold does it indicate that the personnel are not momentarily present, but are continuously and stably stationed in front of the control cabinet, posing a potential operational or destructive risk. If the duration does not reach the second preset duration, regardless of other conditions, no alarm-related operations are triggered, and the stable facing state is maintained while the duration is continuously monitored. Simultaneously with the first condition determination, the state management unit 3 uses an internal dedicated data addressing instruction to read, without delay or error, the Boolean flag bit of the approach trend characteristic, which was previously stored in the dedicated front-end feature storage cache before entering the current stable facing state. This flag bit has only two states: True (approach trend characteristic exists) and False (approach trend characteristic does not exist). It is the sole basis for distinguishing between personnel "actively approaching and then staying" and "directly staying in place or occasional stopping." The second condition rigid determination is then initiated.
[0044] The system determines whether the Boolean flag is True. Only when the flag is True does it indicate that the personnel had a clear and active tendency to approach the control cabinet before entering the stable facing state, which is considered an intentional and unauthorized approach. If the flag is False, it is determined that the personnel are stationary and have no intention to approach, thus failing to meet the alarm triggering prerequisite. The state management unit 3 adopts a rigid judgment rule with hardware-level logic and gate circuits + software dual verification. The alarm triggering signal generation process will only be initiated when both the first condition "the duration of the stable facing state exceeds the second preset duration" and the second condition "there is an approach trend feature flag before entering the stable facing state" are fully met. If either condition is not met, the system maintains the current state and does not generate any alarm signal, continuously monitoring until the state changes. To more intuitively present this judgment logic, an example is given using actual system operating parameters:
[0045] The system defaults to a second preset duration of 3 seconds. After the behavior state machine switches to a stable facing state, the real-time duration accumulates sequentially to 1.2 seconds and 2.8 seconds, neither of which exceeds 3 seconds, so the first condition is not met and no alarm is triggered. When the duration accumulates to 5.2 seconds, it exceeds 3 seconds, so the first condition is met, and the proximity trend flag in the pre-feature storage buffer is True, so the second condition is met. Both conditions are met simultaneously, and an alarm signal is immediately generated. If the duration reaches 4.5 seconds (meeting the first condition), but the pre-feature flag is False (not meeting the second condition), no alarm signal is generated. After both conditions are met simultaneously, the state management unit 3 immediately follows the instructions of the industrial control system. The standardized protocol generates the final alarm trigger signal, which is a high-level active digital trigger signal. After the signal is generated, the status management unit 3 outputs the alarm trigger signal to the alarm trigger unit 4 through the communication interface, driving the alarm trigger unit 4 to start the audible and visual alarm. At the same time, the status management unit 3 writes the entire process information of this alarm trigger to the system's permanent alarm log in real time. After an alarm trigger signal is output, the signal output port is locked until the behavior state machine switches to a stable orientation state before the lock is released, to avoid the same violation behavior triggering the alarm repeatedly. It also has a signal output fault self-check function. If the alarm trigger signal output failure is detected, a local fault alarm is immediately generated to ensure the alarm link is unobstructed.
[0046] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A proximity alarm system for the protection of automated electrical control cabinets, characterized in that, It includes a data acquisition unit (1), a behavior analysis unit (2), a status management unit (3), and an alarm triggering unit (4); The data acquisition unit (1) continuously collects the real-time distance value between the personnel and the front of the electrical control cabinet at a preset sampling frequency, generates a distance time series, and transmits it to the behavior analysis unit (2). The behavior analysis unit (2) performs sliding window segmentation analysis on the distance time series. For each sliding window, it calculates the standard deviation of the distance value within the sliding window. When the standard deviation is less than the preset stability threshold and the window duration exceeds the first preset duration, the window is marked as a stable dwelling window. The local fluctuation variance of the distance value is calculated within the stable dwelling window. When the local fluctuation variance is less than the preset attitude variance threshold, the current state is marked as attitude-oriented feature. Otherwise, it is marked as non-attitude-oriented feature. At the same time, the behavior analysis unit (2) backtracks to a preset historical window before the start time of the stable dwelling window and calculates the linear regression slope of the distance value with respect to time within the preset historical window. When the linear regression slope is negative and the absolute value is greater than the preset approach slope threshold, it is marked as approach trend feature. When the behavior parsing unit (2) performs sliding window segmentation parsing on the distance time series, it adopts a first sliding window with a fixed time length and slides the first sliding window forward along the time axis according to the preset sliding step size. After each slide, all distance values falling into the time range of the new first sliding window are treated as a data segment for subsequent parsing, and the data segments corresponding to adjacent first sliding windows have some overlap in time. Within the identified stable dwell window, the behavior analysis unit (2) further adopts a second sliding window with a time length shorter than the stable dwell window. The second sliding window slides within the stable dwell window. For each dwell position of the second sliding window within the stable dwell window, the variance of the distance value covered by the second sliding window at the dwell position is calculated to obtain multiple local fluctuation variances. The average value of the local fluctuation variances is calculated as the final local fluctuation variance representing the stable dwell window. If the final local fluctuation variance is less than the preset attitude variance threshold, the behavior state corresponding to the current stable dwell window is marked as attitude-oriented feature. When the behavior analysis unit (2) marks a stable dwell window, it traces back a continuous time period before the start time of the stable dwell window, defines the continuous time period as the preset history window, extracts all distance values sorted by time within the preset history window, fits the linear trend of distance value change with time using the least squares method, and calculates the linear regression slope describing the speed and direction of distance change with time. The state management unit (3) maintains a behavioral state machine that includes a moving state, a stable facing state, and a stable non-facing state, and switches and maintains the state according to the marking results. When and only when the duration of the stable facing state exceeds the second preset duration and there is a trend feature before the stable facing state, an alarm trigger signal is generated and output to the alarm trigger unit (4). The behavioral state machine maintained by the state management unit (3) includes three states: moving state, stable state-oriented state, and stable non-state-oriented state. The behavior parsing unit (2) transmits the marked pose-oriented features, non-pose-oriented features, and proximity trend features to the state management unit (3). The state management unit (3) drives the behavior state machine to switch and maintain states based on the received marking results, specifically: If no stable dwell window is identified, the behavior state machine switches to the moving state. When a stable dwell window is identified and a facing posture feature marker is received, the behavior state machine switches to the stable facing state. When a stable dwell window is identified but a non-facing posture feature marker is received, the behavior state machine switches to the stable non-facing state. During the state switching and holding process, the state management unit (3) records the duration of the current state and stores whether there is an approach trend feature marker sent by the behavior parsing unit (2) before entering the current stable facing state. The state management unit (3) continuously checks whether two conditions are met simultaneously when the behavioral state machine is in a stable state-oriented state, wherein: The first condition is whether the duration of the current stable orientation state exceeds the second preset duration. The second condition is whether a near trend feature marker is stored before entering this stable orientation state. If and only if both conditions are met, the state management unit (3) generates the final alarm trigger signal and outputs the alarm trigger signal to the alarm trigger unit (4).
2. The proximity alarm system for protecting automated electrical control cabinets according to claim 1, characterized in that: The data acquisition unit (1) uses a laser radar ranging sensor to continuously emit lasers to the fan-shaped area in front of the electrical control cabinet at a preset sampling frequency and receive its reflected signals. It calculates the real-time distance between the personnel and the front of the electrical control cabinet by measuring the laser flight time, and encapsulates each real-time distance value with the corresponding timestamp to generate and arrange them in order to form the distance time sequence, and transmits it to the behavior analysis unit (2).
3. The proximity alarm system for protecting automated electrical control cabinets according to claim 1, characterized in that: For each data segment corresponding to the first sliding window, the behavior parsing unit (2) calculates the standard deviation of all distance values in the data segment and compares the standard deviation with a preset stability threshold. At the same time, it determines whether the duration of the first sliding window exceeds the first preset duration. When the standard deviation is less than the stability threshold and the duration of the first sliding window exceeds the first preset duration, the entire time period covered by the current first sliding window is marked as a stable dwelling window, which is used to identify the time period when the person is relatively stationary.
4. The proximity alarm system for protecting automated electrical control cabinets according to claim 1, characterized in that: If the final local fluctuation variance calculated within the stable dwell window is greater than or equal to the preset attitude variance threshold, it indicates that the person has non-frontal body swaying during the stay. At this time, the behavior analysis unit (2) marks the behavior state corresponding to the current stable dwell window as a non-frontal attitude feature.
5. The proximity alarm system for protecting automated electrical control cabinets according to claim 1, characterized in that: The behavior analysis unit (2) determines the value of the linear regression slope. If the linear regression slope is negative and the absolute value is greater than the preset approach slope threshold, it indicates that the distance between the personnel and the front of the electrical control cabinet is shortening before entering a stable dwelling state. At this time, the behavior analysis unit (2) marks this situation as an approach trend feature.