A method and device for real-time status monitoring of an electromagnetic lock supporting three-wire control.
By employing a three-wire controlled electromagnetic lock real-time status monitoring method, and utilizing spectrum analysis and interference feature mapping models, the problem of weak anti-interference capability in electromagnetic lock status monitoring is solved. This enables real-time and accurate monitoring and health management of the electromagnetic lock status, thereby improving the security and operational efficiency of the access control system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU KAISHENG ELECTRONIC TECH CO LTD
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-02
AI Technical Summary
Existing electromagnetic lock status monitoring solutions have weak anti-interference capabilities and struggle to distinguish between signal fluctuations that are temporary noise interference or actual changes in physical state, leading to frequent false alarms and missed alarms, which affects the rapid response capability of the access control system.
A real-time status monitoring method for electromagnetic locks using three-wire control is proposed. By acquiring current waveform segments to construct the original signal sequence, and combining spectrum analysis and Hilbert transform, transient oscillation and steady-state noise characteristics are identified. By utilizing interference feature mapping model and frequency domain masking filtering mechanism, interference is accurately located and the signal is purified.
It significantly improves the identification and reliability of electromagnetic lock status monitoring, reduces the false alarm rate, realizes real-time and accurate monitoring of electromagnetic lock status and full life cycle health management, and improves the security control level and operation and maintenance efficiency of access control system.
Smart Images

