Intelligent cabinet door anti-pinch control method and system based on multi-source sensor fusion

By using a multi-source sensor fusion system and an adaptive inertial weight optimization SVM model, the problem of false judgment in anti-pinch operation of smart cabinet doors under low temperature or oily conditions was solved, achieving highly accurate and reliable anti-pinch control, ensuring user safety and equipment operation efficiency.

CN121637210BActive Publication Date: 2026-05-29WUHAN HAHA BIANLI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN HAHA BIANLI TECH CO LTD
Filing Date
2026-02-05
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing intelligent cabinet door anti-pinch control methods based on PSO algorithm and SVM classification model lack environmental adaptability under complex working conditions such as low temperature or oil stains. This leads to the misjudgment of high resistance when the door is closing normally as an abnormality of pinching people, resulting in frequent false rebound of the cabinet door, which affects equipment operating efficiency and user safety.

Method used

By acquiring current and velocity data sequences, a multi-source sensing fusion system is constructed. By utilizing the consistency of resistance drift, the proportion of high-frequency oscillation energy in current data, and the correlation of change trends, the confidence level of the environmental state is determined. The inertial weights of the PSO algorithm are adaptively adjusted, and the SVM classification model is optimized to achieve dynamic parameter optimization and improve the accuracy of anti-pinch control.

Benefits of technology

It effectively avoids interference from mechanical wear and environmental vibration on the anti-pinch control, improves the accuracy and reliability of cabinet door anti-pinch control, reduces the equipment false detection rate, and ensures user safety and operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121637210B_ABST
    Figure CN121637210B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of automatic control and data processing, in particular to a kind of intelligent cabinet door anti-pinch control method and system based on multi-source sensing fusion, the method comprises: obtaining current and speed data in the process of intelligent cabinet door closure, and determine the consistent degree of resistance drift in combination with factory reference data;Analysis of the proportion of high-frequency oscillation energy of current data and the correlation of current and speed variation trend, comprehensive construction environment state confidence;Based on the adaptive inertia weight of particle of PSO algorithm calculated by environment state confidence, to drive PSO algorithm to optimize the parameters of SVM classification model, make classification model dynamically adapt to the current environment, obtain the optimized SVM model, carry out intelligent anti-pinch control to cabinet door.The method can accurately distinguish the resistance anomaly caused by environmental factors and the real pinch / handling state by introducing environmental perception and adaptive optimization mechanism, improve the accuracy of anti-pinch control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic control and data processing technology. Specifically, it relates to an intelligent cabinet door anti-pinch control method and system based on multi-source sensor fusion. Background Technology

[0002] With the booming development of the new retail industry, smart vending machines, as key terminals connecting online and offline, are widely used in communities, office buildings and schools. Considering that such devices are usually in an unattended open state and have a wide user base, including the elderly and children, the safety, sensitivity and reliability of the anti-pinch control function of the cabinet door are particularly important, as they are directly related to the personal safety of users and the operational efficiency of the equipment.

[0003] In existing technologies, the control of anti-pinch mechanisms for smart cabinet doors typically relies on real-time monitoring and classification of motor operation data. The mainstream approach uses an SVM (Support Vector Machine) classification model, which collects feature data such as current and speed during the operation of the cabinet door's motor to identify normal closing and abnormal pinching states. To further improve the classification accuracy of SVM under nonlinear and high-dimensional data, traditional methods introduce the PSO (Particle Swarm Optimization) algorithm to optimize key parameters (penalty factor and kernel function parameters) in the SVM model. This method utilizes an iterative search strategy based on swarm intelligence, which can overcome the blindness of manually setting parameters to a certain extent and improve the model's generalization ability and classification accuracy.

[0004] However, smart vending machines face outdoor or semi-outdoor operating conditions, especially in low-temperature seasons or when the equipment is aging. The door sealing strips may harden due to the temperature drop, or the guide rails may become sticky due to the accumulation of oil. These environmental factors can cause the motor running resistance to drift gradually or be accompanied by microscopic viscous oscillations. Under such complex time-varying conditions, the characteristic distribution of the data during motor operation will shift, causing high resistance samples that originally belonged to normal door closing to overlap with abnormal sample distributions, thus being incorrectly classified as abnormal.

[0005] Faced with the aforementioned changes in operating conditions, traditional PSO algorithms typically employ fixed or simply linearly decreasing inertial weights when optimizing parameters. This rigid search strategy lacks the ability to perceive and respond to real-time environmental conditions. When environmental resistance drifts, the system urgently needs the algorithm to perform a rapid, localized, and refined search near the current operating parameters to quickly update the SVM parameters and adapt to the environment. However, because the inertial weights cannot adaptively adjust according to environmental confidence, the algorithm still tends to maintain a large-scale global search capability. This prevents the PSO algorithm from quickly converging to a locally optimal solution that fits the current high-resistance operating condition within a limited control cycle. Consequently, the SVM model cannot adjust its classification boundaries in time, incorrectly identifying normal closing resistance affected by hardened or oily sealant as an abnormal pinch signal. This high-frequency misjudgment causes the cabinet door to frequently trigger anti-pinch rebound even without any obstacles, preventing normal closure. This not only damages the cooling and insulation effect of the smart cabinet and increases energy consumption but also causes the equipment to frequently malfunction and stop operating, impacting the user's shopping experience. Summary of the Invention

[0006] To address the problem that existing anti-pinch control methods based on PSO algorithms and SVM classification models lack environmental adaptability when facing complex working conditions such as low temperatures or oil stains, leading to the misjudgment of normal door closing high resistance as an abnormality of being pinched, resulting in frequent false rebound of the cabinet door and low accuracy of anti-pinch control, this invention proposes an intelligent cabinet door anti-pinch control method and system based on multi-source sensor fusion.

[0007] In a first aspect, the present invention provides an intelligent cabinet door anti-pinch control method based on multi-source sensor fusion, comprising:

[0008] The current data sequence and speed data sequence of the smart cabinet door during each closing process are obtained, as well as the average current data of multiple cabinet doors during the closing process under factory standard conditions, forming a reference current data sequence.

