Electric tailgate anti-pinch control method and device based on Hall sensing and medium
Through the K-means clustering technology based on Hall sensing, the Hall pulse width data of the electric tailgate is clustered and the center of mass matrix is updated, which solves the problem that the electric tailgate anti-pinch function is susceptible to the environment and age, and achieves stable and efficient anti-pinch control in different environments.
Patent Information
- Application Number
- CN202411677284.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing electric tailgate anti-clip method is easily affected by the use environment and age, resulting in the failure of the anti-clip function, resulting in excessive clamping force or incorrect clamping.
The electric tailgate anti-pinch control method based on Hall sensing is adopted, and the Hall pulse width data is clustered and divided by K-means clustering, the center of mass matrix is obtained, and the real-time update is to reflect the real pulse width change characteristics, the clamping force is calculated and the clamping control is performed with the preset threshold.
The stability and adaptability of the anti-pinch function are achieved, and good performance can be maintained in different usage environments to avoid failure of the anti-pinch function caused by environmental changes.
Smart Images

Figure CN119754661A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric tailgates, and in particular to an electric tailgate anti-pinch control method, device and medium based on Hall sensor. Background Art
[0002] The electric tailgate is a widely used and highly regarded intelligent configuration of automobiles, and is loved by users for its simple and convenient operation. The anti-pinch function is a key indicator for the safety evaluation of the electric tailgate, which aims to prevent the electric tailgate from pinching and causing personal safety accidents.
[0003] There are two conventional methods for preventing electric tailgates from being pinched: the first is to collect the driving current of the strut motor and compare it with the set threshold to determine whether an obstacle is encountered. The second is to use a Hall sensor to detect the motor speed and compare it with the threshold set for normal speed to determine whether an obstacle is encountered. Both methods set fixed thresholds, but the driving characteristics of the electric tailgate are easily affected by the use environment and age. If the external environment and the set parameters do not match, the anti-pinch function will fail, the clamping force of the anti-pinch function will be too large, or false anti-pinch phenomenon will occur. Summary of the invention
[0004] Aiming at the problem that the anti-pinch function of the existing electric tailgate technology is easily affected by the use environment and age, resulting in failure of the anti-pinch function, the present invention proposes an electric tailgate anti-pinch control method based on Hall sensor, comprising the steps of:
[0005] S1: Obtain a clustered sample set consisting of Hall pulse width data at each opening and closing position during multiple normal uses of the electric tailgate in the current acquisition cycle;
[0006] S2: Cluster the cluster sample set by K-means clustering, and obtain a centroid matrix of the Hall pulse characteristics of the normal opening and closing process of the electric tailgate after clustering;
[0007] S3: Acquire the real-time Hall pulse width data during the current opening and closing process of the electric tailgate, calculate the distance with the centroid at the corresponding position in the centroid matrix, and retain the shortest distance;
[0008] S4: Obtain the shortest distance of each Hall pulse width data within a preset window size, and calculate the difference result between the shortest distances corresponding to the real-time Hall pulse width data at adjacent positions;
[0009] S5: Based on the difference result within the window, the clamping force is calculated by the approximate integration method and compared with the preset trigger threshold to perform tailgate anti-pinch control.
[0010] Furthermore, the normal use process refers to the process in which the electric tailgate performs a complete opening and closing action and encounters no obstacles during the opening and closing process.
[0011] In the step S2, obtaining the centroid matrix specifically includes the following steps:
[0012] S21: Based on the distance measurement method, the Hall pulse width data at the same opening and closing position in the cluster sample set is subjected to centroid iteration and cluster division under the target cluster number through K-means clustering;
[0013] S22: Calculate the centroid of the corresponding cluster based on the clustered data groups to obtain the centroid data column of each cluster at the current opening and closing position;
[0014] S23: Combining the centroid data columns at each opening and closing position into a centroid matrix.
[0015] Furthermore, in the step S22, the calculation of the centroid is expressed as the following formula:
[0016]
[0017] Where x is the Hall pulse width data, is the ith cluster of Hall pulse width data, is the number of samples in the ith cluster of Hall pulse width data, u i is the centroid of the ith cluster of Hall pulse width data sets.
[0018] Furthermore, in step S23, the centroid matrix is expressed as:
[0019]
[0020] In the formula, k is the number of target clusters, U k is the centroid matrix, C m is the centroid data column at the mth opening and closing position, is the centroid of the kth cluster in the centroid data column at the mth opening and closing position.
[0021] Furthermore, in the step S4, when the differential result is smaller than a preset threshold, the differential result is screened out.
[0022] Furthermore, in the step S5, the clamping force calculation is expressed as the following formula:
[0023] diff i =dist i -dist i+1
[0024]
[0025] In the formula, dist i is the shortest distance of the ith Hall pulse width data, diff iis the difference result of the shortest distance between the i-th Hall pulse width data and the i+1-th Hall pulse data, K d is the preset threshold, L+1 is the preset window size, and s is the clamping force.
[0026] Furthermore, in the step S5, when the clamping force is greater than a preset triggering pressure, the tailgate anti-pinch function is triggered.
[0027] The present invention also includes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the electric tailgate anti-pinch control method based on Hall sensor are implemented.
[0028] Also included is a device for processing data, comprising:
[0029] a memory having a computer program stored thereon;
[0030] A processor is used to execute the computer program in the memory to implement the steps of the electric tailgate anti-pinch control method based on Hall sensor.
[0031] Compared with the prior art, the present invention has at least the following beneficial effects:
[0032] (1) The electric tailgate anti-pinch control method, device and medium based on Hall sensor described in the present invention can automatically adjust the anti-pinch judgment threshold in real time according to different usage environments and conditions based on the environmental adaptive strategy of K-means clustering. This makes the anti-pinch function more stable and can maintain good performance in different usage environments;
[0033] (2) By continuously updating the centroid matrix, it is ensured that it can always reflect the actual pulse width variation characteristics, thereby avoiding the failure of the anti-pinch function due to environmental changes;
[0034] (3) The differential result is filtered by limiting and an appropriate window size is selected to eliminate false signals caused by tailgate acceleration or normal fluctuations, ensuring that the change in clamping force can be detected in time when the tailgate just contacts the obstacle, while avoiding premature or late judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A step diagram of an electric tailgate anti-pinch control method based on Hall sensor;
[0036] Figure 2 Schematic diagram of matrix update for clustering sample set. DETAILED DESCRIPTION
[0037] The following are specific embodiments of the present invention and the accompanying drawings to further describe the technical solution of the present invention, but the present invention is not limited to these embodiments.
[0038] Embodiment 1
[0039] In order to solve the problem that the existing electric tailgate cannot adapt to the changes in the external environment and cause the anti-pinch function to fail, such as Figure 1 As shown, the present invention proposes an electric tailgate anti-pinch control method based on Hall sensor, comprising the steps of:
[0040] S1: Obtain a clustered sample set consisting of Hall pulse width data at each opening and closing position during multiple normal uses of the electric tailgate in the current acquisition cycle;
[0041] S2: Cluster the cluster sample set by K-means clustering, and obtain a centroid matrix of the Hall pulse characteristics of the normal opening and closing process of the electric tailgate after clustering;
[0042] S3: Acquire the real-time Hall pulse width data during the current opening and closing process of the electric tailgate, calculate the distance with the centroid at the corresponding position in the centroid matrix, and retain the shortest distance;
[0043] S4: Obtain the shortest distance of each Hall pulse width data within a preset window size, and calculate the difference result between the shortest distances corresponding to the real-time Hall pulse width data at adjacent positions;
[0044] S5: Based on the difference result within the window, the clamping force is calculated by the approximate integration method and compared with the preset trigger threshold to perform tailgate anti-pinch control.
[0045] Among them, in step S2, obtaining the centroid matrix specifically includes the following steps:
[0046] S21: Based on the distance measurement method, the Hall pulse width data at the same opening and closing position in the cluster sample set is subjected to centroid iteration and cluster division under the target cluster number through K-means clustering;
[0047] S22: Calculate the centroid of the corresponding cluster based on the clustered data groups to obtain the centroid data column of each cluster at the current opening and closing position;
[0048] S23: Combining the centroid data columns at each opening and closing position into a centroid matrix.
[0049] It is not difficult to see from the above steps that the present invention also analyzes the anti-pinch control of the tailgate based on the Hall pulse data during the opening and closing process of the electric tailgate. However, unlike the ordinary anti-pinch control of the tailgate based on the Hall pulse, the basis for the anti-pinch judgment of the present invention is continuously updated according to the actual multiple usage situations within the current acquisition cycle. In order to achieve this, the present invention continuously obtains multiple sets of Hall pulse width data under pulse width changes during the opening and closing process of the electric tailgate without encountering any obstacles during the current acquisition cycle (for example, the Hall pulse width data of the most recent 50 times of the opening and closing of the electric tailgate). Here, we regard the situation in which the entire electric tailgate opening and closing process is executed and no obstacles are encountered during the entire opening and closing process as a normal situation. A set of Hall pulse width data generated in this process is called a set of normal data, denoted as N i The Hall pulse width data of the normal data opening and closing positions 1 to m of the i-th group can be expressed as:
[0050]
[0051] The cluster sample set consisting of multiple groups of normal data to be obtained is recorded as T n , then the cluster sample set T consisting of n groups of normal data n It is expressed as:
[0052]
[0053] T n The column vector is denoted as P j , expressed as the Hall pulse width of n groups of normal data at the opening and closing position j:
[0054]
[0055] Then, according to the obtained cluster sample set in the normal opening and closing process of the electric tailgate, the present invention first uses K-means clustering to cluster the column vector P at the same opening and closing position j in the cluster sample set. j Perform clustering and centroid iteration under the target number of clusters, so as to facilitate the classification of real-time Hall pulse width data. Among them, K-means clustering is to iteratively optimize the position of the cluster center (that is, the centroid) to minimize the sum of the squares of the distances from each data point to the center of its cluster (the distance between data points is obtained by Manhattan distance measurement or Euclidean distance measurement), thereby dividing the data set into several clusters (clusters), so that the data objects in the same cluster are more similar to each other, while the data objects in different clusters are less similar.
[0056] According to K-means clustering, the column vector P j The clustering results of , we then calculate the centroid of each data group (cluster) after clustering:
[0057]
[0058] Where x is the Hall pulse width data, is the ith cluster of Hall pulse width data, is the number of samples in the ith cluster of Hall pulse width data, u i is the centroid of the ith cluster of Hall pulse width data. The convergent centroid obtained by clustering can reflect the pulse width characteristics of the opening and closing position. j The integration of the centroid vectors obtained by clustering is C j , C j Represents the centroid vector at position j, C j Denoted as:
[0059]
[0060] In the formula, k is the value of the target cluster number, is the centroid of the kth cluster at the jth opening and closing position. Thus, the centroid matrix U k It is expressed as:
[0061]
[0062] In the formula, C m is the centroid data column at the mth opening and closing position, is the centroid of the kth cluster in the centroid data column at the mth opening and closing position.
[0063] Then, based on the centroid matrix obtained from the data collected in the most recent collection cycle, the real-time Hall pulse data during the current opening and closing process of the electric tailgate is obtained, and the distance is compared with each centroid at the corresponding position in the centroid matrix, and the shortest distance dist between the centroids closest to the real-time Hall pulse width data is retained. Here, we classify the real-time Hall pulse width data based on the centroid distance comparison to reduce the impact of the change in mechanism resistance on the Hall pulse width.
[0064] The calculation of the clamping force is based on the shortest distance between the front and rear positions, and the difference result is diff:
[0065] diff i =ist i -dist i+1 (7)
[0066] In the formula, dist i is the shortest distance of the ith Hall pulse width data, diff i It is the difference result of the shortest distance between the i-th Hall pulse width data and the i+1-th Hall pulse data.
[0067] Since the calculation result can only reflect the clamping force when encountering an obstacle, we use the differential result in the sliding window to perform approximate integration to calculate the clamping force. Because the resistance is small when the tailgate just touches the obstacle, the pulse width change is not obvious, so the actual sliding window size can be selected as 20 Hall pulse width signals.
[0068] When the diff value is negative, it indicates that the tailgate is accelerating. When the diff value is small, it indicates normal fluctuations during the operation of the tailgate. Neither of these two situations reflects that the tailgate encounters resistance and decelerates. Therefore, we also need to filter the difference result diff and discard the values less than the preset threshold K. d Finally, the difference result in the window after screening is approximated by integral calculation:
[0069]
[0070] Where L+1 is the preset window size and s is the clamping force.
[0071] Based on the final calculated clamping force, it is compared with the preset trigger threshold. When the clamping force is greater than the preset trigger threshold, it is determined that there is an obstacle and the corresponding anti-pinch control measures are executed. According to GB11552, the clamping force shall not exceed 100N. In order to increase safety, the clamping force is set to T=75N in this embodiment.
[0072] In the present invention, the purpose of the adaptive function is to eliminate the problem of anti-pinch function failure caused by the change of running resistance. When the running resistance changes, it will first affect the Hall pulse width signal, and then affect the calculated clamping force evaluation value. In the clamping force evaluation algorithm, the centroid matrix U k As a parameter that reflects the pulse width variation characteristics of the tailgate under normal opening and closing conditions, it directly affects the final clamping force evaluation value s. The core reason for the failure of the tailgate anti-pinch function is the centroid matrix U k It can no longer reflect the true pulse width variation characteristics, so the centroid matrix U can be continuously recalculated based on K-means clustering. k , so that it can always keep corresponding to the real situation.
[0073] For the cluster sample set we need to collect, we use a queue-like method to update it, such as Figure 2 As shown, T n In the matrix N1 to N n They are the relationship from the earliest to the latest data, and the latest Hall pulse width data N n+1 Replace the earliest N1 to update T n The effect of the matrix. And so on, the data after updating.
[0074] The present invention also includes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the electric tailgate anti-pinch control method based on Hall sensor are implemented.
[0075] Also included is a device for processing data, comprising:
[0076] a memory having a computer program stored thereon;
[0077] A processor is used to execute the computer program in the memory to implement the steps of the electric tailgate anti-pinch control method based on Hall sensor.
[0078] In summary, the electric tailgate anti-pinch control method, device and medium based on Hall sensor described in the present invention can automatically adjust the anti-pinch judgment threshold in real time according to different usage environments and conditions based on the environmental adaptive strategy of K-means clustering. This makes the anti-pinch function more stable and can maintain good performance in different usage environments.
[0079] By continuously updating the centroid matrix, we ensure that it can always reflect the true pulse width variation characteristics, thus avoiding the problem of anti-pinch function failure caused by environmental changes. The differential result is limited and filtered, and the appropriate window size is selected to exclude false signals caused by tailgate acceleration or normal fluctuations, ensuring that the change of clamping force can be detected in time when the tailgate just contacts the obstacle, while avoiding premature or late judgment.
[0080] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0081] In addition, in the present invention, descriptions such as "first", "second", "one", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0082] In the present invention, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0083] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
Claims
1. An electric tailgate anti-pinch control method based on Hall sensor, characterized in that: Includes steps: S1: Obtain a clustered sample set consisting of Hall pulse width data at each opening and closing position during multiple normal uses of the electric tailgate in the current acquisition cycle; S2: Cluster the cluster sample set by K-means clustering, and obtain a centroid matrix of the Hall pulse characteristics of the normal opening and closing process of the electric tailgate after clustering; S3: Acquire the real-time Hall pulse width data during the current opening and closing process of the electric tailgate, calculate the distance with the centroid at the corresponding position in the centroid matrix, and retain the shortest distance; S4: Obtain the shortest distance of each Hall pulse width data within a preset window size, and calculate the difference result between the shortest distances corresponding to the real-time Hall pulse width data at adjacent positions; S5: Based on the difference result within the window, the clamping force is calculated by the approximate integration method and compared with the preset trigger threshold to perform tailgate anti-pinch control.
2. The electric tailgate anti-pinch control method based on Hall sensor as claimed in claim 1, characterized in that: The normal use process refers to the process in which the electric tailgate completes the opening and closing action and encounters no obstacles during the opening and closing process.
3. The electric tailgate anti-pinch control method based on Hall sensor as claimed in claim 1, characterized in that: In the step S2, obtaining the centroid matrix specifically includes the following steps: S21: Based on the distance measurement method, the Hall pulse width data at the same opening and closing position in the cluster sample set is subjected to centroid iteration and cluster division under the target cluster number through K-means clustering; S22: Calculate the centroid of the corresponding cluster based on the clustered data groups to obtain the centroid data column of each cluster at the current opening and closing position; S23: Combining the centroid data columns at each opening and closing position into a centroid matrix.
4. The electric tailgate anti-pinch control method based on Hall sensor as claimed in claim 3 is characterized in that: In the step S22, the calculation of the centroid is expressed as the following formula: Where x is the Hall pulse width data, is the ith cluster of Hall pulse width data, is the number of samples in the ith cluster of Hall pulse width data, u i is the centroid of the i-th cluster of Hall pulse width data set.
5. The electric tailgate anti-pinch control method based on Hall sensor as claimed in claim 4, characterized in that: In the step S23, the centroid matrix is expressed as: In the formula, k is the number of target clusters, U k is the centroid matrix, C m is the centroid data column at the mth opening and closing position, is the centroid of the kth cluster in the centroid data column at the mth opening and closing position.
6. The electric tailgate anti-pinch control method based on Hall sensor as claimed in claim 1, characterized in that: In the step S4, when the difference result is less than a preset threshold, the difference result is screened out.
7. The electric tailgate anti-pinch control method based on Hall sensor as claimed in claim 6, characterized in that: In the step S5, the clamping force calculation is expressed as the following formula: diff i =dist i -dist i+1 In the formula, dist i is the shortest distance of the ith Hall pulse width data, diff i is the difference result of the shortest distance between the i-th Hall pulse width data and the i+1-th Hall pulse data, K d is the preset threshold, L+1 is the preset window size, and s is the clamping force.
8. The electric tailgate anti-pinch control method based on Hall sensor as claimed in claim 1, characterized in that: In step S5, when the clamping force is greater than the preset triggering pressure, the tailgate anti-pinch function is triggered.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the anti-pinch control method described in any one of claims 1 to 8 are implemented.
10. A device for processing data, characterized in that: include: a memory having a computer program stored thereon; A processor is used to execute the computer program in the memory to implement the steps of the anti-pinch control method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Anti-pinch control method with self-adaptability for electric window
CN102226368A
Anti-pinch detection method and device for vehicle body closing system
CN111997471A
Actuation method and actuating device for a vehicle part
DE102013022102A1
Pinching protection method for implementation in a motorized adjusting device for an adjustable vehicle part and associated adjusting device
DE102015226108A1
Actuating method and actuating apparatus for a vehicle part
US20150176322A1