Tray layer adaptive detection method and system based on height interval scanning
By using a height interval scanning method, the problem of misjudgment in the generation of layer numbers and the counting of layers in multi-layer load-bearing structures is solved, and adaptive detection of the operation of the lifting mechanism is realized, ensuring the stability and accuracy of layer edge positioning and layer counting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SIYUE INTELLIGENCE
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-26
Smart Images

Figure CN121880902B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of scanning layer number detection technology, specifically to a TRAY layer number adaptive detection method and system based on height interval scanning. Background Technology
[0002] With the expanding application of automated equipment in warehousing and logistics, intelligent manufacturing, precision sorting, and high-speed loading and unloading, multi-layer material handling structures based on lifting mechanisms are gradually becoming key components for efficient stacking, palletized management, and intelligent material box scheduling. To improve the positioning accuracy and operational safety of multi-layer structures, the equipment is typically equipped with data acquisition and monitoring control mechanisms to continuously acquire, synchronously monitor, and control the lifting execution status, sensor triggering status, and layer change process. Furthermore, methods such as height scanning, optical triggering, laser ranging, structured light reconstruction, and load change analysis are used to automatically identify and determine the edge features or layer positions of objects. In related fields, existing solutions utilize optical scanning path planning, high-precision acquisition head positioning, and multi-path scanning strategies to conduct surface feature detection of ceramic bodies or components, providing mature technical references for multi-dimensional detection tasks.
[0003] For example, the invention with announcement number CN102749884B relates to a method for controlling the light transmission scanning detection of a ceramic radome, which employs the following steps: 1) Locating the starting coordinate position of the laser ranging image acquisition head; 2) Obtaining the starting coordinate position of the scanning control point by focusing; 3) Determining the coordinate position and scanning incident angle of the radome scanning control point according to the tracking calculation and equal error control point selection method; 4) Calculating the coordinate movement position of the light source according to the scanning incident angle of each scanning control point; 5) Compiling a scanning control NC program for the scanning path, scanning incident angle, and light source position according to the linear point-position motion control method; 6) Compiling a circular scanning NC program based on the viewing angle of the laser ranging image acquisition head and the outer edge curve of the center section of the scanning line; 7) Controlling the laser ranging image acquisition head to acquire images of the radome and processing and analyzing them to obtain parameters of cracks and porous texture defects in the ceramic radome for quality judgment.
[0004] However, for layer number identification and layer edge positioning in multi-layered load-bearing structures, such optical scanning control methods still have significant limitations in practical applications. Existing technologies generally rely on fixed-path scanning, single trigger thresholds, or static calibration models, lacking the ability to adaptively handle fluctuations in the operation of the lifting mechanism, load disturbances, individual differences in layer height, and cumulative offsets from repetitive movements. When the height of a single tray is inconsistent, the tray spacing deviates, or the mechanical structure experiences slight drift or noise causing instability in the trigger boundary, traditional fixed determination methods are prone to false triggers, missed triggers, or accumulated layer drift, failing to achieve stable layer number detection in continuous multi-layered environments.
[0005] Therefore, in order to address the above problems, there is an urgent need for a TRAY layer number adaptive detection method and system based on height interval scanning. Summary of the Invention
[0006] Technical problems to be solved
[0007] To address the shortcomings of existing technologies, this invention provides an adaptive detection method and system for TRAY layer numbers based on height interval scanning. This solves the problem that existing TRAY layer scanning processes suffer from disturbances in the operation of the lifting mechanism and jitter at interval boundaries, leading to easy misjudgments in layer number generation and layer counting.
[0008] Technical solution
[0009] To achieve the above objectives, the present invention provides the following technical solution: a TRAY layer number adaptive detection method based on height interval scanning, comprising: S1, periodically collecting layer feature data, and performing time synchronization, smoothing, anomaly removal, interpolation completion, and scale normalization on the layer feature data to generate preprocessed layer feature data; S2, generating theoretical layer height and height detection interval based on the preprocessed layer feature data, performing stability evaluation processing on the operation of the lifting mechanism to generate scanning stability evaluation value, and triggering interval scanning based on the scanning stability evaluation value to construct an interval scanning dataset; S3, performing occlusion intensity evaluation processing on the interval scanning dataset to generate occlusion intensity evaluation value, identifying the trigger cycle based on the occlusion intensity evaluation value, and recording the real-time height of the lifting mechanism corresponding to the first trigger cycle as the layer edge positioning height; S4, generating layer edge offset based on the layer edge positioning height and theoretical layer height, performing offset change calculation and trend determination on the offset sequence, performing height compensation processing based on the height compensation model, generating layer number based on the compensated theoretical layer height, and performing layer counting processing.
[0010] Furthermore, the specific steps for periodically collecting stratigraphic feature data and performing time synchronization, smoothing, anomaly removal, interpolation completion, and scale normalization on the stratigraphic feature data to generate preprocessed stratigraphic feature data are as follows: A fixed-width sliding time window is set as one sampling period, and stratigraphic feature data is periodically collected. This data includes the initial height of the lifting mechanism, the real-time height of the lifting mechanism, the operating speed of the lifting mechanism, the operating acceleration of the lifting mechanism, the output torque of the servo motor, the output current of the servo motor, the historical value of the TRAY layer sequence number, the TRAY layer interval distance, and the TRAY layer interval deviation bandwidth. For the collected stratigraphic feature data, a timestamp reconstruction algorithm is used to perform sampling alignment and trigger synchronization processing on the multi-source time-series records. A double exponential smoothing algorithm is used to smooth and suppress jitter and abrupt segments in the stratigraphic feature data. A local outlier detection algorithm is used to identify and remove outliers and drift segments in the stratigraphic feature data, and short-term missing segments are continuously completed using a linear interpolation algorithm. Finally, a min-max normalization algorithm is used to perform scale normalization processing on the stratigraphic feature data to eliminate dimensional differences between data points.
[0011] Furthermore, the specific steps for generating the theoretical stratum height and height detection interval based on the preprocessed stratum feature data are as follows: Read the preprocessed stratum feature data, add the product of the historical value of the TRAY layer number and the TRAY layer interval distance to the initial height of the lifting mechanism to obtain the theoretical stratum height of the current layer; and subtract the TRAY layer interval deviation bandwidth from the theoretical stratum height and add the TRAY layer interval deviation bandwidth to generate the lower boundary and upper boundary of height detection.
[0012] Furthermore, the specific steps for performing stability evaluation processing on the lifting mechanism during operation and generating scan stability evaluation values are as follows: The lower boundary of the height detection is used as the target height setting value for the lifting mechanism, and an operation command is sent to the servo driver; during the lifting mechanism's movement towards the lower boundary of the height detection, the real-time operating speed, acceleration, servo motor output current, and servo motor output torque of the lifting mechanism are read; the square of the lifting mechanism's operating speed is incremented by one, and the natural logarithm is taken to obtain the speed stability factor; the square of the lifting mechanism's acceleration is incremented by one, and the square root is taken, then the speed stability factor is divided by the square root result to obtain the motion smoothness term; the squares of the servo motor output current and servo motor output torque are respectively summed, and the square root of the sum is taken and incremented by one to obtain the servo load combination quantity; the motion smoothness term is multiplied by the reciprocal of the servo load combination quantity to obtain the scan stability evaluation value.
[0013] Furthermore, the specific steps for constructing the interval scan dataset based on the scan stability evaluation value to trigger interval scanning are as follows: The scan stability evaluation value and the stability threshold are compared in real time. When the scan stability evaluation value is less than the stability threshold, the current sampling period is determined to be invalid and no action is taken. When the scan stability evaluation value is greater than or equal to the stability threshold, the current sampling period is determined to be valid, and the scan preparation flag is set to valid. When the scan preparation flag is valid and the real-time height of the lifting mechanism enters the area between the lower and upper boundaries of the height detection for the first time, an enable command is sent to the sensor interface to put the control sensor into working mode. In each sampling period, the real-time height of the lifting mechanism, the servo motor output current, and the servo motor output torque are read synchronously and written into the interval scan data cache. When the real-time height of the lifting mechanism exceeds the upper boundary of the height detection, a stop command is sent to the sensor interface, a stop command is sent to the servo driver, and all records in the interval scan data cache are extracted to construct the interval scan dataset.
[0014] Further, the specific steps for performing occlusion intensity assessment processing based on the interval scan dataset to generate occlusion intensity assessment values are as follows: Read the interval scan dataset, iterate through all sampling periods in the interval scan dataset in sampling order, calculate the difference in servo motor output current, the difference in servo motor output torque, and the difference in real-time height of the lifting mechanism between adjacent sampling periods, and obtain the changes in servo motor output current, servo motor output torque, and real-time height of the lifting mechanism; Squat the changes in servo motor output current and servo motor output torque respectively, sum them, and take the square root of the sum to obtain the composite load change; Take the absolute value of the real-time height change of the lifting mechanism, add one, and then take the reciprocal to obtain the height change suppression amount; Multiply the composite load change amount by the height change suppression amount to obtain the occlusion intensity assessment value corresponding to the current sampling period.
[0015] Furthermore, the specific steps for identifying the trigger cycle based on the occlusion intensity assessment value and recording the real-time height of the lifting mechanism corresponding to the first trigger cycle as the edge positioning height are as follows: Compare the occlusion intensity assessment value of each sampling cycle with the trigger threshold. When the occlusion intensity assessment value is greater than or equal to the trigger threshold, mark the corresponding sampling cycle as a trigger cycle; when the occlusion intensity assessment value is less than the trigger threshold, mark the corresponding sampling cycle as a non-trigger cycle; in all trigger cycles, read the real-time height of the lifting mechanism corresponding to the first trigger cycle and record it as the edge positioning height.
[0016] Furthermore, based on the stratigraphic margin positioning height and the theoretical stratigraphic height, stratigraphic margin offsets are generated. The offset change sequence is then calculated and trend is determined. The specific steps for performing height compensation processing based on the height compensation model are as follows: After each scan, the corresponding theoretical stratigraphic height and stratigraphic margin positioning height are read, and a difference operation is performed between them to obtain the stratigraphic margin offset corresponding to this scan. The stratigraphic margin offsets corresponding to the most recent N scans are extracted, and the differences between adjacent stratigraphic margin offsets are calculated in chronological order to obtain the offset change sequence. After each update of the offset change sequence, the sign of all offset changes in the sequence is checked item by item: when the signs are inconsistent or zero values exist, the trend status is changed. The label is updated to a discontinuous offset state, keeping the current theoretical layer height unchanged. When all signs are the same and not zero, the trend state label is updated to a continuous offset state, and the height correction process begins: extract the edge offsets obtained from the most recent N scans, and construct a height compensation model based on the recursive least squares algorithm; use the edge offsets corresponding to the most recent N scans as training samples, and perform incremental training on the height compensation model with squared loss as the optimization objective; after the edge offset sequence is updated, input the latest edge offset into the incrementally trained height compensation model, and output the height compensation correction amount; add the height compensation correction amount to the current theoretical layer height to obtain the compensated theoretical layer height.
[0017] Further, the specific steps for generating layer numbers based on the compensated theoretical layer height and performing layer counting are as follows: Divide the compensated theoretical layer height by the TRAY layer interval distance, round down the quotient to generate the updated TRAY layer number for this scan, and compare it with the historical TRAY layer number recorded in the previous scan. If the updated TRAY layer number is greater than the historical TRAY layer number, increment the layer counter; otherwise, keep the layer counter unchanged. Write the compensated theoretical layer height, the updated TRAY layer number, the layer counter value, and the layer edge offset record sequence into the system state storage area for use in the next scan cycle for height interval generation, trend determination, and layer accumulation processing.
[0018] The second aspect of this invention provides a TRAY layer number adaptive detection system based on height interval scanning, comprising: a feature data acquisition and processing module, an interval height generation and scheduling module, an occlusion feature analysis and memory module, and a layer compensation trend accumulation module, wherein: the feature data acquisition and processing module is used to periodically acquire layer feature data and perform time synchronization, smoothing, anomaly removal, interpolation completion, and scale normalization processing on the layer feature data to generate preprocessed layer feature data; the interval height generation and scheduling module is used to generate theoretical layer heights and height detection intervals based on the preprocessed layer feature data, perform stability evaluation processing on the operation process of the lifting mechanism, and generate scanning... The system employs several modules: a stability assessment module to generate occlusion intensity assessment values, triggering interval scanning based on these values and constructing an interval scanning dataset; an occlusion feature analysis and memory module to perform occlusion intensity assessment processing based on the interval scanning dataset, generating occlusion intensity assessment values, identifying trigger cycles based on these values, and recording the real-time height of the lifting mechanism corresponding to the first trigger cycle as the layer edge positioning height; and a layer compensation trend accumulation module to generate layer edge offsets based on the layer edge positioning height and theoretical layer height, calculating the offset change and determining the trend of the offset sequence, performing height compensation processing based on the height compensation model, generating layer numbers based on the compensated theoretical layer height, and performing layer counting processing.
[0019] Beneficial effects
[0020] The present invention has the following beneficial effects:
[0021] (1) The TRAY layer number adaptive detection method and system based on height interval scanning constructs a height detection interval with the theoretical layer height as the center, and organizes scanning and judgment within the interval. This avoids the layer drift sensitivity caused by relying solely on fixed point triggers, and ensures that the layer edge capture remains consistent under the conditions of layer interval fluctuation and single-trap height difference.
[0022] (2) The TRAY layer number adaptive detection method and system based on height interval scanning, by coupling and quantifying the current change, torque change and height change suppression, realizes the continuous characterization of "occlusion trigger strength", so that the trigger cycle identification no longer depends on the instantaneous signal of a single sensor, and improves the distinguishability of slight occlusion, edge rubbing and short-term contact.
[0023] (3) The TRAY layer number adaptive detection method and system based on height interval scanning extracts the real-time height of the lifting mechanism corresponding to the first trigger in the trigger cycle sequence as the layer edge positioning height and binds it with the interval scanning process to realize the layer edge positioning from "single point trigger" to "first trigger positioning in interval", reducing the risk of repeated counting caused by multiple triggers.
[0024] (4) The TRAY layer number adaptive detection method and system based on height interval scanning constructs a layer edge offset sequence and offset change trend judgment mechanism. When continuous offset is detected, the incremental training and compensation output of the height compensation model are triggered, so that the theoretical layer height can be adaptively corrected with the operation process, suppressing the long-term drift of the layer caused by repeated rise and fall accumulation error, and ensuring the long-term stability of layer number generation and layer counting results. Attached Figure Description
[0025] Figure 1 Here is a flowchart of the TRAY layer number adaptive detection method based on height interval scanning;
[0026] Figure 2 This is a structural diagram of a TRAY layer number adaptive detection system based on height interval scanning;
[0027] Figure 3 This is a trigger cycle determination diagram based on the occlusion intensity evaluation value;
[0028] Figure 4 This is a schematic diagram of the human-computer interaction interface for TRAY layer scanning detection. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] Please see Figures 1-4 This invention provides a technical solution: a TRAY layer number adaptive detection method based on height interval scanning, comprising: S1, periodically collecting layer feature data, and performing time synchronization, smoothing, anomaly removal, interpolation completion, and scale normalization processing on the layer feature data to generate preprocessed layer feature data; S2, generating theoretical layer height and height detection interval based on the preprocessed layer feature data, performing stability evaluation processing on the operation process of the lifting mechanism to generate scanning stability evaluation value, and triggering interval scanning based on the scanning stability evaluation value to construct an interval scanning dataset; S3, performing occlusion intensity evaluation processing based on the interval scanning dataset to generate occlusion intensity evaluation value, identifying the trigger cycle based on the occlusion intensity evaluation value, and recording the real-time height of the lifting mechanism corresponding to the first trigger cycle as the layer edge positioning height; S4, generating layer edge offset based on the layer edge positioning height and theoretical layer height, performing offset change calculation and trend determination on the offset sequence, performing height compensation processing based on the height compensation model, generating layer number based on the compensated theoretical layer height, and performing layer counting processing.
[0031] Specifically, the following steps are taken to periodically collect strata feature data and perform time synchronization, smoothing, anomaly removal, interpolation completion, and scale normalization on the strata feature data to generate preprocessed strata feature data: A fixed-width sliding time window is set as one sampling period, with a fixed-width sliding time window value of twenty milliseconds. Within each sampling period, a sampling timestamp is written to the strata feature data. The continuous sampling sequence is arranged according to the sampling timestamp order, and a sequence integrity check is performed. If a timestamp is reversed, the reversed segment is marked as an invalid segment. The strata feature data includes the initial height of the lifting mechanism, the real-time height of the lifting mechanism, and the operating height of the lifting mechanism. The parameters include speed, lifting mechanism acceleration, servo motor output torque, servo motor output current, historical value of TRAY layer sequence number, TRAY layer interval distance, and TRAY layer interval deviation bandwidth. Specifically, the initial height of the lifting mechanism is obtained by reading the zero-point homing reference from the absolute encoder of the lifting servo motor and written into the first valid sampling period; the real-time height of the lifting mechanism is obtained by real-time position feedback from the absolute encoder of the lifting servo motor and updated according to the sampling period; the operating speed of the lifting mechanism is read by the servo driver based on the speed feedback value calculated by the encoder position difference; the operating acceleration of the lifting mechanism is obtained by the controller performing inter-frame difference calculation on the speed feedback sequence and written into the acceleration field; the servo motor output torque, servo motor output current, historical value of TRAY layer sequence number, TRAY layer interval distance, and TRAY layer interval deviation bandwidth; among these, the initial height of the lifting mechanism is obtained by reading the zero-point homing reference reading from the absolute encoder of the lifting servo motor and written into the first valid sampling period; the real-time height of the lifting mechanism is obtained by reading the real-time position feedback from the absolute encoder of the lifting servo motor and updated according to the sampling period; the operating speed of the lifting mechanism is read by reading the speed feedback value calculated by the servo driver based on the encoder position difference; the operating acceleration of the lifting mechanism is obtained by the controller performing inter-frame difference calculation on the speed feedback sequence and written into the acceleration field; the servo motor output torque, servo motor output current, and the historical value of the TRAY layer sequence number, TRAY layer interval distance, and TRAY layer interval deviation bandwidth; among these parameters, the initial height of the lifting mechanism is obtained by reading the zero-point homing reference reading from the absolute encoder of the lifting servo motor and written into the acceleration field; the real-time height of the lifting mechanism is obtained by reading the real-time position feedback from the absolute encoder of the lifting servo motor and updated according to the sampling period; the operating speed of the lifting mechanism is obtained by reading the speed feedback value calculated by the servo driver based on the encoder position difference; the The output torque is read through the torque estimation feedback register of the servo driver; the servo motor output current is read through the servo driver's built-in current sampling and readback interface; the historical value of the TRAY layer sequence number is read through the status storage area and written into the current sampling period record. The TRAY layer sequence number is a non-negative integer, and the historical value of the TRAY layer sequence number recorded in the previous scan is used in the sampling period when the reference sensor is not triggered; the TRAY layer interval distance is obtained by subtracting the distance measurement results of the adjacent layer reference plane by the laser displacement sensor with the calibration fixture and read as a fixed parameter; the TRAY layer interval deviation bandwidth is written through the touch screen parameter input interface and read by the controller in each sampling period; during the acquisition process, the lifting... The initial height of the lowering mechanism is locked by the data acquisition starting point. The first valid real-time height record of the lifting mechanism in the same sampling period is written into the initial height field of the lifting mechanism. Subsequent sampling periods only update the real-time height field of the lifting mechanism to avoid the initial height being overwritten repeatedly. For the collected layer feature data, a timestamp reconstruction algorithm is used to perform sampling alignment and trigger synchronization processing on the multi-source time series records. During the alignment process, a line-by-line correspondence is established based on the sampling timestamp, including the real-time height of the lifting mechanism, the operating speed of the lifting mechanism, the operating acceleration of the lifting mechanism, the output torque of the servo motor, and the output current of the servo motor. When there is a missing sampling timestamp, the gap between adjacent valid sampling timestamps is recorded as the missing interval.A double exponential smoothing algorithm is used to smooth and suppress jitter and abrupt changes in the stratum feature data. Smoothing sequences are established for the real-time height, speed, acceleration, servo motor output torque, and servo motor output current of the lifting mechanism. The smoothed value of each field at the previous moment is incorporated into the current observation value and substituted into the double exponential smoothing recursive formula to obtain the current smoothed value. The smoothed value is then written back to the smoothing result record area of the corresponding field to form a continuous and traceable smoothing link. A local outlier detection algorithm is used to identify and remove outliers and drift segments in the stratum feature data. First, a local neighborhood sample set is constructed for each field using the sampling timestamp as an index. The local reachability density is calculated for each record to obtain the local outlier. When the local outlier exceeds the outlier determination threshold, the corresponding sampling timestamp record is marked as an outlier and removed from the valid sequence. When the local outlier deviates continuously for multiple consecutive sampling periods, the corresponding segment is marked as a drift segment and the entire drift segment is removed. Furthermore, short... Missing segments are continuously filled using a linear interpolation algorithm. For the two ends of the missing interval, the boundary values of the corresponding fields are read from the most recent valid sampling timestamps. Using the sampling timestamp interval as a step size, the linear interpolation results are calculated for each sampling timestamp within the missing interval and written to the missing positions of the lifting mechanism's real-time height, lifting mechanism operating speed, lifting mechanism operating acceleration, servo motor output torque, and servo motor output current. The layer feature data is then normalized using a minimum-maximum normalization algorithm. The minimum values of the lifting mechanism's initial height, real-time height, lifting mechanism operating speed, lifting mechanism operating acceleration, servo motor output torque, and servo motor output current within the valid sequence are calculated and merged into the maximum values. Each record is transformed to a unified numerical range according to the minimum-maximum mapping formula and written back to the corresponding fields. The historical values of the TRAY layer sequence number, TRAY layer interval distance, and TRAY layer interval deviation bandwidth remain unchanged and are not included in the normalization calculation to maintain the consistency of their parameter meanings and eliminate differences in the units of measurement between data.
[0032] In this implementation scheme, by dividing the stratum feature data into sampling periods using a fixed-width sliding time window and uniformly writing them into the sampling timestamp, and then establishing a traceable corresponding relationship within the same period for the initial height of the lifting mechanism, the real-time height of the lifting mechanism, the operating speed of the lifting mechanism, the operating acceleration of the lifting mechanism, the output torque of the servo motor, the output current of the servo motor, the historical value of the TRAY layer number, the TRAY layer interval distance, and the TRAY layer interval deviation bandwidth, the above processing ensures that the subsequent generation of theoretical stratum height and height detection interval is based on inputs that are time-consistent, data-continuous, and anomaly-controlled. This improves the robustness of interval scanning trigger judgment to stratum drift and short-term disturbances, and ensures that the stratum edge positioning height extraction and stratum counting processing maintain a stable judgment baseline under continuous operation conditions.
[0033] Specifically, the steps for generating the theoretical stratum height and height detection interval based on the preprocessed stratum feature data are as follows: Read the preprocessed initial height of the lifting mechanism, historical values of the TRAY layer sequence number, TRAY layer interval distance, and TRAY layer interval deviation bandwidth; perform a non-negative integer validity check on the historical values of the TRAY layer sequence number, and write the historical values of the TRAY layer sequence number back to the current sampling period record to fix the input for subsequent calculations; add the product of the historical values of the TRAY layer sequence number and the TRAY layer interval distance to the initial height of the lifting mechanism to obtain the theoretical stratum height of the current layer, and bind the theoretical stratum height with the sampling timestamp and write it into the theoretical stratum height record sequence; after the theoretical stratum height record sequence is written, traverse the record sequence according to the sampling timestamp order. During the traversal, the current sampling TRAY layer sequence is used as the reference. Assuming the historical value remains unchanged, difference comparisons are performed on adjacent records. When the absolute value of the difference between the theoretical stratum height difference and the TRAY layer interval distance is greater than the TRAY layer interval deviation bandwidth, the record corresponding to the sampling timestamp at the later time is marked as an interval anomaly record, and the theoretical stratum height record corresponding to this sampling timestamp is not used when generating the lower and upper boundaries of height detection. For theoretical stratum height records that are not marked as interval anomalies, the lower and upper boundaries of height detection are generated by subtracting the TRAY layer interval deviation bandwidth from the theoretical stratum height and adding the TRAY layer interval deviation bandwidth, respectively. The lower and upper boundaries of height detection are bound to the sampling timestamp and written into the height detection interval record sequence, so that each height detection interval record can be traced back to the theoretical stratum height calculation result under the corresponding sampling timestamp.
[0034] In this implementation scheme, a one-to-one correspondence is established between the initial height of the lifting mechanism, the historical value of the TRAY layer number, the TRAY layer interval distance, the TRAY layer interval deviation bandwidth, and the theoretical layer height by using sampling timestamps. Based on this, a traceable lower boundary and upper boundary for height detection are formed. The above processing ensures that the height detection interval maintains a stable boundary reference benchmark during continuous operation, reduces the sensitivity of interval positioning to TRAY layer number fluctuations and interlayer spacing dispersion, and ensures that the subsequent interval scanning process still has consistent scanning range constraints under the condition of layer drift accumulation, thereby improving the continuous stability of layer edge positioning height extraction and layer counting processing.
[0035] Specifically, the steps for performing stability assessment processing on the lifting mechanism during operation and generating scan stability assessment values are as follows: The lower boundary of the height detection is used as the target height setting value for the lifting mechanism, and an operation command is sent to the servo driver. Simultaneously, a sampling timestamp is written, and the corresponding lower boundary record of the height detection is locked, ensuring that subsequent calculations maintain data correspondence under the same sampling timestamp. During the lifting mechanism's movement towards the lower boundary of the height detection, the real-time operating speed, acceleration, servo motor output current, and servo motor output torque of the lifting mechanism are read, and these four data items are written into the stability assessment sequence according to the sampling timestamp, ensuring that the scan stability assessment values have continuous and traceable calculation input. The operating speed, acceleration, servo motor output current, and servo motor output torque of the lifting mechanism are all corresponding data after minimum-maximum normalization processing, and are all dimensionless quantities, ensuring that subsequent nonlinear calculations are performed on a unified scale. The speed stability factor is obtained by taking the natural logarithm of the square of the lifting mechanism's operating speed plus one. The square is used to map positive and negative speed changes to the same value range, the addition of one prevents the logarithmic input from being zero due to zero speed, and the natural logarithm is used to compress the numerical span of large speed ranges, preventing excessive amplification of the disturbance to the evaluation value caused by sudden speed increases. The motion smoothness term is obtained by taking the square root of the square of the lifting mechanism's operating acceleration plus one, and then dividing the result by the speed stability factor. The square root is used to suppress the numerical expansion of acceleration peaks, the addition of one prevents numerical instability caused by an excessively small denominator when acceleration approaches zero, and the division is used to normalize the speed stability factor along the acceleration dimension, causing the motion smoothness term to automatically converge under high acceleration conditions. The servo motor output current and servo motor output torque are squared and summed. The square root of the sum is then added to obtain the servo load combination. The summation and square root are combined using Euclidean norm to synthesize the load components of the same scale, so that the servo motor output current and servo motor output torque form a single load intensity characterization under a unified numerical scale, avoiding bias judgment caused by relying solely on a single load. The motion smoothness term is multiplied by the reciprocal of the servo load combination to obtain the scan stability evaluation value. The reciprocal is used to suppress high load conditions, so that the scan stability evaluation value naturally decreases under heavy load jitter conditions and maintains distinguishable gain under light load stable conditions, thereby providing a stable and consistent numerical baseline for subsequent trigger judgment.
[0036] The specific formula for calculating the scan stability assessment value is as follows:
[0037] ;
[0038] In the formula, Indicates the scan stability evaluation value. Indicates the operating speed of the lifting mechanism. This indicates the acceleration of the lifting mechanism. This indicates the output current of the servo motor. This indicates the output torque of the servo motor.
[0039] In this implementation scheme, by forming a unified stability evaluation input at the same sampling timestamp, the operating speed and acceleration of the lifting mechanism, the output current of the servo motor, and the output torque of the servo motor, and by using the speed stability factor, motion smoothness term, and servo load combination to form a nonlinear constraint relationship for the scan stability evaluation value, the above processing enables the scan stability evaluation value to have consistent compression and suppression characteristics for high-speed jumps, high acceleration impacts, and load fluctuations, avoiding misjudgment of stability caused by a single measurement anomaly, thereby providing a more reliable operating state gating basis for interval scan triggering and improving the determination stability of the layer edge positioning height extraction process under continuous lifting conditions.
[0040] Specifically, the steps for constructing the interval scan dataset based on the scan stability assessment value to trigger interval scanning are as follows: Real-time comparison of the scan stability assessment value and the stability threshold; during the comparison process, using the sampling timestamp as an index to lock the scan stability assessment value record corresponding to the current sampling period, ensuring that the scan stability assessment value and the real-time height record of the lifting mechanism are at the same sampling timestamp; when the scan stability assessment value is less than the stability threshold, the current sampling period is determined to be an invalid period, no action is taken, and the scan preparation flag remains invalid to avoid triggering the control sensor during an invalid period; when the scan stability assessment value is greater than or equal to the stability threshold, the current sampling period is determined to be a valid period, the scan preparation flag is set to valid, and the current sampling timestamp is written... The scan preparation flag is recorded to form a traceable trigger point. When the scan preparation flag is valid and the real-time height of the lifting mechanism enters between the lower and upper boundaries of the height detection, the shortest dwell time determination process is initiated. The sampling timestamp of entering the interval is recorded as the interval entry start timestamp, and the real-time height of the lifting mechanism is continuously read in subsequent sampling cycles. When the real-time height of the lifting mechanism continuously dwells between the lower and upper boundaries of the height detection for three consecutive sampling cycles, it is determined that the first entry condition of the interval is met, and the sampling timestamp that meets the condition is recorded as the interval first entry confirmation timestamp. If the real-time height of the lifting mechanism exits between the lower and upper boundaries of the height detection before the dwell time reaches sixty milliseconds, then... Clear the interval entry start timestamp and wait for the next interval entry; after the initial interval entry condition is confirmed, first read the lower boundary and upper boundary of the height detection corresponding to the current sampling period and perform interval boundary consistency verification. After the verification passes, send an enable command to the sensor interface to enable the control sensor to enter the working state, and write the control sensor's enable sampling timestamp into the enable flag field of the interval scan data cache; and synchronously read the real-time height of the lifting mechanism, the servo motor output current, and the servo motor output torque in each sampling period, bind the three data items with the sampling timestamp and write them into the interval scan data cache, so that each record in the interval scan data cache has a traceable time-series index relationship; during the writing process, The real-time height of the lifting mechanism undergoes monotonicity verification. When the real-time height of the lifting mechanism experiences a reverse jump, the corresponding sampling timestamp record is marked as an abnormal record and removed during the interval scanning dataset construction stage. When the real-time height of the lifting mechanism exceeds the upper boundary of the height detection, a shutdown command is first sent to the sensor interface and the shutdown sampling timestamp of the reference sensor is written. Then, a stop command is sent to the servo driver and the stop sampling timestamp is written. All records in the interval scanning data cache are extracted to construct the interval scanning dataset. During the construction process, the fields of real-time height of the lifting mechanism, servo motor output current, servo motor output torque, and sampling timestamp are retained, so that the interval scanning dataset can be directly used for subsequent occlusion intensity evaluation value calculation and trigger cycle identification processing.
[0041] In this implementation scheme, by introducing continuous dwell confirmation of the lifting mechanism's real-time height entering the interval between the lower and upper boundaries of the height detection based on the gating of the stable evaluation value, and binding the lifting mechanism's real-time height, servo motor output current, and servo motor output torque to the interval scanning data cache with sampling timestamps, the above processing transforms the interval scanning trigger from an instantaneous boundary crossing judgment to a verifiable time-series entry event, reducing the risk of false activation caused by jitter near the boundary, and ensuring that the interval scanning dataset has a stable benchmark in terms of the consistency of the triggering start point and the integrity of the recording link, thereby improving the reliability of the occlusion intensity evaluation value calculation and trigger cycle identification.
[0042] Specifically, the steps for performing occlusion intensity assessment processing based on the interval scan dataset and generating occlusion intensity assessment values are as follows: Read the interval scan dataset. During the reading process, traverse all sampling period records within the interval scan dataset in sampling order using the sampling timestamp as the index, and establish a one-to-one temporal pairing relationship between adjacent sampling periods to ensure that the difference calculation is based on continuous sampling periods. Read the servo motor output current, servo motor output torque, and real-time height of the lifting mechanism corresponding to adjacent sampling periods, and calculate the differences in servo motor output current, servo motor output torque, and real-time height of the lifting mechanism for adjacent sampling periods respectively, obtaining the changes in servo motor output current, servo motor output torque, and real-time height of the lifting mechanism. The change in servo motor output current is used to characterize the instantaneous fluctuation amplitude of the servo motor load current, the change in servo motor output torque is used to characterize the instantaneous fluctuation amplitude of the servo motor load torque, and the change in real-time height of the lifting mechanism is used to characterize the displacement propulsion within the current sampling period. Square the changes in servo motor output current and servo motor output torque respectively, sum them, and take the square root of the sum to obtain the composite load change, where the square is used to eliminate... By removing the sign of the difference and highlighting the fluctuation amplitude, the load fluctuation components under the same numerical scale are synthesized using Euclidean norm form after summing and square rooting. This ensures that the synthesized load change remains sensitive to individual component peaks and simultaneously reflects the combined intensity of current-side and torque-side load fluctuations. The absolute value of the real-time height change of the lifting mechanism is taken, then one is added, and the reciprocal is taken to obtain the height change suppression amount. The absolute value is used to eliminate differences in displacement direction and unify it to the propulsion amplitude. Adding one prevents the reciprocal from diverging when the real-time height change of the lifting mechanism approaches zero, leading to numerical instability. The reciprocal is used to apply suppression constraints to the propulsion amplitude. The height change suppression value is made larger when the propulsion amplitude is small and automatically decays when the propulsion amplitude is large. This makes the occlusion determination focus more on load abrupt changes near the same layer rather than load fluctuations when rapidly passing through the interval. The composite load change value is multiplied by the height change suppression value to obtain the occlusion intensity assessment value corresponding to the current sampling period. The product structure is used to couple the load fluctuation intensity with the propulsion amplitude constraint, so that the occlusion intensity assessment value has a higher response when the composite load change value increases and the real-time height change of the lifting mechanism is small. This is used to support the stable determination baseline of occlusion events in subsequent triggering cycles.
[0043] The specific formula for calculating the shading intensity assessment value is as follows:
[0044] ;
[0045] In the formula, This indicates the assessment value of shading intensity. This indicates the change in the output current of the servo motor. This indicates the change in the output torque of the servo motor. This indicates the real-time height change of the lifting mechanism.
[0046] In this embodiment, Table 1 shows the occlusion strength evaluation results and related input data for five sampling periods. Specifically: Sampling period P1: The change in servo motor output current is 0.08, the change in servo motor output torque is 0.10, and the real-time height change of the lifting mechanism is 0.05, corresponding to a calculated occlusion strength evaluation value of 0.12. Sampling period P2: The change in servo motor output current is 0.20, the change in servo motor output torque is 0.18, and the real-time height change of the lifting mechanism is 0.08, corresponding to a calculated occlusion strength evaluation value of 0.25. Sampling period P3: The change in servo motor output current is 0.35, the change in servo motor output torque is 0.30, and the real-time height change of the lifting mechanism is 0.10, corresponding to a calculated occlusion strength evaluation value of 0.42. Sampling period P4: The change in servo motor output current is 0.55, the change in servo motor output torque is 0.60, and the real-time height change of the lifting mechanism is 0.12, corresponding to a calculated occlusion strength evaluation value of 0.73. Sampling period P5: The change in servo motor output current is 0.75, the change in servo motor output torque is 0.70, and the real-time height change of the lifting mechanism is 0.15, corresponding to a calculated occlusion intensity assessment value of 0.89. The above data is used to quantitatively compare the occlusion intensity assessment values for each sampling period within the interval scan dataset, and to provide direct input for subsequent trigger period identification, initial trigger height extraction, and layer edge positioning height recording.
[0047] Table 1. Data Table of Shading Intensity Assessment Values
[0048]
[0049] like Figure 3As shown in the figure, the occlusion intensity assessment values and trigger period determination results for five sampling periods are displayed. The bar chart uses different colors to distinguish the determination status: blue bars indicate non-triggering periods, and orange bars indicate triggering periods. The trigger threshold is marked with a black dashed line in the figure, used for threshold comparison of the occlusion intensity assessment values for each sampling period; the top of each bar is labeled with the corresponding occlusion intensity assessment value, facilitating a direct comparison of the occlusion variation amplitude across different sampling periods. Specifically, the occlusion intensity assessment values for sampling periods P1, P2, and P3 are 0.12, 0.25, and 0.42, respectively, all below the trigger threshold, corresponding to the blue bars, and are determined to be non-triggering periods; the occlusion intensity assessment values for sampling periods P4 and P5 are 0.73 and 0.89, respectively, both above the trigger threshold, corresponding to the orange bars, and are determined to be triggering periods. This figure uses the visualization method of bar colors, trigger threshold lines and evaluation value annotations to present the trigger determination in the interval scan dataset in a structured way. It provides a trigger cycle input basis that can be directly referenced for extracting the real-time height of the lifting mechanism corresponding to the first trigger in the trigger cycle and recording it as the layer edge positioning height.
[0050] In this implementation scheme, by forming a unified occlusion intensity evaluation value from the changes in servo motor output current, servo motor output torque, and real-time height changes of the lifting mechanism within a continuous sampling period, the above processing transforms the occlusion event determination criteria from single sensor triggering to a joint feature characterization based on load fluctuations and displacement propulsion. This improves the occlusion recognition's ability to distinguish minor scratches, light touches, and short-term occlusions within the interval, reduces the tendency for false triggering caused by rapid changes in the real-time height of the lifting mechanism, and thus provides a more stable intensity ranking basis for trigger cycle screening and improves the consistency of edge positioning height extraction.
[0051] Specifically, the steps for identifying the trigger cycle based on the occlusion intensity assessment value and recording the real-time height of the lifting mechanism corresponding to the first trigger cycle as the floor edge positioning height are as follows: The occlusion intensity assessment value of each sampling cycle is compared with the trigger threshold. During the comparison, the record corresponding to the occlusion intensity assessment value is locked using the sampling timestamp as an index, ensuring that the occlusion intensity assessment value and the real-time height of the lifting mechanism are at the same sampling timestamp. When the occlusion intensity assessment value is greater than or equal to the trigger threshold, the corresponding sampling cycle is marked as a trigger cycle, and the trigger mark is bound to the sampling timestamp and written into the trigger mark sequence to form a traceable trigger chain. When the occlusion intensity assessment value is less than the trigger threshold, the corresponding sampling cycle is marked as a trigger cycle. When triggering a threshold, the corresponding sampling period is marked as a non-triggering period, and the non-triggering mark is bound to the sampling timestamp and written into the triggering mark sequence to maintain the integrity of the mark sequence. After the triggering mark sequence is generated, all mark records are traversed in the order of sampling timestamps to locate the sampling timestamp corresponding to the first triggering period mark. The real-time height of the lifting mechanism corresponding to the sampling timestamp is read from the interval scan dataset and the value range consistency is checked. After the check passes, the real-time height of the lifting mechanism is written into the edge positioning height record, and the edge positioning height is bound to the sampling timestamp and written into the edge positioning height sequence, so that the edge positioning height has a traceable trigger source relationship.
[0052] In this implementation, the threshold determination result of the occlusion intensity assessment value is solidified by the trigger mark sequence that runs through the sampling timestamp, and a traceable one-to-one correspondence is established between the layer edge positioning height and the first trigger cycle. The above processing makes the output of the layer edge positioning height have a clear trigger source link, avoids the drift of the positioning point caused by multiple fluctuations in the interval, and ensures that the subsequent layer edge offset calculation obtains a stable and consistent reference starting point, thereby improving the continuity and consistency of the layer accumulation processing under repeated rise and fall conditions.
[0053] Specifically, the following steps are taken to generate a layer edge offset based on the layer edge location height and the theoretical layer height, and to calculate the offset change and determine the trend of the offset sequence. The specific steps for performing height compensation processing based on the height compensation model are as follows: After each round of scanning, the historical value of the TRAY layer number recorded before the scanning of the interval triggered by that round of scanning is read, the theoretical layer height record corresponding to the historical value of the TRAY layer number is read, the layer edge location height obtained in the same round of scanning is read, and the difference operation is performed on the two to obtain the layer edge offset corresponding to this scan. The layer edge offset is bound to the sampling timestamp and written into the layer edge offset sequence to form a traceable offset record link. The layer edge offsets corresponding to the most recent N scans are extracted, and the differences between adjacent layer edge offsets are calculated in chronological order to obtain the offset change sequence. The offset change sequence is bound to the corresponding sampling timestamp and written into the offset change sequence record, so that the trend determination has continuous temporal input. After each offset change sequence update, the sign of all offset changes in the sequence is checked item by item. During the check, the sampling timestamp order of the offset change sequence is used to locate each sign and keep the sign determination caliber consistent: when the signs are inconsistent or there is a zero value, the trend status mark is updated to a discontinuous offset state, keeping the current theoretical layer height unchanged, and the trend status mark corresponding to this round of scans is bound to the sampling timestamp and written into the trend status sequence for subsequent scans to inherit; when all signs are the same and not zero, the trend status mark is updated to a continuous offset state, and the height is entered. The calibration process involves locking the edge offsets corresponding to the most recent N scans as the training data window upon entering the height calibration process, and maintaining this training data window in the order of sampling timestamps. The edge offsets obtained from the most recent N scans are extracted, and a height compensation model is constructed based on a recursive least squares algorithm. During the construction process, incremental training is performed on the height compensation model with squared loss as the optimization objective. A recursive least squares parameter update is triggered after the edge offset sequence is updated, allowing the height compensation model to adaptively update with newly added edge offset records. After the edge offset sequence is updated, the latest edge offset is input into the incrementally trained height compensation model, outputting a height compensation correction value. This height compensation correction value is then added to the current theoretical layer height to obtain the compensated theoretical layer height. Simultaneously, the compensated theoretical layer height is bound to the sampling timestamp and written into the compensated theoretical layer height record sequence, ensuring a consistent compensation basis for the subsequent generation of the lower and upper boundaries of height detection.
[0054] In this implementation scheme, by using the theoretical stratum height recorded under the historical value index of the TRAY stratum number as a reference for the stratum margin offset, and by using the sampling timestamp to form a continuous and consistent offset evolution link through the stratum margin offset sequence, offset change sequence, and trend status sequence, the above processing enables the compensated theoretical stratum height to have a stable update basis during multiple rounds of scanning. It can achieve adaptive correction of the theoretical stratum height under continuous offset conditions, avoid the accumulation of stratum drift causing the stratum margin positioning height to deviate from the reference benchmark for a long time, thereby improving the continuous reliability of stratum number generation and stratum counting processing under long-term repeated rise and fall conditions.
[0055] Specifically, the steps for generating layer numbers based on the compensated theoretical layer height and performing layer counting are as follows: Divide the compensated theoretical layer height by the TRAY layer interval distance. Before the division, read the initial height of the lifting mechanism as the zero reference. Perform zero-reference alignment processing on the compensated theoretical layer height with reference to the initial height of the lifting mechanism to obtain the alignment height. Use this alignment height in the division operation, and perform a floor operation on the resulting quotient to generate the updated TRAY layer number corresponding to this scan. The quotient is based on the layer corresponding to the initial height of the lifting mechanism as the zero reference starting point. A quotient of zero indicates that the alignment height has not crossed a TRAY layer interval distance; a positive quotient indicates the number of TRAY layer interval distances crossed by the alignment height; and a negative quotient indicates that the alignment height is below the initial height of the lifting mechanism. When the quotient is negative, the generated TRAY layer number update value is limited to zero to avoid... To avoid negative layer numbers and maintain consistency in the layer number definition domain, the layer number is compared with the historical value of the TRAY layer number recorded in the previous scan. During the comparison, the sampling timestamp is used as an index to lock the historical value of the TRAY layer number recorded in the previous scan and the updated value of the TRAY layer number generated in this scan, maintaining the correspondence between the two in adjacent scan cycles. When the updated value of the TRAY layer number is greater than the historical value of the TRAY layer number, the layer counter is incremented by one, and the sampling timestamp of the layer counter update is written into the layer counter record sequence to form a traceable counting update link. Otherwise, the layer counter remains unchanged, and the layer counter record of the previous round is retained. The compensated theoretical layer height, the updated value of the TRAY layer number, the layer counter value, and the layer edge offset record sequence are written into the state storage area as a whole, and the sampling timestamp of the writing operation is also recorded for use in the next scan cycle for height interval generation, trend determination, and layer number accumulation processing.
[0056] In this implementation scheme, by establishing a unified zero reference benchmark based on the initial height of the lifting mechanism and performing zero reference alignment on the compensated theoretical layer height, the generation of TRAY layer number update values is limited to an interpretable non-negative numbering range. The above processing ensures that the TRAY layer number update values maintain a stable layer mapping relationship during repeated scanning, avoiding reverse jumps in TRAY layer number update values due to benchmark drift and preventing incorrect accumulation of layer counters, thereby improving the continuity, consistency and traceability of layer counting processing under long-term operating conditions.
[0057] like Figure 2 As shown, the second aspect of the present invention provides a TRAY layer number adaptive detection system based on height interval scanning, comprising: a feature data acquisition and processing module, an interval height generation and scheduling module, an occlusion feature analysis and memory module, and a layer compensation trend accumulation module, wherein: the feature data acquisition and processing module is used to periodically acquire layer feature data and perform time synchronization, smoothing, anomaly removal, interpolation completion, and scale normalization processing on the layer feature data to generate preprocessed layer feature data; the interval height generation and scheduling module is used to generate theoretical layer heights and height detection intervals based on the preprocessed layer feature data, perform stability evaluation processing on the operation process of the lifting mechanism, and generate scanning stability. The system determines the evaluation value and triggers interval scanning based on the stable evaluation value, constructing an interval scanning dataset. An occlusion feature analysis and memory module is used to perform occlusion intensity evaluation processing based on the interval scanning dataset, generating occlusion intensity evaluation values, identifying trigger cycles based on these values, and recording the real-time height of the lifting mechanism corresponding to the first trigger cycle as the layer edge positioning height. A layer compensation trend accumulation module is used to generate layer edge offsets based on the layer edge positioning height and theoretical layer height, calculate the offset change and determine the trend of the offset sequence, perform height compensation processing based on the height compensation model, generate TRAY layer number update values based on the compensated theoretical layer height, and perform layer counting processing.
[0058] like Figure 4As shown, the left side of the interface displays the TRAY status, arranging the record rows of each layer from top to bottom according to the TRAY layer number, and displaying the TRAY status judgment result of the corresponding layer in a bar-like manner. The TRAY layer number column is used for intuitive comparison with the layer number obtained from the current scan. The right side of the interface sets up the parameter input and real-time status display area, where "Initial Position Z0" is used to input the initial height of the lifting mechanism, "Interval Distance Hm" is used to input the TRAY layer interval distance, "Interval Deviation Bandwidth H" is used to input the TRAY layer interval deviation bandwidth, and "Current Height" is used to display the real-time height of the lifting mechanism. The bottom of the interface provides a detection start control. After being triggered, the lifting mechanism generates the lower boundary of the height detection and the height detection based on the theoretical layer height. The upper boundary is measured, and after the scanning stability evaluation value reaches the stability threshold, the interval scanning process begins. When the real-time height of the lifting mechanism meets the first entry judgment condition between the lower boundary of the entry height detection and the upper boundary of the height detection, the comparative sensor is activated and an interval scanning dataset is constructed. Subsequently, the occlusion intensity evaluation value is calculated based on the interval scanning dataset, and the trigger cycle is identified. The real-time height of the lifting mechanism corresponding to the first trigger cycle is recorded as the layer edge positioning height. After the layer edge positioning height is updated, the compensated theoretical layer height is obtained based on the layer edge offset and height compensation processing. Based on this, the updated TRAY layer number is generated and layer counting processing is performed. The judgment result is synchronously updated to the TRAY status display area to form a continuous and traceable layer status record.
[0059] In this implementation scheme, by integrating the data acquisition and monitoring control links of layer feature data acquisition, preprocessing, interval scanning triggering, occlusion intensity assessment value calculation, layer edge positioning height recording, layer edge offset generation, compensation-based theoretical layer height update, TRAY layer number update value generation, and layer counting processing into a consistent data acquisition and monitoring control link, the above structure can maintain the continuous and stable basis for layer determination under the condition of repeated operation of the lifting mechanism. This allows the TRAY layer number and layer counter to still have reliable adaptive correction capabilities in the case of offset accumulation, thereby improving the stability and traceability of TRAY layer number detection in long-term operation.
[0060] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0061] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A TRAY layer number adaptive detection method based on height interval scanning, characterized in that, Includes the following steps: S1 periodically collects stratigraphic feature data and performs time synchronization, smoothing, anomaly removal, interpolation completion and scale normalization on the stratigraphic feature data to generate preprocessed stratigraphic feature data. S2, based on the preprocessed stratum feature data, generate theoretical stratum height and height detection interval, perform stability evaluation processing on the operation process of the lifting mechanism, generate scanning stability evaluation value, and trigger interval scanning based on the scanning stability evaluation value to construct interval scanning dataset; The specific steps for triggering interval scanning based on the scan stability evaluation value and constructing the interval scan dataset are as follows: The scanning stability evaluation value and the stability threshold are compared in real time. When the scanning stability evaluation value is less than the stability threshold, the current sampling period is determined to be an invalid period and no action is taken. When the scanning stability evaluation value is greater than or equal to the stability threshold, the current sampling period is determined to be a valid period and the scanning preparation flag is set to valid. When the scan preparation flag is valid and the real-time height of the lifting mechanism enters the area between the lower and upper boundaries of the height detection for the first time, an enable command is sent to the sensor interface to activate the control sensor. In each sampling cycle, the real-time height of the lifting mechanism, the output current of the servo motor, and the output torque of the servo motor are read synchronously and written into the interval scan data buffer. When the real-time height of the lifting mechanism exceeds the upper boundary of the height detection, a stop command is sent to the sensor interface, a stop command is sent to the servo driver, and all records in the interval scan data buffer are extracted to construct the interval scan dataset. S3, perform occlusion intensity assessment processing based on the interval scan dataset, generate occlusion intensity assessment value, identify the trigger cycle based on the occlusion intensity assessment value, and record the real-time height of the lifting mechanism corresponding to the first trigger cycle as the layer edge positioning height; S4 generates a layer edge offset based on the layer edge location height and the theoretical layer height, performs offset change calculation and trend determination on the offset sequence, performs height compensation processing based on the height compensation model, generates TRAY layer number update value based on the compensated theoretical layer height, and performs layer counting processing.
2. The adaptive detection method for the number of TRAY layers based on height interval scanning according to claim 1, characterized in that: The specific steps for periodically collecting stratigraphic feature data and performing time synchronization, smoothing, anomaly removal, interpolation completion, and scale normalization on the stratigraphic feature data to generate preprocessed stratigraphic feature data are as follows: Set a fixed-width sliding time window as a sampling period and periodically collect layer feature data. The layer feature data includes the initial height of the lifting mechanism, the real-time height of the lifting mechanism, the running speed of the lifting mechanism, the running acceleration of the lifting mechanism, the output torque of the servo motor, the output current of the servo motor, the historical value of the TRAY layer number, the TRAY layer interval distance, and the TRAY layer interval deviation bandwidth. For the collected stratigraphic feature data, a timestamp reconstruction algorithm is used to perform sampling alignment and trigger synchronization processing on multi-source time-series records; a double exponential smoothing algorithm is used to smooth and suppress jitter and abrupt segments in the stratigraphic feature data; a local outlier detection algorithm is used to identify and remove outliers and drift segments in the stratigraphic feature data, and short-term missing segments are continuously filled in using a linear interpolation algorithm; and a min-max normalization algorithm is used to perform scale normalization processing on the stratigraphic feature data to eliminate dimensional differences between data.
3. The adaptive detection method for the number of TRAY layers based on height interval scanning according to claim 2, characterized in that: The specific steps for generating the theoretical stratigraphic height and height detection interval based on the preprocessed stratigraphic feature data are as follows: Read the preprocessed layer feature data, add the initial height of the lifting mechanism to the product of the historical value of the TRAY layer number and the TRAY layer interval distance to obtain the theoretical layer height of the current layer; and subtract the TRAY layer interval deviation bandwidth from the theoretical layer height and add the TRAY layer interval deviation bandwidth to generate the lower boundary and upper boundary of height detection.
4. The adaptive detection method for the number of TRAY layers based on height interval scanning according to claim 3, characterized in that: The specific steps for performing stability assessment processing on the lifting mechanism during operation and generating scan stability assessment values are as follows: The lower boundary of the height detection is used as the target height setting value of the lifting mechanism, and a running command is sent to the servo driver. During the movement of the lifting mechanism towards the lower boundary of the height detection, the real-time operating speed, acceleration, servo motor output current, and servo motor output torque of the lifting mechanism are read. The speed stability factor is obtained by taking the natural logarithm of the square of the lifting mechanism's operating speed plus one. The motion smoothness term is obtained by taking the square root of the square of the acceleration and the speed stability factor. The servo motor output current and torque are squared and summed. The servo load combination is obtained by taking the square root of the sum and adding one. The motion smoothness term is multiplied by the reciprocal of the servo load combination to obtain the scan stability evaluation value.
5. The adaptive detection method for the number of TRAY layers based on height interval scanning according to claim 1, characterized in that: The specific steps for performing occlusion intensity assessment processing based on the interval scan dataset to generate occlusion intensity assessment values are as follows: Read the interval scan dataset, iterate through all sampling periods in the interval scan dataset in the sampling order, calculate the difference in servo motor output current, the difference in servo motor output torque, and the difference in real-time height of the lifting mechanism between two adjacent sampling periods, and obtain the change in servo motor output current, the change in servo motor output torque, and the change in real-time height of the lifting mechanism. The load change composite quantity is obtained by squaring the changes in servo motor output current and servo motor output torque, summing the squares, and taking the square root of the sum. The height change suppression quantity is obtained by taking the absolute value of the real-time height change of the lifting mechanism, adding one, and taking the reciprocal. The height change suppression quantity is obtained by multiplying the load change composite quantity by the height change suppression quantity. The occlusion intensity assessment value corresponding to the current sampling period is obtained.
6. The TRAY layer number adaptive detection method based on height interval scanning according to claim 5, characterized in that: The specific steps for identifying the trigger cycle based on the occlusion intensity assessment value and recording the real-time height of the lifting mechanism corresponding to the first trigger cycle as the floor edge positioning height are as follows: The occlusion intensity assessment value of each sampling period is compared with the trigger threshold. When the occlusion intensity assessment value is greater than or equal to the trigger threshold, the corresponding sampling period is marked as the trigger period. When the occlusion intensity assessment value is less than the trigger threshold, the corresponding sampling period is marked as a non-trigger period; in all trigger periods, the real-time height of the lifting mechanism corresponding to the first trigger period is read and recorded as the floor edge positioning height.
7. The adaptive detection method for the number of TRAY layers based on height interval scanning according to claim 1, characterized in that: The specific steps for generating the stratigraphic offset based on the stratigraphic edge location height and the theoretical stratigraphic height, calculating the offset change and determining the trend of the offset sequence, and performing height compensation processing based on the height compensation model are as follows: After each round of scanning, the corresponding theoretical layer height and layer edge positioning height are read, and the difference operation is performed on the two to obtain the layer edge offset corresponding to this scan; the layer edge offsets corresponding to the most recent N scans are extracted, and the difference between adjacent layer edge offsets is calculated in chronological order to obtain the offset change sequence. After each update of the offset change sequence, the sign of each offset change in the sequence is checked: When the signs are inconsistent or zero values exist, the trend status mark is updated to a discontinuous offset state, while keeping the current theoretical layer height unchanged; When all signs are identical and non-zero, the trend state is updated to a continuous offset state, and the height correction process begins: extract the edge offsets obtained from the most recent N scans, construct a height compensation model based on the recursive least squares algorithm; use the edge offsets corresponding to the most recent N scans as training samples, and perform incremental training on the height compensation model with squared loss as the optimization objective; after the edge offset sequence is updated, input the latest edge offset into the incrementally trained height compensation model, output the height compensation correction amount; and add the height compensation correction amount to the current theoretical layer height to obtain the compensated theoretical layer height.
8. The adaptive detection method for the number of TRAY layers based on height interval scanning according to claim 2, characterized in that: The specific steps for generating TRAY layer index update values based on the compensated theoretical layer height and performing layer counting processing are as follows: The compensated theoretical layer height is divided by the TRAY layer interval distance. The integer part of the result is used to generate the updated TRAY layer number for this scan. This updated value is then compared with the historical TRAY layer number recorded in the previous scan. If the updated TRAY layer number is greater than the historical TRAY layer number, the layer counter is incremented by one; otherwise, the layer counter remains unchanged. The compensated theoretical layer height, TRAY layer number update value, layer counter value, and layer edge offset record sequence are written into the system status storage area for the generation of height intervals, trend determination, and layer accumulation processing in the next scan cycle.
9. A TRAY layer number adaptive detection system based on height interval scanning, employing the TRAY layer number adaptive detection method based on height interval scanning as described in any one of claims 1-8, characterized in that, include: The module comprises a feature data acquisition and processing module, a range height generation and scheduling module, an occlusion feature analysis and memory module, and a layer compensation trend accumulation module, among which: The feature data acquisition and processing module is used to periodically acquire stratigraphic feature data and perform time synchronization, smoothing, anomaly removal, interpolation completion and scale normalization on the stratigraphic feature data to generate preprocessed stratigraphic feature data. The interval height generation and scheduling module is used to generate theoretical layer height and height detection interval based on preprocessed layer feature data, perform stability evaluation processing on the operation process of the lifting mechanism, generate scanning stability evaluation value, and trigger interval scanning based on the scanning stability evaluation value to construct interval scanning dataset. The occlusion feature analysis and memory module is used to perform occlusion intensity assessment processing based on the interval scan dataset, generate occlusion intensity assessment value, identify the trigger cycle based on the occlusion intensity assessment value, and record the real-time height of the lifting mechanism corresponding to the first trigger cycle as the layer edge positioning height. The layer compensation trend accumulation module is used to generate layer offset based on the layer edge positioning height and the theoretical layer height, and to perform offset change calculation and trend determination on the offset sequence, perform height compensation processing based on the height compensation model, generate TRAY layer number update value based on the compensated theoretical layer height, and perform layer counting processing.