[0009] Based on the numerical difference between the current data sequence and the reference current data sequence, the degree of consistency of resistance drift during each closing process from the start to the end of closing is determined.

[0010] Extract the proportion of high-frequency oscillation energy in the current data sequence, calculate the correlation between the changing trends of the current data sequence and the velocity data sequence, and determine the environmental state confidence level for each closing process by combining the consistency of the resistance drift, the correlation of the changing trends, and the proportion of high-frequency oscillation energy.

[0011] Based on the environmental state confidence, the adaptive inertia weight of the PSO algorithm is calculated in each iteration. The adaptive inertia weight is used to optimize the parameters of the SVM classification model. The output of the optimized SVM classification model is used to determine whether the state of the cabinet door from the start of closing to the stop of closing is normal or abnormal. The intelligent cabinet door is then controlled to prevent pinching based on the state.

[0012] This technical solution reflects the long-term benchmark shift caused by mechanical aging by introducing resistance drift consistency. It comprehensively evaluates the reliability of data collected under the working conditions of the smart vending machine by using environmental state confidence. It also establishes a dynamic parameter optimization mechanism. When the environmental confidence is high, it indicates that the data conforms to physical laws and has low noise. The inertial weight of particles in the PSO algorithm is adjusted in the parameter optimization process, so that the SVM classification model can accurately fit the characteristics of the current data sequence and velocity data sequence of the cabinet door from the start of closing to the stop of closing. When the environment is complex, the strategy is adaptively adjusted to ensure robustness. This closed-loop control based on environmental perception and model adaptive optimization avoids the interference of mechanical wear and environmental vibration on the anti-pinch control judgment and improves the accuracy of cabinet door anti-pinch control.

[0013] Preferably, the degree of uniformity of drag drift is determined based on the following method: for the first Alignment is performed on the current and velocity data sequences from the start of closure to the end of closure; drag drift consistency is calculated.

[0014]

[0015] in, For the first The degree of consistency of resistance drift during the entire closing process from the start to the end of the closing process. For the first The length of the current data sequence from the start of the closing process to the end of the closing process. For the first The current data sequence from the start of closing the secondary cabinet door to the stop of closing. A number, The first in the reference current data sequence A number, For the first The overall offset between the current data sequence from the start of closing of the secondary cabinet door to the stop of closing and the reference current data sequence, wherein the overall offset is the total offset of the current data sequence from the start of closing of the secondary cabinet door to the stop of closing. The current data sequence from the start of the closing process to the stop of the closing process is obtained by subtracting the reference current data sequence element by element and then averaging the results. To prevent constants with a denominator of zero, This is a normalization operation.

[0016] This technical solution constructs a nonlinear consistency evaluation model based on residual dispersion, which accurately reflects the morphological characteristics of resistance changes rather than simply the numerical magnitude at the mathematical level. When the smart cabinet is in a low-temperature or aging state, the operating resistance exhibits a uniform drift throughout the entire stroke, with minimal fluctuations in the difference, thus calculating an extremely high consistency index. However, when sudden events such as people being trapped occur, the resistance curve will produce local distortions, leading to a sharp increase in the difference dispersion. This approach effectively separates systematic environmental drift from random obstacle mutations from a physical perspective.

[0017] Preferably, the method for extracting the proportion of high-frequency oscillation energy in the current data sequence is as follows: the sum of the squares of all values ​​in the current data sequence is taken as the total energy of the current data sequence; the current data sequence is decomposed into multiple scales using discrete wavelet transform technology to obtain the high-frequency detail coefficient sequence under each scale decomposition; the sum of the squares of all values ​​in the high-frequency detail coefficient sequence under the smallest scale decomposition is taken as the high-frequency oscillation energy; the ratio of the high-frequency oscillation energy to the total energy is determined as the proportion of high-frequency oscillation energy in the current data sequence.

[0018] Preferably, the correlation between the changing trends of the current data sequence and the velocity data sequence is determined based on the following method: performing a first-order difference operation on the current data sequence and the velocity data sequence respectively to obtain two first-order difference sequences, and using the Pearson correlation coefficient between the two first-order difference sequences as the correlation between the changing trends of the current data sequence and the velocity data sequence.

[0019] Preferably, the confidence level of the environmental state during each closing process satisfies the following relationship:

[0020]

[0021] in, For the first Confidence of environmental states during the initial closure process to the end of closure. For normalization operations, For the first The degree of consistency of resistance drift during the entire closing process from the start to the end of the closing process. For the first High-frequency oscillation energy of the current data sequence from the start of the closing process to the end of the closing process. For the first The total energy of the current data sequence from the start of the closing process to the end of the closing process. For the first The correlation between the changing trends of the current data sequence and the velocity data sequence during the initial closing process to the final closing process. It is the absolute value symbol.

[0022] This technical solution constructs a multi-dimensional feature fusion evaluation system. It captures the overall macroscopic resistance increase caused by low temperature by utilizing the consistency of resistance drift, and captures the microscopic mechanical oscillation caused by oil viscosity by utilizing the correlation between the proportion of high-frequency oscillation energy and the trend of change. Through nonlinear weighted fusion, it can accurately separate the essential difference between nonlinear resistance caused by environmental factors and abrupt resistance caused by obstacle collision from the physical level. It ensures that high confidence is output only when the signal characteristics highly conform to the laws of mechanical aging or environmental drift, thus providing a judgment benchmark with extremely strong anti-interference ability for subsequent control algorithms.

[0023] Preferably, the adaptive inertia weights of the PSO algorithm in each iteration satisfy the following relationship:

[0024]

[0025] in, In order to target the The PSO algorithm performs the parameter optimization process for the SVM classification model from the start of closure to the stop of closure. The adaptive inertia weights of all particles in the next iteration. and These are the maximum and minimum inertia weights preset for the PSO algorithm, respectively. For the first Confidence of environmental states during the process from the start of closure to the end of closure.

