Security grating multi-beam scanning spread spectrum control method considering timing jitter
Patent Information
- Application Number
- CN202610907301.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-09-25
AI Technical Summary
[0012]本申请提供考虑时序抖动的安全光栅多光束扫描扩频控制方法,旨在解决上述背景技术中提到的现有技术存在的问题或问题之一
(1)通过构建光束时序指纹并建立系统时序知识库,本方案有效克服了传统安全光栅在多光束扫描过程中因机械抖动、环境干扰或光源老化导致的响应时序漂移问题。现有技术通常依赖外部振动传感器或全局同步时钟进行动态补偿,不仅引入额外硬件成本与信号延迟,且难以针对每束光的个体动态特性实现精细化校正。本发明则利用各光束在标准参考面下的相位偏置角、过冲振荡衰减包络和稳态窗口中心等独有时序特征,形成具备唯一性的指纹标识,实现了对每束光本征响应行为的精准建模。该指纹作为后续实时比对的基准模板,使系统能够在无负载空扫阶段即完成初始特性标定,显著提升了对光束动态变化的感知灵敏度与识别可靠性,从根本上避免了因统一时序基准导致的“以强带弱”式误差传播,为高密度多光束系统的稳定运行提供了底层支撑。
Smart Images

Figure CN122815869A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optoelectronic detection and control technology, and in particular to a method for multi-beam scanning spread spectrum control of safety gratings that takes into account timing jitter. Background Technology
[0002] Currently, multi-beam scanning systems for safety gratings, as core photoelectric sensing devices in space target detection and area protection, are widely used in industrial automation, area intrusion detection, intelligent access control, and logistics security isolation. Their principle involves high-frequency periodic scanning of multiple beams to perform refined segmented detection of the monitored area, achieving high spatiotemporal resolution target identification and area monitoring. However, with the increasing complexity of the measured scenarios and the growing demands for detection accuracy and response speed, the problem of "beam response timing jitter" in grating systems has become increasingly prominent, becoming a significant bottleneck affecting overall detection efficiency and system robustness.
[0003] Currently, mainstream safety gratings and related multi-beam scanning systems in the industry generally employ spread spectrum modulation technology at the signal modulation level. This involves spreading the carrier signal to a wider frequency band using a pseudo-random code stream to improve anti-interference capability and spatial resolution. Jitter compensation is often based on additional sensor arrays (such as accelerometers) to collect vibration information from the device itself or the environment, and uses independent compensation algorithms to correct the response delay or spectral characteristics of each beam. Some systems also attempt to use methods such as logic gate calibration, code timing advance / lag, and filter adaptation to discretely compensate for timing drift during spread spectrum modulation. However, most existing technologies separate beam response jitter compensation from spread spectrum modulation parameter design into two relatively independent technical modules, lacking an effective coordinated control mechanism.
[0004] In existing technologies, jitter compensation parameters (such as delay correction for each beam and window adjustment amplitude) typically rely on hardware redundancy or modeling of external interference sources, while spread spectrum modulation parameters (such as code phase start point and modulation synchronization window) are set based on communication protocols or static parameter libraries. Both are optimized separately during the system design phase, lacking parameter mapping and interactive feedback channels. This leads to the following typical problems: First, there is a strong coupling relationship between jitter compensation parameters and spread spectrum modulation parameters: the physical timing jitter of the scanning beam directly affects whether spread spectrum modulation can start in the correct time window; conversely, inaccurate phase initiation of the spreading code amplifies jitter compensation errors, significantly increasing the probability of signal decision misalignment and false triggering. Existing independent design methods struggle to detect and eliminate these hidden system-level cooperative errors.
[0005] Secondly, due to the lack of a unified time base and parameter interaction modeling, the system needs to maintain multiple sets of parameter optimization mechanisms and feedback calibration loops, which significantly increases the hardware and software resource consumption and debugging complexity of the controller. Especially when the dynamic response of multi-beams changes greatly and environmental disturbances are frequent, traditional compensation-modulation decoupling schemes are difficult to adapt in real time, resulting in a decline in detection sensitivity or an increase in false detection rate.
[0006] Furthermore, some existing solutions, when attempting to achieve joint parameter modeling and online collaborative optimization, often require constructing a high-dimensional joint state-space model and a corresponding online iterative solver. This approach not only consumes significant computational and storage resources in embedded environments but also necessitates complex state observation and anomaly detection processes, making it challenging to balance engineering practicality and real-time performance.
[0007] In addition, the industry has tried to use bypass measures such as filter compensation, channel equalization, oversampling or super-resolution control to reduce the impact of timing jitter on spread spectrum modulation. However, such solutions cannot establish the consistency between signal generation and modulation control at the intrinsic physical characteristics level, the compensation effect is limited, and they do not have deep adaptive capabilities.
[0008] Therefore, existing technologies generally suffer from the following drawbacks: The inability to achieve intrinsic synergistic optimization of jitter compensation parameters and spread spectrum modulation parameters results in insufficient overall control accuracy and system adaptability.
[0009] For complex dynamic responses of multi-beam arrays, the independent parameter optimization strategy requires separate maintenance of each beam, which increases system resource consumption and management difficulty, and is not conducive to the automated deployment and long-term operational stability of large-scale arrays.
[0010] The lack of dynamic parameter modeling and real-time adaptation mechanisms for the coordinated optimization of timing jitter and spread spectrum modulation makes it difficult to implement coupled computation and iterative synthesis schemes in engineering.
[0011] In summary, the industry urgently needs a novel technical solution that can fully exploit the intrinsic temporal characteristics of beams to achieve implicit synergy between jitter compensation and spread spectrum modulation parameters, as well as system-level adaptive optimization. This solution should overcome existing technical bottlenecks such as fragmented parameters, complex collaborative modeling, and limited control precision, providing a solid physical and control foundation for high-precision, high-reliability safety grating multi-beam array detection systems. Summary of the Invention
[0012] This application provides a safety grating multi-beam scanning spread spectrum control method that takes into account timing jitter, aiming to solve one of the problems or issues of the prior art mentioned in the background.
[0013] The safety grating multi-beam scanning spread spectrum control method considering timing jitter provided in this application specifically includes: S1: Perform a single-cycle no-load dry scan independently on each scanning beam in the safety grating multi-beam scanning system, collect the response signals of each beam at the standard reference plane, and obtain the initial response dataset.
[0014] S2: Based on the initial response dataset, extract three types of timing features for each beam: the rising edge trigger time, the overshoot oscillation attenuation envelope, and the steady-state window center, to generate a beam timing fingerprint.
[0015] S3: Register all the beam timing fingerprints to the system timing knowledge base, and perform clustering and grouping processing based on the dispersion of the steady-state window center in each fingerprint to construct a beam cluster classification table.
[0016] S4: During real-time scanning, the phase offset angle in the timing fingerprint of the beam corresponding to the beam currently entering the detection area is taken as the theoretical zero point. The response signal in the current scanning cycle is compared with the morphological deviation of the fingerprint template in the key time window to obtain the timing offset.
[0017] S5: Based on the mapping relationship between the timing offset and the initial phase offset angle of the spreading code sequence, a phase anchoring control model is constructed.
[0018] S6: Input the timing offset into the phase anchoring control model to dynamically correct the initial phase offset angle of the spreading code sequence, so as to generate phase anchoring parameters that strictly align the starting phase of the spreading modulation to the center of the steady-state window of the beam response.
[0019] S7: Adjust the carrier phase of the spread spectrum modulation process based on the phase anchoring parameters, and perform spread spectrum control operation on the beam scanning signal.
[0020] S8: Monitor the beam detection stability index after the spread spectrum control operation. If the timing offset exceeds the preset threshold, update the corresponding record in the beam timing fingerprint database to complete the dynamic self-optimization of the system timing knowledge base.
[0021] The safety grating multi-beam scanning spread spectrum control method considering timing jitter provided in this application has the following advantages: (1) By constructing a beam timing fingerprint and establishing a system timing knowledge base, this solution effectively overcomes the problem of response timing drift caused by mechanical jitter, environmental interference, or light source aging during multi-beam scanning of traditional safety gratings. Existing technologies usually rely on external vibration sensors or global synchronization clocks for dynamic compensation, which not only introduces additional hardware costs and signal delays, but also makes it difficult to achieve fine correction for the individual dynamic characteristics of each beam. This invention utilizes the unique timing characteristics of each beam, such as the phase offset angle, overshoot oscillation attenuation envelope, and steady-state window center under the standard reference plane, to form a unique fingerprint identifier, thereby achieving accurate modeling of the intrinsic response behavior of each beam. This fingerprint serves as a reference template for subsequent real-time comparison, enabling the system to complete the initial characteristic calibration during the no-load empty scanning stage, significantly improving the sensitivity and reliability of beam dynamic changes, fundamentally avoiding the "strong-to-weak" error propagation caused by a unified timing reference, and providing underlying support for the stable operation of high-density multi-beam systems.
[0022] (2) Based on the phase anchoring mechanism driven by time fingerprint, this scheme achieves adaptive alignment of the starting phase of spread spectrum modulation, thereby naturally coupling jitter compensation and signal modulation process on the time axis without changing the spread spectrum code frequency, code length, and modulation structure. Compared with traditional methods that require the construction of a complex jitter-spread spectrum joint state space model and rely on online iterative optimization and closed-loop feedback adjustment to maintain synchronization performance, this invention directly generates a dedicated time offset by normalizing the morphological deviation between the current response signal and the fingerprint template, and dynamically corrects the initial phase offset angle of the spread spectrum code sequence accordingly, ensuring that the modulation action always falls within the period when the beam response is most stable. This mechanism sinks the strongly coupled control problem originally concentrated at the controller level to the time alignment link at the physical layer, greatly reducing the system control complexity and computational overhead. It can achieve automatic tracking of the independent optimal operating point of each beam without the need for high-dimensional parameter search, real-time solution, or cross-module feedback loop support, significantly improving the real-time performance, robustness, and scalability of the system.
[0023] (3) By clustering beams with similar dynamic response characteristics and combining a lightweight fingerprint database with a phase offset lookup table mapping relationship, this scheme achieves efficient management of system-level resources while ensuring individual accuracy. Unlike the common unified control strategy in traditional schemes, which easily causes some beams to be in non-ideal working ranges, this invention performs intelligent clustering based on the discreteness of the steady-state window center, making the control strategy more targeted and hierarchical, reducing redundant computation and storage requirements while maintaining high-performance output. The entire process completely avoids complex technical paths such as image processing, chaotic sequence generation, LFSR modulation, differential coding, polarization synthesis, federated learning, fractional-order transformation, and EMI filter design, and only relies on basic photoelectric response characteristics and timing alignment logic to achieve excellent anti-interference and synchronization effects. The resulting system is a low-power, low-latency, and highly reliable safety grating control system with good engineering practicality and deployment flexibility, especially suitable for industrial protection, automated production lines, and human-machine collaboration scenarios with stringent requirements for response consistency.
[0024] In summary, this scheme innovatively transforms the dynamic stability problem of multi-beam systems into a fingerprint-driven problem of timing alignment and phase adaptive control by extracting and applying the intrinsic timing characteristics of beams, achieving a technological leap from "passive compensation" to "active coordination." This not only significantly improves the accuracy of individual beam responses and the overall system's anti-interference capability but also simplifies the control architecture, reduces algorithm complexity and hardware dependence, and forms a novel safety grating operation paradigm that combines high precision, high efficiency, and high robustness. Attached Figure Description
[0025] Figure 1 This is the main flowchart of a multi-beam scanning spread spectrum control method for safety gratings that takes into account timing jitter.
[0026] Figure 2 This is a sub-flowchart of a safety grating multi-beam scanning spread spectrum control method that takes into account timing jitter.
[0027] Figure 3 This is another sub-flowchart of the safety grating multi-beam scanning spread spectrum control method that takes into account timing jitter. Detailed Implementation
[0028] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0029] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0030] like Figure 1 As shown, this application provides a method for multi-beam scanning spread spectrum control of safety gratings that takes into account timing jitter, specifically including: S1: Perform a single-cycle no-load dry scan independently on each scanning beam in the safety grating multi-beam scanning system, collect the response signals of each beam at the standard reference plane, and obtain the initial response dataset.
[0031] S2: Based on the initial response dataset, extract three types of timing features for each beam: the rising edge trigger time, the overshoot oscillation attenuation envelope, and the steady-state window center, to generate a beam timing fingerprint.
[0032] S3: Register all the beam timing fingerprints to the system timing knowledge base, and perform clustering and grouping processing based on the dispersion of the steady-state window center in each fingerprint to construct a beam cluster classification table.
[0033] S4: During real-time scanning, the phase offset angle in the timing fingerprint of the beam corresponding to the beam currently entering the detection area is taken as the theoretical zero point. The response signal in the current scanning cycle is compared with the morphological deviation of the fingerprint template in the key time window to obtain the timing offset.
[0034] S5: Based on the mapping relationship between the timing offset and the initial phase offset angle of the spreading code sequence, a phase anchoring control model is constructed.
[0035] S6: Input the timing offset into the phase anchoring control model to dynamically correct the initial phase offset angle of the spreading code sequence, so as to generate phase anchoring parameters that strictly align the starting phase of the spreading modulation to the center of the steady-state window of the beam response.
[0036] S7: Adjust the carrier phase of the spread spectrum modulation process based on the phase anchoring parameters, and perform spread spectrum control operation on the beam scanning signal.
[0037] S8: Monitor the beam detection stability index after the spread spectrum control operation. If the timing offset exceeds the preset threshold, update the corresponding record in the beam timing fingerprint database to complete the dynamic self-optimization of the system timing knowledge base.
[0038] Step S1: Perform a single-cycle no-load scan independently on each scanning beam in the safety grating multi-beam scanning system, acquire the response signal of each beam at the standard reference plane, and obtain the initial response dataset. Specifically, this includes: S1.1: Perform single-beam polling addressing processing on the beam emission array in the safety grating multi-beam scanning system to generate a unique hardware activation instruction for the current beam under test, thereby establishing an independent execution object for a single air scan operation.
[0039] During the initialization of the air scan in the safety grating multi-beam scanning system, the input condition is that the system controller has completed a global hardware self-test and loaded the physical address mapping table of the beam emission array. The array contains multiple independent control channels, and each channel corresponds to a scanning beam. This sub-step is located at the beginning of the execution segment of the main step S1. It is used to uniquely determine the current air scan target beam through a polling and addressing mechanism and generate a hardware activation command to achieve independent control of a single beam.
[0040] The beam emission array index table is traversed by reading the physical address of each channel and checking its current occupancy status in order to filter out candidate beam addresses that are not participating in the current cycle of air sweep.
[0041] The physical address of the candidate beam is precisely matched with the set of empty scan sequences recorded in the system task scheduling queue to obtain the unique address identifier of the current beam to be tested.
[0042] The hardware control interface is invoked based on a unique address identifier to generate a hardware activation instruction data frame containing the channel number, pulse control parameters, and synchronization timing code.
[0043] Perform CRC cyclic redundancy check on the hardware activation command data frame to ensure the integrity and anti-interference capability of the command content during transmission to the beam drive module.
[0044] The verified hardware activation command is loaded into the system's beam drive register, and the emission control authority of the corresponding channel is locked, thus establishing the independent execution object of the current beam under test.
[0045] Through the above processing method, the system initialization information in the previous step is transformed into hardware activation instruction data with uniqueness and execution constraints, thereby realizing the independence of physical objects and the precision of control in a single air scan.
[0046] For example, in a safety grating emission array containing 32 beams, a channel physical address table of length 32 is loaded upon system startup. The detection result shows that channel 5 is idle and at the head of the scheduling queue. The matching algorithm confirms that the physical address of channel 5 is the unique identifier 2015 for the current beam under test. The hardware control interface generates a data frame based on the identifier, where the channel number field is 5, the pulse width parameter is set to 20 microseconds, and the synchronization timing code is based on a 100 nanosecond reference. After generation, a CRC-16 check is performed, with a checksum of 6052. The data frame is loaded into the driver register after verification, locking the emission permission of channel 5 and ensuring that only this beam is activated during the empty scan. In actual testing, this mechanism ensures the uniqueness of the hardware activation command and the accuracy of the waveform parameters. In the subsequent S1.2 pulse emission operation, standard time-domain waveform raw data unaffected by other beams was successfully obtained, effectively improving the stability and accuracy of subsequent timing feature extraction.
[0047] S1.2: Based on the unique hardware activation instruction, control the current beam under test to perform a single-cycle pulse emission operation in an unobstructed environment to generate a raw optical scanning signal with standard time-domain waveform characteristics, thereby triggering the physical-level timing reference establishment process.
[0048] Once the unique hardware activation command has been generated and transmitted to the beam emission array, the command is input to the timing logic unit of the beam drive control module to ensure that the drive channel of the beam under test is in exclusive access state and to lock the internal power modulation register.
[0049] After locking the drive channel, the transmitter module is placed in a zero-load, unobstructed environment control mode. The preset transmit pulse envelope parameters, including amplitude, duration, and edge transition rate, are loaded through the power modulation register to ensure the matching degree of the output waveform with the standard reference model.
[0050] After the environmental mode is confirmed and the power parameters are set, the pulse timer inside the transmitter module is triggered to start a single-cycle pulse generation sequence. Under the strict constraints of the local clock source, this sequence outputs the original optical scanning signal that conforms to the time domain specification.
[0051] The generated raw optical scanning signal is guided to the standard reference surface through the optical path of the transmitting array, ensuring that the optical signal propagation path is not affected by external obstructions or media, thereby guaranteeing the physical integrity and purity of the signal transmission.
[0052] During pulse transmission, the current waveform and temperature characteristics of the drive circuit are monitored, and the real-time monitoring data are compared with the preset threshold table. When all indicators are within the qualified range, the transmission end flag is sent back to the upper controller to mark the completion status of the timing reference establishment process.
[0053] Through the above chain processing method, the unique hardware activation instruction is transformed into a single-cycle pulse emission result in an unobstructed standard environment, thereby achieving the expected technical effect of generating a raw optical scanning signal with standard time-domain waveform characteristics and triggering the establishment of a physical timing reference.
[0054] For example, in a safety grating multi-beam scanning system, the current beam under test is numbered 5, and its unique hardware activation command code is 0x05. Upon receiving this command, the drive control module places the transmitting module in an unobstructed environment control mode and applies an amplitude of 2.5A and a current rise time of [missing information]. seconds, pulse duration is The envelope parameters are defined in seconds. The pulse timer outputs the original optical scan signal under the constraint of a local 50MHz clock source. The entire 1.5-meter optical path is in air, with no obstructions during propagation. During transmission, the peak value of the drive current waveform is monitored at 2.51A, and the steady-state temperature is within the range of 25℃±0.2℃. All system performance indicators are satisfactory. The final output original optical scan signal exhibits time-domain characteristics in the rising edge, overshoot, and steady-state phases that are completely consistent with the standard reference model, becoming the reference signal for subsequent high-precision synchronous sampling in S1.3, significantly improving the accuracy of the timing reference.
[0055] S1.3: A high-precision synchronous sampling circuit is used to perform real-time voltage signal capture processing on the output terminal of the photodetector at the standard reference plane to obtain an analog electrical signal sequence that is strictly time-aligned with the original optical scanning signal, thereby forming an original timing voltage flow containing rising edge, overshoot and steady-state information.
[0056] S1.4: Perform analog-to-digital conversion and time-base calibration on the original time-series voltage stream to quantize the continuous analog signal into discrete digital samples and eliminate system clock deviation, thereby generating a digital beam response sample set with uniform timestamp accuracy.
[0057] The analog-to-digital converter input channel number and sampling trigger source are set for the original timing voltage flow output by the high-precision synchronous sampling circuit to establish the physical input object of the current data processing task.
[0058] The original voltage waveform is loaded into the sample-and-hold unit inside the analog-to-digital converter according to the preset sampling frequency parameters, and a continuous sampling process is performed to maintain the transient characteristics of the signal without distortion at the hardware level.
[0059] The quantizer of the analog-to-digital converter converts the continuous analog voltage signal output from the sample-and-hold unit into a discrete digital quantity. The binary encoding is completed according to the bit depth setting to obtain a digital sampled data stream with a sampling order index.
[0060] The digital sampled data stream is time-base aligned with the system global clock signal. The phase comparison logic identifies and compensates for the offset between the sampled clock and the system clock to eliminate cross-module clock differences.
[0061] Timestamp interpolation and recalibration operations are used to uniformly assign high-precision time identifiers to the offset-corrected digital sampling data, ensuring that the time information of any sampling point is consistent with the time base of the global controller.
[0062] Through the above-mentioned combined analog-to-digital conversion and time-base calibration, the analog voltage signal sequence captured in the previous step is transformed into a digital beam response sample set with uniform timestamp accuracy, thereby achieving time-consistent data input in the subsequent feature extraction stage.
[0063] For example, during the air scan of a safety grating multi-beam system, the peak value range of the raw voltage signal output by the high-precision synchronous sampling circuit is 0.2 to 1.5 volts. The sampling frequency is set to 2 MHz, the analog-to-digital converter bit depth is configured to 12 bits, and the input channel number is 5. After the voltage signal is applied to the sample-and-hold unit, it is quantized into a discrete integer value sequence from 0 to 4095. The sampling sequence number is from 0 to 1999, forming a 2000-bit digital data stream. The system global clock period is 500 ns, and the sampling clock offset relative to the global clock is determined to be 3 × 10⁻⁶ ns. 7 The sampling timescale is adjusted by an offset compensation module, and a recalculated timescale value is inserted at each data point using a timestamp interpolation algorithm, achieving a time resolution of 100 ns. This output digital beam response sample set is used in subsequent time-series feature extraction to accurately locate the phase offset angle and overshoot oscillation attenuation process. Verification shows that the alignment error of the sample set across two air scans under the same time reference is significantly reduced after this processing, resulting in a significant improvement in the accuracy of time-series feature extraction.
[0064] S1.5: Perform multi-cycle data splicing and metadata encapsulation processing based on the digital beam response sample set to integrate beam number, environmental reference parameters and complete waveform data, thereby constructing an initial response dataset containing original time-series information for subsequent feature extraction.
[0065] Step S2: Based on the initial response dataset, extract three types of temporal features for each beam: the rising edge trigger time, the overshoot oscillation attenuation envelope, and the steady-state window center, to generate a beam temporal fingerprint. Specifically, this includes: S2.1: Perform adaptive threshold segmentation processing on the original response signal in the initial response dataset to obtain a signal rising edge sequence containing accurate transition information, and calculate the phase offset angle characterizing the transient characteristics of the beam initiation based on the signal rising edge sequence.
[0066] Based on the initial response dataset containing the original timing information output in step S1.5, the original response signals in the digital beam response sample set are used as the execution object of this step, focusing on extracting the key timing parameter, the phase offset angle, which characterizes the transient characteristics of beam initiation. For each beam response signal in the initial response dataset, the adaptive threshold segmentation algorithm module is invoked. Using the global mean and local variance of the current signal as the basis for threshold adjustment, the gradient information of the signal amplitude changing over time is analyzed in real time to generate a segmentation threshold configuration table for different waveform noise levels. The segmentation threshold is applied to the amplitude sequence of the original response signal to perform interval segmentation, marking all time points where the amplitude jumps above the threshold, and reconstructing them into a rising edge candidate point list in chronological order. For each time point in the candidate point list, the instantaneous slope value and amplitude gain difference of its adjacent sampling points are calculated. Transition points that do not meet the preset slope threshold and gain threshold are eliminated, forming a signal rising edge sequence containing precise transition positions. For the first valid transition point in the rising edge sequence, the timestamp calculation unit is invoked to read its sampling index and, combined with the system's unified time base, map the sampling index to an absolute time quantization value to obtain the corresponding phase offset angle. Through the above adaptive threshold segmentation and precise time mapping processing method, the initial response dataset result from the previous step is transformed into a startup transient timing reference that can be used for subsequent overshoot and steady-state feature extraction, achieving noise-free and drift-free precise positioning of the beam startup characteristics.
[0067] For example, in a three-beam safety grating system, the sampling frequency of the digital beam response sample set is configured to 200kHz, and the length of a single beam response signal is 4096 points. The adaptive threshold segmentation algorithm sets the global mean and local variance weighting coefficients to 0.6 and 0.4, respectively, and the maximum noise level threshold to 0.015V. After segmentation, the number of candidate rising edges for each beam is 8, 6, and 7, respectively. After elimination rules with a slope threshold of 0.5V / μs and an amplitude gain threshold of 0.02V, the final number of effective rising edges is 1 for each beam. Taking the sampling index of the effective rising edge candidate point of the first beam as 102, combined with the system time base of 0.005ms / sample point, the trigger time is calculated to be 102 × 0.005ms, or 0.51ms, through time mapping. The trigger moment was recorded as the transient reference value for the start of the first beam of light, and used as the starting time point in the subsequent overshoot oscillation attenuation envelope extraction process. The verification results show that the trigger moment remains stable under different noise conditions, and the overall timing positioning accuracy of the system is significantly improved.
[0068] S2.2: Based on the starting time point determined by the phase offset angle, perform envelope detection and exponential fitting operations on the amplitude fluctuation data of the original response signal in the overshoot interval to generate an overshoot oscillation attenuation envelope parameter set describing the beam energy convergence process.
[0069] Based on the phase offset angle output from step S2.1 as the starting time point input, the amplitude fluctuation data of the original response signal within the overshoot interval from that time point to the first entry into the steady-state error band is locked.
[0070] Bandpass preprocessing filtering is performed on the amplitude fluctuation data within the locked overshoot interval to remove high-frequency noise components that exceed the preset frequency window and retain the main oscillation components during energy convergence.
[0071] Envelope detection is performed on the filtered fluctuation data. By extracting the peak points of each oscillation period and interpolating and fitting the upper and lower envelope curves, a continuous and smooth oscillation decay envelope curve is formed.
[0072] Nonlinear curve matching is performed on the formed attenuation envelope curve, and an exponential attenuation model is used for fitting calculation. The attenuation coefficient and initial amplitude parameters are optimized by the least squares method.
[0073] The expression for the exponential fitting model is:
[0074] in, The initial amplitude of the oscillation. The decay rate coefficient, It is a relative time variable.
[0075] Will and The fitting results are combined to form an overshoot oscillation decay envelope parameter set, and the fitting residual index of the envelope curve is recorded for subsequent feature quality assessment.
[0076] By using envelope detection and exponential fitting, the overshoot oscillation data corresponding to the rising edge trigger reference point in the previous step is transformed into a parameter set describing the beam energy convergence process, thereby achieving accurate quantification of the dynamic response jitter characteristics of the beam.
[0077] For example, a target beam at a standard reference plane of a certain safety grating is triggered by a rising edge at 0.85 μs, locking the overshoot interval length from the start to the steady-state error band to 2.15 μs. Fluctuation data within the overshoot interval is bandpass filtered to retain 2–8 MHz components, and envelope detection yields a peak sequence [1.20V, 0.85V, 0.60V, 0.42V]. An exponential model is used for fitting, with an initial amplitude fitting value of 1.20V and an attenuation rate coefficient fitting value of 0.95 × 10⁻⁶. 6 s -1The fitting residual is 0.0023V. According to the formula, the initial amplitude fitting value, deceleration coefficient and residual index generated by the fitting together constitute the overshoot oscillation attenuation envelope parameter set of the beam, which is subsequently used as the input for steady-state window center measurement and time-series fingerprint encapsulation, realizing high-precision energy convergence feature quantization.
[0078] S2.3: Using the convergence endpoint of the overshoot oscillation attenuation envelope parameter set as a reference, the time span of the original response signal entering the preset steady-state error band is delayed and measured to calculate the center value of the steady-state window that reflects the thermal stability of the beam and the circuit establishment characteristics.
[0079] Using the convergence endpoint of the overshoot oscillation decay envelope parameter set as a reference, a delay measurement is performed on the time span during which the original response signal enters the preset steady-state error band. The convergence endpoint is defined as the time point at which the amplitude of the envelope curve stabilizes within the target range, and an absolute time index corresponding to this endpoint is established in the response signal data sequence. Using this time index as the starting reference, the amplitude change of the original response signal within the steady-state error band is continuously monitored, and the time index of the first signal sample that meets the upper and lower bounds of the error band is recorded. A difference operation is performed between the starting reference time index and the time index at which the steady-state error band meets the conditions to obtain the length of the delay interval reflecting the signal entering the steady state. This delay interval length is converted into a steady-state window center value, and the time drift introduced by the sampling end is eliminated using a time reference correction algorithm to compensate for system clock errors. The steady-state window center is calculated using the following formula:
[0080] in, This is the time index for when the signal first enters the steady-state error band. This serves as the time index for the envelope convergence endpoint. Through this delay measurement chain, the envelope convergence characteristic data from the previous step is transformed into a steady-state window center time index, enabling a quantitative description of the beam thermal stability and circuit setup characteristics.
[0081] For example, in a safety grating multi-beam system, the sampling frequency of the original response signal is configured to 2MHz, and the upper and lower bounds of the steady-state error band amplitude are set to ±0.05V respectively. The convergence endpoint time index of the overshoot oscillation attenuation envelope parameter is 3250 sampling points. According to the acquisition sequence, the signal amplitude first enters the error band interval at the 3625th sampling point. Performing a difference operation on the two yields a delay interval length of 375 sampling points. Combining this with the sampling frequency, the steady-state window center is calculated, and the output result is 0.0001875 seconds. After system time base correction, the steady-state window center value is obtained as 0.0001869 seconds. This value is used for subsequent beam timing fingerprint generation, effectively characterizing the dynamic response characteristics of the beam in terms of thermal stability and circuit establishment, and exhibiting significant distinguishing ability in the multi-beam cluster similarity clustering process.
[0082] S2.4: The phase offset angle, the overshoot oscillation attenuation envelope parameter set, and the steady-state window center value are encapsulated in a multi-dimensional vector and mapped by a hash index to generate the beam temporal fingerprint.
[0083] like Figure 2 As shown, step S3 involves registering all the beam time-series fingerprints to the system time-series knowledge base, and performing clustering and grouping processing based on the dispersion of the steady-state window center in each fingerprint to construct a beam cluster classification table. Specifically, this includes: S3.1: Standardize and encapsulate the generated beam temporal fingerprint dataset to construct a standard fingerprint record object containing a unique identifier and a three-dimensional temporal feature vector, ensuring the uniformity of the format and the retrieval of the uniqueness data of each beam's dynamic response.
[0084] S3.2: Perform full traversal statistical calculations based on the steady-state window center value in the standard fingerprint recording object to obtain the delay benchmark mean and variance statistics that characterize the discrete distribution characteristics of the overall response of the multi-beam system.
[0085] Based on the steady-state window center values of the encapsulated standard fingerprint recording objects, a complete traversal operation is performed on all recording objects to form the statistical baseline for the delay distribution of subsequent clustering. For each standard fingerprint recording object, its steady-state window center value is read and input into a delay sample accumulation container for serialization and storage, ensuring no data loss and maintaining consistency with the beam identifier order. Arithmetic summation is performed on all delay values in the delay sample accumulation container, and the sum is divided by the total number of samples to obtain the delay baseline mean, using the following formula: in Let be the center value of the steady-state window for the i-th beam. Indicates the total number of beams. The delay baseline mean is calculated. For all delay values in the delay sample accumulation container, the difference between the delay baseline mean and the actual delay is calculated. The squared differences are then summed, and the result is divided by the sample size minus one. An arithmetic square root operation is then performed to obtain the delay baseline variance statistic. The delay baseline mean and variance are stored in floating-point format in a delay distribution statistical structure, forming a retrievable and transferable delay distribution statistical baseline. Through this statistical calculation process, the standard fingerprint record object from the previous sub-step is transformed into delay baseline mean and variance statistics characterizing the discrete distribution of the overall response of the multi-beam system, enabling the setting of a quantitative clustering threshold based on the steady-state window center.
[0086] For example, the multi-beam scanning system includes 64 beams, and the steady-state window center values in the standard fingerprint recording object are distributed in the range of 23.4 μs to 29.8 μs. After the delay sample accumulation container serializes and stores the delay values of each beam, the summation result is 1584.6 μs, the sample size is 64, and the mean delay baseline is calculated to be 24.759 μs. Based on this mean, the difference, square, and summation are calculated for each delay value, resulting in a summation of 82.364. The denominator is the sample size minus one, i.e., 63. The square root of the variance is 1.142 μs. The mean delay baseline of 24.759 μs and the variance of 1.142 μs are written into the delay distribution statistical structure. Subsequent clustering algorithms use these values to set dynamic threshold boundaries, causing beam clusters with low delay dispersion to be significantly concentrated in the classification table, improving the physical consistency and stability of clustering.
[0087] S3.3: Using the mean and variance statistics of the delay benchmark, a dynamic clustering threshold boundary is set, and a similarity matching operation based on the steady-state window center dispersion is performed on all standard fingerprint record objects to divide several initial beam candidate clusters with homogeneous dynamic response characteristics.
[0088] Using the delay baseline mean and variance statistics output from step S3.2 as input, the delay mean is set as the initial cluster center reference line, and the dynamic threshold interval is determined in conjunction with the variance statistics. For each standard fingerprint recording object, a difference calculation is performed between the steady-state window center value and the delay baseline mean to generate a sequence of absolute delay deviations. Dividing the absolute delay deviation by the square root of the delay variance forms a standardized dispersion index sequence, eliminating dimensional differences in delay data from different beams. A similarity matching method based on Euclidean distance is used to group fingerprint recording objects with similar standardized dispersion into the same candidate cluster. By iteratively scanning all standard fingerprint recording objects and updating the cluster center values, consistency between the dynamic threshold and object allocation is ensured during clustering. Boundary correction is then performed on the clustering results based on the threshold interval boundaries, forming several initial candidate beam clusters with homogeneous dynamic response characteristics. Through the above processing, the delay mean and variance from the previous step are transformed into dynamic clustering thresholds and similarity indices, achieving a consistent preliminary classification of the response characteristics of the multi-beam system.
[0089] S3.4: Perform intra-cluster consistency verification and boundary optimization processing on the initial candidate beam clusters to generate a beam cluster classification index table with clear physical meaning and highly convergent response characteristics, thereby completing the structured update of the system's time-series knowledge base.
[0090] For the initial beam candidate cluster dataset divided based on the discreteness of the steady-state window center, the standard fingerprint record object in the system time series knowledge base is called as the verification benchmark. Multi-dimensional feature consistency judgment operation is performed on all beam time series fingerprints in each candidate cluster to detect the convergence of the beam dynamic response feature vector in the cluster in three dimensions: phase offset angle, overshoot oscillation attenuation envelope parameter and steady-state window center value.
[0091] The fingerprint records within a cluster that have outliers at the feature vector boundary in the consistency determination results are extracted, and the corresponding feature vectors are subjected to boundary pruning and centroid drift calculation to determine the degree of deviation of the fingerprint in physical response characteristics.
[0092] For cluster members whose deviation exceeds a preset physical response tolerance threshold, the Euclidean distance between the cluster center feature vector and the feature vector of the deviating member is used. Calculate the distance between the record and the cluster feature center, and remove records exceeding the threshold from the current cluster and move them to the cluster boundary buffer. The Euclidean distance between a member of the cluster and the cluster center. For the member beam in the Numerical values on dimensional features For the cluster center at the th Numerical values on dimensional features =1, 2, 3 correspond to the three dimensions of phase offset angle, overshoot oscillation decay envelope parameter, and steady-state window center, respectively.
[0093] A similarity reassignment algorithm is performed on the moved-in records in the cluster boundary buffer to assign them to the closest new cluster or to form a new single-member cluster, in order to optimize feature convergence within the cluster.
[0094] The cluster member sequences and their physical response characteristic tags, after consistency verification and boundary optimization, are encapsulated into entries of the beam cluster classification index table and written into the structured classification table data structure of the system time series knowledge base to achieve accurate classification of multi-beam dynamic response modes.
[0095] By using intra-cluster consistency verification and boundary optimization, the initial beam candidate cluster results from the previous step are transformed into beam cluster classification index data with clear physical meaning and highly convergent response characteristics, thereby realizing the structured update of the system's time-series knowledge base and improving its retrieval and matching accuracy.
[0096] For example, in a safety grating system with 16 scanning beams, the initially identified candidate beam clusters include cluster A (5 beams), cluster B (4 beams), and cluster C (7 beams). The average steady-state window center of the members in cluster A is 2.5 μs with a standard deviation of 0.05 μs, and the physical response tolerance threshold is set to 0.08 μs. During consistency verification of cluster A, it is found that the steady-state window center of beam A4 differs from the center of cluster A by 0.09 μs, exceeding the threshold. In boundary optimization, the Euclidean distance between beam A4 and the eigenvector of the cluster A center is calculated. For example, in the three-dimensional feature space, its eigenvector is (2.51, 0.48, 0.09), and the cluster A center is (2.50, 0.47, 0.05). According to the formula, the distance value is 0.045, which is greater than the set threshold of 0.04. Therefore, A4 is removed from cluster A. After buffer reallocation, the beam has the highest feature similarity to cluster C and is reclassified into cluster C. In the final generated beam cluster classification index table, the convergence of the three-dimensional temporal characteristics of each cluster member is significantly improved, which greatly enhances the steady-state reference accuracy of subsequent temporal offset comparison and spread spectrum phase anchoring processes.
[0097] like Figure 3 As shown, step S4: During real-time scanning, taking the phase offset angle in the temporal fingerprint corresponding to the beam currently entering the detection area as the theoretical zero point, the response signal within the current scanning cycle is compared in real-time with the morphological deviation of the fingerprint template within the key time window to obtain the temporal offset. Specifically, this includes: S4.1: Real-time acquisition and window truncation processing of the photodetector response waveform generated by the target beam currently entering the detection area within the latest scanning cycle, in order to obtain the original response signal sequence to be compared, which contains complete transient features.
[0098] For the photodetector response waveform generated by the target beam entering the detection area within the latest scan cycle, the system's high-precision synchronous acquisition channel is invoked to ensure strict consistency with the internal scanning timing reference of the controller. The initial displacement of the acquisition window is set according to the scan cycle start trigger flag, and the window length is configured to cover the entire transient range defined in the beam's temporal fingerprint features. Waveform truncation within the window is performed, using a bandpass filter to shield low-frequency drift and high-frequency noise components during data truncation, ensuring the retained signal morphology is comparable to the fingerprint template. The truncated analog voltage signal sequence undergoes analog-to-digital conversion, with sampling accuracy matching the quantization resolution recorded by the fingerprint template, to generate a digital raw response signal sequence for comparison. The digital signal sequence is bound and indexed with the beam's unique identifier output from the previous step, providing a unique signal source identifier for subsequent zero-point alignment and morphological deviation calculation. Through the above processing, the beam entering the detection area event from the previous step is transformed into a raw response signal sequence with complete transient features and calculable morphological parameters for comparison, achieving unbiased and accurate data acquisition and window truncation during real-time scanning.
[0099] For example, in a multi-beam scanning system for a safety grating, target beam number 23 is selected to enter the detection area. The controller internally activates a high-precision synchronous acquisition channel, with a sampling frequency configured to 200MHz to match the fingerprint template resolution. The initial displacement of the acquisition window is set to a 0.5μs delay from the scan cycle start trigger flag, and the window length is 15μs, covering the entire process of rising edge, overshoot, and steady-state establishment in the fingerprint features. During waveform truncation, a bandpass filter with a center frequency of 10MHz and a bandwidth of 6MHz is applied to effectively suppress drift below 7MHz and noise above 13MHz. A 12-bit ADC conversion is performed on the truncated signal to ensure that the quantization step size is consistent with the signal amplitude accuracy corresponding to the fingerprint template. The unique beam identifier 23 is bound to a digital sequence index to form a raw response signal matrix with a length of 3000 sampling points to be compared. This matrix is used to achieve accurate morphological deviation comparison with the fingerprint template in subsequent zero-point alignment operations, ultimately resulting in significantly improved timing offset calculation accuracy and system response stability.
[0100] S4.2: Based on the first voltage transition zero-crossing point identified in the original response signal sequence to be compared as the measured trigger reference, and combined with the phase offset angle recorded in the target beam's unique beam timing fingerprint retrieved from the system timing knowledge base as the theoretical reference reference, a dual reference time axis alignment operation is performed to generate a zero-point aligned response signal segment that eliminates the influence of global clock drift.
[0101] Based on the original response signal sequence to be compared obtained through step S4.1, the first transient point where the voltage amplitude crosses zero level is located using a waveform transition detection algorithm. Its timestamp is extracted and defined as the measured trigger reference. The standard beam time-series fingerprint record of the target beam is retrieved from the system time-series knowledge base, and the phase offset angle parameter is extracted and defined as the theoretical reference reference. The measured trigger reference and the theoretical reference reference are mapped to a unified local time-series coordinate system. A time-axis translation operation is performed using a dual-reference alignment operator to generate a zero-point alignment reference value after drift compensation. Under the action of the zero-point alignment reference value, the original response signal sequence to be compared is resampled in time, ensuring that the signal segment maintains complete zero-point alignment with the theoretical fingerprint signal under global clock drift elimination conditions. The response signal segment generated under this alignment condition is used as the input for subsequent differential calculations in S4.3, achieving physical-layer elimination of global clock drift. Through the dual-reference time-axis alignment processing method, the original signal extraction result from the previous step is transformed into a zero-point aligned response signal segment with global drift elimination characteristics, achieving the time consistency required for morphological deviation calculation. For example, in a safety light curtain system, when the sampling frequency of the original response signal sequence of the target beam to be compared is 100MHz, the transition detection algorithm based on first-order difference is applied. Within a 20μs time window, the time value at which the positioning voltage transitions from -0.05V to +0.05V is 3.500μs, which is defined as the measured trigger reference. The phase offset angle record of the corresponding beam fingerprint retrieved from the knowledge base is 3.480μs, which is used as the theoretical reference reference. In a unified time-series coordinate system, the translation calculation formula of the dual-reference alignment operator is executed:
[0102] in, The translation amount, The actual trigger reference timestamp, As a theoretical reference base timestamp; =0.020μs was used as the drift compensation shift value and applied to the time axis of the original response signal sequence. The resampling process was performed to obtain the zero-point aligned signal segment after global drift elimination. This segment can significantly improve the accuracy of morphological difference calculation when compared with the key time window of the standard fingerprint template. The verification results show that the stability of the morphological deviation coefficient is greatly improved after the zero-point alignment process.
[0103] S4.3: Using the zero-point alignment response signal segment and the standard fingerprint template waveform extracted from the beam temporal fingerprint within a preset key time window, perform differential operation and absolute value integration to calculate the original morphological deviation cumulative value that characterizes the degree of morphological difference between the two.
[0104] The input condition is the alignment result of the zero-point alignment response signal segment output from step S4.2 with the beam-specific standard fingerprint template waveform retrieved from the system timing knowledge base within a preset key time window, using point-by-point amplitude data alignment. For the two sets of amplitude data after zero-point alignment, the corresponding set of sampling points within the key time window is first determined based on the point-by-point matching index, forming a measured waveform vector and a template waveform vector of consistent length. Point-to-point amplitude difference operations are performed on the measured vector and template vector at the corresponding sampling points to generate a difference sequence within the key time window. Absolute value operations are performed on each difference value in the difference sequence to eliminate the polarity influence of positive and negative deviation directions, mapping the result to a unified non-negative waveform deviation value. Numerical integration is performed on all non-negative waveform deviation values within the time window length to accumulate the difference amplitude and obtain the cumulative value of the original morphological deviation. For the integration operation, a discrete summation form is used:
[0105] in, Indicates the measured waveform amplitude. Indicates the amplitude of the template waveform. Indicates the sampling point index. Indicates the total number of sampling points. This represents the cumulative value of the original morphological deviation. Through a difference-absolute value-integration processing method, the zero-point alignment result of the previous step is transformed into quantitative data of the cumulative value of the original morphological deviation, thereby achieving an accurate representation of the degree of difference between the real waveform and the template waveform within the key time window.
[0106] For example, in a safety grating multi-beam scanning system, for the beam entering the detection area, the total number of sampling points of the zero-point alignment response signal segment and the standard fingerprint template waveform within the critical time window is set to 500. The measured amplitude vector unit is millivolts, the template vector unit is millivolts, and the average amplitude of the differential sequence is approximately 3mV, with a maximum amplitude of approximately 12mV. After absolute value processing, all differential values are non-negative. During integration, the cumulative value of the original morphological deviation is calculated by discrete summation to obtain 1500mV·Sample. Inputting this cumulative value into the subsequent normalization algorithm can significantly improve the stability of the deviation coefficient and effectively compensate for beam jitter in subsequent phase anchoring control. Under different beam response characteristics, if the average differential amplitude increases to 8mV, the integral value will reach 4000mV·Sample. After normalization, the deviation coefficient can still be kept within the allowable range, ensuring the coordinated control effect at the system time reference level.
[0107] S4.4: Based on the accumulated value of the original morphological deviation and the total energy norm of the standard fingerprint template waveform within the key time window, execute the ratio normalization mapping algorithm to eliminate beam intensity fluctuation interference and generate a dimensionless relative morphological deviation coefficient.
[0108] The input processing objects are the original morphological deviation cumulative value calculated in the preceding sub-step S4.3 and the total energy norm of the standard fingerprint template waveform within a preset key time window. These two together constitute the input for the ratio normalization mapping operation. For the original morphological deviation cumulative value, the preset energy norm calculation module is first invoked to accumulate the sum of squares from the point-by-point amplitude sequence of the standard fingerprint template waveform and take the square root to generate the corresponding total energy norm value. Using the original morphological deviation cumulative value as the numerator and the total energy norm of the standard template as the denominator, a ratio normalization operation formula is constructed to form a dimensionless relative morphological deviation coefficient:
[0109] in, This is the relative morphological deviation coefficient. This represents the cumulative value of the original morphological deviation. This represents the total energy norm of the standard fingerprint template waveform within the critical time window. To ensure the numerical stability of the ratio calculation, the denominator undergoes zero-value determination and minimum threshold replacement processing to avoid coefficient distortion caused by division by zero. During the ratio mapping process, double-precision floating-point arithmetic is applied to improve the accuracy of coefficient calculation, and a preset amplitude normalization factor is used to limit the range of the results, ensuring that the value range of the relative morphological deviation coefficient meets the input requirements of the subsequent time-domain transformation matrix. Through the above chain processing method, the morphological difference quantity in the previous step is transformed into a dimensionless relative morphological deviation coefficient that remains stable under beam intensity fluctuations, achieving intensity independence of jitter detection data.
[0110] For example, in the real-time detection scenario of a safety grating multi-beam scanning system, the preset key time window length is 2ms. The amplitude sequence of the standard fingerprint template waveform is sampled at 162 points. The total energy value is calculated as 980.5 V² after summation of squares, and the total energy norm E after taking the square root is 31.32 V. The original cumulative morphological deviation value P is obtained as 5.92 V·ms through absolute value integration. The ratio normalization formula yields a ratio of 0.189. After adjustment by an amplitude normalization factor of 1.05, the final relative morphological deviation coefficient is 0.198. This coefficient remains stable under different beam intensity conditions and is successfully mapped to a timing offset of 0.44μs after subsequent S4.5 time-domain conversion gain matrix processing, significantly improving the time alignment accuracy of jitter detection and spread spectrum modulation.
[0111] S4.5: Based on the relative morphological deviation coefficient and the preset linear time-domain conversion gain matrix, perform scalar transformation and polarity determination processing to finally output the normalized timing offset used to drive the phase anchoring control model.
[0112] Based on the input relative morphological deviation coefficient and the system's preset linear time-domain transformation gain matrix, the correspondence between the coefficient matrix and the deviation value involved in the current operation is determined. The relative morphological deviation coefficient is used as a scalar input, and the diagonal elements of the gain matrix are multiplied one by one to map the deviation coefficient into an intermediate offset that meets the time-domain dimension requirements. The polarity of the intermediate offset data sign is determined, constructing logical branches for positive and negative offsets, and applying the positive or negative offset correction factors required by the phase anchoring control module within each branch. The determination result is used to update the sign bit and numerical domain of the offset, forming a final normalized offset vector with a clear time-domain polarity. This vector undergoes bit width adjustment and quantization encoding to ensure it can be directly used as a dimensionless timing input in subsequent phase anchoring model calls. Through mapping multiplication and polarity determination processing, the morphological difference index calculated in the previous step is transformed into a normalized timing offset that can drive frequency-domain control logic, achieving accurate initial phase calibration based on time-domain and frequency-domain coordination.
[0113] For example, assuming the relative morphological deviation coefficient is set to 0.024, the main diagonal elements of the linear time-domain transformation gain matrix are 1.5, 1.7, and 1.8, corresponding to the scaling weights of the three key feature time windows. Multiplying the deviation coefficient with the matrix elements yields the intermediate offset vectors of 0.036, 0.0408, and 0.0432. Applying the polarity determination rule, when the second component has a negative sign, a reverse correction factor is applied to that component. 1. Maintain sign correctness. In this embodiment, all components are positive, directly entering the positive correction branch. The correction coefficient is set to 1.02, so the corrected offset vector is 0.03672, 0.041616, 0.044064, which is encoded into an 8-bit fixed-point format after bit width adjustment. This encoded value directly triggers a mapping table lookup when the phase anchoring control model is input, outputting the corresponding initial phase calibration command, realizing the alignment of the scanning beam's initial phase to the most stable response time window, thereby significantly improving the stability of timing jitter compensation and the phase consistency of spread spectrum modulation in industrial automation safety light curtain scenarios.
[0114] Step S5: Based on the mapping relationship between the timing offset and the initial phase offset angle of the spreading code sequence, a phase anchoring control model is constructed. Specifically, this includes: S5.1: Perform linear interval mapping on the normalized timing offset generated in the previous step to convert the dimensionless deviation value into a phase adjustment reference value that meets the phase resolution requirements of the spread spectrum modulator, thereby obtaining a standardized phase adjustment reference value.
[0115] It should be noted that the phase anchoring control model is a parameterized mapping processing unit deployed in a digital logic controller. Its core architecture consists of a cascaded input quantizer, a core mapping lookup table, and an interpolation filtering unit. The model uses the normalized timing offset obtained from real-time comparison as the only dynamic input. After being converted into a digital offset codeword by the input quantizer, the initial phase correction coefficient corresponding to the codeword is indexed by the core mapping lookup table. Then, the correction coefficients of multiple consecutive scanning cycles are weighted and smoothed by the interpolation filtering unit to suppress phase jumps caused by noise. Finally, the output is the phase anchoring parameter that aligns the starting phase of the spread spectrum modulation to the center of the steady-state window of the beam response. The contents of the core mapping lookup table and the model parameter set such as the scaling factor and bias factor of the linear / nonlinear mapping function are dynamically loaded from the system timing knowledge base according to the beam cluster type. It also supports online updates through the self-optimization process of the system timing knowledge base, thereby realizing a fast, accurate, and adaptive conversion from time-domain jitter characteristics to frequency-domain phase compensation commands.
[0116] For example, the input quantizer can use a linear uniform quantization rule: Let the normalized timing offset D∈[-1,1], the quantization bit width M=10 bits, then the quantization step size Δ=2 / 1024, and the output digital codeword q=round(D / Δ), with a value range of 0~1023. The core mapping lookup table can be a 1024-bit deep, 12-bit wide read-only memory. The memory cell corresponding to address q stores the pre-calibrated phase correction coefficient C[q] (range -180°~+180°, represented in 12-bit two's complement). The lookup table content is pre-written through offline calibration experiments. A first-order recursive filter can output the current lookup table. ,in It is 0.1. This is the output smoothing phase correction command. After being encapsulated by the protocol, this command is output as phase anchoring parameters.
[0117] The input condition is the normalized timing offset output from the preceding step S4.5. This offset is a dimensionless relative shape deviation coefficient, possessing the property of eliminating beam intensity fluctuation interference, and can be directly used as the input source for the phase anchoring control model. Based on this normalized timing offset, an interval linear mapping operation is performed to transform it into a phase adjustment reference value that meets the phase resolution requirements of the spread spectrum modulator. During this process, a mapping matrix is established between the normalized offset and the upper and lower limits of the modulator's phase resolution to ensure that input changes exhibit a linear response at the output. By setting the endpoint values of the mapping interval to correspond to the minimum and maximum phase increments allowed by the modulator, the conversion result is guaranteed to be within the range achievable by the physical hardware. A combined scaling and offset compensation approach is used to proportionally map the normalized offset value to the target resolution interval, and offset compensation is injected before mapping to align with the system's zero-phase reference. The mapping formula is then calculated:
[0118] in, As a reference value for phase adjustment, The defined proportionality coefficient, This is the normalized timing offset. This is the bias compensation value. Through this linear interval mapping process, the result of the previous step is transformed into a standardized phase adjustment reference quantity with modulator phase resolution adaptation characteristics, realizing the conversion from dimensionless time-domain deviation to a frequency-domain controllable phase reference.
[0119] For example, the phase resolution of the spread spectrum modulator in a safety grating system is set to 0.5°, with an allowable adjustment range of -45° to 45°. The phase adjustment reference value is set to 45°, and the offset compensation value is set to 0 based on the hardware zero-point offset. In one test, the normalized timing offset was measured to be 0.6. Using the mapping formula, the phase adjustment reference value V = 45 × 0.6 + 0 = 27° was calculated. This reference value can directly drive the spread spectrum modulator's phase register to achieve a 27° adjustment during physical loading. In multiple repeated tests, the significant improvement in beam response stability verified the effectiveness of this method in converting the timing offset into a usable phase reference for the modulator. In the extreme case where D is -0.8, V = -36° was calculated, which is also within the hardware's allowable range. This allows for the output of negative phase correction, ensuring the system's adaptive capability when timing drift reverses.
[0120] S5.2: Based on the phase adjustment reference value and the preset spreading code sequence period length of the safety grating system, perform phase sector division calculation to determine the phase compensation search range corresponding to the current beam response fluctuation, thereby generating a restricted phase compensation search interval.
[0121] Based on the input phase adjustment reference value and the preset spreading code sequence period length of the safety grating system, a periodic quantization model is established to form a mapping coefficient matrix between the time axis and the phase axis. The phase adjustment reference value is input into the periodic quantization model, and a period normalization operation is performed to eliminate phase reference offsets caused by different spreading code period lengths. Using the period-normalized phase reference value, combined with the phase resolution unit defined by the system, the number of complete phase sectors that can be divided is calculated. Based on the center and boundary values of each phase sector, a phase sector index table is constructed to achieve bidirectional retrieval of phase position and physical time interval. A range-limiting algorithm based on the phase sector index table is used to map the phase adjustment reference value corresponding to the current beam response fluctuation to the phase sector set, and to determine the boundary intervals within the sector containing this value that can be used for compensation. Through the above processing method, the result of the previous step is transformed into a physically meaningful and range-limited phase compensation search interval, effectively constraining the generation range of subsequent candidate phase offset angles.
[0122] For example, the spread spectrum code sequence period length of a certain safety grating system is preset to 1024 chips, and the phase resolution unit is 0.5 degrees. The standardized phase adjustment reference value obtained in the preceding step S5.1 is 73.6 degrees, and the period normalization model is based on the formula:
[0123] in This is the reference value for phase adjustment. The total phase (360 degrees) corresponding to the code sequence period length is calculated, and the normalized phase reference value is approximately 0.204. Multiplying the normalized value by the number of sectors (720 sectors) yields a sector index of 147.2, which is rounded to obtain sector number 147. The center value of this sector is 73.5 degrees, and the boundary interval is [73.0 degrees, 74.0 degrees], forming a restricted phase compensation search interval of 1.0 degree. During the phase compensation search process, the system generates candidate phase offset angles only within this boundary interval, significantly improving the physical validity and stability of candidate parameters and avoiding noise interference from irrelevant ranges.
[0124] S5.3: Using the historical stability weight data within the restricted phase compensation search interval, the candidate phase offset angles are subjected to weighted smoothing filtering to eliminate the risk of phase jump caused by single measurement noise, thereby outputting a smoothed set of candidate phase offset angles.
[0125] Using candidate phase offset angle data within the restricted phase compensation search interval as the processing object, the weight values of each period in the historical stability weight dataset are called to establish a one-to-one correspondence with the corresponding candidate angles, forming a weight vector matrix for smoothing processing.
[0126] Based on the relative magnitude of each weight value in the weight vector matrix, the candidate phase offset angle sequence is arranged by time index, and a weighted moving average calculation is performed. The corresponding values of each candidate angle data and multiple adjacent periods are weighted and summed to form a preliminary smoothing result.
[0127] An exponentially weighted smoothing filter algorithm is used to map the initial smoothing result to the exponential decay coefficient of the historical stability weights. The final smoothing angle value is calculated using the following formula:
[0128] in, For the first Historical stability weight value for each period, This corresponds to the candidate phase offset angle value. To smooth out window length.
[0129] Boundary constraint determination is performed on the smoothed angle sequence after exponential weighting. Smoothed angle values that exceed the range of the restricted phase compensation search interval are clipped and corrected to keep them within the legal value range of the interval.
[0130] By using the weighted smoothing filtering method described above, the candidate angle data of the restricted phase compensation search interval in the previous step is transformed into a smoothed set of candidate phase offset angles, thereby effectively suppressing the risk of phase jump caused by single measurement noise.
[0131] For example, in a safety grating multi-beam scanning system, the restricted phase compensation search interval is set to [-15°, 15°]. The historical stability weight dataset contains weight values for the most recent five scanning cycles, which are 0.50, 0.80, 0.65, 0.90, and 0.70, respectively, corresponding to candidate phase offset angles of -10.2°, -9.5°, -8.7°, -9.0°, and -8.9°. The smoothing window length is set to n=5. When calculating the weighted result using the formula, the numerator is the sum of the products of each candidate angle value and its corresponding weight, and the denominator is the sum of each weight value. The calculated smoothed candidate phase offset angle is approximately -9.09°, which falls within the range of [-15°, 15°] and requires no trimming correction. This performance significantly reduces the abrupt changes in phase offset angle caused by single-cycle environmental noise interference in actual operation, ensuring the stability and repeatability of the spread spectrum modulation initial phase alignment process.
[0132] S5.4: Based on the functional correspondence between the smoothed candidate phase offset angle set and the normalized timing offset, construct a lookup table index mapping logic to establish a direct conversion rule from time-domain jitter characteristics to frequency-domain phase parameters, thereby forming a phase anchoring control mapping table.
[0133] Based on the input conditions of the candidate phase offset angle set obtained through the smoothing process in step S5.3 and the normalized time offset, establishing the mapping logic requires clarifying the functional correspondence between the two and ensuring that the mapping process can be executed in real time under fixed computational resource constraints. The candidate phase offset angle set is sequentially indexed according to phase resolution units to generate an iteratively accessible angle index sequence, and a corresponding normalized time offset interval boundary parameter is established for each index value. Interval detection operations are performed on the normalized time offsets according to the set interval boundaries to determine the matching interval to which the offset belongs, and the candidate phase offset angle values bound to the corresponding interval are extracted. The difference coefficient between the normalized time offset and the interval center value is calculated within the matching interval, and interpolation is used to fine-tune the extracted candidate phase offset angles to improve mapping accuracy. The offset interval index, difference coefficient, and fine-tuned phase offset angle are combined and encoded to form a single record object in the index mapping table. The above combined encoding is performed on all normalized time offset intervals to complete the construction of a full-coverage mapping rule from time-domain jitter features to frequency-domain phase parameters. By using lookup table index mapping logic, the smoothed candidate phase offset angle set from the previous step is transformed into a phase anchoring control mapping table that can be directly used by the phase anchoring control model, thus achieving a fast and accurate conversion from normalized timing offset to spreading code phase correction value.
[0134] For example, in a safety grating multi-beam scanning system, assuming the spread spectrum modulator has a phase resolution of 0.5°, the candidate phase offset angle set includes... Smoothed angle data ranging from 5° to +5°, totaling 21 discrete values. The normalized time offset interval boundaries are set to equal intervals of 0.1. During the mapping logic construction, each offset interval is bound to its corresponding phase offset angle. For a normalized time offset of 0.37, interval detection determines it belongs to the 0.3–0.4 interval, and the bound candidate phase offset angle value is extracted to be 1.5°. A linear interpolation fine-tuning formula is used:
[0135] Among them, the fine-tuning coefficient Used to correct angles This is the current normalized time offset. These are the offsets corresponding to the lower and upper boundaries of the interval, respectively. The formula for calculating the corrected phase offset angle is:
[0136] in The reference phase offset angle for interval binding. This is the phase offset angle for the next interval.
[0137] Calculations were performed to obtain The corrected phase offset angle is 0.2. The value is 1.6°. The offset interval index value, coefficients and sum The value combination encoding is written into a mapping table to achieve direct conversion from a timing offset of 0.37 to the initial phase correction value of the spreading code. In practical applications, this mapping table can be used for lookup and interpolation operations in the phase anchoring control model to ensure a significant improvement in the alignment effect between the initial phase of the spreading code and the beam response stabilization window. The phase alignment deviation of the system remains within 0.2° in 100 consecutive scanning cycles.
[0138] S5.5: Based on the phase anchoring control mapping table, the phase calculation engine is encapsulated, and the normalized time offset input in real time is used as the trigger condition to perform table lookup and interpolation operations, so as to directly derive the phase correction instruction that does not depend on the joint state space model and generate the phase anchoring control model.
[0139] Using the phase anchoring control mapping table formed by the preceding sub-steps as input conditions, and the index structure and interpolation strategy in the mapping table as core data configuration, the normalized time offset acquired in real time is used as the sole trigger variable for parameter calculation.
[0140] The bit width and quantization resolution of the input trigger variable are analyzed to ensure that it has unique positioning capability in the lookup table index address space, and thus form the retrieval entry point of the mapping table.
[0141] Perform precise index positioning by calling the pointer of the mapping table entry corresponding to the normalized time offset from the storage unit to the local computation buffer, and synchronously loading the set of candidate phase correction values for that entry.
[0142] Interpolation is performed on the candidate phase correction value set, and bilinear interpolation is used to establish a continuous phase response surface between known data points in the mapping table, thereby achieving high-precision phase correction value fitting for non-integer offset inputs.
[0143] The phase correction value output by interpolation is checked for consistency with the historical correction value in the mapping table entry. A threshold determination mechanism is used to remove abrupt change anomalies and generate stable phase correction command data.
[0144] The phase correction instruction data and lookup-interpolation logic kernel are encapsulated into an integrated computing instance, forming a phase calculation engine that can be directly deployed to the controller, and the engine is registered as a running instance of the phase anchoring control model.
[0145] Through the above lookup table and interpolation chain, the result of the previous step is transformed into a stable phase correction instruction that can directly drive the spread spectrum modulator, thereby achieving real-time dynamic phase calculation based on timing offset.
[0146] For example, in a safety grating system equipped with 128 scanning beams, the index resolution of the mapping table is set to 0.001 dimensionless units, and the address range covers the interval from 0 to 1 of the normalized timing offset. The real-time input normalized timing offset is 0.537. After indexing, the phase correction values for two adjacent table records are found to be 1.250 radians and 1.265 radians, respectively. The bilinear interpolation calculation formula is as follows:
[0147] in The lower-order table value, The high-order value, The normalized difference of the offset within the interval is calculated as follows: The value is 1.257 radians. This value differs from adjacent period data in the historical correction set by no more than 0.005 radians, indicating a stable state, and is directly used as the output command of the phase calculation engine. After loading this command into the spread spectrum modulator, the initial phase is aligned to the center of the beam response window. The timing consistency in the system's stability indicators is significantly improved, and the relative morphological deviation coefficient of the response waveform decreases to 0.12, verifying the effectiveness of the internal interpolation and lookup table-driven phase anchoring control model in complex multi-beam jitter environments.
[0148] Step S6: Input the timing offset into the phase anchoring control model to dynamically correct the initial phase offset angle of the spreading code sequence, thereby generating phase anchoring parameters that strictly align the starting phase of the spreading modulation to the center of the steady-state window of the beam response. Specifically, this includes: S6.1: The normalized timing offset of the input is quantized and encoded to generate a digital offset codeword with discrete level characteristics, which serves as the original driving data for the phase anchoring control model.
[0149] S6.2: Based on the digital offset codeword, query the pre-constructed phase offset lookup table mapping relationship to obtain the initial phase correction coefficient that strictly corresponds to the normalized timing offset.
[0150] The input digital offset codeword establishes a unique query path by matching its index position in the phase anchoring control map table, and calls the map table's retrieval logic to obtain the initial phase correction coefficient of the corresponding record.
[0151] During the mapping table lookup process, the index position is used to perform precise address positioning of the mapping table, and the phase correction coefficient storage unit associated with the digital offset codeword is read to ensure that the retrieval results are not affected by external interference or index drift.
[0152] For query results that require interpolation, the bilinear interpolation algorithm is invoked to estimate coefficients between adjacent records in the mapping table to compensate for the step size discrepancy introduced by the quantization encoding process.
[0153] The initial phase correction coefficients obtained by querying or interpolation are standardized and converted into a numerical format that conforms to the loading specification of the phase register of the spread spectrum modulation module.
[0154] The quantization accuracy of the correction coefficients after format standardization is checked to ensure that their resolution meets the minimum accuracy requirement for the initial phase offset angle correction of the spreading code sequence.
[0155] By using a mapping table lookup and interpolation process, the digital offset codewords generated in the previous step are converted into initial phase correction coefficients that strictly correspond to the normalized timing offset, thereby enabling the construction of an independent and precise phase adjustment reference for a single beam.
[0156] For example, in a safety grating multibeam system, the normalized timing offset is encoded as an 8-bit digital offset codeword, where the high 4 bits serve as the primary index and the low 4 bits are used for interpolation weight calculation, inputting to a phase offset mapping table. The mapping table has 256 pre-defined records, with values ranging from -0.25 to 0.25 radians. Each record corresponds to a phase correction coefficient in radians. The retrieval logic locates the primary record in the mapping table based on the high 4-bit index, reads the corresponding phase correction coefficient and the phase correction coefficient of the next record, and performs bilinear interpolation using the low 4-bit weight to obtain the accurate coefficient. The interpolation formula is:
[0157] in, Main record coefficient, For the next recorded coefficient, The weighting coefficient is 0.1375 radians. After format normalization, it is converted into a 16-bit fixed-point format acceptable to the spread spectrum modulator register. The accuracy is verified to achieve a resolution of 0.0001 radians, thus realizing high-precision correction of the initial phase offset angle of the target beam.
[0158] S6.3: Use the initial phase correction coefficient to perform a weighted operation on the reference phase angle of the standard spreading code sequence to calculate the phase dynamic compensation value to be applied.
[0159] The accuracy of the acquired initial phase correction coefficients is verified to ensure that they meet the steady-state response constraints of the synchronous capture device.
[0160] Once the accuracy requirement is met, the initial phase correction coefficient is paired with the reference phase angle of the standard spreading code sequence to form paired data and loaded into the weighted calculation module.
[0161] In the weighted calculation module, arithmetic weighting is performed based on the preset stability weight factor matrix, and differentiated weighting is applied to the reference phase angle and the initial phase correction coefficient to eliminate random disturbances introduced by a single measurement.
[0162] The weighted reference phase angle value and the weighted initial phase correction coefficient are superimposed using a vectorized operation method to form a dynamic phase compensation value data vector.
[0163] To ensure calculation accuracy, a standardization process is introduced in the phase superposition stage to control the compensation value within the phase resolution range allowed by the spread spectrum modulator.
[0164] The phase superposition operation uses the following formula:
[0165] in, This is the phase dynamic compensation value. As a stability weighting factor, As the reference phase angle, This is the initial phase correction coefficient.
[0166] Through the above weighting and superposition process, the initial phase correction coefficient and the reference phase angle are fused in the weight space to obtain the phase dynamic compensation value to be applied to the spreading code sequence, thereby realizing accurate phase calibration driven by the intrinsic response characteristics of the beam.
[0167] For example, in an industrial automation safety light curtain application, the system presets a reference phase angle of 45 degrees, an initial phase correction coefficient of -3 degrees, and a stability weighting factor of 0.8. The reference phase angle and the initial correction coefficient are input into the weighted calculation module, and the above formula is executed. The resulting output phase dynamic compensation value is 35.4 degrees. This compensation value, after normalization, is controlled within the resolution allowable range (±40 degrees) of the spread spectrum modulator and is subsequently superimposed on the initial phase offset angle to achieve precise phase alignment of the spread spectrum code sequence. In this scenario, this significantly improves the response consistency and detection stability of beam scanning in complex environments.
[0168] S6.4: The phase dynamic compensation value is superimposed on the initial phase offset angle of the spreading code sequence in the current scanning period to generate a target phase anchoring parameter aligned with the center of the steady-state window of the beam response.
[0169] Using the phase dynamic compensation value calculated in the previous sub-step as the input for the superposition operation, numerical combination processing is performed on the initial phase offset angle of the spreading code sequence in the current scanning period to form a calculation chain for the target phase anchoring parameters. Based on the standard phase reference angle value provided by the internal register of the spreading modulation module, a compensation value vector with the same dimensions as the reference angle value is constructed in the numerical domain to ensure the physical consistency of the subsequent superposition results. A double-precision floating-point accumulator is used to perform vector summation of the reference angle value and the compensation value, and a ring phase normalization function is applied during the summation process to limit the superposition result to the effective phase range of 0 to 2π. The target phase anchoring parameters are calculated using the following ring phase superposition formula:
[0170] in, The initial phase offset angle for the current scan cycle. This is the phase dynamic compensation value. For the ring normalization function, its processing is based on the following rules:
[0171] To ensure that the superposition result does not exhibit out-of-bounds phase jumps during the modulus calculation, a fixed decimal truncation and resolution matching correction are performed on the superimposed parameters to adapt to the phase register accuracy constraints of the spread spectrum modulator. Through ring superposition and accuracy correction, the result of the previous step is transformed into target phase anchoring parameters that can be directly used for updating the carrier phase register, achieving the expected technical effect of strictly aligning the starting phase of the spread spectrum modulation to the center of the steady-state window of the beam response.
[0172] For example, in a safety light curtain system operating on an industrial automated production line, the initial phase offset angle of the spreading code sequence in the current scanning cycle is 1.0472 radians, and the dynamic phase compensation value is 0.5236 radians. Based on the ring superposition formula, wrap(1.0472+0.5236)=wrap(1.5708)=1.5708 radians, which is within the valid range of [0,2π] and requires no additional adjustment. After resolution matching correction, the target phase anchoring parameter is retained to four decimal places, resulting in control data of 1.5708 radians. After this parameter is input to the carrier phase register of the spread spectrum modulation module, the starting phase of the driving beam scanning signal in the current cycle is perfectly aligned with the center of its response steady-state window, significantly improving the detection stability of the system under high-temperature conditions, significantly reducing the response delay fluctuation amplitude, and significantly improving the timing consistency index when multiple beams are working in parallel.
[0173] S6.5: Update the carrier phase register state of the spread spectrum modulation module based on the target phase anchoring parameters to complete the dynamic correction of the initial phase offset angle of the spread spectrum code sequence and output the final phase anchoring parameters.
[0174] Using the target phase anchoring parameters calculated in substep S6.4 as the sole input, a parameter update operation is performed on the current state of the carrier phase register of the spread spectrum modulation module. Addressing the difference between the register bit width and the target phase anchoring parameter's numerical format in the spread spectrum modulation module, a bit width reconstruction algorithm is used to rearrange the binary data structure, converting the target parameters into a phase control word format conforming to the register's acceptance standard. The physical storage unit of the phase register is locked according to the register address mapping table, and a multi-cycle clock synchronous write is performed using the bus driver interface, loading the phase control word into the register in high-order priority. Write protection logic is introduced during the write process, comparing the difference between the current register state and the control word to be written to ensure that updates only occur when the difference exceeds a minimum threshold, thus avoiding system disturbances caused by invalid writes. After completing the register state update, a phase state refresh instruction is triggered within the spread spectrum modulation module, causing it to reconstruct the starting phase of the spreading code sequence based on the latest register content in the next scan cycle, thereby generating the final phase anchoring parameters with precise timing alignment characteristics. By using the above register state update and refresh processing method, the target phase anchoring parameters of the previous step are converted into hardware state data that can directly participate in spread spectrum modulation, thereby realizing the dynamic correction of the initial phase offset angle of the spread spectrum code and the precise alignment of the beam response timing window.
[0175] For example, in a real-time scanning scenario of a safety grating multibeam system, the target phase anchoring parameter is set to 18.75 degrees, the register width is 12 bits, and it is represented in a fixed-point format. Using a bit-width reconstruction algorithm, 18.75 degrees is converted into a phase control word multiplied by... The integer value is used to obtain the control word code 213. Under the I²C bus driver interface, the register physical address is 0x3F, and the control word is written in four consecutive clock cycles in high-order priority. The write protection logic sets the difference threshold to 2. When the difference between the current value of the register and 213 is greater than 2, the write is performed to ensure that frequent updates are avoided due to minor jitter. After the register is updated, the starting phase of the spreading code is reconstructed through an internal refresh instruction. The system detects that the peak position of the beam response in the new cycle has a significantly improved coincidence with the center of the steady-state timing window, and the response consistency index remains stable among different beams, verifying the dynamic correction effect of this step.
[0176] Step S7: Adjust the carrier phase of the spread spectrum modulation process based on the phase anchoring parameters, and perform spread spectrum control operation on the beam scanning signal. Specifically, this includes: S7.1: Perform digital encoding format verification and bit width alignment processing on the target phase anchoring parameters output from the previous step to generate a standardized phase control word that conforms to the input interface standard of the spread spectrum modulator phase register, thereby establishing a precise digital command reference for carrier phase adjustment.
[0177] Using the target phase anchoring parameter as input, the digital encoding processing unit is invoked, and the preset spread spectrum modulator interface protocol specification and bit width constraints are loaded. Encoding format validity checks are performed, with sign verification and data field length confirmation performed on each bit of the input parameter to filter out abnormal code values that do not conform to the interface format. Bit width alignment logic is invoked, adjusting the target phase anchoring parameter to match the register bit width through unsigned extension or high-bit truncation, based on the effective bit length of the spread spectrum modulator phase register. Using a binary weight remapping method, the bit-width-aligned phase offset value is converted into a register-recognizable control word structure, maintaining the data order and synchronization with the interface transmission protocol.
[0178] The structured control word is subjected to CRC check sequence appending processing to generate a standardized phase control word with redundant check bits, ensuring that the bit error rate remains within a controllable range during subsequent register writing. Through the above format verification and bit width alignment processing, the target phase anchoring parameters from the previous step are transformed into a standardized phase control word conforming to the input interface standard of the spread spectrum modulator phase register, thereby achieving accurate establishment of the carrier phase adjustment command reference.
[0179] S7.2: Based on the standardized phase control word, perform forced loading and offset injection operations on the initial value of the carrier phase accumulator inside the spread spectrum modulation module to reconstruct the initial phase state of the local spread spectrum code sequence, thereby generating a phase-corrected spread spectrum code stream with specific timing alignment characteristics.
[0180] The input conditions include the standardized phase control word output from step S7.1 and the current initial value register state of the carrier phase accumulator inside the spread spectrum modulation module. The standardized phase control word is parsed using an interface protocol, its high-order segments are read as offset injection parameters, and its low-order segments are read as initial value loading parameters to form a segmented phase control instruction data structure. Based on the initial value loading parameters, the existing value of the carrier phase accumulator register in the spread spectrum modulation module is directly overwritten, achieving a forced refresh of the carrier phase start state. The offset injection parameters undergo sign polarity identification and amplitude quantization processing, treating positive polarity offsets as early corrections to the start phase and negative polarity offsets as delayed corrections to the start phase, and calculating the corrected phase start point based on the current accumulator value. A numerical accumulation algorithm is used to add the amplitude-quantized offset injection parameters to the initial value loading parameters.
[0181] Through the above chain processing method, the standardized phase control word is converted into a phase-corrected spread spectrum code stream, so as to achieve precise alignment between the starting phase of the scanning cycle and the stable timing window of the beam response.
[0182] S7.3: The phase-corrected spread spectrum code stream is used to perform binary phase keying modulation processing on the original scanning pulse carrier signal of the safety grating system, so as to map the phase offset information into the frequency domain characteristics of the optical signal, thereby producing a phase-modulated optical drive signal carrying jitter compensation information.
[0183] The input conditions include the phase-corrected spread spectrum code stream output from sub-step S7.2 and the original scanning pulse carrier signal of the safety light grating system. Both are in the digital baseband domain and have completed timing and codeword format standardization. Based on this, the phase-corrected spread spectrum code stream and the original carrier signal are first synchronized in the numerical domain to ensure strict alignment of waveform periods during modulation. Subsequently, in the modulation control unit, the logic bit states of the spread spectrum code stream are mapped to the corresponding phase offset command values, defining logic "0" as corresponding to the carrier reference phase angle and logic "1" as the carrier reference phase angle plus the offset angle Δφ.
[0184] The physical injection of the above mapping is then achieved using a binary phase keying (BPSK) modulator, which applies a phase rotation operation to the carrier signal according to the code value within each symbol duration. To eliminate spectral sidelobes caused by phase abrupt changes, a raised cosine weighting function is used to smooth the phase transition boundaries, ensuring that only the main lobe distribution related to the modulation information is retained in the frequency domain characteristics. Through the above processing method, the phase offset information is stably embedded into the spectral structure of the scanning pulse optical signal, thereby forming a phase-modulated optical drive signal that simultaneously carries jitter compensation coding information, achieving the expected function of this sub-step. For example, in an industrial automation safety light curtain system, the original carrier frequency is set to 20MHz, the spreading code sequence period length is 1024 symbols, and the offset angle in the spreading code stream after phase correction generated by S7.2 is π / 4 radians. The modulation control unit assigns code value "0" to phase 0 and code value "1" to phase π / 4, and the BPSK modulator operates according to the symbol duration of 120.48 × 10 6 Phase rotation is performed every second, and the roll-off factor of the raised cosine filter is set to 0.25 to control the bandwidth of the transition region. At the modulation output, after the current waveform is injected by the optical driver, the laser diode emits a phase-modulated beam with a main lobe width of approximately 0.5 MHz. Field tests show that the correlation peak position of this beam in the detection area is stable at the center of the expected timing window, the morphological jitter is significantly reduced, and the coordinated accuracy of spread spectrum modulation and jitter compensation is greatly improved.
[0185] S7.4: Drive the laser diodes in the beam emission array to perform high-intensity pulse emission operation according to the phase-modulated light driving signal, so as to form a scanning beam with dynamic phase calibration characteristics in the spatial domain, thereby completing the physical conversion from electrical domain phase compensation to optical domain signal emission.
[0186] S7.5: Monitor the coverage integrity and timing consistency index of the scanning beam with the dynamic phase calibration feature in the detection area to verify the actual correction effect of the phase anchoring parameter on the spread spectrum control operation, thereby confirming the establishment of the implicit cooperative control closed loop of jitter compensation and spread spectrum modulation at the time reference level.
[0187] The input conditions include a scanning beam output from step S7.4 that already possesses dynamic phase calibration characteristics, and beam signal data streams acquired in real time by the photoelectric receiver array deployed within the detection area. Based on the geometric coverage model of the detection area, a parameter table is retrieved to determine the spatial sampling point distribution matrix required for coverage integrity evaluation. The coverage integrity evaluation module performs point-by-point integration and threshold judgment processing on the received light intensity at each sampling point to form a coverage status judgment matrix, which serves as the input data benchmark for temporal consistency evaluation. Based on the judgment matrix, beam response curves for areas with normal coverage are extracted, and timestamp differential detection is performed on the curves to calculate the scanning pulse arrival time deviation sequence for each normal area, thus eliminating interference from abnormal areas on the temporal consistency evaluation. A temporal consistency measure algorithm is used to perform statistical calculations on the deviation value sequence, and a sum of squares is calculated to form the global consistency deviation, as shown in the following formula:
[0188] in, This represents the global timing consistency deviation. Let be the arrival time deviation value of the scan pulse for the i-th normally covered sampling point. The reference deviation value is the center of the steady-state window of the target beam response. This represents the total number of sampling points with normal coverage. The global consistency deviation is compared with the system's preset consistency threshold to generate a consistency verification result, which is then logically evaluated in parallel with the coverage integrity verification result. Through joint verification of both coverage integrity and timing consistency indicators, a phase anchoring parameter correction effect evaluation report is output to confirm the establishment of an implicit collaborative control closed loop between jitter compensation and spread spectrum modulation at the time reference level.
[0189] By combining coverage integrity and timing consistency monitoring, the dynamic phase calibration effect of the scanning beam in the previous step is transformed into a quantitative indicator for determining the establishment status of the collaborative control closed loop, thereby verifying the actual correction effect of the phase anchoring parameter in the spread spectrum control operation.
[0190] For example, in an industrial automation safety light curtain system, the detection area is a rectangle with a width of 3.5 meters and a height of 1.2 meters. The number of spatial sampling points for the coverage integrity evaluation module is set to 140, and the threshold light intensity per point is 2.5mW. The beam response curve sampling frequency is set to 100MHz, and the timing consistency algorithm reference deviation value is set to the nanosecond level. The standard timeframe is 15 ns. The consistency threshold is set to 0.8 ns based on equipment accuracy. After coverage integrity assessment, 137 sampling points meet the threshold requirement, forming a normal region matrix. Timestamp difference analysis is performed on the arrival time series of the scan pulses for these matrix points, yielding a deviation range of 14.9 ns to 15.3 ns. The sum of squares divided by 137 gives a global consistency deviation of 0.42 ns, which is lower than the threshold of 0.8 ns. The joint assessment results indicate that the closed loop is stably established. The output verification report clearly indicates that after phase anchoring parameter correction, the beam coverage is high and the timing consistency deviation is low, ensuring the steady-state operation of the implicit cooperative control closed loop and significantly improving the system's response accuracy and stability under complex optical interference conditions.
[0191] Step S8: Monitor the beam detection stability index after the spread spectrum control operation. If the detected timing offset exceeds a preset threshold, update the corresponding record in the beam timing fingerprint database to complete the dynamic self-optimization of the system timing knowledge base. Specifically, this includes: S8.1: Perform continuous periodic sampling processing on the beam scanning signal after spread spectrum control operation to obtain a real-time detection stability index dataset containing the current actual response waveform characteristics.
[0192] S8.2: Extract the real-time timing offset value of the current scanning cycle based on the real-time detection stability index dataset, and perform a logical comparison operation between the real-time timing offset value and the timing offset threshold preset by the system to generate a timing offset out-of-bounds judgment result that characterizes the abnormal state of the beam response.
[0193] Based on the real-time detection stability index dataset formed by continuous periodic sampling, the time series waveforms associated with the transient response of the beam in the dataset are used to extract features, and the key time window after zero-point alignment is locked to obtain the cumulative value of energy norm and morphological difference.
[0194] The cumulative morphological difference value is mapped to the energy norm by ratio normalization to generate a dimensionless relative morphological deviation coefficient, which is then converted into a normalized temporal offset by a preset linear time-domain transformation gain matrix.
[0195] The system calls the internal threshold management unit to read the preset time offset threshold, compares the normalized time offset with the threshold, generates a Boolean-type boundary crossing judgment flag representing the abnormal state of the beam response based on the comparison result, and encapsulates the judgment result into a boundary crossing event report object for subsequent fingerprint template update module to call.
[0196] Through the above logical operation chain, the real-time detection stability index of the previous step is transformed into a structured temporal offset boundary judgment result, thereby realizing the accuracy and automation of abnormal beam identification.
[0197] S8.3: Based on the abnormal beam identifier indicated in the time offset out-of-bounds determination result, retrieve and retrieve the corresponding original beam time fingerprint record from the system time knowledge base to obtain the beam dynamic response reference template data to be updated.
[0198] The input is the timing offset out-of-bounds judgment result generated in step S8.2, which includes the abnormal beam identifier and the corresponding out-of-bounds detection status. The execution object is the full beam timing fingerprint record stored in the system timing knowledge base.
[0199] The uniqueness of the abnormal beam identifier is verified to ensure that the retrieval process can locate the unique target fingerprint record in the knowledge base.
[0200] An index mapping relationship is established based on the abnormal beam identifier, which is then associated with the globally unique identifier field of the standard fingerprint record object to eliminate retrieval ambiguity caused by numbering conflicts or duplicate naming.
[0201] In the knowledge base storage structure, a fast location operation based on a hash chain is performed. The physical address of the corresponding storage block is located in the index table using the identifier hash value, thereby obtaining the storage location of the target record to be retrieved.
[0202] Integrity verification and version consistency checks are performed on the located storage blocks to ensure that the retrieved beam timing fingerprint records contain all three-dimensional timing feature vectors and are consistent with the current system version, so as to avoid introducing outdated or incomplete reference template data.
[0203] The beam timing fingerprint records that have passed the consistency verification are extracted from the storage block to extract three core features: phase offset angle, overshoot oscillation attenuation envelope parameter set, and steady-state window center value, forming the beam dynamic response benchmark template data to be updated.
[0204] Through the above retrieval and processing methods, the abnormal beam identifiers from the previous step are transformed into dynamic response benchmark template data of the beam to be updated with high-precision original features, thereby achieving accuracy and completeness in the extraction of the data to be updated.
[0205] For example, in a multi-beam safety grating system, the system's temporal knowledge base stores the temporal fingerprint records of 128 beams in a high-density storage mode. Each record contains a unique identifier, a phase offset angle accuracy set to 0.1 μs, an overshoot oscillation attenuation envelope fitting error of less than 0.5%, and a steady-state window center measurement accuracy of 1 μs. During a stability monitoring process, the real-time temporal offset detection value of beam 6 was 3.2 μs, exceeding the system's preset threshold of 3.0 μs, resulting in an out-of-bounds judgment. During the retrieval process, the identifier of beam 6 passed the uniqueness check without conflict, mapped to the hash index value 473, and located at the physical storage location 0x1F8 in the knowledge base. The integrity check of this storage block passed, and the version consistency matched the current system control software. The three-dimensional feature vector of the benchmark template with a phase offset angle of 12.8 μs, an overshoot oscillation attenuation envelope index fitting coefficient of 0.92, and a steady-state window center of 28.6 μs was parsed and used as the data to be updated to be input into the sliding window weighted average fusion calculation in step S8.4. After performing this retrieval and parsing, the accuracy of the update processing is significantly improved, avoiding timing compensation deviations caused by calling incorrect records.
[0206] S8.4: The sliding window weighted average algorithm is used to perform fusion calculation on the recent historical response features associated with the beam dynamic response reference template data to be updated and the real-time time series offset value, so as to generate a high-precision updated version of beam time series fingerprint data that reflects the latest environmental characteristics.
[0207] S8.5: Based on the high-precision updated beam timing fingerprint data, perform a database write and replacement operation to overwrite and update the original old version of the beam timing fingerprint records in the system timing knowledge base, so as to complete the dynamic self-optimization of the system timing knowledge base and output the latest beam timing fingerprint database with adaptive capabilities.
[0208] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
[0209] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the element or object preceding “comprising” or “including” encompasses the element or object listed following “comprising” or “including” and its equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.
[0210] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A multi-beam scanning spread spectrum control method for safety gratings considering timing jitter, specifically including: S1: Perform a single-cycle no-load scan independently on each scanning beam in the safety grating multi-beam scanning system, collect the response signal of each beam at the standard reference plane, and obtain the initial response dataset. S2: Based on the initial response dataset, extract three types of temporal features for each beam: the rising edge trigger time, the overshoot oscillation attenuation envelope, and the steady-state window center, to generate a beam temporal fingerprint; S3: Register all the beam timing fingerprints to the system timing knowledge base, and perform clustering and grouping processing based on the dispersion of the steady-state window center in each fingerprint to construct a beam cluster classification table; S4: During real-time scanning, the phase offset angle in the timing fingerprint of the beam corresponding to the beam currently entering the detection area is taken as the theoretical zero point. The response signal in the current scanning cycle is compared with the morphological deviation of the fingerprint template in the key time window to obtain the timing offset. S5: Based on the mapping relationship between the timing offset and the initial phase offset angle of the spreading code sequence, a phase anchoring control model is constructed; S6: Input the timing offset into the phase anchoring control model to dynamically correct the initial phase offset angle of the spreading code sequence, so as to generate phase anchoring parameters that strictly align the starting phase of the spreading modulation to the center of the steady-state window of the beam response. S7: Adjust the carrier phase of the spread spectrum modulation process based on the phase anchoring parameters, and perform spread spectrum control operation on the beam scanning signal.
2. The multi-beam scanning spread spectrum control method for safety gratings considering timing jitter according to claim 1, characterized in that, Step S7 is followed by step S8, which specifically includes: S8: Monitor the beam detection stability index after the spread spectrum control operation. If the timing offset exceeds the preset threshold, update the corresponding record in the beam timing fingerprint database to complete the dynamic self-optimization of the system timing knowledge base.
3. The multi-beam scanning spread spectrum control method for safety gratings considering timing jitter according to claim 1, characterized in that, Step S2 specifically includes: Adaptive threshold segmentation is performed on the original response signal in the initial response dataset to obtain a signal rising edge sequence containing accurate jump information, and the phase offset angle characterizing the transient characteristics of beam initiation is calculated based on the signal rising edge sequence. Based on the starting time point determined by the phase offset angle, envelope detection and exponential fitting operations are performed on the amplitude fluctuation data of the original response signal in the overshoot interval to generate an overshoot oscillation attenuation envelope parameter set describing the beam energy convergence process. Using the convergence endpoint of the overshoot oscillation attenuation envelope parameter set as a reference, the time span of the original response signal entering the preset steady-state error band is delayed and measured to calculate the center value of the steady-state window that reflects the thermal stability of the beam and the circuit establishment characteristics. The phase offset angle, the overshoot oscillation attenuation envelope parameter set, and the steady-state window center value are encapsulated into multi-dimensional vectors and mapped by hash index to generate the beam temporal fingerprint.
4. The multi-beam scanning spread spectrum control method for safety gratings considering timing jitter according to claim 1, characterized in that, Step S5 specifically includes: The normalized timing offset generated in the preceding steps is processed by linear interval mapping to convert the dimensionless deviation value into a phase adjustment reference value that meets the phase resolution requirements of the spread spectrum modulator, thereby obtaining a standardized phase adjustment reference value. Based on the phase adjustment reference value and the preset spreading code sequence period length of the safety grating system, phase sector division calculation is performed to determine the phase compensation search range corresponding to the current beam response fluctuation and generate a restricted phase compensation search interval. Using the historical stability weight data within the restricted phase compensation search interval, the candidate phase offset angles are subjected to weighted smoothing filtering to eliminate the risk of phase jump caused by single measurement noise, and a smoothed set of candidate phase offset angles is output. Based on the functional correspondence between the smoothed candidate phase offset angle set and the normalized timing offset, a lookup table index mapping logic is constructed to establish a direct conversion rule from time-domain jitter features to frequency-domain phase parameters, forming a phase anchoring control mapping table. The phase calculation engine is encapsulated based on the phase anchoring control mapping table. The normalized time offset input in real time is used as the trigger condition to perform table lookup and interpolation operations, so as to directly derive the phase correction instruction that does not depend on the joint state space model and generate the phase anchoring control model.
5. The method according to claim 1, characterized in that, The real-time comparison of the actual response signal within the current scanning cycle with the morphological deviation of the fingerprint template within the key time window specifically includes: calculating the cumulative value of the original morphological deviation using point-by-point difference and absolute value integration, and normalizing it by combining the energy norm of the standard template to obtain the dimensionless morphological deviation coefficient.
6. The method according to claim 1, characterized in that, The mapping relationship between the timing offset and the initial phase offset angle of the spreading code sequence is implemented through linear interval proportional mapping or lookup table indexing and interpolation algorithms, so as to directly map the normalized timing offset to the correction value of the starting phase of the spreading modulation.
7. The method according to claim 1, characterized in that, The extraction of the overshoot oscillation attenuation envelope of each beam of light specifically includes: performing envelope detection and band filtering on the overshoot interval of the response signal to obtain an envelope parameter set; and using the nonlinear least squares method to fit the envelope parameter set to an exponential attenuation model to obtain the initial amplitude and attenuation rate parameters.
8. The method according to claim 1, characterized in that, The phase anchoring control model supports dynamically loading the mapping parameters or lookup table corresponding to the beam cluster based on the current detection environment and the beam cluster classification table, so as to adapt to the collaborative compensation requirements of different time-series characteristic clusters.
9. The method according to claim 1, characterized in that, The system's time-series knowledge base supports dynamic adaptive updates: it uses sliding window weighted average fusion calculation to associate and update the key feature data collected in real time with the historical beam time-series fingerprints, so as to maintain long-term stable operation in high temperature, high humidity or high interference environments.
10. The method according to claim 1, characterized in that, When updating the beam timing fingerprint in the system timing knowledge base, a data integrity verification, version compatibility detection, and rollback protection mechanism are adopted to prevent the recognition accuracy from decreasing due to erroneous data or environmental anomalies.