A proximity switch state anomaly detection method and system using a time sequence neural network
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-08-11
AI Technical Summary
[0005]针对现有技术的不足,本发明提供了一种采用时序神经网络的接近开关状态异常检测方法及系统,解决了工业设备在长期运行过程中,接近开关的感应性能衰减与机械传动部件的摩擦阻尼变化通常叠加发生,导致单一依赖时间维度的触发信号分析难以准确区分电气元器件退化与机械部件磨损的问题
1、本发明通过计算平滑电流序列的积分值生成动态补偿系数,并结合该系数对电流极值时间点进行修正得到补偿时间基准点。该技术特征量化并排除了机械传动阻尼变化对时间基准造成的干扰,使得提取的相对相位差数据能够客观反映接近开关自身的电气性能衰减,有效解决了机电部件同时发生退化时单一时间维度分析导致的状态误判问题。
Smart Images

Figure CN122548518A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial sensor status data processing and pattern recognition technology, specifically to a method and system for detecting abnormal status of proximity switches using a temporal neural network. Background Technology
[0002] In automated industrial control systems, proximity switches, as conventional position sensing elements, are commonly used for detecting the position and protecting the travel of actuators. With prolonged operation, the sensing performance of proximity switches degrades, resulting in hysteresis. Simultaneously, the mechanical damping of internal mechanical transmission components changes due to friction and wear.
[0003] Currently, condition monitoring of proximity switches typically relies on analyzing the time delay of the switch's trigger signal. However, in actual operating conditions, aging of electrical components and wear of mechanical parts often occur simultaneously, and the extension of the device's trigger time is a combined result of electrical response attenuation and changes in mechanical damping. Simply analyzing the time delay of the trigger signal makes it difficult to isolate the interference caused by mechanical damping fluctuations on the time reference, and it is impossible to accurately distinguish whether the equipment abnormality originates from the electrical degradation of the proximity switch itself or from abnormal wear of mechanical parts.
[0004] Furthermore, when servo driver current is introduced as an auxiliary judgment parameter, the high-frequency chopping of inverters in industrial settings introduces noise into the current signal. Conventional low-pass filtering algorithms, while smoothing and denoising the signal, introduce phase delay errors, causing the extracted current extrema to shift on the time axis. This shift disrupts the alignment accuracy between the current data and the proximity switch level data in the time domain, affecting subsequent data comparison calculations. Due to interference from electromechanical coupling effects and time reference shifts caused by signal preprocessing, existing abnormal state detection methods struggle to extract accurate degradation features, resulting in low accuracy in state classification and diagnosis under electromechanical composite degradation conditions. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for detecting abnormal states of proximity switches using a time-series neural network. This solves the problem that during long-term operation of industrial equipment, the degradation of the sensing performance of proximity switches and the changes in frictional damping of mechanical transmission components often occur simultaneously, making it difficult for trigger signal analysis relying solely on the time dimension to accurately distinguish between the degradation of electrical components and the wear of mechanical parts.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method and system for detecting abnormal states of proximity switches using a temporal neural network, comprising the following steps: By coordinating state monitoring and data acquisition, the raw current sequence of the servo driver and the digital level sequence of the proximity switch are synchronously acquired within a defined transient alignment window. Zero-phase forward and reverse filtering is performed on the original current sequence to obtain a smooth current sequence; The total energy dissipation of the current operating cycle is calculated based on the smooth current sequence, and a dynamic compensation coefficient is generated by combining the preset baseline energy integral value. Dynamic anchor points in the physical dimension are extracted based on smooth current sequences. The coordinates of the dynamic anchor points are corrected using dynamic compensation coefficients, and normalized compensation anchor points are derived. Edge transition detection is performed on the digital level sequence to obtain the trigger time coordinates, and the relative phase difference data between the digital level sequence and the normalized compensation anchor point on the time axis is calculated. By combining continuous multi-cycle relative phase difference data, dynamic compensation coefficients, and the switching duty cycle data of proximity switches, a multi-source correlated time-series feature tensor is constructed. The multi-source associated temporal feature tensor is input into a pre-trained hybrid temporal neural network model for inference and recognition, and the diagnostic results of the device's operating status are output.
[0007] Furthermore, the method for determining the transient alignment window and synchronously acquiring data includes: cyclically reading the instruction status register of the motion controller; recording the start time when a flag indicating the issuance of a deceleration and braking command is effectively flipped; recording the end time when a flag indicating the actuator has reached the target position and maintained the holding torque; and using the start and end times to extract the transient alignment window in a single running cycle on the time axis; within the transient alignment window, synchronously reading the quadrature-axis current data of the underlying servo driver and the proximity switch status signal connected to the input terminal at a fixed sampling period based on a distributed clock synchronization mechanism to construct the original current sequence and the digital level sequence.
[0008] Furthermore, the process of performing zero-phase forward and reverse filtering on the original current sequence includes: inputting the original current sequence into a group-delay-free discrete-time low-pass filter with a preset cutoff frequency in forward time order to obtain a preliminary smoothed sequence; performing a time-dimension reversal operation on the preliminary smoothed sequence to obtain a reversed order result; inputting the reversed order result into the same low-pass filter to generate a secondary filtered sequence; and performing a time-reversal operation again on the secondary filtered sequence to restore the data arrangement direction to the original forward time order state and output a smoothed current sequence.
[0009] Furthermore, the method for generating dynamic compensation coefficients is as follows: the discrete absolute value integral of the smooth current sequence within the transient alignment window is calculated using a discrete numerical integration algorithm, which is used as the total energy dissipation value of the current operating cycle; it is determined whether the total energy dissipation value is greater than the preset minimum effective energy threshold; if it is greater, the reference energy integral value retrieved from the non-volatile memory is divided by the total energy dissipation value to calculate and generate dynamic compensation coefficients for quantifying the degree of mechanical damping offset.
[0010] Furthermore, the method for extracting dynamic anchor points in the physical dimension includes: applying a numerical differentiation algorithm to calculate the time-domain first derivative sequence of the smooth current sequence; traversing the first derivative sequence along the time coordinate axis, retrieving adjacent discrete points that satisfy the sign flip condition and classifying them into a candidate set; in the smooth current sequence, extracting the data point with the largest absolute value of the corresponding current in the candidate set, and using the time coordinate of this data point as the original dynamic anchor point.
[0011] Furthermore, the method for deriving the normalized compensation anchor point includes: performing a subtraction operation between the original dynamic anchor point and the start time of the transient alignment window to obtain the relative distance; multiplying the relative distance by the dynamic compensation coefficient to obtain the corrected relative offset; and superimposing the corrected relative offset onto the start time to derive the normalized compensation anchor point for suppressing mechanical damping fluctuation interference.
[0012] Furthermore, the method for obtaining the trigger time coordinate and calculating the relative phase difference data is as follows: perform a first-order forward differential operation on the digital level sequence, and determine the discrete time coordinate of the effective level flip based on the operation difference; after detecting the level flip edge, read the level state data within the preset time window to confirm the state. If the level state does not fall back within the window, extract the first transition edge that meets the condition as the effective trigger time coordinate; perform a subtraction operation between the trigger time coordinate and the normalized compensation anchor point, calculate the absolute span of the two on the time axis, and generate single-cycle relative phase difference data stripped of single-run speed interference.
[0013] Furthermore, the method for constructing a multi-source correlation time-series feature tensor includes: establishing a sliding data buffer window with a time step length of N, collecting a feature set containing relative phase difference data, dynamic compensation coefficients, and switch duty cycle data periodically; performing data normalization preprocessing on each type of feature sequence within the sliding data buffer window; extracting the normalized feature values within any time step to construct a one-dimensional feature row vector, and stacking the feature row vectors of N consecutive periods in ascending order of time in the vertical dimension to generate a two-dimensional feature tensor matrix with a fixed dimension of N×3, which serves as the multi-source correlation time-series feature tensor.
[0014] Furthermore, the steps for performing data normalization preprocessing include: calculating the difference between the maximum and minimum values in the feature sequence to be normalized; determining whether the difference is greater than a preset constant; if the difference is not greater than the preset constant, directly assigning zero to all normalized values in the feature sequence window; if the difference is greater than the preset constant, using the min-max normalization algorithm to map the feature values to a dimensionless interval.
[0015] Furthermore, the pre-trained hybrid temporal neural network model is generated through the following offline construction process: multiple sets of physical simulation tests are performed on a device bench to collect underlying data and process it into a training sample set; a one-hot encoded real state label vector is assigned to each sample; the deviation between the predicted probability vector output by the model and the real state label vector is quantified using the cross-entropy loss function; an adaptive moment estimation optimization algorithm is used to update the network weights in reverse according to the gradient of the loss function until the loss value on the validation set converges, and then the network weights are solidified and derived.
[0016] Furthermore, the inference process of the pre-trained hybrid temporal neural network model includes: receiving a two-dimensional multi-source correlation temporal feature tensor through a one-dimensional convolutional layer, and extracting local features by sliding the convolutional kernel along the time dimension; performing dimensionality reduction on the local features output by the one-dimensional convolutional layer through a max pooling layer; receiving the dimensionality-reduced local features through a long short-term memory network layer, extracting the degradation trend and nonlinear correlation within the sliding window, and outputting the hidden layer state vector; mapping the hidden layer state vector to a predefined state space through a fully connected layer and activation function, performing probability normalization calculation, and outputting the predicted probability vector.
[0017] Furthermore, the diagnostic results of the output device operating status include: extracting the maximum value in the predicted probability vector; determining whether the maximum value is not less than a preset confidence threshold; if it is not less than the confidence threshold, confirming the classification is valid and outputting the device physical status label corresponding to the maximum value. The status abnormality category label includes at least four categories: normal status, proximity switch sensing attenuation, mechanical transmission damping abnormality, and electromechanical comprehensive degradation; if the maximum value is less than the preset confidence threshold, determining that the current operating condition belongs to the classification boundary or unknown abnormality, and generating an unknown status warning code.
[0018] A second aspect of the present invention provides a proximity switch state anomaly detection system employing a temporal neural network, comprising: The multi-source timing data acquisition module is used to synchronously acquire the raw current sequence of the servo driver and the digital level sequence of the proximity switch within a defined transient alignment window; The zero-phase timing reconstruction module is used to perform zero-phase forward and reverse filtering on the original current sequence to obtain a smooth current sequence; An energy-type compensation parameter generation module is used to calculate the total energy dissipation based on a smooth current sequence and generate dynamic compensation coefficients by combining the reference energy integral value. The compensation-type feature extraction module is used to extract dynamic anchor points based on smooth current sequences and derive normalized compensation anchor points by coordinate correction, and to perform transition detection on digital level sequences to obtain trigger time coordinates and calculate relative phase difference data. The multi-source feature tensor construction module is used to construct a multi-source correlated temporal feature tensor by combining continuous multi-period relative phase difference data, dynamic compensation coefficients, and switching duty cycle data. The status anomaly category identification module is used to input multi-source associated temporal feature tensors into a pre-trained hybrid temporal neural network model for inference and identification, and output diagnostic results of the device's operating status.
[0019] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method steps.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method steps.
[0021] This invention provides a method and system for detecting anomalies in the state of proximity switches using a temporal neural network. It offers the following advantages: 1. This invention generates a dynamic compensation coefficient by calculating the integral value of a smoothed current sequence, and then uses this coefficient to correct the extreme current time point to obtain the compensation time reference point. This technical feature quantifies and eliminates the interference caused by changes in mechanical transmission damping on the time reference, enabling the extracted relative phase difference data to objectively reflect the electrical performance degradation of the proximity switch itself, effectively solving the problem of misjudgment of the state caused by single-time-dimensional analysis when electromechanical components degrade simultaneously.
[0022] 2. The original current sequence of this invention undergoes sequential discrete low-pass filtering in both forward and reverse time order to obtain a smooth current sequence. This feature eliminates the phase delay error generated by traditional low-pass filters while filtering out high-frequency chopping noise from the servo driver, ensuring the accuracy of the coordinates of the current extreme points on the time axis and providing a reliable data foundation for subsequent calculations of relative phase difference data.
[0023] 3. This invention concatenates relative phase difference data, dynamic compensation coefficients, and switch duty cycle data from multiple consecutive periods to construct a multi-source correlated temporal feature tensor, which is then input into a model cascaded with a one-dimensional convolutional layer and a long short-term memory network for inference. This process utilizes convolutional layers to extract local correlation features between different physical variables and long short-term memory networks to extract long-term degradation evolution trends across periods, thereby improving the accuracy of classification and diagnosis of equipment under combined conditions of abnormal mechanical damping and electrical induction attenuation. Attached Figure Description
[0024] Figure 1 This is a system architecture diagram of an embodiment of the present invention; Figure 2 This is a flowchart of a proximity switch state anomaly detection method according to an embodiment of the present invention; Figure 3This is a timing logic diagram of the multi-source data synchronous acquisition mechanism according to an embodiment of the present invention; Figure 4 This is a diagram illustrating the zero-phase forward and reverse filtering principle and timing reconstruction of an embodiment of the present invention. Figure 5 This is a schematic diagram illustrating the mechanical damping quantification and dynamic compensation calculation principle of an embodiment of the present invention; Figure 6 This is a logic diagram for dynamic feature anchor point extraction and coordinate correction in an embodiment of the present invention; Figure 7 This is a timing diagram of cross-domain state transition and relative phase difference extraction according to an embodiment of the present invention; Figure 8 This is a schematic diagram illustrating the principle of constructing multi-source correlation temporal feature tensors according to an embodiment of the present invention. Figure 9 This is a logic diagram of offline model construction and deep learning-based device operation status evaluation and identification for embodiments of the present invention; Figure 10 This is a schematic diagram of zero-phase reconstruction and dynamic anchor point extraction in an embodiment of the present invention; Figure 11 This is a scatter plot of the characteristic distribution before and after damping compensation in an embodiment of the present invention; Figure 12 This is a multi-class confusion matrix diagram for the state anomaly category identification module in an embodiment of the present invention.
[0025] Among them, 10 is the multi-source time series data acquisition module; 20 is the target segment determination module; 30 is the zero-phase time series reconstruction module; 40 is the energy-type compensation parameter generation module; 50 is the compensation-type feature extraction module; 60 is the multi-source feature tensor construction module; and 70 is the state anomaly category identification module. Detailed Implementation
[0026] 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.
[0027] See attached document Figure 1 , Figure 1 This is a system architecture diagram according to an embodiment of the present invention. The present invention provides a proximity switch state anomaly detection system employing a temporal neural network, the system including: The multi-source timing data acquisition module 10 is configured to acquire multi-source timing data corresponding to the target runtime segment. Specifically, the multi-source timing data acquisition module 10 is based on distributed clock technology and establishes a synchronous communication mechanism with the servo drive node and distributed digital input terminals through a fieldbus protocol.
[0028] The target segment determination module 20 has its logic inputs configured to connect to the underlying control bus and cyclically parses the status identifier data of the target running segment. The target segment determination module 20 is used to identify the deceleration and braking flags of the actuator and define the transient alignment window on the physical time axis.
[0029] The zero-phase timing reconstruction module 30 is configured to receive the discrete current sequence from the servo driver. The zero-phase timing reconstruction module 30 incorporates a second-order Butterworth low-pass digital filter, which, through forward and reverse low-pass filtering, outputs a time-referenced current sequence that eliminates high-frequency noise from pulse-width modulation and has no group delay.
[0030] The energy-type compensation parameter generation module 40 is configured to perform absolute value discrete integration on the sequence output by the zero-phase timing reconstruction module 30. The energy-type compensation parameter generation module 40 compares the calculated current working cycle integral value with the reference integral value stored in the non-volatile memory to generate energy-type time base compensation parameters.
[0031] The compensation-type feature extraction module 50 is configured to receive the output signal of the zero-phase timing reconstruction module 30 and the high-frequency digital level sequence of the proximity switch. The compensation-type feature extraction module 50 performs a first-order differential operation to extract the braking extreme point as the initial anchor point, and applies the compensation coefficient output by the energy-type compensation parameter generation module 40 to perform linear coordinate correction on the initial anchor point, thereby calculating the absolute phase difference between the digital level sequence transition edge and the corrected anchor point.
[0032] The multi-source feature tensor construction module 60 is configured to cache phase difference data, compensation coefficients, and digital level sequence duty cycles for multiple consecutive working cycles, and combine one-dimensional time series data into a multi-source correlated time series feature matrix in the feature dimension.
[0033] The state anomaly category recognition module 70 is configured to receive the tensor matrix output by the multi-source feature tensor construction module 60. The state anomaly category recognition module 70 includes a one-dimensional convolutional layer, a long short-term memory network layer, and a fully connected activation layer. The state anomaly category recognition module 70 performs forward propagation calculation, outputs the state anomaly category probability vector, and generates the state anomaly category recognition result based on the maximum probability and confidence threshold.
[0034] See attached document Figure 2 , Figure 2This is a flowchart of a proximity switch state anomaly detection method according to an embodiment of the present invention. The present invention provides a proximity switch state anomaly detection method employing a temporal neural network, comprising the following steps: S100, the target segment determination module 20 cyclically reads the instruction status register of the motion controller. When a deceleration braking command is received, the start time is recorded; when the actuator reaches the target position and maintains the holding torque, the end time is recorded. The start and end times define the transient alignment window in a single running cycle. Within the transient alignment window, the multi-source timing data acquisition module 10 synchronously reads the quadrature-axis current data and the digital level sequence of the proximity switch from the servo drive process data object at a fixed sampling period, forming the original current sequence and the digital level sequence. S200, the zero-phase timing reconstruction module 30 performs zero-phase forward and reverse filtering on the original current sequence. The original current sequence is passed through a low-pass filter in forward time order to generate a preliminary smoothed sequence. The preliminary smoothed sequence is inverted on the time axis and passed through the same low-pass filter again to generate a secondary filtered sequence. The secondary filtered sequence is inverted on the time axis to reconstruct and output a smooth current sequence without group delay distortion. S300, the energy-type compensation parameter generation module 40 calculates the discrete absolute value integral of the smooth current sequence within the transient alignment window, characterizes the current integral characteristic value of a single braking process, and obtains the dynamic compensation coefficient that reflects the change in mechanical friction damping. S400, the compensation-type feature extraction module 50 calculates the time-domain first derivative of the smoothed current sequence. The time coordinates corresponding to the zero-crossing points of the optimal first derivative are used as the original dynamic anchor points. Using the start time of the transient alignment window as the origin, the dynamic compensation coefficient is multiplied by the relative distance of the original dynamic anchor points on the time axis to obtain the normalized compensation anchor points that avoid mechanical damping interference. S500, the compensation-type feature extraction module 50, applies an edge detection algorithm to extract the trigger time coordinates of state transitions in the digital level sequence. It calculates the subtraction difference between the trigger time coordinates and the normalized compensation anchor point to generate single-cycle relative phase difference data that removes running speed fluctuations. S600, the multi-source feature tensor construction module 60 collects single-cycle relative phase difference data, dynamic compensation coefficients, and the high-low level time ratio of the proximity switch within N consecutive transient alignment windows. These three sets of feature data are used as column vectors and concatenated to construct a multi-source correlated temporal feature matrix with dimensions of N rows and 3 columns. In S700, the anomaly category recognition module 70 inputs the multi-source correlated temporal feature matrix into a pre-trained cascaded neural network model. The model extracts local features through a one-dimensional convolutional layer, then extracts non-linear time-dependent features through a long short-term memory network layer, and performs state propagation in the hidden layer. The normalized exponential function of the fully connected layer is used to output the probability distribution of the corresponding device operating state classification dictionary. The system generates anomaly recognition results based on the classification results for subsequent applications.
[0035] The following section will further elaborate on the detailed execution logic of the above steps, combining the internal physical mapping rules of each module with the mathematical derivation of the algorithm.
[0036] See attached document Figure 3 , Figure 3 This is a timing logic diagram of a multi-source data synchronous acquisition mechanism according to an embodiment of the present invention. In this embodiment, in order to achieve accurate identification of the physical operating state and synchronous interception of multi-source heterogeneous data, the target segment determination module 20 and the multi-source timing data acquisition module 10 jointly execute step S100, which specifically includes the following sub-steps: S101, the target segment determination module 20 reads the instruction status register of the motion controller cyclically through the underlying control bus to obtain the real-time motion status word of the mechanical actuator.
[0037] In practice, when the target segment determination module 20 parses the flag bit in the status register indicating the issuance of the deceleration and braking command and it is validly flipped, the system calls the hardware clock to record the current moment and defines it as the start time of the transient alignment window. Subsequently, if the target segment determination module 20 parses a flag indicating that the actuator has reached the target position and the drive motor output shaft maintains the position holding torque, then this moment is recorded as the end time of the transient alignment window. Therefore, the system uses the start time and end time Extract the transient alignment window from a single running loop on the timeline, denoted as . For the reading method of the motion controller status register and the parsing of the register bit definitions, those skilled in the art can refer to conventional driver configuration file standards such as CiA402 for implementation. This state machine-based window definition method can effectively eliminate redundant data in the state of uniform speed operation or stationary idle state, reducing the load of subsequent calculations.
[0038] S102, within the defined transient alignment window Inside, the multi-source timing data acquisition module 10 is triggered to execute based on the bus distributed clock synchronization mechanism.
[0039] Specifically, the multi-source time-series data acquisition module 10 uses a fixed sampling period preset by the system. Perform synchronous data reading on the underlying device nodes. (Based on the sampling period) The determination of the sampling period typically requires a reasonable configuration combining the communication capabilities of the fieldbus and the Nyquist sampling theorem. For example, to ensure the capture of the high-frequency abrupt changes in transient braking current, the sampling period... The value range can be set from microseconds to milliseconds (e.g., 250 microseconds to 1 millisecond), and this period should generally not exceed the current loop control period of the underlying servo driver. The multi-source timing data acquisition module 10 extracts the real-time quadrature-axis current data of the motor from the process data object of the servo driver according to this period. The quadrature-axis current data is positively correlated with the output electromagnetic torque of the drive motor. During deceleration and braking, this current manifests as a reverse braking current, and its amplitude and waveform characteristics reflect the actual force conditions of the mechanical guide rail friction damping and inertial load, thus providing an objective physical reference for subsequent dynamic benchmark extraction.
[0040] S103, in coordination with the reading operation of quadrature axis current data, the multi-source timing data acquisition module 10 synchronously reads the proximity switch status signal connected to the digital input terminal and obtains the corresponding digital level sequence.
[0041] To avoid communication delays caused by the cyclic scanning cycle of traditional control systems, this embodiment preferably uses a fast digital input terminal that supports hardware interrupts and low-level timestamp recording to ensure the accuracy of capturing level transition moments. The system arranges the extracted quadrature-axis current data and digital level sequence in chronological order, constructing the original current sequence and digital level sequence within a transient alignment window.
[0042] In terms of data structure representation, the discrete sampling index is set as... ,in Let be a non-negative integer starting from 0 and incrementing sequentially. The corresponding discrete-time coordinates satisfy . and The original current sequence of the system is represented as follows: The digital level sequence constructed by the system is represented as follows: Among them, digital level sequence The element values contain only two logic levels: 0 and 1, which respectively map to the physical open and physical closed states of the proximity switch. The above processing synchronously converts the device's operating force state and sensor position feedback into a time-aligned discrete digital array, providing input data for subsequent signal reconstruction and feature calculation.
[0043] See attached document Figure 4 , Figure 4This is a zero-phase forward and reverse filtering principle and timing reconstruction diagram according to an embodiment of the present invention. After obtaining the aligned original data sequence, the zero-phase timing reconstruction module 30 executes step S200 to perform time-domain reconstruction on the original signal containing high-frequency noise.
[0044] S201, the internal inverter of the servo driver operates based on the principle of pulse width modulation, which causes the original current sequence acquired by the multi-source timing data acquisition module 10 to typically contain high-frequency chopping noise. To suppress the high-frequency glitches amplified by direct differentiation and to avoid the group delay error introduced by traditional low-pass filters, the zero-phase timing reconstruction module 30 is configured with a discrete-time low-pass filter function without group delay. .
[0045] As a preferred approach, this function uses a second-order Butterworth low-pass digital filter. The cutoff frequency of this filter... Its setting needs to be determined in conjunction with the hardware operating conditions. As a specific implementation example, the cutoff frequency... The value can be set to the range of 100Hz to 500Hz, which is much lower than the carrier frequency of 4kHz to 16kHz in general industrial inverters, effectively suppressing electromagnetic noise caused by switching operations; at the same time, it is higher than the current macroscopic dynamic response frequency of 10Hz to 50Hz under common mechanical braking conditions, thus completely preserving the low-frequency envelope characteristics corresponding to the real physical damping changes. The zero-phase timing reconstruction module 30 will convert the original current sequence into a single frequency range. Input the above filter in ascending time sequence to obtain a preliminary smoothed sequence. Satisfying the relation: ; After the above calculations, the amplitude of high-frequency noise in the sequence is initially attenuated, and its peak characteristics produce a unidirectional phase lag on the time axis.
[0046] S202, considering the group delay error present in the forward filtering, the system performs a time-dimension reversal operation on the initially smoothed sequence in the memory space.
[0047] Set the total number of discrete sampling points within the transient alignment window to , A positive integer, discrete sampling index The range of values is Define the time reversal operator as follows: For any input sequence Its reverse sequence satisfies The zero-phase timing reconstruction module 30 uses this operator to obtain the reverse order of the preliminary smoothed sequence and inputs it into a circuit with the same cutoff frequency. Filter In the process, a secondary filter sequence is generated. Its mathematical expression is: ; Since the data array passes through the filter in reverse time, the phase lag caused by this operation is equivalent to phase lead on the real physical time axis. This effect complements the phase lag generated during the forward filtering process.
[0048] S203, after acquiring the secondary filtered sequence, the zero-phase time-series reconstruction module 30 calls the time reversal operator again. The data arrangement is restored to its original time sequence, and a smooth current sequence is output. : ; Under this processing mechanism, the output smooth current sequence At the frequency domain level, the amplitude of the low-pass filter was attenuated by two series passes, reducing chopper noise interference. At the same time, the bidirectional processing kept the phase response of the overall system at zero, ensuring that the current peak representing the mechanical braking extreme value within the sequence did not shift in the time coordinate system, maintaining the spatiotemporal consistency of the physical state mapping, and providing underlying data support for the subsequent calculation of the absolute phase difference.
[0049] See attached document Figure 5 , Figure 5 This is a schematic diagram illustrating the mechanical damping quantification and dynamic compensation calculation principle according to an embodiment of the present invention. In this embodiment, considering that the equipment is prone to mechanical characteristic drift during long-term operation, the energy-type compensation parameter generation module 40 executes step S300, which quantifies the physical damping characteristics by processing the smoothed reconstructed current data. This step specifically includes the following sub-steps: S301, Energy-type compensation parameter generation module 40 extracts the smooth current sequence generated in the previous step. For this sequence, calculate its discrete absolute value integral within the transient alignment window.
[0050] The absolute integral of the quadrature-axis current characterizes the total electromagnetic work performed by the motor within a specific time period. During deceleration and braking, the electromagnetic energy output by the motor is primarily used to balance the inertia of the actuator and overcome the frictional damping of the mechanical transmission components. As the operating cycle increases, the lubrication performance of the equipment mechanism may decrease or localized wear may occur. This change in physical state typically leads to an increase in internal frictional damping. To maintain the preset motion trajectory, the servo system will output a larger torque, thus altering the corresponding integral value of the current. Based on this mapping relationship, the system uses discrete trapezoidal integral or cumulative summation algorithms to calculate the total energy dissipation for the current operating cycle. Its discrete mathematical expression is: ; in, This represents the total number of discrete sampling points contained within the transient alignment window. This is the time interval between adjacent sampling points, i.e., the system sampling period.
[0051] S302, the system retrieves the pre-calibrated reference energy integral value from the non-volatile memory. .
[0052] Since the frictional characteristics of mechanical parts are easily affected by ambient temperature and the viscosity-temperature characteristics of lubricating grease, to ensure the objectivity of the reference data, as a preferred method, this reference energy integral value... The determination process is typically configured as follows: after the equipment is in its initial healthy operating period and has reached thermal equilibrium (e.g., after continuous operation for a specified time), the control equipment performs multiple cyclic braking operations under standard process parameters. The energy-type compensation parameter generation module 40 extracts the total energy dissipation value corresponding to a preset number (e.g., 50 to 100) braking cycles, calculates its mathematical average, and stores the result as a baseline energy integral value. This value serves as a reference benchmark for subsequent assessments of the equipment's mechanical condition.
[0053] S303, Energy-type compensation parameter generation module 40 combines the total energy dissipation value of the current period. Compared with the baseline energy integral value Calculate and generate dynamic compensation coefficients .
[0054] Compensation coefficient The formula used to quantify the deviation of the current mechanical damping state of the equipment from its initial healthy state is as follows: ; To prevent the current from approaching zero and causing a division-to-zero error due to abnormal coasting or servo disabling, the energy-type compensation parameter generation module 40 presets a minimum effective energy threshold. ,For example, It can be set as the baseline energy integral. 5% to 10%. The system determines before performing the division operation. Is it greater than .like Less than or equal to If the current period's data acquisition fails, the calculation of the dynamic compensation coefficient is stopped and the buffer is cleared. This process converts the change in friction damping into a quantized coefficient that can be used for coordinate correction.
[0055] See attached document Figure 6 , Figure 6This is a logic diagram for dynamic feature anchor point extraction and coordinate correction according to an embodiment of the present invention. In this embodiment, in order to extract a dynamic reference independent of equipment operating speed fluctuations and to minimize common-mode interference caused by mechanical state drift, the compensation-type feature extraction module 50 executes step S400, which includes the following specific sub-steps: S401, Compensation-type feature extraction module 50 receives the smoothed current sequence generated in the previous step. The time-domain first derivative sequence is calculated using a numerical differentiation algorithm.
[0056] Considering that directly performing two-point backward or forward differencing on discrete data often introduces phase shift errors and exacerbates local truncation effects, the system employs a central difference algorithm to perform derivative calculations. The generated first-order derivative sequence is set as follows: Its corresponding discrete mathematical formula is: ; in, and These represent the current calculation points. Backward and forward sampling time coordinates, This represents the time interval between adjacent sampling points. For the central difference algorithm's handling of the beginning and end boundary points of the sequence, technicians can also use conventional algorithms such as forward difference or backward difference as equivalent alternatives.
[0057] S402, after obtaining the first derivative sequence, the compensation-type feature extraction module 50 traverses the sequence along the time coordinate axis to find the zero-crossing point.
[0058] The zero-crossing point corresponds to the current extreme point where the inertial load force and friction damping force reach transient equilibrium during deceleration and braking. The system searches for adjacent discrete points in the first derivative sequence that satisfy the sign reversal condition, i.e., the determination formula: ; Whether this condition holds true. To eliminate pseudo-zero-crossing interference caused by minute current fluctuations, the system includes discrete time points that satisfy the above conditions in the candidate set. The system in the original smooth current sequence... In the process, the data point with the largest absolute value of the corresponding current in the candidate set is extracted, and its time coordinate is used as the original dynamic anchor point. When an empty candidate set is detected, the system records the abnormal operating condition flag and discards the feature extraction for that cycle, or selects the midpoint time of the transient alignment window as an alternative anchor point. This extreme point serves as the initial dynamic benchmark, reducing the interference of equipment operating speed fluctuations on the time benchmark.
[0059] S403, the compensating feature extraction module 50 uses the start time of the transiently aligned window. Using the origin of the coordinate system, calculate the relative offset of the original dynamic anchor point on the time axis and perform normalization correction.
[0060] In the specific calculation process, the original dynamic anchor point With start time Perform subtraction to obtain the relative distance. Based on the energy assessment results obtained in the preceding steps, the compensation feature extraction module 50 calls the dynamic compensation coefficient. , relative distance With dynamic compensation coefficient Multiply to obtain the corrected relative offset. ,Right now .
[0061] In practical applications, the coefficient representing the change in energy dissipation will be... Relative distance to the position characterizing spatial dynamics Multiplicative fusion can typically amplify the time-domain drift effect caused by mechanical damping degradation to some extent, thereby increasing the data differentiation between healthy and abnormal states. The system will calculate the corrected relative offset. Superimposed to start time The normalized compensation anchor point is derived. The complete calculation formula is as follows: ; This normalized compensation anchor point, by incorporating the correction parameters of the energy dimension, constructs a reference coordinate system to suppress mechanical damping fluctuation interference, providing a stable reference system for subsequent evaluation of the trigger phase of the proximity switch digital level signal.
[0062] See attached document Figure 7 , Figure 7 This is a timing diagram for cross-domain state transition and relative phase difference extraction according to an embodiment of the present invention. In this embodiment, in order to convert the switching action state in physical space into time-dimensional analysis features, the compensation-type feature extraction module 50 executes step S500, the specific implementation details of which are as follows: S501, the compensation-type feature extraction module 50 extracts the digital level sequence synchronously acquired within the transient alignment window in the previous step. For this sequence, the system applies an edge detection algorithm to identify the moments when the level states change abruptly.
[0063] As a preferred approach, the system uses digital level sequences. Perform a first-order forward difference operation to calculate the state difference between adjacent discrete sampling points. The calculation formula is as follows: ; To prevent out-of-bounds errors in the underlying array during traversal, the index of this discrete operation is set. The range of values is limited to ,in This represents the total number of data points contained in the sequence. Combined with the aforementioned setting that the level sequence value can only be 0 or 1, when the difference... When the result of the operation is 1, the system determines that a rising edge of a transition from low to high level has occurred; when the difference is... When the calculation result is -1, it is determined that a falling edge has occurred, indicating a transition from high to low level. The system extracts the discrete time coordinates of the corresponding valid operating edge based on the hardware wiring logic of the proximity switch in the field (e.g., normally open or normally closed contact configuration).
[0064] S502, in order to eliminate glitches and jumps in the proximity switch signal caused by electromagnetic interference, the system is configured with a status confirmation mechanism in the edge detection stage.
[0065] Upon detecting a level transition edge, the system reads the level state data within a preset time window (e.g., 5 to 10 consecutive sampling periods). If the level state does not fall back within this window, the system confirms the transition as a valid trigger action and uses the discrete time coordinate of the initial transition as the trigger time coordinate. If the voltage level returns to its original value, the system determines it as an interference glitch and ignores it. For repeated triggering of the proximity switch caused by oscillations at the end of the mechanical braking mechanism, the system extracts the first transition edge that meets the confirmation condition as the trigger time coordinate. If no valid transition is detected after traversing the sequence, the system records a no-valid-transition status flag and terminates the subsequent calculations for the current work cycle.
[0066] S503, upon obtaining a valid confirmation of the trigger time coordinate. Subsequently, the compensatory feature extraction module 50 calls the normalized compensatory anchor points generated in the previous step. .
[0067] The system will trigger the time coordinates With normalized compensation anchor point Perform a subtraction operation to calculate the absolute span of the two on the time axis, generating single-cycle relative phase difference data. The corresponding mathematical expression is: ; Because the initial speed or load of the equipment fluctuates with each operation, directly reading the absolute time of the switching action is prone to time drift. By mapping the switching action moment to a dynamic reference coordinate system that incorporates damping compensation, the system largely eliminates the absolute time error caused by speed fluctuations during a single operation. The output relative phase difference data... It can reflect the relative change in the sensing distance attenuation of proximity switches or the mechanical installation position offset over time in a relatively pure way, providing state-related data for the subsequent construction of multi-source feature matrices.
[0068] See attached document Figure 8 , Figure 8 This is a schematic diagram illustrating the construction principle of a multi-source associated temporal feature tensor according to an embodiment of the present invention. In this embodiment, to meet the input format requirements of subsequent deep learning models (such as long short-term memory networks or convolutional neural networks) for high-dimensional temporal data and to effectively fuse state information from multiple physical dimensions, the multi-source feature tensor construction module 60 executes step S600, which specifically includes the following sub-steps: S601, the multi-source feature tensor construction module 60 establishes a sliding data cache window based on first-in-first-out logic in the system memory. During continuous operation of the device, the system collects and caches multi-source feature data in each working cycle.
[0069] As a preferred approach, the feature set extracted in each cycle contains three dimensions of variables: the relative phase difference data output by the compensated feature extraction module 50. The dynamic compensation coefficient generated by the energy-type compensation parameter generation module 40 And analyze the digital level sequence output by the multi-source timing data acquisition module 10 within the transient alignment window to calculate the acquired switching duty cycle data. The duty cycle data of a switch represents the proportion of time that the sensor contacts are in the closed and open states, and its value changes can reflect the aging and hysteresis of electrical components. The specific calculation logic of the duty cycle can be directly calculated from the ratio of the duration of the high and low levels.
[0070] To construct a historical state sequence with temporal depth, the system sets the time step length of the sliding data cache window to N, where N is a preset positive integer. The specific value of the time step length N typically needs to consider both the natural evolution cycle of the equipment's mechanical degradation and the controller's memory processing capabilities. As a concrete implementation example, for conventional industrial pneumatic or electric actuators, N can be configured to range from 30 to 120 working cycles. In actual operation, during the system startup or restart reset phase, the cached data is usually less than N cycles. To avoid subsequent matrix dimension loss and algorithmic dead zones, the multi-source feature tensor construction module 60 incorporates sequence filling logic. Specifically, the system uses a strategy of filling with zero values or copying the data from the first valid cycle to fill in missing time steps, ensuring the constancy of the data window output dimension.
[0071] S602, considering that the relative phase difference, dynamic compensation coefficient and switching duty cycle come from different physical measurement domains, the three have significantly different dimensions and numerical magnitudes.
[0072] Directly concatenating the original values often leads to gradient vanishing or unbalanced weight updates during the training and inference processes of the neural network. To mitigate this problem, the multi-source feature tensor construction module 60 performs data normalization preprocessing on various feature sequences within the sliding data buffer window. Taking a relative phase difference sequence containing N sampling periods as an example, the sequence within the current window is set as follows: The system uses the minimum-maximum normalization algorithm to map it to a dimensionless interval. The specific conversion formula is as follows: ; in, This is the normalized relative phase difference value. This is the original value at the current time step. and These are the sliding window sequences. The maximum and minimum values in the sequence are considered. It is worth noting that under specific operating conditions (e.g., the equipment is in an absolutely steady state for a long time or a large number of repeated values are used for filling during the initial startup phase), the maximum and minimum values within the sequence may be equal or very close. To prevent the denominator from being zero, the multi-source feature tensor construction module 60 calculates the maximum and minimum values before normalization. The difference is calculated, and it is determined whether the difference is greater than a preset constant. (For example, it can be set) =10 -6 If the difference is not greater than This indicates that the sequence characteristics do not fluctuate significantly, and the system will use all normalized values within this window. The value is assigned to 0. If the difference is greater than 0... Then, the aforementioned normalization calculation is performed. The system synchronously performs the above isomorphic operation on the dynamic compensation coefficient sequence and the switch duty cycle sequence, thereby unifying the feature values of all dimensions into the interval [0,1], which improves the numerical stability of cross-domain data fusion.
[0073] S603, after obtaining the normalized feature sequences, the multi-source feature tensor construction module 60 performs a high-dimensional feature tensor splicing operation.
[0074] The system sets the time step index to n, where n ranges from [1, N]. At any time step n, the multi-source feature tensor construction module 60 extracts the corresponding normalized relative phase difference. Normalized dynamic compensation coefficient and normalized switch duty cycle Construct one-dimensional feature row vectors The system stacks the feature row vectors of N consecutive periods in ascending order of time along the vertical dimension to generate a two-dimensional feature tensor matrix. Its mathematical expression is: ; The generated feature tensor matrix is obtained through this concatenation logic. The dimensions of the matrix are strictly fixed at N×3. This matrix preserves the temporal dependencies of the mechanical equipment's state evolution over the working cycle in the row dimension, and integrates cross-domain correlation information of spatial location, energy dissipation, and electrical characteristics in the column dimension. This feature tensor matrix will be directly input into the subsequent neural network model to comprehensively characterize the physical relationship between sensor sensing bias and mechanical damping degradation.
[0075] See attached document Figure 9 , Figure 9 This is a logic diagram for offline model construction and deep learning-based device operation status assessment and identification according to an embodiment of the present invention. In this embodiment, to achieve automatic mapping from high-dimensional abstract features to specific physical states, a hybrid temporal neural network model is first trained and constructed offline. Then, the state anomaly category identification module 70 loads the solidified network weights, performs online pattern recognition on the input data, and outputs the final diagnostic result. This step specifically includes the following sub-steps: S701, construct a pre-trained hybrid temporal neural network model.
[0076] The system pre-performs multiple sets of simulated operating condition tests on the equipment test bench. Specific operations include simulating sensing distance attenuation by adjusting the mounting gap of the proximity switch using physical shims, and simulating mechanical guide rail wear by adjusting the additional load on the servo motor. Simultaneously, the system collects low-level sensor data under the corresponding operating conditions and processes it according to the aforementioned steps to generate a batch of multi-source correlated time-series feature tensors corresponding to different operating conditions as training samples. To objectively evaluate model performance and prevent overfitting, the system randomly divides the collected sample set into training, validation, and test sets according to a preset ratio (e.g., 70%, 15%, 15%). Based on manually injected fault types, technicians assign one-hot encoded real-state label vectors to each sample. During the iterative update phase of the model parameters, the system employs the cross-entropy loss function. Quantization model predicts probability vector With the real state label vector The deviation between them.
[0077] ; in, and Represent the true label vector and the predicted probability vector at the th... The training platform employs an adaptive moment estimation optimization algorithm, updating the weights and bias parameters of the network layers based on the gradients calculated from the loss function. As a preferred hyperparameter setting, the initial learning rate can be set between 0.001 and 0.005, and the batch size can be configured to 32 or 64. This training process continues until the loss value on the validation set converges and stabilizes, no longer showing a significant decrease. The system then exports the solidified network weights and distributes them online to the state anomaly category recognition module 70 within the industrial field controller.
[0078] S702, the state anomaly category identification module 70 loads the solidified network weights and deploys a hybrid temporal neural network model.
[0079] The temporal neural network model employs a topology that cascades a one-dimensional convolutional neural network and a long short-term memory network. The model's input receives a two-dimensional feature tensor matrix with dimensions N×3. The input data is first fed into a one-dimensional convolutional layer. The kernel of the one-dimensional convolutional layer slides along the time dimension, extracting local features related to phase difference, compensation coefficient, and duty cycle within the same time step and its neighboring periods. For example, the number of output channels of the one-dimensional convolutional layer can be 16 to 32, and the kernel size can be 3 to 5. The output of the convolutional layer is then dimensionality-reduced by a max-pooling layer before being input into a long short-term memory (LSM) network layer. The LSM network extracts the long-term degradation trend and nonlinear correlation of local fusion features within the sliding window. The number of hidden layer nodes in the LSM network can be configured from 64 to 128.
[0080] In S703, the hidden state vector output by the Long Short-Term Memory (LSTM) network layer is mapped to the target state space via a fully connected layer, and then connected to the Softmax activation function for probability normalization calculation, outputting a predicted probability vector.
[0081] Set the total number of predefined device physical state categories to , It is a positive integer greater than 1. As an implementation example, set... =4, corresponding to four typical operating conditions: "normal state", "proximity switch induction attenuation", "abnormal mechanical transmission damping", and "comprehensive electromechanical degradation". The model outputs a predicted probability vector. ,in This indicates that the current device belongs to the first... The confidence probability of a class state is calculated using the following formula: ; in, The first output of the fully connected layer The original log-log odds of a neuron.
[0082] S704, the status anomaly category identification module 70 performs confidence boundary verification on the predicted probability vector and outputs the diagnostic results of the device operating status.
[0083] The state anomaly category identification module 70 is equipped with a confidence boundary verification mechanism. The system extracts the prediction probability vector. The maximum value in And determine whether it is not less than the preset confidence threshold. .For example, It can be configured from 0.75 to 0.85. If... If the system confirms the classification is valid, it outputs the status label corresponding to the highest probability; if The system determines that the current operating condition belongs to the classification boundary or an unknown anomaly, and generates an "unknown state" warning code.
[0084] Specific application examples: Application scenario settings: This embodiment uses a high-speed CNC machine tool feed servo platform in a precision manufacturing workshop as an example. The platform is driven by an AC servo motor and a ball screw, with an inductive proximity switch installed at the end as a home / limit sensor. After long-term operation, the equipment faces two intertwined physical degradation problems: first, the mechanical friction damping increases due to guide rail lubrication degradation; second, the sensing distance of the proximity switch decreases due to cutting fluid oil mist coverage and component aging.
[0085] System execution flow and specific data mapping: S100 (Data Acquisition and Window Definition): The system target segment determination module parses the "return to origin braking" command executed by the feed axis and records the start time. When the motor speed drops to 0 and the holding torque is maintained, record the end time. The transient alignment window is defined as 300ms. Within this window, ... The sampling period synchronously collects the quadrature axis current of the servo motor and the level state of the proximity switch to obtain a one-dimensional discrete sequence containing 300 data points.
[0086] S200 (Signal Filtering and Reconstruction): Due to the 8kHz PWM chopping in the servo driver, the raw current is mixed with a large amount of high-frequency noise. The zero-phase timing reconstruction module calls a second-order Butterworth low-pass filter (with a cutoff frequency configured to 120Hz) to perform forward and reverse filtering on the raw current, outputting a smooth time-referenced current sequence without group delay.
[0087] S300 (Damping Energy Assessment): The baseline energy integral value calibrated during the first month of healthy operation of the system-recalled equipment. The total energy dissipation for the current period is calculated by performing a trapezoidal integral on the absolute value of the smoothed current for the current period. (This indicates that increased frictional resistance leads to increased work done.) A dynamic compensation coefficient is generated. .
[0088] S400 (Dynamics Reference Extraction and Correction): Calculates the first-order central difference of a smooth current sequence to find zero-crossing points (current peaks). Extracts the original dynamic anchor points corresponding to physical equilibrium. Linear correction is performed using compensation coefficients, and the normalized compensation anchor point is calculated. .
[0089] S500 (Cross-Domain Phase Extraction): Performs edge detection on the level sequence to extract the discrete-time coordinates of the actual triggering of the proximity switch. ms. Calculate the relative phase difference per single period. =145-138.15=7.85ms. (Without damping compensation, this difference is only -4ms, and the true electrical delay characteristics will be masked by the deceleration caused by mechanical damping).
[0090] S600 (Tensor Construction): System Cache Continuity Each cycle Compensation coefficient The duty cycle data, after being normalized by Min-Max, is then spliced together to generate the data. Two-dimensional characteristic tensor matrix .
[0091] S700 (Network Inference and Output): [This will...] The model is fed into a pre-trained 1D-CNN+LSTM cascaded network. After forward propagation, the Softmax layer outputs probability distribution vectors corresponding to four states (normal, sensor degradation, mechanical wear, and overall degradation). Maximum probability 0.88 is greater than the confidence threshold. 0.80, the system outputs the status anomaly identification result for the proximity switch sensing attenuation category.
[0092] To verify the effectiveness of the "multi-source characteristic time-series network based on current reconstruction and damping compensation" introduced in this invention, 5000 cycles of accelerated life testing were conducted on the aforementioned machine tool bench, with varying degrees of mechanical damping increase and sensor gap change injected.
[0093] The experiment set up three algorithm models for comparison: Traditional Solution A (Time Domain Absolute Threshold Method): Relies solely on the absolute timer inside the motion controller to determine whether the proximity switch trigger time exceeds the fixed tolerance band.
[0094] Compared to Scheme B (uncompensated timing network method): the S300 and S400 damping compensation steps in this invention are omitted, and the uncorrected absolute phase difference and duty cycle are directly input into the LSTM network.
[0095] Solution C of the present invention (hybrid domain compensation + joint neural network): adopts the complete process of the present invention.
[0096] Test result data comparison table: Experimental data shows that traditional scheme A, unable to decouple fluctuations in equipment operating speed and changes in damping, is prone to misinterpreting mechanical stalls as sensor malfunctions (false alarm rate as high as 22.4%). While scheme B utilizes neural networks to process timing, its accuracy is limited because it fails to remove mechanical common-mode interference from input features. The present invention's scheme C extracts dynamic compensation coefficients through energy assessment. The feature was successfully aligned in the physical coordinate system, which improved the final classification accuracy to 98.1% and reduced the false positive rate to 1.8%, fully demonstrating the superiority of cross-domain feature compensation combined with cascaded neural networks.
[0097] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for detecting abnormal states of proximity switches using a temporal neural network, characterized in that, include: Acquire the raw current sequence of the servo driver and the digital level sequence of the proximity switch within a set time window during the operating cycle of the target device; The original current sequence is low-pass filtered to obtain a smooth current sequence; The dynamic compensation coefficient for the current period is calculated based on the integral value of the smoothed current sequence. The extreme current time points are extracted from the smooth current sequence, and the extreme current time points are corrected by combining the dynamic compensation coefficient to obtain the compensation time reference point. Extract the trigger time coordinates of the state transition in the digital level sequence, and calculate the difference between the trigger time coordinates and the compensation time reference point to obtain the relative phase difference data; The relative phase difference data, the dynamic compensation coefficient, and the switch duty cycle data calculated based on the digital level sequence are concatenated to construct a multi-source correlated time series feature tensor. The multi-source associated temporal feature tensor is input into a pre-trained temporal neural network model for feature extraction and classification, and the output is a classification result used to characterize the abnormal state category of the proximity switch.
2. The method for detecting abnormal states of a proximity switch using a time-series neural network according to claim 1, characterized in that, The acquisition of the raw current sequence of the servo driver and the digital level sequence of the proximity switch within a set time window of the target device's operating cycle includes: The motion controller's status register is analyzed, and the moment when the deceleration and braking command is issued is taken as the start time, and the moment when the command to reach the target position is issued is taken as the end time. The set time window is obtained by interpolating the start time and the end time. Within the set time window, the current data of the servo driver and the level data of the proximity switch are read synchronously at a set sampling period to construct the original current sequence and the digital level sequence, respectively.
3. The method for detecting abnormal states of a proximity switch using a time-series neural network according to claim 1, characterized in that, The step of performing low-pass filtering on the original current sequence to obtain a smooth current sequence includes: The original current sequence is input into a discrete-time low-pass filter with a preset cutoff frequency in ascending time order to obtain a preliminary filtered sequence. The preliminary filtering sequence is input into the discrete-time low-pass filter in reverse time order to obtain the secondary filtering sequence. The smoothed current sequence is obtained by arranging the secondary filter sequence in reverse chronological order.
4. The method for detecting abnormal states of proximity switches using a time-series neural network according to claim 1, characterized in that, The step of calculating the dynamic compensation coefficient for the current period based on the integral value of the smoothed current sequence includes: Calculate the discrete absolute value integral of the smoothed current sequence within the set time window to obtain the total energy dissipation of the current period; Determine whether the total energy dissipation is greater than the set minimum effective energy threshold; If the total energy dissipation is greater than the minimum effective energy threshold, the preset baseline energy integral value is divided by the total energy dissipation to obtain the dynamic compensation coefficient.
5. The method for detecting abnormal states of a proximity switch using a time-series neural network according to claim 1, characterized in that, The step of extracting the extreme current time points from the smoothed current sequence and correcting these extreme time points using the dynamic compensation coefficient to obtain the compensation time reference point includes: Calculate the first derivative sequence of the smoothed current sequence; Candidate points that satisfy the sign flipping condition are selected from the first derivative sequence, and the time coordinates of the data points with the largest absolute current values among the candidate points are extracted from the smooth current sequence as the current extreme value time points. Obtain the start time corresponding to the set time window, calculate the difference between the current extreme value time point and the start time, and multiply the difference by the dynamic compensation coefficient to obtain the correction offset. The corrected offset is added to the starting time to obtain the compensation time reference point.
6. The method for detecting abnormal states of a proximity switch using a time-series neural network according to claim 1, characterized in that, The step involves extracting the trigger time coordinates of state transitions from the digital level sequence and calculating the difference between the trigger time coordinates and the compensation time reference point to obtain relative phase difference data, including: Calculate the first-order forward difference for the digital level sequence and extract the level transition edges corresponding to the discrete time coordinates where the difference is non-zero; If, after detecting the level transition edge, no reverse transition occurs in the level state within a preset time window, the first level transition edge is taken as the valid trigger time coordinate. The relative phase difference data is obtained by subtracting the compensation time reference point from the trigger time coordinate.
7. The method for detecting abnormal states of a proximity switch using a time-series neural network according to claim 1, characterized in that, The step of concatenating the relative phase difference data, the dynamic compensation coefficient, and the switch duty cycle data calculated based on the digital level sequence over multiple consecutive periods to construct a multi-source correlated time-series feature tensor includes: Within a sliding window containing N consecutive periods, the relative phase difference data, the dynamic compensation coefficient, and the switch duty cycle data for each period are collected to form a relative phase difference sequence, a dynamic compensation coefficient sequence, and a switch duty cycle sequence, respectively. The relative phase difference sequence, the dynamic compensation coefficient sequence, and the switch duty cycle sequence are respectively subjected to minimum-maximum normalization processing; The normalized relative phase difference data, the dynamic compensation coefficient, and the switch duty cycle data within the same period are concatenated into a one-dimensional feature row vector. The feature row vectors of multiple consecutive periods within the sliding window are stacked in the vertical dimension to obtain the two-dimensional multi-source correlation time series feature tensor.
8. The method for detecting abnormal states of a proximity switch using a time-series neural network according to claim 7, characterized in that, The step of performing minimum-maximum normalization processing on the relative phase difference sequence, the dynamic compensation coefficient sequence, and the switch duty cycle sequence includes: Calculate the difference between the maximum and minimum values in the sequence to be processed; If the difference is not greater than a preset constant, replace all values in the sequence with zero; If the difference is greater than a preset constant, the values in the sequence are mapped to the range of 0 to 1 based on the maximum and minimum values.
9. The method for detecting abnormal states of a proximity switch using a time-series neural network according to claim 1, characterized in that, The temporal neural network model includes a one-dimensional convolutional layer, a long short-term memory network layer, and a fully connected layer. The multi-source correlated temporal feature tensor is input into a pre-trained temporal neural network model for feature extraction and classification, outputting classification results to characterize the anomaly category of the proximity switch state, including: The local features are extracted by performing convolution operations on the multi-source associated temporal feature tensor through the one-dimensional convolutional layer. The local features are then input into the long short-term memory network layer to extract temporal features. Finally, the prediction probability vector is output through the fully connected layer and the activation function. Extract the maximum value from the predicted probability vector; If the maximum value is not less than the confidence threshold, the category corresponding to the maximum value is used as the state anomaly category label. The state anomaly category label includes normal category, proximity switch induction attenuation category, damping disturbance category and composite anomaly category. If the maximum value is less than the confidence threshold, a warning message for unknown anomalies will be output.
10. A proximity switch state anomaly detection system employing a temporal neural network, used to execute the proximity switch state anomaly detection method employing a temporal neural network as described in any one of claims 1-9, characterized in that, include: The multi-source timing data acquisition module is used to acquire the original current sequence of the servo driver and the digital level sequence of the proximity switch within a set time window during the operating cycle of the target device. The filtering module is used to perform low-pass filtering on the original current sequence to obtain a smooth current sequence; The coefficient calculation module is used to calculate the dynamic compensation coefficient of the current period based on the integral value of the smoothed current sequence. The reference extraction module is used to extract the current extreme value time points in the smooth current sequence, and to correct the current extreme value time points in combination with the dynamic compensation coefficient to obtain the compensation time reference point. The time calculation module is used to extract the trigger time coordinates of the state transition in the digital level sequence, and calculate the difference between the trigger time coordinates and the compensation time reference point to obtain relative phase difference data. The feature construction module is used to concatenate the relative phase difference data, the dynamic compensation coefficient, and the switch duty cycle data calculated based on the digital level sequence for multiple consecutive cycles to construct a multi-source correlated time series feature tensor. The abnormal status category identification module is used to input the multi-source associated temporal feature tensor into a pre-trained temporal neural network model for feature extraction and classification, and output the diagnostic results of the device operating status.