[0026] This technical solution establishes a dynamic switching mechanism for particle swarm search strategies based on environmental awareness. When the confidence level of the environmental state is high, it indicates that the current high drag originates from environmental factors. The algorithm automatically reduces the inertial weight to suppress the global divergence of particles, prompting them to conduct a local fine-grained search in the solution space near the current operating condition. This allows the algorithm to quickly converge to new parameters that fit the current environment within a millisecond-level control cycle. Conversely, when the confidence level is low, the algorithm maintains a large inertial weight to preserve global search vitality and prevent the model from overfitting to sudden signals. This dynamic adjustment achieves a balance between rapid adaptation under steady-state conditions and high-sensitivity response under sudden operating conditions.

[0027] Preferably, the method for optimizing the parameters of the SVM classification model using the adaptive inertial weights is as follows: A training sample library is constructed, including: multiple normal sample data under standard factory conditions, multiple abnormal sample data when the cabinet door traps people / goods, and multiple recent normal sample data where the resistance change is determined to originate from environmental factors and the cabinet door is in a normally closed state. The normal / abnormal sample data in the training sample library each contain a current data sequence and a velocity data sequence representing the process from the start to the stop of the cabinet door closing. A fitness function for the PSO algorithm is defined, characterizing the average cross-validation accuracy of the parameter combination represented by the particle on the training sample library. During the iterative optimization process of the PSO algorithm, the particle state is updated using the adaptive inertial weights to search for the optimal parameter combination. When the maximum number of iterations is reached, the optimal parameter combination is used to construct the SVM classification model.

[0028] This technical solution utilizes a first-in-first-out sliding window mechanism to construct a dynamic environmental sample set. By introducing the latest high-resistance samples identified as environmental factors in real time and eliminating outdated samples, the SVM classification boundary is forced to dynamically evolve with environmental changes. This not only prevents model sluggishness caused by sample lag but also ensures that the model can accommodate the current harsh working conditions. At the same time, in conjunction with a fitness function based on cross-validation accuracy, it ensures that the parameters of the final generated SVM model can accurately identify environmental interference to correctly execute the door closing operation, thereby improving the accuracy of cabinet door anti-pinch control.

[0029] Preferably, the alignment operation is performed as follows: Discrete-time integration is performed on the velocity data sequence to obtain the cumulative displacement of the gate at each moment from the start of closure to the stop of closure, thereby constructing the correspondence between the cumulative displacement of the gate, current, and velocity at each moment; a standardized gate travel space coordinate system is established, and the gate travel space coordinate system is divided into multiple equally spaced standard spatial sampling points; using the cumulative displacement of the gate as an index, a linear interpolation algorithm is applied to calculate the current and velocity corresponding to each standard spatial sampling point, so that the velocity data sequence and the current data sequence correspond one-to-one based on the standard spatial sampling points, thereby achieving the alignment operation.

[0030] Secondly, the present invention also provides an intelligent cabinet door anti-pinch control system based on multi-source sensor fusion, characterized in that the intelligent cabinet door anti-pinch control system includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the intelligent cabinet door anti-pinch control methods described above.

[0031] The present invention has the following effects:

[0032] This invention effectively solves the problem of false pinch prevention caused by resistance drift in complex working conditions such as low temperature and oil contamination of smart cabinet doors by introducing an adaptive adjustment mechanism of particle swarm optimization based on environmental state confidence. It deeply integrates the macroscopic drift consistency characteristics and microscopic oscillation energy characteristics of motor current, enabling accurate identification of environmental resistance caused by non-human factors. By using an adaptive inertial weight strategy, it automatically switches to a local fine search mode when environmental interference is confirmed, prompting the SVM model to quickly reconstruct the classification boundary to accommodate high resistance in normal conditions, while maintaining global sensitivity in the event of a sudden pinching incident. This control strategy, which combines steady-state adaptation with sudden high response, significantly reduces the false detection rate of equipment, improves operational efficiency, and strictly protects the personal safety of users, achieving a dual improvement in environmental robustness and anti-pinch reliability. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0034] Figure 2 This is a schematic diagram showing the changing trend of the cabinet door operation status score output by the present invention and the traditional SVM classification model, and the anti-pinch trigger threshold. Detailed Implementation

[0035] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0036] refer to Figure 1 This invention provides an intelligent cabinet door anti-pinch control method based on multi-source sensor fusion, comprising:

[0037] S1: Obtain the current data sequence and speed data sequence of the smart cabinet door during each closing process from start to stop, as well as the reference current data sequence.

[0038] The door drive system of smart vending machines needs to ensure absolute safety for special user groups such as the elderly and children while meeting the requirements of high-frequency start and stop. However, in actual hardware architecture, in order to control costs and adapt to the compact cabinet space, the drive motor is usually grounded with high-power equipment such as refrigeration compressors. This results in the collected current signal often containing a large amount of electromagnetic radiation noise and mechanical commutation ripple. In addition, the Hall position sensor of the vending machine is limited by installation accuracy and is prone to quantization errors during the low-speed closing phase. If these raw data with high noise characteristics are directly input into subsequent algorithms, they are very likely to be submerged due to noise amplification effect.

[0039] Therefore, this step not only aims to achieve synchronous acquisition of current and speed, but more importantly, it aims to build a high-fidelity signal conditioning link that is compatible with the hardware characteristics of the smart cabinet. Through time-domain filtering and dynamic windowing, background electromagnetic noise is filtered out, and the true load change curve caused by the compression of sealing strips or obstruction by foreign objects is restored.

[0040] Utilizing the high-precision current sampling circuit and motor Hall sensor on the main control board of the smart cabinet, synchronous triggering and acquisition are performed at a frequency of 100Hz. This frequency setting fully considers the short closing stroke of the smart cabinet door (usually only a few seconds), and can capture the millisecond-level resistance change at the moment of contact of the rubber strip. By monitoring the door locking signal and the back electromotive force of the motor, the system automatically identifies each door closing process from the start to the stop, eliminating the mechanical vibration data at the moment of unlocking, and ensuring that subsequent calculations focus on the resistance characteristics during the closing process.