Figure CN122137482A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of access control and security monitoring technology, and in particular to a method and device for real-time status monitoring of an electromagnetic lock that supports three-wire control. Background Technology
[0002] Currently, as the core execution component of access control systems, the real-time and accurate status monitoring of electromagnetic locks, as well as their full lifecycle health management capabilities, have become core requirements for the intelligent upgrading of access control systems. The intelligent lock control board, as the control core of the electromagnetic lock, directly determines the security control level and operational efficiency of the access control system through its integrated monitoring capabilities.
[0003] In existing technologies, most electromagnetic lock status monitoring solutions rely on a single dry contact signal or simple high / low level judgment, and are mostly independent monitoring modules, making efficient integration with smart lock control boards difficult. While this approach has the advantage of simple structure, it reveals significant shortcomings in practical engineering applications. Minor misalignments of internal mechanical components, door frame deformation, installation errors, wear and loosening after long-term operation, and strong electromagnetic interference in the external environment can all cause unstable jitter or occasional abnormal jumps in the feedback signal. Existing methods lack the ability to deeply analyze the dynamic characteristics of the signal, making it difficult to distinguish whether these signal fluctuations are transient noise interference or real changes in physical state. This not only fails to achieve fault prediction and health management but also leads to frequent false alarms and missed alarms, severely weakening the system's ability to respond quickly to abnormal situations.
[0004] Existing technologies suffer from weak anti-interference capabilities in condition monitoring. Summary of the Invention
[0005] This invention provides a method and apparatus for real-time status monitoring of an electromagnetic lock that supports three-wire control, in order to solve the problem of weak anti-interference capability of status monitoring in the prior art.
[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for real-time status monitoring of an electromagnetic lock supporting three-wire control, comprising: The dry contact status data stream of the electromagnetic lock is acquired and the current waveform segments of the corresponding preset time length are extracted and fused to form the original signal sequence. Spectral analysis was performed on the original signal sequence to obtain the transient oscillation frequency distribution characteristics and the steady-state noise frequency distribution characteristics; The transient oscillation amplitude value is calculated based on the transient oscillation frequency distribution characteristics. If the transient oscillation amplitude value is greater than the preset amplitude threshold, the original signal interval corresponding to the original signal sequence is determined to be a dynamic transition process. Multi-stage feature analysis is performed on the dynamic transition process to obtain the start point and end point of the multi-stage features. Based on the start and end points of the multi-stage features, the steady-state noise frequency distribution features are decomposed to obtain the time-frequency domain sub-band energy distribution of the noise; If the energy distribution of the time-frequency domain sub-band fluctuates continuously within a preset switching frequency range, then the energy distribution of the time-frequency domain sub-band is determined to be a fuzzy intermediate state. The original signal sequence corresponding to the fuzzy intermediate state is input into a preset interference feature mapping model to obtain the interference type of the fuzzy intermediate state. The interference type is compared with a preset library of transient interference spectrum patterns. If they match, a frequency domain mask matrix is generated, and the spectrum data of the original signal sequence is corrected and reconstructed to obtain the purified state signal. The purified status signal is subjected to time-frequency domain feature extraction to obtain real-time spectrum data. The real-time spectrum data is compared with the spectrum information of normal locking and unlocking actions to output the real-time status monitoring result of the electromagnetic lock.
[0007] Secondly, the present invention provides a real-time status monitoring device for an electromagnetic lock that supports three-wire control, comprising: The signal acquisition module acquires the dry contact status data stream of the electromagnetic lock and extracts the current waveform segments of the corresponding preset time length, and fuses them to form the original signal sequence. The spectrum analysis module is used to perform spectrum analysis on the original signal sequence to obtain the transient oscillation frequency distribution characteristics and the steady-state noise frequency distribution characteristics; The dynamic transition identification module is used to calculate the transient oscillation amplitude value based on the transient oscillation frequency distribution characteristics. If the transient oscillation amplitude value is greater than a preset amplitude threshold, the original signal interval corresponding to the original signal sequence is determined to be a dynamic transition process. Multi-stage feature analysis is performed on the dynamic transition process to obtain the start point and end point of the multi-stage features. The noise decomposition module is used to decompose the steady-state noise frequency distribution characteristics based on the start and end points of the multi-stage characteristics to obtain the time-frequency domain sub-band energy distribution of the noise. The fuzzy intermediate state determination module is used to determine that the time-frequency domain sub-band energy distribution is a fuzzy intermediate state if the energy distribution of the time-frequency domain sub-band fluctuates continuously within a preset switching frequency range, and inputs the original signal sequence corresponding to the fuzzy intermediate state into a preset interference feature mapping model to obtain the interference type of the fuzzy intermediate state. An interference filtering module is used to compare the interference type with a preset short-term interference spectrum pattern library. If they match, a frequency domain mask matrix is generated, and the spectrum data of the original signal sequence is corrected and reconstructed to obtain the purified state signal. The status output module is used to extract time-frequency domain features from the purified status signal to obtain real-time spectrum data, compare the real-time spectrum data with the spectrum information of normal locking and unlocking actions, and output the real-time status monitoring result of the electromagnetic lock.
[0008] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention constructs the original signal sequence by fusing current waveform segments and dry node state data streams, and combines spectral analysis to separate transient oscillations and steady-state noise characteristics, effectively solving the problem of insufficient feature dimensions caused by existing technologies relying on single signals or simple level judgments. By using Hilbert transform to locate the boundary of the dynamic transition process, it accurately captures the multi-stage evolution law of electromagnetic lock action, and can distinguish physical state changes such as mechanical misalignment and installation errors from signal interference, significantly improving the identification and reliability of state monitoring, and avoiding the risk of missed alarms due to incomplete feature extraction.
[0009] (2) This invention constructs an anti-interference closed-loop structure by identifying fuzzy intermediate states and introducing an interference feature mapping model and a frequency domain masking filtering mechanism. Compared with the shortcomings of traditional methods that lack targeted interference processing, this invention can accurately locate the spectral characteristics of various interferences such as strong electromagnetic interference and signal jitter, and achieve directional filtering of interference signals through frequency domain weighted suppression. While preserving effective state characteristics, it purifies signal quality, significantly reduces the false alarm rate caused by external environment and equipment aging, and improves the anti-interference capability of the monitoring system under complex working conditions.
[0010] (3) This invention extracts multidimensional spectral fingerprint data through short-time Fourier transform and realizes state recognition based on feature space clustering and probability confidence judgment, abandoning the rigid mode of traditional single threshold judgment. By quantitatively comparing real-time features with normal action spectral feature clusters, it can accurately output the locking and unlocking status and the monitoring results with timestamps. This not only realizes the real-time and accurate monitoring of the electromagnetic lock status, but also provides data support for the health management of the entire life cycle of the equipment, improves the security control level and operation and maintenance efficiency of the access control system, and adapts to the needs of intelligent upgrade. Attached Figure Description
[0011] Figure 1 This is a schematic flowchart of the real-time status monitoring method for an electromagnetic lock supporting three-wire control provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the electromagnetic lock real-time status monitoring device supporting three-wire control provided in the second embodiment of the present invention. Detailed Implementation
[0012] 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.
[0013] Reference Figure 1 The first embodiment of the present invention provides a real-time status monitoring method for an electromagnetic lock supporting three-wire control, comprising the following steps: S11, acquire the dry contact status data stream of the electromagnetic lock operation and extract the current waveform segment with the corresponding preset time length, and fuse them to form the original signal sequence; S12, Perform spectral analysis on the original signal sequence to obtain the transient oscillation frequency distribution characteristics and the steady-state noise frequency distribution characteristics; S13, calculate the transient oscillation amplitude value based on the transient oscillation frequency distribution characteristics. If the transient oscillation amplitude value is greater than the preset amplitude threshold, determine that the original signal interval corresponding to the original signal sequence is a dynamic transition process. Perform multi-stage feature analysis on the dynamic transition process to obtain the start point and end point of the multi-stage features. S14. Based on the starting and ending points of the multi-stage features, decompose the steady-state noise frequency distribution features to obtain the time-frequency domain sub-band energy distribution of the noise. S15, if the energy distribution of the time-frequency domain sub-band fluctuates continuously within a preset switching frequency range, then the energy distribution of the time-frequency domain sub-band is determined to be a fuzzy intermediate state, and the original signal sequence corresponding to the fuzzy intermediate state is input into a preset interference feature mapping model to obtain the interference type of the fuzzy intermediate state; S16, compare the interference type with the preset short-term interference spectrum pattern library. If they match, generate a frequency domain mask matrix and correct and reconstruct the spectrum data of the original signal sequence to obtain the purified state signal. S17, extract time-frequency domain features from the purified status signal to obtain real-time spectrum data, compare the real-time spectrum data with the spectrum information of normal locking and unlocking actions, and output the real-time status monitoring result of the electromagnetic lock.
[0014] In step S11, the dry contact state data stream of the electromagnetic lock operation is acquired and current waveform segments of corresponding preset time lengths are extracted and fused to form the original signal sequence, including: The real-time analog voltage of the electromagnetic lock power supply circuit is collected by a voltage sensor, and the real-time analog current of the power supply circuit is collected by a current sensor. The real-time analog voltage is compared with a preset voltage threshold one by one. When the real-time analog voltage is greater than or equal to the preset voltage threshold, a high-level signal is output. When the real-time analog voltage is less than the preset voltage threshold, a low-level signal is output. The high-level signal and the low-level signal are arranged in chronological order to obtain a binary form dry node status data stream. Identify the transition moments in the dry node state data stream, and determine that the level change direction corresponding to the transition moment is a rising edge and a falling edge; Centered on the transition moment, a current data segment of a preset time length is extracted from the real-time analog current quantity as the current waveform segment corresponding to the transition moment; Align the time axis of the current waveform segment with the time axis of the dry junction state data stream, and associate and integrate the current amplitude data of the current waveform segment with the corresponding dry junction level state data in chronological order to obtain the original signal sequence.
[0015] In one implementation, this embodiment uses a high-precision Hall voltage sensor and a closed-loop current sensor to construct a signal acquisition link. The sensor sampling frequency is strictly set to 1kHz, meaning that a set of analog voltage and current data is acquired every 1 millisecond. The analog signals output by the sensors are converted into digital signals by a 16-bit ADC converter, ensuring that the voltage measurement accuracy reaches ±0.5% and the current measurement accuracy reaches ±1%, meeting the signal fidelity requirements of subsequent spectrum analysis.
[0016] It should be noted that the preset voltage threshold value needs to be determined in conjunction with the rated operating voltage of the electromagnetic lock. For example, for an electromagnetic lock with a rated voltage of 24V, this embodiment sets the preset voltage threshold to 22V. This value is both lower than 10% of the rated operating voltage and higher than the line induced voltage (usually less than 5% of the rated voltage), avoiding false triggering caused by induced voltage. After the threshold is set, the system generates a dry node status data stream through a combination of hardware comparator and software filtering. The hardware comparator performs real-time level judgment, and the software layer adopts a three-time consecutive sampling consistency verification mechanism to filter out false level jumps caused by single instantaneous interference.
[0017] When identifying the transition moments of the dry node state data stream, this embodiment employs an edge detection algorithm. By traversing the binary data stream and comparing the level states of two adjacent sampling moments, when a state change of "0→1" or "1→0" occurs, the timestamp of that moment is recorded as the transition moment. Simultaneously, the direction of change is determined by the level trend of three consecutive sampling points. If the current level is "1" and the previous level was "0", it is determined to be a rising edge, corresponding to the electromagnetic lock being energized and engaging; if the current level is "0" and the previous level was "1", it is determined to be a falling edge, corresponding to the electromagnetic lock being de-energized and releasing.
[0018] In another implementation, for the extraction of current waveform segments, this embodiment sets the preset time length to 200 milliseconds, that is, extracting current data 100 milliseconds before and 100 milliseconds after the transition moment. The extracted current waveform segments are stored using timestamps as indices, with the data format being "timestamp and current amplitude" key-value pairs, where the current amplitude is in amperes (A) and retains 4 decimal places of precision. During time axis alignment and data fusion, the time axis of the current waveform segments is calibrated using linear interpolation based on the timestamp of the dry node state data stream, ensuring that the timestamp error between the two does not exceed 1 microsecond. During the fusion process, the dry node level state and current amplitude data at each sampling moment are stored in pairs in chronological order to form a two-dimensional original signal sequence, which serves as the original signal sequence. For example, the fused data corresponding to timestamp t1 is (high level, 0.5234A), and the fused data corresponding to timestamp t2 is (high level, 0.5312A). The resulting original signal sequence contains both state transition information and current dynamic change characteristics, providing a complete data foundation for subsequent spectrum analysis.
[0019] It is worth noting that this embodiment also performs outlier filtering before data fusion. To address potential spike pulse interference (such as instantaneous pulses caused by electromagnetic coupling) in the analog current, the 3σ criterion is used for identification and replacement: the mean μ and standard deviation σ of the current data are calculated, and values exceeding the range [μ-3σ, μ+3σ] are identified as outliers and replaced with the mean of two adjacent normal data points to avoid interference from outliers in subsequent feature extraction.
[0020] In step S12, spectral analysis is performed on the original signal sequence to obtain the transient oscillation frequency distribution characteristics and the steady-state noise frequency distribution characteristics, including: The original signal sequence is divided into transient change intervals and steady-state holding intervals. Fast Fourier transform is performed on the transient change intervals and the steady-state holding intervals respectively to obtain a frequency domain complex sequence. Calculate the amplitude of the frequency domain complex sequence, construct a discrete amplitude spectrum, and extract the energy spectral density value from the discrete amplitude spectrum to obtain a set of spectral components; By traversing the set of spectral components, the high-energy frequency band data corresponding to the transient change interval is identified as the transient oscillation frequency distribution feature, and the background spectral line features corresponding to the steady-state maintenance interval are identified as the steady-state noise frequency distribution feature, thus obtaining the transient oscillation frequency distribution feature and the steady-state noise frequency distribution feature.
[0021] In one implementation, this embodiment divides the signal into intervals based on the state transition moments of the dry nodes and the trend of current amplitude changes in the original signal sequence. Starting from the transition moment, a 200-millisecond interval is extracted as the transient change interval, covering the entire stage of transient oscillations and damping decay during the electromagnetic lock's engagement or release. The signal segment following the transient change interval until the next transition is defined as the steady-state holding interval, corresponding to the stable operating state of the electromagnetic lock. To avoid signal distortion at the interval boundaries affecting the analysis results, a 50-millisecond transition overlap region is set during the division.
[0022] It should be noted that, for the execution of the Fast Fourier Transform, this embodiment first applies a Hanning window function to the signals in the two intervals to suppress signal spectral leakage. The window length is consistent with the interval data length to ensure smooth attenuation at both ends of the signal. Subsequently, the signal is padded with zeros to a length equal to an integer power of 2. The frequency domain complex sequence output after the Fast Fourier Transform covers the frequency range from 0 to half the sampling frequency, capturing the low-frequency to mid-frequency characteristics of the electromagnetic lock signal.
[0023] It's worth noting that the discrete amplitude spectrum is constructed by extracting amplitude information from a complex sequence in the frequency domain, directly reflecting the signal strength at different frequency points. The energy spectral density value is calculated based on the amplitude spectrum, with units corresponding to the signal type; for voltage signals, it's expressed in V. 2 / Hz, current signal is A 2 / Hz, this value can intuitively reflect the energy distribution of different frequency components, and is a key basis for distinguishing effective features from noise.
[0024] In another implementation, during the traversal and feature identification of the spectral component set, this embodiment sets the energy threshold to three times the average energy spectral density of the steady-state holding interval. For the transient change interval, the energy spectral density values of all frequency points are traversed, and frequency bands where the energy spectral density of three or more consecutive frequency points exceeds the threshold are identified as high-energy frequency band data. The start frequency, end frequency, and average energy spectral density of this frequency band are recorded to form the transient oscillation frequency distribution characteristics. In the steady-state holding interval, frequency components with energy spectral density below the threshold constitute background spectral lines. These spectral lines are mainly generated by steady-state interference from coil heating noise and spring vibration, forming the steady-state noise frequency distribution characteristics.
[0025] It is worth noting that after feature recognition, spectral smoothing is performed. A moving average filtering algorithm is used to correct the discrete amplitude spectrum, with the window size set to 5 frequency points. This eliminates high-frequency glitches introduced by the Fast Fourier Transform, making the two types of frequency distribution characteristics clearer. The bandwidth and peak frequency of the transient oscillation frequency distribution characteristics are calculated, and the mean frequency and variance of the steady-state noise frequency distribution characteristics are calculated, providing quantitative indicators for subsequent transient oscillation amplitude calculation and noise decomposition.
[0026] In step S13, the transient oscillation amplitude value is calculated based on the transient oscillation frequency distribution characteristics. If the transient oscillation amplitude value is greater than a preset amplitude threshold, the original signal interval corresponding to the original signal sequence is determined to be a dynamic transition process. Multi-stage feature analysis is performed on the dynamic transition process to obtain the start and end points of the multi-stage features, including: High-energy frequency band data is extracted from the transient oscillation frequency distribution characteristics, and integral operation is performed on the high-energy frequency band data within a preset frequency range to obtain the transient oscillation amplitude value. The transient oscillation amplitude value is compared with a preset amplitude threshold. If the transient oscillation amplitude value exceeds the preset amplitude threshold, the corresponding original signal interval is marked as a dynamic transition process. Perform a Hilbert transform on the signal sequence during the dynamic transition process to construct an oscillating envelope sequence; Differential operations are performed on the oscillating envelope sequence to locate the inflection points of the multi-stage features. The inflection points are then mapped back to the time axis coordinates of the original signal sequence to lock the boundaries of the dynamic transition process, thereby obtaining the start and end points of the multi-stage features.
[0027] In one implementation, when extracting high-energy frequency band data, this embodiment uses the transient oscillation frequency distribution characteristics identified in S12 as a basis to accurately extract the energy spectral density data of the corresponding frequency band and eliminate interference from irrelevant frequency components. The preset frequency range is consistent with the characteristic frequency band of the transient oscillation and is synchronously set to 100-150Hz. During the integration operation, all energy spectral density data within this frequency range are accumulated and summed, and the result is the transient oscillation amplitude value.
[0028] Specifically, the high-energy frequency band data identified in step S12 that belongs to the transient change range, i.e., the energy spectral density value, can be expressed in V. 2 / Hz or A 2 / Hz, perform definite integration along the frequency axis (unit is Hz) within the preset frequency range (e.g. 100-150Hz); the integration result is a scalar, whose physical meaning represents the total energy contained in the high-energy frequency band, and this scalar value is used as the transient oscillation amplitude value.
[0029] It should be noted that the preset amplitude threshold is determined through offline statistical calibration. This embodiment collects a large amount of transient oscillation data from normal operation of the electromagnetic lock, calculates the statistical distribution of its oscillation amplitude values, and selects the 95th percentile value as the preset amplitude threshold. For example, the transient oscillation amplitude values during normal operation are mostly concentrated in the range of 0.8-1.2V. 2 (Voltage signal) or 0.05-0.08A 2 (For current signals), the threshold is set to 1.5V. 2 Or 0.12A2 After the threshold is set, the system compares the calculated transient oscillation amplitude with the threshold in real time. If the threshold is exceeded, it is determined that there is a significant change in physical state in that interval and is marked as a dynamic transition process.
[0030] In another implementation, regarding the Hilbert transform of the signal sequence during the dynamic transition process, the core objective of this embodiment is to extract the instantaneous amplitude changes of the signal and construct a smooth oscillating envelope sequence. Through the Hilbert transform, the original time-domain signal is converted into an analytic signal, thereby separating the instantaneous amplitude information. The envelope sequence clearly presents the complete trend of transient oscillation from initiation, enhancement, decay to stabilization, avoiding the high-frequency fluctuations in the original signal from obscuring the core change pattern. For example, during the electromagnetic lock engagement process, the oscillating envelope sequence first rises rapidly to a peak value, corresponding to the armature striking the lock body, and then gradually decreases to a stable state, corresponding to oscillation decay, intuitively reflecting the stage characteristics of the dynamic transition. In the differential operation of the oscillating envelope sequence, this embodiment locates the evolution inflection point by calculating the difference in envelope values between two adjacent sampling points. When the difference changes from positive to negative or from negative to positive, it indicates that the trend of the envelope sequence has reversed; this position is the evolution inflection point, corresponding to the boundary point of different stages in the dynamic transition process. For example, the difference is positive during the rising phase of the envelope sequence. When the difference becomes negative, it corresponds to the peak point of the oscillation, which is an evolution inflection point. When the subsequent difference remains negative and gradually approaches zero, it corresponds to the oscillation decaying to stability, forming another evolution inflection point.
[0031] It should be noted that when mapping the evolution inflection points back to the time axis coordinates of the original signal sequence, the sampling times of the envelope sequence and the original signal are directly correlated based on the time synchronization of the Hilbert transform, thus locking the specific time position of each inflection point in the original signal. These inflection points collectively define the boundaries and internal stages of the dynamic transition process. For example, the first inflection point corresponds to the start time of the dynamic transition (the starting point of the multi-stage feature), and the last inflection point corresponds to the end time of the dynamic transition (the end point of the multi-stage feature), ultimately yielding the start and end points of the multi-stage feature.
[0032] In step S14, based on the start and end points of the multi-stage features, the steady-state noise frequency distribution features are decomposed to obtain the time-frequency domain sub-band energy distribution of the noise, including: Select a wavelet basis function that matches the steady-state noise waveform, and perform discrete wavelet transform on the steady-state noise sequence corresponding to the start and end points of the multi-stage features; The high-frequency detail coefficients and low-frequency approximation coefficients after the discrete wavelet transform are separated, and the signals are reconstructed from the high-frequency detail coefficients and low-frequency approximation coefficients respectively to obtain the time-frequency sub-band signal; Calculate the energy proportion of each time-frequency sub-band signal, generate an energy entropy value sequence, scan the energy entropy value sequence to locate the modulus maxima, and mark the modulus maxima with an amplitude greater than a preset background noise baseline as singular point abrupt change times. Based on the singular point mutation time, the start and end points of the multi-stage features are calibrated, and the energy distribution of the time-frequency sub-band signal is calculated according to the calibrated interval to obtain the time-frequency domain sub-band energy distribution of the noise.
[0033] In one implementation, this embodiment first selects a suitable wavelet basis function by analyzing the waveform characteristics of steady-state noise. Steady-state noise often exhibits smooth, low-amplitude fluctuations without obvious sharp abrupt changes. The db6 type Daubechies wavelet basis function is selected. After selection, a three-level discrete wavelet transform is performed on the steady-state noise sequence corresponding to the start and end points of the multi-stage features, decomposing the noise signal into frequency components of different scales. When calculating the energy proportion of the time-frequency sub-band signal, the total energy of each sub-band signal is first calculated, and then the ratio of the energy of a single sub-band to the total energy of all sub-bands is calculated to obtain the energy proportion of each sub-band. The energy entropy value sequence is then generated based on the energy proportion. The entropy value reflects the uniformity of energy distribution across sub-bands; the lower the entropy value, the more concentrated the energy is in a few sub-bands; the higher the entropy value, the more dispersed the energy distribution.
[0034] It should be noted that when locating the modulus maxima in the energy entropy value sequence, this embodiment uses a sliding window method to traverse the sequence. The window size is set to 5 sampling points. When the entropy value at the center of the window is greater than all the entropy values on both sides, it is determined to be a modulus maxima. The preset background noise baseline is set as the mean of the energy entropy value sequence plus 2 standard deviations. Modulus maxima with amplitudes exceeding this baseline are marked as singularity abrupt change moments. These moments correspond to the instants when there are abnormal fluctuations in the noise, which may be related to slight vibrations of the lock body, poor contact, or other physical state changes.
[0035] In another implementation, when calibrating the start and end points of multi-stage features based on the abrupt change of singular points, singular points close to the original start and end points are preferentially selected. If singular points exist before or after the original start point, these singular points are used as the calibrated start point; similarly, the end point is calibrated to ensure that the multi-stage feature interval can completely cover the critical periods of abnormal noise fluctuations. After calibration, the energy distribution of each time-frequency sub-band signal within the interval is recalculated, and the energy changes of each sub-band in different time segments are statistically analyzed. Finally, a time-frequency domain sub-band energy distribution containing three-dimensional information of time, frequency, and energy is formed, clearly presenting the energy change patterns of noise in different frequency and time dimensions.
[0036] It is worth noting that this embodiment performs threshold denoising on the high-frequency detail coefficients before signal reconstruction. A very small threshold is set to filter out weak interference, retaining the true high-frequency noise components and avoiding irrelevant interference from affecting the energy distribution calculation results. Simultaneously, a smoothing process is performed on the energy entropy value sequence to eliminate spurious modulus maxima caused by high-frequency spikes, improving the accuracy of identifying abrupt changes in singularity and ensuring the reliability of subsequent interval calibration and energy distribution calculation.
[0037] In step S15, if the time-frequency domain sub-band energy distribution fluctuates continuously within a preset switching frequency range, then the time-frequency domain sub-band energy distribution is determined to be a fuzzy intermediate state. The original signal sequence corresponding to the fuzzy intermediate state is input into a preset interference feature mapping model to obtain the interference type of the fuzzy intermediate state, including: The sliding window variance is calculated for the energy distribution of the time-frequency domain sub-band to obtain the fluctuation intensity data. It is determined whether the fluctuation frequency of the fluctuation intensity data is within the preset switching frequency range and whether the energy amplitude is non-convergent oscillating. If so, it is determined to be a fuzzy intermediate state. Spectral analysis is performed on the original signal sequence corresponding to the fuzzy intermediate state to extract harmonic component distribution data and transient pulse amplitude data; The harmonic component distribution data and transient pulse amplitude data are input into a preset interference feature mapping model, and the interference type of the fuzzy intermediate state is output.
[0038] In one implementation, this embodiment features a refined design for determining the fluctuation of the time-frequency domain sub-band energy distribution. When calculating the sliding window variance, an adaptive window size strategy is employed. First, the basic window length is determined by the average change period of the time-frequency domain sub-band energy distribution. If the average change period of the energy distribution is 50 milliseconds (corresponding to a 20Hz fluctuation frequency), the basic window size is set to 50 sampling points (sampling frequency 1kHz). Simultaneously, the rate of change of the energy distribution within the window is monitored in real time. If the rate of change exceeds a preset threshold (more than 10 changes per second), the window size is automatically reduced to 30 sampling points; if the rate of change is below the threshold, it is expanded to 80 sampling points, ensuring that energy distributions with different fluctuation characteristics can be accurately captured. The sliding step size is fixed at 5 sampling points, balancing computational efficiency with the integrity of fluctuation details. The final fluctuation intensity data not only includes the variance value but also synchronously records auxiliary parameters such as the fluctuation period and amplitude extreme values for each window.
[0039] The preset switching frequency range is determined based on the operating characteristics of the electromagnetic lock drive circuit, typically covering a range of 50-200Hz. This range includes the switching frequency when the electromagnetic lock coil is switched on and off, as well as the resonant frequency of the mechanical action, and is the frequency range where fuzzy intermediate states are most likely to occur. During the judgment process, if the fluctuation frequency of the fluctuation intensity data falls within this range, and the energy amplitude continues to oscillate within a certain range without a clear convergence trend (i.e., the amplitude change over 5 consecutive windows exceeds 30% of the average value), then it is determined to be a fuzzy intermediate state.
[0040] It should be noted that for the original signal sequence corresponding to the fuzzy intermediate state, the spectral analysis focuses on the extraction of harmonic components and transient pulses. Harmonic component distribution data is obtained by identifying frequency components that are integer multiples of the fundamental frequency, recording the frequency position and energy proportion of each harmonic. For example, external electromagnetic interference may cause a significant increase in the energy of the 3rd and 5th harmonics. Transient pulse amplitude data is obtained by detecting spike pulses in the signal, recording the peak value, duration, and frequency of occurrence of the pulse. Mechanical jamming or collisions with foreign objects usually produce transient pulses with high amplitude and short duration.
[0041] The pre-defined interference feature mapping model is a classification model trained on a large number of labeled samples. These samples cover common interference scenarios for electromagnetic locks, including external electromagnetic interference, mechanical jamming, continuous door compression, and poor circuit contact. Each scenario corresponds to characteristic harmonic component distribution and transient pulse amplitude data. During model training, feature clustering and classification algorithms are used to establish a mapping relationship between input features and interference types. The output is the confidence score for each interference type, and the type with the highest confidence score is taken as the final judgment. To improve the accuracy of model recognition, this embodiment performs feature standardization processing before input data, mapping the harmonic component distribution data and transient pulse amplitude data to a unified numerical range to eliminate the influence of dimensional differences. Simultaneously, the model supports online updates, continuously optimizing the mapping relationship by adding interference samples from real-world scenarios to adapt to the characteristics of different electromagnetic lock models and complex and ever-changing application environments.
[0042] It should be noted that the interference feature mapping model uses a support vector machine (SVM) classifier. Its training samples are derived from typical interference scenarios simulated in the laboratory, such as electromagnetic interference from frequency converters, mechanical vibration, and historical operating data of electromagnetic locks collected on-site. Sample labeling is completed based on signal characteristics and operation and maintenance records, with each type of interference containing at least 1000 samples. During training, the feature vector includes 10-dimensional parameters such as the energy proportion of harmonic components, the peak value and duration of transient pulses, etc., and the SVM kernel function parameters are optimized through grid search. After the model is deployed, it supports online updates. When an unidentified interference type occurs, the system records the sample and triggers manual review to gradually expand the training set.
[0043] It is worth noting that if the highest confidence level of the model output is lower than the preset confidence threshold (0.7), it is determined to be an unknown interference type. The system will record the original signal segment and the corresponding feature data, triggering a manual review process. This not only avoids misjudgment affecting the monitoring results, but also accumulates new sample data and continuously improves the interference feature mapping model.
[0044] In step S16, the interference type is compared with a preset library of transient interference spectrum patterns. If a match is found, a frequency domain mask matrix is generated, and the spectrum data of the original signal sequence is corrected and reconstructed to obtain the purified state signal, including: Extract the spectral features corresponding to the interference type, and calculate the feature matching degree between the spectral features and each standard template in the preset transient interference spectrum pattern library; If the feature matching degree value exceeds the preset judgment threshold, then according to the frequency domain distribution interval corresponding to the interference type, the interference frequency band to be suppressed is locked, and a frequency domain mask matrix with the same spectral data dimension as the original signal sequence is constructed. The frequency domain mask matrix is mapped to the spectral data of the original signal sequence, and a weighted suppression operation is performed on the interference frequency band to obtain the corrected spectral sequence. The corrected spectral sequence is subjected to inverse Fourier transform processing to reconstruct the time-domain waveform and output the purified state signal.
[0045] In one implementation, the transient interference spectrum pattern library in this embodiment is a standardized template library built based on transient interference samples from all scenarios of electromagnetic locks. It covers common transient interference types such as external electromagnetic interference, mechanical vibration interference, and transient poor contact of lines. Each interference template includes core spectrum features (center frequency, bandwidth, amplitude distribution pattern), typical frequency domain distribution intervals, and mask construction rules, and supports dynamic updates based on actual operation and maintenance data. When extracting the spectrum features corresponding to the interference type, the specific interference type determined in S15 is used as the basis. For example, when it is determined to be inverter electromagnetic interference, its core features are extracted as center frequency and bandwidth, and auxiliary features such as the duration and energy proportion of the interference in the time and frequency domain are extracted simultaneously to form a complete feature vector.
[0046] It should be noted that a weighted calculation method combining cosine similarity and Euclidean distance is used when calculating the feature matching degree. First, the cosine similarity (70% weight) between the extracted spectral feature vector and the feature vectors of each standard template in the pattern library is calculated. Then, the normalized Euclidean distance between the two is calculated (30% weight). The final calculated feature matching degree value ranges from 0 to 1, with the value closer to 1 indicating a higher matching degree. The preset judgment threshold is set to 0.85. If the feature matching degree value exceeds 0.85, this embodiment will construct a frequency domain mask matrix based on the frequency domain distribution interval corresponding to the interference type. First, the core frequency band range of the interference is determined (e.g., inverter interference is 130-170Hz). The corresponding index of this interval in the spectrum sequence is marked as the interference frequency band, and the remaining frequency bands are marked as effective frequency bands. The frequency domain mask matrix is a one-dimensional matrix with the same length as the spectrum sequence. The mask value corresponding to the effective frequency band is set to 1 (no suppression), and the mask value of the interference frequency band is dynamically set according to the proportion of interference energy. When the interference energy percentage is less than or equal to 10%, the mask value is 0.8 (mild suppression), when it is between 10% and 30%, it is 0.5 (moderate suppression), and when it is greater than 30%, it is 0.2 (deep suppression). This achieves interference filtering while preserving the effective signal components within the interference frequency band to the greatest extent possible, avoiding feature loss caused by complete shielding.
[0047] The spectral data of the original signal sequence refers to the complex sequence or its amplitude spectrum obtained by converting the original signal sequence to the frequency domain through Fast Fourier Transform (FFT); when constructing the frequency domain mask matrix, its length, i.e., its dimension, is consistent with the number of spectral data points after the FFT transformation.
[0048] In another implementation, when mapping the frequency domain mask matrix to the original signal's spectral data, the original time-domain signal is first converted into a frequency-domain spectral sequence using a Fast Fourier Transform (FFT). Then, the mask matrix is multiplied point-by-point with the spectral sequence to perform weighted suppression on the interfering frequency band. For example, if the original amplitude at a certain frequency point in the interfering band is 5V and the mask value is 0.5, the amplitude after weighted suppression will be 2.5V, while the amplitude of the effective frequency band remains unchanged, ultimately yielding the corrected spectral sequence. During this process, to avoid abrupt spectral changes at the mask boundaries, a linearly gradual mask value is used in the transition interval between the interfering and effective frequency bands (each extended by two frequency points) to eliminate spectral distortion caused by frequency band switching.
[0049] Before performing an inverse Fourier transform on the corrected spectral sequence, amplitude calibration is first performed to ensure that the deviation between the total energy of the corrected sequence and the total energy of the original spectral sequence is less than or equal to 5%, guaranteeing the energy consistency of the reconstructed waveform. Then, an inverse fast Fourier transform is used to convert the frequency domain data back to the time domain waveform, obtaining the initial reconstructed signal. Finally, time-domain smoothing is performed on the initial reconstructed signal, using a 5-point moving average algorithm to filter out high-frequency glitches generated during the reconstruction process, ultimately outputting a cleaned-up state signal after removing transient interference.
[0050] It should be noted that this embodiment also includes a mask matrix validity verification mechanism. After each mask matrix is generated, a small number of verification samples are first filtered to calculate the feature retention rate (core feature amplitude / original core feature amplitude) of the purified signal. If the feature retention rate is less than 90%, the mask value of the interference band is automatically adjusted (increased by 0.1-0.2) until the feature retention rate is greater than or equal to 90% and the interference suppression rate is greater than or equal to 80%, ensuring that the key features for electromagnetic lock status determination are not lost while effectively filtering interference.
[0051] It is worth noting that the transient interference spectrum pattern library supports incremental updates. When a new type of transient interference is identified and its feature matching degree is below a threshold, the system records the interference's spectral characteristics, frequency domain distribution range, and other information. After manual review and annotation, this information is added to the pattern library, and the corresponding mask construction rules are updated synchronously to continuously improve the coverage and adaptability of interference filtering. If the feature matching degree values of the interference type and all standard templates in the preset transient interference spectrum pattern library do not exceed the preset judgment threshold, it is determined to be an unknown new type of interference. The system can record the abnormal signal segment and related features, and output an interference unidentified flag. It can also choose not to perform frequency domain mask filtering temporarily, or directly hand over the original signal sequence to the subsequent state judgment steps for processing, and assign a low confidence weight.
[0052] In step S17, time-frequency domain features are extracted from the purified state signal to obtain real-time spectrum data. The real-time spectrum data is compared with the spectrum information of normal locking and unlocking actions, and the real-time status monitoring result of the electromagnetic lock is output, including: Short-time Fourier transform is used to perform time-frequency analysis on the purified state signal to extract characteristic parameters such as energy proportion, peak position and time-varying trend in each frequency band, forming multi-dimensional real-time spectral fingerprint data. Obtain the start timestamp of the purified state signal corresponding to the short-time Fourier transform, and use it as timestamp information; The real-time spectral fingerprint data is mapped to a preset action feature space, and the corresponding spectral fingerprints are extracted and clustered to form a locking feature cluster and an unlocking feature cluster. Calculate the Euclidean distance between the real-time spectral fingerprint data and the centers of the locked and unlocked feature clusters; Based on the Euclidean distance value, a Gaussian kernel function operation is performed to obtain the probability confidence scores of belonging to the locked and unlocked categories; If the probability confidence level meets the preset classification decision threshold and the total value of the frequency band energy distribution is higher than the preset action trigger noise floor, then a corresponding locked or unlocked status identifier is generated. The status identifier is associated with and encapsulated with the timestamp information to form a timestamped status data packet, and the real-time status monitoring result indicating the current action attribute of the electromagnetic lock is output.
[0053] In one implementation, when performing the short-time Fourier transform, this embodiment sets the frame length to 50 milliseconds and the inter-frame overlap rate to 50%. After time-frequency analysis, the spectrum is divided into five key frequency bands (20-50Hz, 50-100Hz, 100-150Hz, 150-200Hz, and 200-300Hz), which cover the core spectral components of the electromagnetic lock's locking and unlocking actions. The peak frequency of the locking action is mostly concentrated in the 100-150Hz range, while the unlocking action has a higher energy proportion in the 50-100Hz band. For each frequency band, four feature parameters are extracted: energy proportion, peak position, peak amplitude, and time-varying trend slope, ultimately forming 20-dimensional real-time spectral fingerprint data.
[0054] It should be noted that the preset action feature space is constructed based on a large number of normal action samples. 5000 sets each of electromagnetic lock locking and unlocking action signals were collected from different environments and usage durations (from new equipment to 10,000 cumulative runs). After purification, spectral fingerprint data was extracted and clustered into locking and unlocking feature clusters respectively using a clustering algorithm. During the clustering process, the threshold for the sum of squared errors within each cluster was set to 0.01, automatically determining the optimal number of cluster centers (one core center for each of the locking and unlocking feature clusters), and calculating the center vector of each feature cluster as the classification criterion. The characteristic value of the 100-150Hz frequency band energy proportion for the locking feature cluster center is 0.45, and the characteristic value of the 50-100Hz frequency band energy proportion for the unlocking feature cluster center is 0.42.
[0055] Specifically, the preset action feature space is generated by the K-means clustering algorithm. Before clustering, at least 5,000 sets of spectral fingerprint data of normal locking and unlocking actions need to be collected, covering different load and temperature conditions. The feature vector includes 20-dimensional parameters such as the energy ratio of each frequency band and the peak position. Principal component analysis is performed before clustering to reduce the dimension to 5 to improve efficiency. The number of cluster centers is determined by the elbow rule, and locking and unlocking actions each form a feature cluster. The feature space is automatically updated once a month, and the cluster centers are adjusted according to the recent high confidence (>0.9) monitoring results to adapt to feature drift caused by equipment aging.
[0056] It's worth noting that when calculating the Euclidean distance, the real-time spectral fingerprint data and the center vectors of the two feature clusters are calculated dimension-by-dimensionally. A smaller distance indicates a higher similarity between the real-time feature and that type of action. For example, if the Euclidean distance between the real-time spectral fingerprint and the center of the locking feature cluster is 1.2, and the distance to the center of the unlocking feature cluster is 3.5, it indicates that the current action is more likely to be locking. To avoid the limitations of a single distance metric, cosine similarity is calculated simultaneously as an auxiliary reference, with weights of 0.8 and 0.2 respectively, to obtain a comprehensive distance value.
[0057] In another implementation, when performing Gaussian kernel function calculations based on the comprehensive distance value, the bandwidth parameter of the kernel function is set to 1 / 3 of the distance between feature cluster centers to ensure that the calculation results can effectively distinguish different categories. After the calculation, the probability confidence scores for the locked and unlocked categories are output, with values ranging from 0 to 1, and the sum of the confidence scores for the two categories is 1. For example, an output locking confidence score of 0.93 and an unlocking confidence score of 0.07 indicates that the current action is highly likely to be locking. The preset classification decision threshold is set to 0.8, that is, when the confidence score of a certain category exceeds 0.8, it is initially determined to be that action type; at the same time, the action trigger noise floor is set to 1 / 5 of the total value of the minimum frequency band energy distribution of normal actions. If the total value of the real-time frequency band energy distribution is lower than this noise floor, it is determined to be an invalid signal to avoid false triggering when there is no action. If the locking confidence level exceeds 0.8 and the frequency band energy is higher than the noise floor, a binary "1" is generated as the locking status identifier. If the unlocking confidence level exceeds 0.8 and the energy meets the standard, a binary "0" is generated as the unlocking status identifier. If both confidence levels are below 0.8, or the energy does not meet the standard, an "unknown status" identifier is generated, triggering a secondary detection process. After the status identifier is generated, it is associated and encapsulated with the index information of the current time window (time window start timestamp, end timestamp, number of sampling points) to form a status data packet. The data packet contains four core pieces of information: status identifier, timestamp range, confidence level value, and total energy value.
[0058] In another implementation, the monitoring results output in this embodiment are pushed in two ways. First, they are transmitted in real-time to the local access controller for linkage with the access control system's switching logic. Second, they are uploaded to the backend management platform, stored in a database, and visualized for easy tracking of equipment operating status by maintenance personnel. Simultaneously, the system records complete data for each status determination (spectral fingerprint, distance value, confidence level). If an unknown status indicator appears three times consecutively, a self-check alarm is automatically triggered, prompting maintenance personnel to check for issues such as mechanical wear or abnormal power supply in the electromagnetic lock.
[0059] It should be noted that the preset action feature space supports adaptive updates. After every 1000 valid state determinations, the system automatically selects samples with a confidence level of 95% or higher, updates the feature cluster center vector, and adapts to the changes in the spectral characteristics of the electromagnetic lock after long-term use, ensuring the long-term reliability of state monitoring. In this embodiment, before extracting time-frequency domain features, baseline calibration is performed on the purified state signal to remove the fixed DC component and environmental background noise, further improving the purity of the spectral fingerprint data. At the same time, outlier filtering is added after the probability confidence calculation. If the confidence value changes abruptly (e.g., a single determination drops sharply from 0.9 to 0.1), it is smoothed by combining historical determination results to avoid misjudgments of the state caused by instantaneous interference.
[0060] It is worth noting that if the probability confidence scores of the locked or unlocked categories calculated in step S17 do not meet the preset classification decision threshold, the unknown status flag will be output. The system can make a comprehensive judgment based on the monitoring results of subsequent time windows, or trigger an additional signal acquisition and analysis process.
[0061] To facilitate understanding of the present invention, some preferred embodiments of the present invention will be described in further detail below.
[0062] In one implementation, optimizations were made for high-frequency switching scenarios. During signal acquisition, a high-speed sampling mode was employed, increasing the sensor sampling frequency to 2kHz to ensure that signals from multiple switching actions within a short period did not overlap or omit any. In dynamic transition process identification, to address the signal superposition problem caused by high-frequency switching, a signal separation algorithm was introduced to split the transient signals of two adjacent switching actions, avoiding interference from the residual vibration of the previous action in the feature extraction of the subsequent action. The interference feature mapping model added high-frequency switch fatigue interference samples, corresponding to the signal fluctuation characteristics caused by lock tongue wear after long-term high-frequency use of electromagnetic locks. The model can accurately identify and mark these as mechanical fatigue warnings, providing maintenance personnel with a basis for predicting the lifespan of devices such as smart lock control boards. The status output stage optimized the data transmission protocol, using a lightweight MQTT protocol to push status data packets, ensuring real-time data transmission in high-frequency scenarios.
[0063] In summary, this invention discloses a real-time status monitoring method for an electromagnetic lock supporting three-wire control. The method includes real-time acquisition of analog voltage and current quantities from the electromagnetic lock's power supply circuit, fusing them to generate an original signal sequence containing the state of dry nodes and current waveforms. The original signal sequence is divided into transient and steady-state intervals, and spectral analysis is performed to separate the frequency distribution characteristics of transient oscillations and steady-state noise. The dynamic transition process is determined by the transient oscillation amplitude, and the starting and ending points of multi-stage features are located using Hilbert transform. Steady-state noise is decomposed based on wavelet transform to obtain the time-frequency domain sub-band energy distribution and identify fuzzy intermediate states. The interference type is determined through an interference feature mapping model. A frequency domain mask matrix is generated to filter interference by comparing with a transient interference spectrum pattern library, resulting in a purified status signal. Finally, a multi-dimensional spectral fingerprint of the purified signal is extracted and quantitatively compared with the feature clusters of normal locking and unlocking actions, outputting a timestamped real-time status monitoring result, thus constructing a multi-dimensional, interference-resistant status monitoring system.
[0064] Reference Figure 2 The second embodiment of the present invention provides a real-time status monitoring device for an electromagnetic lock that supports three-wire control, comprising: The signal acquisition module is used to acquire the dry contact status data stream of the electromagnetic lock operation and extract the current waveform segments of the corresponding preset time length, and fuse them to form the original signal sequence. The spectrum analysis module is used to perform spectrum analysis on the original signal sequence to obtain the transient oscillation frequency distribution characteristics and the steady-state noise frequency distribution characteristics; The dynamic transition identification module is used to calculate the transient oscillation amplitude value based on the transient oscillation frequency distribution characteristics. If the transient oscillation amplitude value is greater than a preset amplitude threshold, the original signal interval corresponding to the original signal sequence is determined to be a dynamic transition process. Multi-stage feature analysis is performed on the dynamic transition process to obtain the start point and end point of the multi-stage features. The noise decomposition module is used to decompose the steady-state noise frequency distribution characteristics based on the start and end points of the multi-stage characteristics to obtain the time-frequency domain sub-band energy distribution of the noise. The fuzzy intermediate state determination module is used to determine that the time-frequency domain sub-band energy distribution is a fuzzy intermediate state if the energy distribution of the time-frequency domain sub-band fluctuates continuously within a preset switching frequency range, and inputs the original signal sequence corresponding to the fuzzy intermediate state into a preset interference feature mapping model to obtain the interference type of the fuzzy intermediate state. An interference filtering module is used to compare the interference type with a preset short-term interference spectrum pattern library. If they match, a frequency domain mask matrix is generated, and the spectrum data of the original signal sequence is corrected and reconstructed to obtain the purified state signal. The status output module is used to extract time-frequency domain features from the purified status signal to obtain real-time spectrum data, compare the real-time spectrum data with the spectrum information of normal locking and unlocking actions, and output the real-time status monitoring result of the electromagnetic lock.
[0065] It should be noted that the electromagnetic lock real-time status monitoring device supporting three-wire control provided in this embodiment of the invention is used to execute all the process steps of the electromagnetic lock real-time status monitoring method supporting three-wire control in the above embodiment. The working principle and beneficial effects of the two are one-to-one, so they will not be described again.
[0066] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0067] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for real-time status monitoring of an electromagnetic lock supporting three-wire control, comprising: The dry contact status data stream of the electromagnetic lock is acquired and the current waveform segments of the corresponding preset time length are extracted and fused to form the original signal sequence. Spectral analysis was performed on the original signal sequence to obtain the transient oscillation frequency distribution characteristics and the steady-state noise frequency distribution characteristics; The transient oscillation amplitude value is calculated based on the transient oscillation frequency distribution characteristics. If the transient oscillation amplitude value is greater than the preset amplitude threshold, the original signal interval corresponding to the original signal sequence is determined to be a dynamic transition process. Multi-stage feature analysis is performed on the dynamic transition process to obtain the start point and end point of the multi-stage features. Based on the start and end points of the multi-stage features, the steady-state noise frequency distribution features are decomposed to obtain the time-frequency domain sub-band energy distribution of the noise; If the energy distribution of the time-frequency domain sub-band fluctuates continuously within a preset switching frequency range, then the energy distribution of the time-frequency domain sub-band is determined to be a fuzzy intermediate state. The original signal sequence corresponding to the fuzzy intermediate state is input into a preset interference feature mapping model to obtain the interference type of the fuzzy intermediate state. The interference type is compared with a preset library of transient interference spectrum patterns. If they match, a frequency domain mask matrix is generated, and the spectrum data of the original signal sequence is corrected and reconstructed to obtain the purified state signal. The purified status signal is subjected to time-frequency domain feature extraction to obtain real-time spectrum data. The real-time spectrum data is compared with the spectrum information of normal locking and unlocking actions to output the real-time status monitoring result of the electromagnetic lock.
2. The real-time status monitoring method for an electromagnetic lock supporting three-wire control according to claim 1, characterized in that, The process of acquiring the dry contact state data stream of the electromagnetic lock operation and extracting current waveform segments of corresponding preset time lengths, fusing them to form the original signal sequence, includes: The real-time analog voltage of the electromagnetic lock power supply circuit is collected by a voltage sensor, and the real-time analog current of the power supply circuit is collected by a current sensor. The real-time analog voltage is compared with a preset voltage threshold one by one. When the real-time analog voltage is greater than or equal to the preset voltage threshold, a high-level signal is output. When the real-time analog voltage is less than the preset voltage threshold, a low-level signal is output. The high-level signal and the low-level signal are arranged in chronological order to obtain a binary form dry node status data stream. Identify the transition moments in the dry node state data stream, and determine that the level change direction corresponding to the transition moment is a rising edge and a falling edge; Centered on the transition moment, a current data segment of a preset time length is extracted from the real-time analog current quantity as the current waveform segment corresponding to the transition moment; Align the time axis of the current waveform segment with the time axis of the dry junction state data stream, and associate and integrate the current amplitude data of the current waveform segment with the corresponding dry junction level state data in chronological order to obtain the original signal sequence.
3. The real-time status monitoring method for an electromagnetic lock supporting three-wire control according to claim 1, characterized in that, The step of performing spectral analysis on the original signal sequence to obtain transient oscillation frequency distribution characteristics and steady-state noise frequency distribution characteristics includes: The original signal sequence is divided into transient change intervals and steady-state holding intervals. Fast Fourier transform is performed on the transient change intervals and the steady-state holding intervals respectively to obtain a frequency domain complex sequence. Calculate the amplitude of the frequency domain complex sequence, construct a discrete amplitude spectrum, and extract the energy spectral density value from the discrete amplitude spectrum to obtain a set of spectral components; By traversing the set of spectral components, the high-energy frequency band data corresponding to the transient change interval is identified as the transient oscillation frequency distribution feature, and the background spectral line features corresponding to the steady-state maintenance interval are identified as the steady-state noise frequency distribution feature, thus obtaining the transient oscillation frequency distribution feature and the steady-state noise frequency distribution feature.
4. The method for real-time status monitoring of an electromagnetic lock supporting three-wire control according to claim 1, characterized in that, The transient oscillation amplitude value is calculated based on the transient oscillation frequency distribution characteristics. If the transient oscillation amplitude value is greater than a preset amplitude threshold, the original signal interval corresponding to the original signal sequence is determined to be a dynamic transition process. Multi-stage feature analysis is performed on the dynamic transition process to obtain the start and end points of the multi-stage features, including: High-energy frequency band data is extracted from the transient oscillation frequency distribution characteristics, and integral operation is performed on the high-energy frequency band data within a preset frequency range to obtain the transient oscillation amplitude value. The transient oscillation amplitude value is compared with a preset amplitude threshold. If the transient oscillation amplitude value exceeds the preset amplitude threshold, the corresponding original signal interval is marked as a dynamic transition process. Perform a Hilbert transform on the signal sequence during the dynamic transition process to construct an oscillating envelope sequence; Differential operations are performed on the oscillating envelope sequence to locate the inflection points of the multi-stage features. The inflection points are then mapped back to the time axis coordinates of the original signal sequence to lock the boundaries of the dynamic transition process, thereby obtaining the start and end points of the multi-stage features.
5. The method for real-time status monitoring of an electromagnetic lock supporting three-wire control according to claim 1, characterized in that, The step of decomposing the steady-state noise frequency distribution characteristics based on the start and end points of the multi-stage characteristics to obtain the time-frequency domain sub-band energy distribution of the noise includes: Select a wavelet basis function that matches the steady-state noise waveform, and perform discrete wavelet transform on the steady-state noise sequence corresponding to the start and end points of the multi-stage features; The high-frequency detail coefficients and low-frequency approximation coefficients after the discrete wavelet transform are separated, and the signals are reconstructed from the high-frequency detail coefficients and low-frequency approximation coefficients respectively to obtain the time-frequency sub-band signal; Calculate the energy proportion of each time-frequency sub-band signal, generate an energy entropy value sequence, scan the energy entropy value sequence to locate the modulus maxima, and mark the modulus maxima with an amplitude greater than a preset background noise baseline as singular point abrupt change times. Based on the singular point mutation time, the start and end points of the multi-stage features are calibrated, and the energy distribution of the time-frequency sub-band signal is calculated according to the calibrated interval to obtain the time-frequency domain sub-band energy distribution of the noise.
6. The real-time status monitoring method for an electromagnetic lock supporting three-wire control according to claim 1, characterized in that, If the energy distribution of the time-frequency domain sub-band fluctuates continuously within a preset switching frequency range, then the energy distribution of the time-frequency domain sub-band is determined to be a fuzzy intermediate state. The original signal sequence corresponding to the fuzzy intermediate state is input into a preset interference feature mapping model to obtain the interference type of the fuzzy intermediate state, including: The sliding window variance is calculated for the energy distribution of the time-frequency domain sub-band to obtain the fluctuation intensity data. It is determined whether the fluctuation frequency of the fluctuation intensity data is within the preset switching frequency range and whether the energy amplitude is non-convergent oscillating. If so, it is determined to be a fuzzy intermediate state. Spectral analysis is performed on the original signal sequence corresponding to the fuzzy intermediate state to extract harmonic component distribution data and transient pulse amplitude data; The harmonic component distribution data and transient pulse amplitude data are input into a preset interference feature mapping model, and the interference type of the fuzzy intermediate state is output.
7. The method for real-time status monitoring of an electromagnetic lock supporting three-wire control according to claim 1, characterized in that, The process involves comparing the interference type with a preset library of transient interference spectrum patterns. If a match is found, a frequency domain mask matrix is generated, and the spectral data of the original signal sequence is corrected and reconstructed to obtain the purified state signal, including: Extract the spectral features corresponding to the interference type, and calculate the feature matching degree between the spectral features and each standard template in the preset transient interference spectrum pattern library; If the feature matching degree value exceeds the preset judgment threshold, then according to the frequency domain distribution interval corresponding to the interference type, the interference frequency band to be suppressed is locked, and a frequency domain mask matrix with the same spectral data dimension as the original signal sequence is constructed. The frequency domain mask matrix is mapped to the spectral data of the original signal sequence, and a weighted suppression operation is performed on the interference frequency band to obtain the corrected spectral sequence. The corrected spectral sequence is subjected to inverse Fourier transform processing to reconstruct the time-domain waveform and output the purified state signal.
8. The method for real-time status monitoring of an electromagnetic lock supporting three-wire control according to claim 1, characterized in that, The process involves extracting time-frequency domain features from the purified state signal to obtain real-time spectrum data. This real-time spectrum data is then compared with the spectrum information of normal locking and unlocking actions to output the real-time state monitoring result of the electromagnetic lock, including: Short-time Fourier transform is used to perform time-frequency analysis on the purified state signal to extract characteristic parameters such as energy proportion, peak position and time-varying trend in each frequency band, forming multi-dimensional real-time spectral fingerprint data. Obtain the start timestamp of the purified state signal corresponding to the short-time Fourier transform, and use it as timestamp information; The real-time spectral fingerprint data is mapped to a preset action feature space, and the corresponding spectral fingerprints are extracted and clustered to form a locking feature cluster and an unlocking feature cluster. Calculate the Euclidean distance between the real-time spectral fingerprint data and the centers of the locked and unlocked feature clusters; Based on the Euclidean distance value, a Gaussian kernel function operation is performed to obtain the probability confidence scores of belonging to the locked and unlocked categories; If the probability confidence level meets the preset classification decision threshold and the total value of the frequency band energy distribution is higher than the preset action trigger noise floor, then a corresponding locked or unlocked status identifier is generated. The status identifier is associated with and encapsulated with the timestamp information to form a timestamped status data packet, and the real-time status monitoring result indicating the current action attribute of the electromagnetic lock is output.
9. A real-time status monitoring device for an electromagnetic lock supporting three-wire control, characterized in that, include: The signal acquisition module is used to acquire the dry contact status data stream of the electromagnetic lock and extract the current waveform segments of the corresponding preset time length and fuse them to form the original signal sequence. The spectrum analysis module is used to perform spectrum analysis on the original signal sequence to obtain the transient oscillation frequency distribution characteristics and the steady-state noise frequency distribution characteristics; The dynamic transition identification module is used to calculate the transient oscillation amplitude value based on the transient oscillation frequency distribution characteristics. If the transient oscillation amplitude value is greater than a preset amplitude threshold, the original signal interval corresponding to the original signal sequence is determined to be a dynamic transition process. Multi-stage feature analysis is performed on the dynamic transition process to obtain the start point and end point of the multi-stage features. The noise decomposition module is used to decompose the steady-state noise frequency distribution characteristics based on the start and end points of the multi-stage characteristics to obtain the time-frequency domain sub-band energy distribution of the noise. The fuzzy intermediate state determination module is used to determine that the time-frequency domain sub-band energy distribution is a fuzzy intermediate state if the energy distribution of the time-frequency domain sub-band fluctuates continuously within a preset switching frequency range, and inputs the original signal sequence corresponding to the fuzzy intermediate state into a preset interference feature mapping model to obtain the interference type of the fuzzy intermediate state. An interference filtering module is used to compare the interference type with a preset short-term interference spectrum pattern library. If they match, a frequency domain mask matrix is generated, and the spectrum data of the original signal sequence is corrected and reconstructed to obtain the purified state signal. The status output module is used to extract time-frequency domain features from the purified status signal to obtain real-time spectrum data, compare the real-time spectrum data with the spectrum information of normal locking and unlocking actions, and output the real-time status monitoring result of the electromagnetic lock.