[0041] Specifically, the current and speed (motor rotation speed) data sequences of the cabinet door are collected during each closing process. A one-dimensional Gaussian filter is used to smooth the original current sequence. This operation can effectively smooth out isolated spikes caused by electromagnetic interference, while preserving to the greatest extent the slow current rise trend caused by the hardening of the low-temperature rubber strip and the mechanical vibration texture caused by oil stains on the guide rail. This lays the data foundation for accurately distinguishing between environmental factors and accidents involving people or goods being trapped.

[0042] Furthermore, the average value of multiple current data sequences from the start-closing to the stop-closing process tested under factory standard conditions is obtained in advance to form a reference current data sequence. For example, if the smart cabinet door is tested 10 times under factory standard conditions, 10 current data sequences for these 10 processes are obtained, the average value of each current data sequence is calculated, and the resulting 10 average values ​​are used to form a reference current data sequence for subsequent benchmarking.

[0043] S2: Based on the numerical difference between the current data sequence and the reference current data sequence, determine the degree of consistency of resistance drift during each closing process from the start to the stop of closing.

[0044] Intelligent vending machines often operate outdoors or in cold chain environments. Their door sealing strips undergo significant hardening at low temperatures. This change in material properties causes a uniform, linear increase in frictional resistance throughout the entire closing process, directly threatening the door's tightness and the preservation of food inside. Conversely, sudden accidents such as people being trapped typically manifest as a surge in resistance at a localized location. To accurately identify this difference from complex current signals, this step aims to determine the consistency of resistance drift during each closing process by comparing the parallelism of the measured current data sequence with the reference current data sequence. This helps identify whether the current resistance increase is a systemic, overall drift. This is not only to prevent false alarms but also to ensure that the motor can output sufficient torque to close the door tightly under low-temperature conditions, guaranteeing operational efficiency.

[0045] In one embodiment, the consistency of resistance drift during each closing process from start to stop is determined based on the following:

[0046] For the first The current data sequence and velocity data sequence from the start of the closing process to the stop of the closing process are aligned.

[0047] Calculate drag drift consistency:

[0048]

[0049] in, For the first The degree of consistency of resistance drift during the entire closing process from the start to the end of the closing process. For the first The length of the current data sequence from the start of the closing process to the end of the closing process. For the first The current data sequence from the start of closing the secondary cabinet door to the stop of closing. A number, The first in the reference current data sequence A number, For the first The overall offset between the current data sequence from the start of closing of the secondary cabinet door to the stop of closing and the reference current data sequence, wherein the overall offset is the total offset of the current data sequence from the start of closing of the secondary cabinet door to the stop of closing. The current data sequence from the start of the closing process to the stop of the closing process is obtained by subtracting the reference current data sequence element by element and then averaging the results. To prevent the constant from having a denominator of zero, the value is taken as 0.001. For normalization operations, a nonlinear mapping function (such as the Sigmoid function) is used to compress any positive number into the range (0,1].

[0050] A nonlinear evaluation model based on residual dispersion is constructed here, specifically to distinguish between environmental aging and sudden collisions in intelligent cabinets, and the overall offset. It serves as a baseline calibration, mathematically filtering out the DC resistance component caused by rubber strip hardening or mechanical wear, allowing the calculation to focus on the fluctuation pattern of the resistance, the core term. The variance of the residuals after bias correction was statistically analyzed, which physically characterizes the smoothness of the measured curve relative to the reference curve. When When the value is large, it means that the residual variance is extremely small, indicating that the measured current has only undergone an overall shift based on the reference, and the waveform details have not been distorted. This is highly consistent with the physical characteristic of the sealing strip hardening uniformly throughout its entire stroke under low temperature conditions. Conversely, if a user's finger is pinched, the resistance curve will experience a sudden change at a specific displacement point, leading to a sharp increase in residual dispersion. The value then drops sharply. This approach, from a mathematical perspective, achieves precise separation between systematic environmental drift (requiring greater force to close the door) and random obstacle mutation (requiring immediate rebound).

[0051] In one embodiment, the alignment operation is performed as follows:

[0052] Discrete-time integration is performed on the velocity data sequence to obtain the cumulative displacement of the gate at each moment from the start of closure to the stop of closure, thereby constructing the correspondence between the cumulative displacement of the gate, current, and velocity at each moment. A standardized gate travel space coordinate system is set up and divided into multiple equally spaced standard spatial sampling points. Using the cumulative displacement of the gate as an index, a linear interpolation algorithm is applied to calculate the current and velocity corresponding to each standard spatial sampling point, so that the velocity data sequence and the current data sequence correspond one-to-one based on the standard spatial sampling points to achieve alignment.

[0053] S3: Extract the proportion of high-frequency oscillation energy in the current data sequence, calculate the correlation between the changing trends of the current data sequence and the velocity data sequence, and determine the environmental state confidence level for each closing process from the start to the stop of closing by combining the degree of resistance drift.

[0054] After obtaining the resistance drift consistency during each closing process, considering that the guide rails and lead screws of the smart vending machine will inevitably accumulate a mixture of dust and grease during long-term operation, this semi-fluid medium will cause the door to produce a microscopic alternating process of viscosity and sliding during movement. This physical phenomenon will cause the current data to be superimposed with high-frequency sawtooth oscillations. Due to the existence of this oscillation, the variance of the difference between the current data sequence and the reference current data sequence during each closing process will be significantly increased, resulting in a smaller resistance drift consistency. If subsequent control is directly based on the smaller resistance drift consistency, the algorithm will mistakenly believe that there is an uncertain obstacle interference, thus maintaining a large inertial weight for global search, which cannot quickly adapt to the current low temperature and oily working conditions, and will still lead to false detection.

[0055] Therefore, based on the consistency of resistance drift, this step further analyzes that a true obstacle collision usually causes a monotonous surge in current and a sharp drop in velocity. However, the low-temperature oil contamination phenomenon manifests as high-frequency micro-oscillations of current, and these oscillations are highly synchronized with the minute fluctuations in velocity. Therefore, if the proportion of high-frequency oscillation energy in the current data sequence is larger, and the cross-correlation between current oscillations and velocity oscillations is stronger, it indicates that the process from the start of the cabinet door closing to its stop closing is not due to an obstacle (such as trapping a person or goods), but rather to a special low-temperature oil contamination condition. In this case, the confidence level of the environmental state should be increased, i.e., the confidence level of the environmental state should be higher. Conversely, if the proportion of high-frequency oscillation energy in the current data sequence is small, or the cross-correlation between current oscillations and velocity oscillations is weak, it indicates that the process from the start of the cabinet door closing to its stop closing is due to an obstacle, rather than a special low-temperature oil contamination condition. In this case, the confidence level of the environmental state should be reduced, i.e., the confidence level of the environmental state should be lower.

[0056] This step introduces microscopic feature analysis, utilizing the high-frequency energy ratio of current and the synchronous coupling between current and velocity changes to construct a multi-dimensional environmental state confidence level. The purpose is to accurately identify low-temperature oil pollution conditions and obstacles, and avoid frequent false alarms.

[0057] In one embodiment, the proportion of high-frequency oscillation energy in the current data sequence is determined based on the following method:

[0058] The sum of the squares of all values ​​in the current data sequence is taken as the total energy of the current data sequence. The current data sequence is decomposed into multiple scales using discrete wavelet transform techniques (such as Dobessie wavelet transform) to obtain the high-frequency detail coefficient sequence under each scale decomposition. The sum of the squares of all values ​​in the high-frequency detail coefficient sequence under the smallest scale decomposition is taken as the high-frequency oscillation energy. The ratio of the high-frequency oscillation energy to the total energy is determined as the proportion of the high-frequency oscillation energy of the current data sequence. This proportion can accurately quantify the micro-oscillation intensity during motor operation and effectively reflect the non-stationary fluctuations caused by oil sludge viscosity.

[0059] For example, current data sequence The total energy is 30.43. The discrete wavelet transform technique is used to decompose it into multiple scales. The high-frequency detail coefficient sequence under the smallest scale decomposition is [0.1, -0.1, 0.1, -0.1, 0.05]. Then the high-frequency oscillation energy is 0.0425, and the proportion of high-frequency oscillation energy is 0.14%.

[0060] In one embodiment, the correlation between the changing trends of the current data sequence and the velocity data sequence is determined based on the following method:

[0061] First-order differencing operations are performed on the current and velocity data sequences respectively. That is, in each sequence, each value is subtracted from the previous value, resulting in two first-order differencing sequences. These sequences characterize the instantaneous rate of change and micro-fluctuation trend of the current and velocity data. The Pearson correlation coefficient between the two first-order differencing sequences is used as the correlation between the changing trends of the current and velocity data sequences. The Pearson correlation coefficient is a statistical indicator that measures the degree of linear correlation between two variables. Its value ranges from -1 to 1, and it is used to quantify the synchronicity and closeness of the changing trends of the current and velocity first-order differencing sequences.

[0062] In one embodiment, the confidence level of the environmental state from the start of the closing process to the end of the closing process is determined based on the following:

[0063]

[0064] in, For the first Confidence of environmental states during the initial closure process to the end of closure. For normalization operations, For the first The degree of consistency of resistance drift during the entire closing process from the start to the end of the closing process. For the first High-frequency oscillation energy of the current data sequence from the start of the closing process to the end of the closing process. For the first The total energy of the current data sequence from the start of the closing process to the end of the closing process. For the first The correlation between the changing trends of the current data sequence and the velocity data sequence during the initial closing process to the final closing process. It is the absolute value symbol.

[0065] in, This provides a basic basis for judging the uniformity of macroscopic resistance. The larger the value, the more likely it is due to environmental interference, and the higher the energy ratio term. This accurately captures the microscopic high-frequency noise caused by oil viscosity in the current signal. The larger this ratio, the more the resistance source conforms to the characteristics of non-rigid fluid viscosity and low-temperature oil sludge, and the higher the confidence level of the corresponding environmental state. The correlation coefficient term... The coupling synchronization between current fluctuations and velocity fluctuations was verified from a dynamic perspective. The larger the value, the higher the correlation between the two, indicating that this is an inherent characteristic of the internal mechanical transmission of the system, rather than a collision with external discrete obstacles.

[0066] Determining the environmental state confidence level through multiplication means that the environmental state confidence level is only valid when the current data sequence simultaneously satisfies macroscopic drift consistency, microscopic viscous oscillations, and conforms to mechanical coupling laws. The larger the number of devices, the better. This ensures that the system only attributes the problem to environmental factors when it is fully confirmed that the issue is due to the equipment itself being old or dirty. This ensures that even in complex unmanned vending scenarios, the system firmly maintains its safety standards and avoids missing any actual incidents of people being trapped. Conversely, when... The smaller the value, the more likely it is an actual accident involving people or goods being trapped, rather than an accident caused by low-temperature oil contamination conditions.

[0067] S4: Based on the environmental state confidence of each closure process from start to stop, calculate the adaptive inertia weight of the PSO algorithm in each iteration.

[0068] In the anti-pinch control of smart cabinets, there is a balance between safety and usability. Excessive sensitivity can cause the door to fail to close at low temperatures, affecting food safety, while excessive insensitivity may injure users. Traditional fixed-parameter algorithms cannot simultaneously address both issues within a millisecond-level control cycle. If the system has confirmed with high confidence that the current increase in resistance is due to low temperature or oil contamination (environmental factors), the optimal strategy should be to quickly adjust the boundaries of the SVM classification model to encompass the environment, rather than performing a blind global search.

[0069] Therefore, this step establishes a dynamic switching mechanism for particle swarm search strategy based on environmental perception, which directly maps the calculated environmental state confidence to the inertial weights of the optimization algorithm, thereby realizing intelligent switching of the control strategy between steady-state adaptation and sudden high response.

[0070] The higher the confidence level of the environmental state, the greater the likelihood that the resistance encountered by the gate is caused by environmental factors. In this case, the PSO algorithm needs to reduce the inertia weight of the particles, weakening their ability to maintain their original motion state, and prompting the particle swarm to converge quickly to establish a new normal baseline. Conversely, if the confidence level of the environmental state is low, it indicates that there are more likely potential obstacles to the resistance. A larger inertia weight needs to be maintained for global exploration to avoid getting trapped in erroneous local optima. Based on the above logic, the adaptive inertia weight of each particle in each iteration of the particle swarm optimization algorithm is calculated.

[0071] In one embodiment, the adaptive inertia weights of the PSO algorithm in each iteration satisfy the following relationship:

[0072]

[0073] in, In order to target the The PSO algorithm performs the parameter optimization process for the SVM classification model from the start of closure to the stop of closure. The adaptive inertia weights of all particles in the next iteration. and These are the maximum and minimum inertia weights preset for the PSO algorithm, respectively. For the first Confidence of environmental states during the process from the start of closure to the end of closure.

[0074] This relationship establishes a negative feedback adjustment mechanism between environmental determinism and the exploration capability of the PSO algorithm, when... When the resistance approaches 1, it indicates that the system is highly confident that the current high resistance is a normal phenomenon caused by low-temperature rubber strips or guide rail oil contamination. At this point, By compressing the inertial weights to near minimum, the global flight inertia of the particles is suppressed at the algorithmic level. This forces the particle swarm to perform high-density, meticulous local mining in the vicinity of the current solution space, thereby finding a set of SVM parameters that can accommodate the current high drag in a very short time, ensuring that the cabinet door can overcome environmental resistance and close smoothly; conversely, when A lower value, approaching 0, indicates a greater likelihood of a sudden foreign object or an unclear situation, and a higher probability of a person or cargo being trapped. Maintaining a high value, approaching the maximum inertia weight, endows particles with extremely strong global traversal capabilities, prevents the model from converging prematurely to the wrong classification boundary, and ensures the highest sensitivity to potential risks of people or goods being trapped. This dynamic adjustment mechanism improves the sensitivity of anti-pinch control.

[0075] S5: Utilize adaptive inertia weights to optimize the parameters of the SVM classification model.

[0076] Because the operating environment of smart vending machines is dynamic, including diurnal temperature variations, seasonal changes, and equipment aging, the definition of normal closing is not static. Traditional offline training models, once deployed, struggle to adapt to the new high-resistance environment, leading to a high false alarm rate. This step addresses this by constructing a dynamic training sample library and combining it with the previously calculated adaptive inertia weights to drive the PSO algorithm's penalty factor on the SVM classifier. and kernel function parameters The core purpose of online optimization is to train the SVM model using recently occurring high-resistance data identified as environmental factors, so that its classification boundary can dynamically accommodate environmental changes, while using historical anomaly data to safeguard the bottom line of safety.

[0077] In one embodiment, the method for optimizing the parameters of the SVM classification model using the adaptive inertia weights is as follows:

[0078] Construct a training sample library, including: current and speed data sequences of multiple starting and stopping closing processes of the smart cabinet under factory standard conditions, current and speed data sequences of multiple starting and stopping closing processes under abnormal conditions of trapping people, and current and speed data sequences of multiple processes in the most recent N times from starting to stopping closing that were determined to be due to resistance changes caused by environmental factors and the cabinet door was in a normal closed state.

[0079] Define a fitness function for the particle swarm optimization algorithm. This function characterizes the average cross-validation accuracy of the support vector machine parameter combination represented by the particles on the training sample library. Here, each particle represents a set of support vector machine penalty factors and kernel function parameters.

[0080] In each iteration, when updating the particle velocity and position, the particle's motion state is updated using the adaptive inertial weights. The optimal penalty factor and optimal kernel function parameters are searched within a preset parameter space. When the preset maximum number of iterations is reached, the optimal penalty factor and optimal kernel function parameters are obtained. An SVM classification model is constructed based on the optimal penalty factor and optimal kernel function parameters to optimize the SVM classification model.

[0081] A specific example is:

[0082] First, initialize the settings:

[0083] To meet the real-time requirements of embedded systems with limited computing power, the population size of the PSO algorithm is set to 30, the maximum number of iterations is set to 50, and the learning factor is set to... All values ​​are set to 1.5 to limit the penalty factor of the SVM classification model in order to avoid parameter divergence. The search space is Kernel function parameters of SVM classification model The search space is ;

[0084] Next, a sample library is constructed: the sample library consists of a static baseline and a dynamic component. The static baseline contains 200 current and speed data sequences of the smart cabinet's start-to-stop closing process under factory standard conditions. Each process's current and speed data sequence constitutes a sample and is marked as a normal sample. The static baseline also includes 200 current and speed data sequences of the smart cabinet's start-to-stop closing process (historical data) when the cabinet is in a clamping or cargo-related state. Again, each process's current and speed data sequence constitutes a sample and is marked as an abnormal sample. All samples in the static baseline are used to lock the SVM classification. The model has basic anti-pinch capabilities; the dynamic part adopts a first-in-first-out sliding window mechanism with a capacity of 50. When the cabinet door is closed from the start to the stop of the current closure process, it only stores the current and velocity data sequences of the 50 most recent processes that the system judges as having resistance changes due to environmental factors and where the cabinet door is in a normal closed state. Similarly, the current and velocity data sequences of a process are treated as a sample and marked as a normal sample. The sliding window mechanism ensures that the model has a forgetting function. When the temperature rises or the oil is cleaned, the old high-resistance samples will be squeezed out by the new samples, and the model will automatically return to a high-sensitivity state.

[0085] Next, the fitness function is constructed: the fitness function serves as a bridge connecting the physical environment and mathematical optimization, and its calculation is directly derived from the training sample library constructed in the previous step. To ensure that the SVM model can accurately encompass the samples corresponding to the current low-temperature oil pollution environment, the fitness function... Defined as the combination of SVM parameters represented by the particle (penalty factor) and kernel function parameters The average cross-validation accuracy on the training set, and the fitness function. Defined as the average cross-validation accuracy of the SVM parameter combination represented by the particles on a training set containing recent measured high drag data:

[0086]

[0087] in, This represents the fitness value of a set of SVM parameters corresponding to a particle in the PSO algorithm. The larger the value, the better the classification performance of that set of parameters. This indicates the number of folds in cross-validation (averaging the sample library into folds). share), This is used to evaluate the model's generalization ability and avoid overfitting. Indicates the first The total number of samples in the validation set during cross-validation includes normal samples from the factory baseline, abnormal samples from historical personnel or goods, and the most recent normal samples affected only by dynamic environments. Indicates the first The SVM model constructed from the SVM parameter combinations corresponding to the n particles is in the nth... In the cross-validation, the number of samples misclassified by the SVM model is the number of samples affected by low-temperature oil pollution that are misclassified as abnormal or the number of real people trapped in the oil that are misclassified as normal.

[0088] Because recently occurring, low-temperature-affected normal samples were added to the training sample library and forcibly labeled as normal samples, if the SVM parameter combination (penalty factor) represented by the particles... and kernel function parameters If the old standard is still used, it will misclassify these normal samples with high resistance as abnormal, which will lead to an increase in the number of misclassifications in the formula. A surge, resulting in a fitness value Significantly reduced, the PSO algorithm aims for higher performance. The old parameters will be forced to be discarded, and new parameters that can accommodate these high-resistance samples will be actively searched. Therefore, it is the composition of this sample library (especially the addition of the dynamic part) that determines the evaluation direction of the fitness function, thereby driving the algorithm to adapt to the current environment.

[0089] The physical meaning of the fitness function is that the fitness function value will be the highest only when a set of parameters can simultaneously and correctly identify the abnormal sample data of historical people / goods trapped in the static baseline (to prevent people or goods from being trapped) and the normal sample data of the dynamic part that are only affected by environmental interference (to prevent environmental influences from being misjudged as people / goods being trapped). Thus, the parameter combination will be selected as the global optimal position of the PSO algorithm and become the gravitational center that attracts all particles to move towards it.

[0090] Subsequently, adaptive updates are performed: During the iterative search for the optimal parameter combination of the SVM classification model using the PSO algorithm, in each iteration, the global optimum position of the PSO algorithm is first updated according to the aforementioned fitness function. Then, when updating the particle velocity, the adaptive inertial weights calculated in step S4 are substituted. When the environmental confidence is high, the adaptive inertial weights automatically decrease, weakening the particle's flight inertia and causing it to make small local perturbations near the global optimum position, achieving rapid convergence. When the environmental confidence is low, the adaptive inertial weights maintain a larger value, preserving the particle's global traversal ability and avoiding getting trapped in local optima. It should be noted that for the q-th iteration from the start of closure to the end of closure, during the parameter optimization process of the SVM classification model by the PSO algorithm, regardless of whether it is the 1st or 50th iteration, the adaptive inertial weights of all particles are the values ​​calculated in step S4. The adaptive inertial weights are only related to the environmental diagnosis results and do not decay with the number of iterations. This is the difference between this invention and the traditional PSO algorithm, and it is also the core of environmental adaptation.

[0091] Finally, when the number of iterations reaches 50 and the output finally converges, the penalty factor and kernel function parameters in the parameter combination corresponding to the global optimal position of the PSO algorithm are used as the optimal penalty factor and optimal kernel function parameters, respectively. The final SVM classification model is constructed using the optimal penalty factor and optimal kernel function parameters for real-time anti-pinch control in step S6.

[0092] S6: Using the output of the optimized SVM classification model, the state of the cabinet door from the start of closing to the stop of closing is determined as normal or abnormal, and anti-pinch control is performed on the smart cabinet door based on the state.

[0093] In one embodiment, anti-pinch control of the smart cabinet door based on the state includes:

[0094] The current and speed data sequences from the start to the stop of each cabinet door closure process are input into the optimized SVM classification model. If the SVM classification model outputs an abnormal classification result, it is determined that there is a risk of trapping a person, the cabinet door is in an abnormal closing state, the motor is controlled to stop rotating and rotate in the reverse direction, causing the cabinet door to spring back, minimizing the risk of personal injury. If the SVM classification model outputs a normal classification result, it is determined that the resistance change is due to environmental factors, the current increase in resistance is due to environmental drift, the cabinet door is in a normal closing state. At this time, the main control unit will ignore the conventional current threshold protection and can selectively and appropriately increase the upper limit of the motor's output torque to overcome the hardening resistance of the low-temperature rubber strip, forcibly driving the cabinet door to continue to perform the closing action until the locking signal is triggered.

[0095] like Figure 2As shown, the horizontal axis represents time, and the vertical axis represents the output score of the SVM classification model on the cabinet door's operating status. In other words, the operating status of the cabinet door is evaluated based on the output classification results of the SVM classification model. The higher the output score, the greater the risk of trapping people or goods. Existing technologies are affected by environmental resistance and fluctuate around the anti-pinch trigger threshold, which is prone to false alarms. This invention uses environmental adaptation to lower the score and eliminate false alarms. The anti-pinch trigger threshold is only exceeded when a person is actually trapped. While preventing false alarms, it ensures accurate triggering of real trapping accidents.

[0096] This invention also provides an intelligent cabinet door anti-pinch control system based on multi-source sensor fusion. The intelligent cabinet door anti-pinch control system includes a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, they implement all or part of the steps of the intelligent cabinet door anti-pinch control method. The processor can be a central processing unit (CPU), a graphics processing unit (GPU), an application-specific integrated circuit (ASIC), or a field-programmable gate array (FPGA). The processor is preferably a GPU to achieve parallel acceleration. The memory can include volatile memory (such as RAM) and non-volatile memory (such as ROM or flash memory).

[0097] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A smart cabinet door anti-pinch control method based on multi-source sensor fusion, characterized in that, include: The current data sequence and speed data sequence of the smart cabinet door during each closing process are obtained, as well as the average current data of multiple cabinet doors during the closing process under factory standard conditions, forming a reference current data sequence. Based on the numerical differences between the current data sequence and the reference current data sequence, the degree of consistency of resistance drift during each closing process from the start to the end of the closing is determined. Extract the proportion of high-frequency oscillation energy from the current data sequence, calculate the correlation between the changing trends of the current data sequence and the velocity data sequence, and determine the environmental state confidence level for each closing process by combining the consistency of resistance drift, the correlation of changing trends, and the proportion of high-frequency oscillation energy. Based on the environmental state confidence, the adaptive inertia weight of the PSO algorithm is calculated in each iteration. The adaptive inertia weight is used to optimize the parameters of the SVM classification model. The output of the optimized SVM classification model is used to determine whether the state of the cabinet door from the start of closing to the stop of closing is normal or abnormal. The intelligent cabinet door is then controlled to prevent pinching based on the state. The uniformity of drag drift is determined based on the following method: for the first Alignment is performed on the current and velocity data sequences from the start of closure to the end of closure; drag drift consistency is calculated. ; For the first The degree of consistency of resistance drift during the entire closing process from the start to the end of the closing process. To standardize the total number of sampling points in the door travel space coordinate system after the alignment operation. For the first The current data sequence from the start of closing the secondary cabinet door to the stop of closing. A number, The first in the reference current data sequence A number, For the first The overall offset between the current data sequence from the start of closing of the secondary cabinet door to the stop of closing and the reference current data sequence is the value of the second current data sequence. The current data sequence from the start of the closing process to the stop of the closing process is subtracted element by element from the reference current data sequence, and then the average is calculated. To prevent constants with a denominator of zero, For the normalization operation, a nonlinear mapping function is used to compress any positive number into the range (0,1]. The method for extracting the proportion of high-frequency oscillation energy in a current data sequence is as follows: the sum of the squares of all values ​​in the current data sequence is taken as the total energy of the current data sequence; the current data sequence is decomposed into multiple scales using discrete wavelet transform technology to obtain the high-frequency detail coefficient sequence under each scale decomposition; the sum of the squares of all values ​​in the high-frequency detail coefficient sequence under the smallest scale decomposition is taken as the high-frequency oscillation energy; the ratio of high-frequency oscillation energy to total energy is determined as the proportion of high-frequency oscillation energy in the current data sequence. The confidence level of the environmental state during each closing process, from the start to the end of the closing process, satisfies the following relationship: ; For the first Confidence of environmental states during the initial closure process to the end of closure. For the first High-frequency oscillation energy of the current data sequence from the start of the closing process to the end of the closing process. For the first The total energy of the current data sequence from the start of the closing process to the end of the closing process. For the first The correlation between the changing trends of the current data sequence and the velocity data sequence during the initial closing process to the final closing process. It is the absolute value symbol.

2. The intelligent cabinet door anti-pinch control method according to claim 1, characterized in that, The correlation between the changing trends of the current data series and the velocity data series was determined based on the following method: First-order difference operations are performed on the current data sequence and the velocity data sequence respectively to obtain two first-order difference sequences. The Pearson correlation coefficient between the two first-order difference sequences is used as the correlation of the changing trends of the current data sequence and the velocity data sequence.

3. The intelligent cabinet door anti-pinch control method according to claim 1, characterized in that, The adaptive inertia weights of the PSO algorithm in each iteration satisfy the following relationship: ;in, In order to target the The PSO algorithm performs the parameter optimization process for the SVM classification model from the start of closure to the stop of closure. The adaptive inertia weights of all particles in the next iteration. and These are the maximum and minimum inertia weights preset for the PSO algorithm, respectively. For the first Confidence of environmental states during the process from the start of closure to the end of closure.

4. The intelligent cabinet door anti-pinch control method according to claim 1, characterized in that, The method for optimizing the parameters of an SVM classification model using adaptive inertia weights is as follows: A training sample library is constructed, including: multiple normal sample data under standard factory conditions, multiple abnormal sample data when the cabinet door traps people / goods, and multiple recent normal sample data where the resistance change is determined to be due to environmental factors and the cabinet door is in a normal closed state. Each normal / abnormal sample data in the training sample library contains current and velocity data sequences from the start to the stop of the cabinet door closure process. A fitness function for the PSO algorithm is defined to characterize the average cross-validation accuracy of the parameter combination represented by the particle on the training sample library. During the iterative optimization process of the PSO algorithm, adaptive inertial weights are used to update the particle state to search for the optimal parameter combination. When the maximum number of iterations is reached, an SVM classification model is constructed using the optimal parameter combination.

5. The intelligent cabinet door anti-pinch control method according to claim 1, characterized in that, The alignment operation is performed in the following way: Discrete-time integration is performed on the velocity data sequence to obtain the cumulative displacement of the gate at each moment from the start of closure to the stop of closure, thus constructing the correspondence between the cumulative displacement of the gate, current, and velocity at each moment. A standardized gate travel space coordinate system is set up and divided into multiple equally spaced standard spatial sampling points. Using the cumulative displacement of the gate as an index, a linear interpolation algorithm is applied to calculate the current and velocity corresponding to each standard spatial sampling point, so that the velocity data sequence and the current data sequence correspond one-to-one based on the standard spatial sampling points to achieve alignment.

6. The intelligent cabinet door anti-pinch control method according to claim 1, characterized in that, The optimized SVM classification model outputs the state of the cabinet door from the start of closing to the stop of closing, classifying it as normal or abnormal. Based on this state, the intelligent cabinet door is controlled to prevent pinching, including: Input the current and velocity data sequences of each cabinet door closing process into the optimized SVM classification model; if the SVM classification model outputs an abnormal classification result, it is determined that there is a risk of trapping people, the cabinet door is in an abnormal closing state, the motor is controlled to stop rotating and rotate in the opposite direction, so that the cabinet door rebounds; if the SVM classification model outputs a normal classification result, it is determined that the resistance change is due to environmental factors, and the cabinet door is in a normal closing state.

7. A smart cabinet door anti-pinch control system based on multi-source sensor fusion, characterized in that, The intelligent cabinet door anti-pinch control system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the intelligent cabinet door anti-pinch control method as described in any one of claims 1-6.