Automobile door and window clamping detection method, device and equipment based on aging compensation and neural network and medium
By introducing aging compensation and neural network technology into the anti-clip system of automobile doors and windows, the problems of misoperation and insufficient adaptability in traditional technology are solved, and higher detection accuracy and adaptability to different working conditions are achieved, and production costs are reduced.
Patent Information
- Application Number
- CN202510418143.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-06-27
AI Technical Summary
The existing anti-clip technology of automobile doors and windows has malfunction problems, especially in different situations such as aging of glue strips, wear of mechanisms and changes in temperature and humidity, it is difficult to accurately detect the speed information of doors and windows in traditional threshold methods.
The car door and window clamping detection method based on aging compensation and neural network is adopted. By obtaining the time and frequency domain characteristics of the motor signal sample set, an aging compensation network, a gated convolution network and a classification network are established, predicting the predicted aging value and operation stage, and the total loss function is constructed and trained to optimize the clamping detection model.
It improves the accuracy of clamping detection and adaptability to different working conditions, reduces production costs, and avoids the design complexity and high costs of sensing modules.
Smart Images

Figure CN120217206A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automotive door and window design, and particularly to a method, device, equipment and medium for detecting clamping of automotive doors and windows based on aging compensation and neural network. Background Art
[0002] With the development of science and technology, automobiles are more and more widely used in people's daily lives, and people's requirements for driving safety and comfort are also constantly improving. Among them, automotive doors and windows are gradually favored by people, and the safety issues of door and window use are more emphasized. The anti-pinch function of electric doors and windows has become one of the basic functions of automotive door and window design.
[0003] At present, the implementation methods of door and window anti-pinch mainly include two categories: the anti-pinch method based on the Hall sensing module and the anti-pinch method based on the motor current signal; the anti-pinch method based on the Hall sensing module integrates a magnetic ring and a Hall sensing module in the motor and the control module to perform position detection and Hall pulse width measurement, so as to achieve the anti-pinch function. This method is the current mainstream door and window anti-pinch method, with simple principle, good reliability, but high hardware cost, complex structure and inconvenient installation; the anti-pinch method based on motor ripple uses the current ripple generated by the commutation of the motor winding of a brushed DC motor, and performs digital processing and counting on it to perform anti-pinch detection. The essence of the above two methods is to detect the rotational speed information of the door and window motor and reflect it on the pulse signal, and use the traditional threshold method for anti-pinch detection. However, during the actual operation of the door and window, its rotational speed information will change with different conditions such as rubber strip aging, mechanism wear, temperature and humidity. Using the traditional threshold method for anti-pinch detection will directly lead to misoperation of the anti-pinch control system.
[0004] At present, although machine learning methods such as the K-means clustering algorithm are used for anti-pinch detection, this method depends on selecting an appropriate number of clusters, resulting in inaccurate detection results. Summary of the Invention
[0005] Aiming at the problems existing in the existing automotive door and window anti-pinch technology, the present invention provides a method, device, equipment and medium for detecting clamping of automotive doors and windows based on aging compensation and neural network, in order to improve the accuracy of clamping detection and the adaptability to different working conditions of automobiles, and the design without a sensing module can effectively reduce production costs.
[0006] To achieve the above object, the technical solutions adopted by the present invention are as follows:
[0007] A method for detecting clamping of automotive doors and windows based on aging compensation and neural network according to the present invention is characterized in that it is carried out according to the following steps:
[0008] Step 1. Obtain the motor signal sample set, its class labels, and the true aging values of the automotive doors and windows during the period from startup to clamping an obstacle under Condition A; calculate the time-domain and frequency-domain characteristics of the motor signal sample set;
[0009] Step 2. Establish an automotive door and window clamping detection network, including: an aging compensation network, a gated convolutional network, and a classification network, and process the time-domain and frequency-domain characteristics to obtain the predicted aging values of the motor signal samples and the predicted probabilities of being in three operating stages, and pre-train the aging compensation network based on the predicted aging and true aging values;
[0010] Step 3. Construct a total loss function based on the class labels and predicted probabilities of the operating stages ;
[0011] Step 4. Use the Adam optimizer to train the pre-trained aging compensation model, gated convolutional network, and classification network, and calculate to update the network parameters until convergence is achieved, thereby obtaining an optimal automotive door and window clamping detection model for predicting each segment in the motor signal samples during the operation of the automotive doors and windows to obtain the aging values and operating stages of the automotive doors and windows.
[0012] The characteristics of the automotive door and window clamping detection method based on aging compensation and neural network according to the present invention also lie in that Step 1 includes:
[0013] Step 1.1. Obtain the motor current ripple period signal and the motor current DC component signal, and form a motor signal sample set , ; where represents the motor signal sample set of the automotive doors and windows under the th condition; and , represents the th motor signal sample in , represents the th motor current ripple period sequence in , represents the th motor current ripple period segment in represents the th motor current DC component sequence in ; represents the th motor current DC component segment in ; A represents the total number of conditions for the operation of the automotive doors and windows, C represents the total number of samples under each condition; from Form the nth motor signal segment sample ;
[0014] Set the class label of the operating stage to be , and ; If , it means is in the normal operating stage of the vehicle door and window in the nth segment under the th working condition; If , it means is in the starting stage of the vehicle door and window in the nth segment under the th working condition; If , it means is in the clamping stage of the vehicle door and window in the nth segment under the th working condition; Perform one-hot encoding on to obtain the one-hot encoding vector , represents any category of , represents the value of
[0015] Set the true aging value of , and ; If , it means is in the non-aging state of the vehicle door and window in the nth segment under the th working condition; If , it means is in the mild aging state of the vehicle door and window in the nth segment under the th working condition; If , it means is in the moderate aging state of the vehicle door and window in the nth segment under the th working condition; If , it means is in the severe aging state of the vehicle door and window in the nth segment under the th working condition; Among them, respectively represent 3 aging thresholds;
[0016] Step 1.2. Calculate the time domain and frequency domain features of to obtain the time-frequency domain feature vector of the nth motor signal segment sample in the cth motor signal sample of the vehicle door and window under the th working condition; Among them, The e-th time-domain feature of the n-th motor signal segment in the c-th motor signal sample under the operating conditions of automotive doors and windows denotes the e-th frequency-domain feature of the n-th motor signal segment in the c-th motor signal sample under the operating conditions of automotive doors and windows; E represents the total number of frequency-domain features.
[0017] Further, step 2 includes:
[0018] Step 2.1. The aging compensation network consists of an aging prediction module and an aging compensation module, and processes to obtain the predicted aging value of and the compensated time-frequency domain feature vector ;
[0019] Step 2.2. Use Equation (3) to construct the MSE Loss function :
[0020] (3)
[0021] Step 2.3. Use the gradient descent method to train the aging compensation network and calculate the MSE Loss function to update the network parameters until converges, thereby obtaining the pre-trained aging compensation model, and processes to obtain the time-frequency domain feature vector corresponding to the optimal pre-compensated motor signal segment sample ; ;
[0022] Step 2.4. The gated convolutional network consists of a depthwise separable convolution module and a gating module, and processes to obtain the gated time-frequency domain feature map of ;
[0023] Step 2.5. The classification network contains two fully connected layers and a Softmax activation function, and processes to obtain the predicted probability of being in the 3-class operating stage , where represents the probability that the classification network predicts as class v.
[0024] Further, step 2.1 is carried out as follows:
[0025] Step 2.1.1. The aging prediction module uses Equation (1) to obtain Predicted aging value :
[0026] (1)
[0027] In formula (1), respectively represent 2E regression coefficients, represents the e-th regression coefficient, is the intercept;
[0028] Step 2.1.2. The aging compensation module obtains the compensated motor signal segment sample :
[0029] (2)
[0030] Step 2.1.3. Calculate the time-frequency characteristics of to obtain the time-frequency domain feature vector of the n-th compensated motor signal segment sample in the c-th motor signal sample of the vehicle door and window under the th working condition; where represents the e-th time domain feature of the n-th compensated motor signal segment in the c-th motor signal sample under the th type of vehicle door and window operating condition, represents the e-th frequency domain feature of the n-th compensated motor signal segment in the c-th motor signal sample under the th type of vehicle door and window operating condition.
[0031] Furthermore, Step 2.2 is carried out as follows:
[0032] Step 2.2.1. The depthwise separable convolution module includes K parallel network units, and each network unit includes: two convolutional layers, an activation layer, and a normalization layer, and the convolutional kernel sizes of different network units are different;
[0033] Input into the K parallel network units of the depthwise separable convolution module for processing respectively, and the corresponding output is K time-frequency domain two-dimensional feature maps of different scales, where represents the time-frequency domain two-dimensional feature map of the k-th scale;
[0034] Step 2.2.2. The gating module uses the gating segmentation layer to perform gating segmentation on to obtain K segmentation feature maps and the gating value , and then uses formula (4) to obtain the gated time-frequency domain feature map :
[0035] (4)
[0036] In formula (4), tanh represents the activation layer, represents the sigmoid activation function; represents the k-th segmentation feature map, represents the k-th gating value.
[0037] Furthermore, in step 3, the total loss function is constructed using formula (5) :
[0038] (5)
[0039] In formula (5), represents the weighted Focal Loss function, is the confidence penalty term, represents the confidence penalty coefficient, and there is:
[0040] (6)
[0041] In formula (6), is the weighting coefficient, is the coefficient used to adjust the balance of easy and difficult classification samples;
[0042] (7).
[0043] The characteristics of an automotive door and window clamping detection device based on aging compensation and neural network according to the present invention are as follows: including:
[0044] A data acquisition and processing module, which is used to obtain the motor signal sample set, its category label, and the true aging value of the automotive door and window during the period from startup to clamping an obstacle under working condition A; calculate the time domain and frequency domain characteristics of the motor signal sample set;
[0045] An automotive door and window clamping detection network module, including: an aging compensation network, a gated convolutional network, and a classification network, which are used to process the time domain and frequency domain characteristics to obtain the predicted aging value of the motor signal sample and the predicted probability of being in three operating stages;
[0046] A network training module, which constructs a total loss function based on the category label and predicted probability of the operating stage, and is used to train the network to obtain an optimal automotive door and window clamping detection model, so as to predict each segment in the motor signal sample during the operation of the automotive door and window, and obtain the aging value and the operating stage of the automotive door and window.
[0047] The characteristics of an automotive door and window clamping detection device based on aging compensation and neural network according to the present invention also lie in that the data acquisition and processing module includes: a data acquisition unit and a data processing unit;
[0048] The data acquisition unit is used to obtain the motor current ripple period signal and the motor current DC component signal, and form a motor signal sample set , ; where, represents the motor signal sample set of the automotive door and window under the th working condition; and , represents the cth motor signal sample in ; and represents the cth motor current ripple period sequence in , represents the nth motor current ripple period segment in ; N represents the total number of segments, represents the cth motor current DC component sequence in ; and represents the nth motor current DC component segment in ; A represents the total number of working conditions of the automotive door and window operation, C represents the total number of samples under each working condition; and
[0049] set the class label of the operation stage as , and ; if , it means is in the normal operation stage of the automotive door and window under the th working condition at the nth segment; if , it means is in the starting stage of the automotive door and window under the th working condition at the nth segment; if , it means is in the clamping stage of the automotive door and window under the th working condition at the nth segment; perform one-hot encoding on to obtain the one-hot encoding vector , represents any class of ; represents
[0050] Set true aging value and ; if it means The vehicle door and window is not aged in the nth segment under the th working condition; if it means The vehicle door and window is slightly aged in the nth segment under the th working condition; if it means The vehicle door and window is moderately aged in the nth segment under the th working condition; if it means The vehicle door and window is severely aged in the nth segment under the th working condition; where represent 3 aging thresholds respectively;
[0051] The data processing unit is used to calculate the time domain and frequency domain characteristics of to obtain the time-frequency domain feature vector of the nth motor signal segment sample in the cth motor signal sample of the vehicle door and window under the th working condition ; where represents the e-th time domain feature of the nth motor signal segment in the cth motor signal sample under the th type of vehicle door and window operating condition, represents the e-th frequency domain feature of the nth motor signal segment in the cth motor signal sample under the th type of vehicle door and window operating condition; E represents the total number of frequency domain features.
[0052] Furthermore, the aging compensation network in the vehicle door and window clamping detection network module is composed of an aging prediction module and an aging compensation module, and processes to obtain the predicted aging value of and the compensated time-frequency domain feature vector , thereby constructing the MSE Loss function using Equation (3) , and training the aging compensation network using the gradient descent method, and calculating the MSE Loss function to update the network parameters until converges, thereby obtaining the pre-trained aging compensation model, and processing to obtain the time-frequency domain feature vector corresponding to the optimally pre-compensated motor signal segment sample ;
[0053] (3)
[0054] The gated convolutional network in the automotive door and window clamping detection network module is composed of a depthwise separable convolutional module and a gating module, and processes to obtain the gated time-frequency domain feature map of ;
[0055] The classification network in the automotive door and window clamping detection network module includes two fully connected layers and a Softmax activation function, and processes to obtain the predicted probability of being in the 3-class operation stage , where represents the probability that the classification network predicts as class v.
[0056] Furthermore, the aging prediction module obtains the predicted aging value of using Equation (1):
[0057] (1)
[0058] In Equation (1), respectively represent 2E regression coefficients, represents the e-th regression coefficient, is the intercept;
[0059] The aging compensation module obtains the compensated motor signal segment sample using Equation (2), and then calculates the time-frequency features of to obtain the time-frequency domain feature vector of the n-th compensated motor signal segment sample in the c-th motor signal sample of the automotive door and window under the th working condition; where represents the e-th time domain feature of the n-th compensated motor signal segment in the c-th motor signal sample of the th class of automotive door and window operating conditions, represents the e-th frequency domain feature of the n-th compensated motor signal segment in the c-th motor signal sample of the th class of automotive door and window operating conditions;
[0060] (2).
[0061] Furthermore, the depthwise separable convolution module comprises K parallel network units, each network unit comprises: two convolution layers and one pooling layer, and the convolution kernel sizes of different network units are different;
[0062] Will The K parallel network units of the depthwise separable convolution module are input for processing, and K two-dimensional feature maps of different scales in the time-frequency domain are output accordingly. ,in, Represents the two-dimensional feature map in the time-frequency domain of the kth scale;
[0063] The gating module uses the gating segmentation layer to Perform gated segmentation to obtain K segmentation feature maps and gate value , and then use formula (4) to get Gated time-frequency domain feature map :
[0064] (4)
[0065] In formula (4), tanh represents the activation layer, Represents the sigmoid activation function; represents the kth segmentation feature map, represents the kth gate value.
[0066] Furthermore, the network training module uses formula (3) to construct the total loss function :
[0067] (5)
[0068] In formula (5), represents the weighted Focal Loss loss function, is the confidence penalty term, represents the confidence penalty coefficient, and:
[0069] (6)
[0070] In formula (6), is the weighting coefficient, It is a coefficient used to adjust the balance of difficult and easy classification samples;
[0071] (7).
[0072] An electronic device according to the present invention includes a memory and a processor, characterized in that the memory is used to store a program that supports the processor to execute the method for detecting clamping of automobile doors and windows, and the processor is configured to execute the program stored in the memory.
[0073] A computer-readable storage medium according to the present invention, characterized in that when the computer program stored on the computer-readable storage medium is run by a processor, it executes the steps of the method for detecting clamping of automobile doors and windows.
[0074] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0075] 1. Compared with the traditional simple threshold detection method, the present invention introduces artificial intelligence technology, uses data preprocessing technology to obtain the time-frequency domain characteristics of the parameters for detecting clamping of automobile doors and windows, designs an aging compensation model to perform aging compensation on the original signal, and establishes a neural network model to learn the characteristics of the automobile doors and windows in the normal operation stage, start-up stage, and clamping stage under different working conditions, optimizing the defect that the existing clamping detection method has poor anti-interference ability with a single detection threshold, improving the adaptability and adjustment ability of the anti-pinch system of automobile doors and windows to complex working conditions, and having great application prospects.
[0076] 2. The present invention uses the motor current and current ripple signals as the basis for clamping detection, without the need to use various displacement and speed sensing modules, which can effectively reduce production costs and is easy to industrialize. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 is the overall flowchart of the present invention;
[0078] Figure 2 is the overall framework diagram of the clamping detection network of the present invention;
[0079] Figure 3 is the structural diagram of the aging compensation network of the present invention;
[0080] Figure 4 is the structural diagram of the gated convolutional network of the present invention;
[0081] Figure 5 is the structural diagram of the classification network of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0082] In this embodiment, as Figure 1 shown, a method for detecting clamping of automobile doors and windows based on aging compensation and neural network is carried out according to the following steps:
[0083] Step 1. Obtain the motor current ripple period signal and the motor current DC component signal during the period from the start to the clamping of an obstacle of the automobile doors and windows under working condition A, and form a motor signal sample set , ; Among them, represents the motor signal sample set of the vehicle door and window under the th working condition; and , represents the cth motor signal sample in ; and represents the cth motor current ripple period sequence in , represents the nth motor current ripple period segment in ; N represents the total number of segments. represents ; represents the nth motor current DC component segment in ; A represents the total number of working conditions of the vehicle door and window operation, and C represents the total number of samples under each working condition; and constitute the nth motor signal segment sample
[0084] Set the class label of the operation stage to , and ; If , it means is in the normal operation stage at the nth segment of the vehicle door and window under the th working condition; if , it means is in the starting stage at the nth segment of the vehicle door and window under the th working condition; if , it means is in the clamping stage at the nth segment of the vehicle door and window under the th working condition; is one-hot encoded to obtain the one-hot encoded vector , represents any class of ; represents
[0085] Set the true aging value of , and ; If , it means is without aging at the nth segment of the vehicle door and window under the th working condition; if , indicating at the th working condition, the automobile doors and windows are slightly aged in the nth segment; if , indicating at the th working condition, the automobile doors and windows are moderately aged in the nth segment; if , indicating at the th working condition, the automobile doors and windows are severely aged in the nth segment; where respectively represent 3 aging thresholds;
[0086] In specific implementation, in step 1, the motor current ripple period signal and the motor current DC component signal under 32 working conditions are collected. Different working conditions are realized by changing the supply voltage, working temperature, rail friction, bumpiness and aging degree when the automobile doors and windows operate; among them, the automobile doors and windows include automobile windows and automobile sunroofs.
[0087] Step 2. Calculate the time domain and frequency domain characteristics of the motor signal segment sample , and obtain the time-frequency domain characteristic vector of the nth motor signal segment sample in the cth motor signal sample of the automobile doors and windows under the th working condition ; where represents the e-th time domain characteristic of the nth motor signal segment in the cth motor signal sample under the th type of automobile doors and windows operating condition, represents the e-th frequency domain characteristic of the nth motor signal segment in the cth motor signal sample under the th type of automobile doors and windows operating condition; E represents the total number of frequency domain characteristics; in specific implementation, the calculated time domain characteristics include mean, variance, root mean square amplitude, skewness, impulse index, waveform index, standard deviation, peak-to-peak value, kurtosis, margin factor and peak factor, and the calculated frequency domain characteristics include spectral center frequency, spectral root mean square frequency, spectral standard deviation, frequency skewness, frequency kurtosis, main frequency, frequency centroid, high-frequency energy ratio, frequency variance, mean square frequency and spectral entropy, a total of 22 time domain and frequency domain characteristics.
[0088] Step 3. Establish an automobile door and window clamping detection network. The overall framework diagram is as Figure 2 shown, including three parts: an aging compensation network, a gated convolution network and a classification network;
[0089] Step 3.1. The aging compensation network, as Figure 3 shown, is composed of an aging prediction module and an aging compensation module, and processes to obtain the compensated time-frequency domain characteristic vector ;
[0090] Step 3.1.1. Obtain the predicted aging value of the aging prediction module for using Equation (1): :
[0091] (1)
[0092] In Equation (1), respectively represent 2E regression coefficients, represents the e-th regression coefficient, is the intercept.
[0093] Step 3.1.2. The aging compensation module obtains the compensated motor signal segment sample using Equation (2): :
[0094] (2)
[0095] Step 3.1.3. Calculate the time-frequency characteristics of to obtain the time-frequency domain feature vector of the n-th compensated motor signal segment sample in the c-th motor signal sample of the automotive window in the th operating condition; where represents the e-th time domain feature of the n-th compensated motor signal segment in the c-th motor signal sample of the th type of automotive window operating condition, and represents the e-th frequency domain feature of the n-th compensated motor signal segment in the c-th motor signal sample of the th type of automotive window operating condition.
[0096] Step 3.2. Construct the MSE Loss function using Equation (3): :
[0097] (3)
[0098] Step 3.3. Train the aging compensation network using the gradient descent method and calculate to update the network parameters until converges, thereby obtaining the pre-trained aging compensation model and processing to obtain the time-frequency domain feature vector corresponding to the optimal pre-compensated motor signal segment sample .
[0099] Step 3.3. The gated convolutional network consists of a depthwise separable convolutional module and a gating module, and Processed to obtain Gated time-frequency domain feature map ;
[0100] Step 3.3.1. The depthwise separable convolution module contains K parallel network units, and each network unit includes: two convolutional layers, one activation layer, and one normalization layer. The convolutional kernel sizes of different network units are different, and the structure is as Figure 4 shown;
[0101] Input into the K parallel network units of the depthwise separable convolution module for processing respectively, and the corresponding output is K time-frequency domain two-dimensional feature maps with different scales , where represents the time-frequency domain two-dimensional feature map of the k-th scale; In specific implementation, the depthwise separable convolution module contains 3 parallel network units, and each network unit consists of 1 Depthwise convolutional layer, 1 Pointwise convolutional layer, 1 RELU activation layer, and 1 batch normalization layer. The Depthwise convolutional kernel sizes of the 3 network units are: 3×1, 5×1, 7×1.
[0102] Step 3.3.2. The gating module uses the gating segmentation layer to perform gating segmentation on to obtain K segmentation feature maps and gating values , and then use Equation (4) to obtain Gated time-frequency domain feature map :
[0103] (4)
[0104] In Equation (4), tanh represents the activation layer, represents the sigmoid activation function; represents the k-th segmentation feature map, represents the k-th gating value.
[0105] Step 3.4. The classification network contains two fully connected layers and a Softmax activation function, and the structure is as Figure 5 shown, and processes to obtain The prediction probability of being in the 3-class operation stage , where represents the probability that the classification network predicts as class v.
[0106] Step 4. Construct the total loss function ;
[0107] Step 4.1. Construct the total loss function using Equation (3) :
[0108] (5)
[0109] In Equation (5), represents the weighted Focal Loss function, is the confidence penalty term, represents the confidence penalty coefficient, and there is:
[0110] (6)
[0111] In Equation (6), is the weighting coefficient, is the coefficient used to adjust the balance of easy and difficult classification samples;
[0112] (7)
[0113] Step 5. Use the Adam optimizer to train the pre-trained aging compensation model, gated convolutional network, and classification network, and calculate to update the network parameters until converges, so as to obtain the optimal automotive window and door clamping detection model, which is used to predict each segment in the motor signal samples during the operation of the automotive window and door, and obtain the aging value and the operating stage of the automotive window and door.
[0114] In this embodiment, an automotive window and door clamping detection device based on aging compensation and neural network includes:
[0115] A data acquisition and processing module, which is used to obtain the motor signal sample set, its class label, and the true aging value of the automotive window and door from startup to clamping an obstacle under Condition A; calculate the time domain and frequency domain features of the motor signal sample set;
[0116] Among them, the data acquisition and processing module includes: a data acquisition unit and a data processing unit;
[0117] The data acquisition unit is used to obtain the motor current ripple period signal and the motor current DC component signal, and form the motor signal sample set , ; among them, represents the motor signal sample set of the automotive window and door under the th condition; and , represents the c-th motor signal sample in; and , represents the c-th motor current ripple period sequence in, and , represents the nth motor current ripple period segment in represents the cth motor current DC component sequence in ; represents the nth motor current DC component segment in and constitute the nth motor signal segment sample .
[0118] Set the class label of the operating stage of as ; if it represents that is in the normal operating stage at the nth segment of the automotive window in the th working condition; if it represents that is in the starting stage at the nth segment of the automotive window in the th working condition; if it represents that is in the clamping stage at the nth segment of the automotive window in the th working condition; perform one-hot encoding on to obtain the one-hot encoded vector , represents any class of represents the value on the vth class;
[0119] Set the true aging value of as ; if it represents that is in the non-aging state at the nth segment of the automotive window in the th working condition; if it represents that is in the mild aging state at the nth segment of the automotive window in the th working condition; if it represents that is in the moderate aging state at the nth segment of the automotive window in the th working condition; if it represents that is in the severe aging state at the nth segment of the automotive window in the th working condition; among them, respectively represent three aging thresholds.
[0120] The data processing unit is used to calculate the time-domain and frequency-domain characteristics of to obtain the time-frequency domain feature vector of the nth motor signal segment sample in the cth motor signal sample of the vehicle door and window under the th working condition; where represents the e-th time-domain characteristic of the nth motor signal segment in the cth motor signal sample under the th type of vehicle door and window operating condition, represents the e-th frequency-domain characteristic of the nth motor signal segment in the cth motor signal sample under the th type of vehicle door and window operating condition; E represents the total number of frequency-domain characteristics.
[0121] The vehicle door and window clamping detection network module includes: an aging compensation network, a gated convolutional network, and a classification network, which are used to process the time-domain and frequency-domain characteristics to obtain the predicted aging value of the motor signal sample and the predicted probabilities in three operating stages;
[0122] Among them, the aging compensation network in the vehicle door and window clamping detection network module is composed of an aging prediction module and an aging compensation module, and processes to obtain the predicted aging value of and the compensated time-frequency domain feature vector , thereby constructing the MSE Loss loss function using Equation (3) , and training the aging compensation network using the gradient descent method, and calculating the MSE Loss loss function to update the network parameters until converges, thereby obtaining the pre-trained aging compensation model, and processing to obtain the time-frequency domain feature vector corresponding to the optimally pre-compensated motor signal segment sample ; ;
[0123] (3)
[0124] The gated convolutional network in the vehicle door and window clamping detection network module is composed of a depthwise separable convolution module and a gating module, and processes to obtain the gated time-frequency domain feature map of ;
[0125] The classification network in the automotive door and window clamping detection network module includes two fully connected layers and a Softmax activation function, and processes to obtain the predicted probability of being in the three operating stages , where represents the probability that the classification network predicts as the category v.
[0126] The aging prediction module uses Equation (1) to obtain the predicted aging value of :
[0127] (1)
[0128] In Equation (1), respectively represent 2E regression coefficients, represents the e-th regression coefficient, is the intercept.
[0129] The aging compensation module uses Equation (2) to obtain the compensated motor signal segment sample , and thus calculates the time-frequency characteristics of to obtain the time-frequency domain feature vector of the n-th compensated motor signal segment sample in the c-th motor signal sample of the automotive door and window under the k-th operating condition ; where represents the e-th time domain feature of the n-th compensated motor signal segment in the c-th motor signal sample under the k-th type of automotive door and window operating condition, represents the e-th frequency domain feature of the n-th compensated motor signal segment in the c-th motor signal sample under the k-th type of automotive door and window operating condition;
[0130] (2).
[0131] The depthwise separable convolution module includes K parallel network units, and each network unit includes: two convolutional layers and a pooling layer, and the convolutional kernel sizes of different network units are different;
[0132] Input into the K parallel network units of the depthwise separable convolution module for processing respectively, and the corresponding output is K time-frequency domain two-dimensional feature maps with different scales , where represents the two-dimensional time-frequency domain feature map of the k-th scale.
[0133] The gating module uses the gating segmentation layer for Perform gated segmentation to obtain K segmented feature maps and the gating values , and then use Equation (4) to obtain the gated time-frequency domain feature maps :
[0134] (4)
[0135] In Equation (4), tanh represents the activation layer, represents the sigmoid activation function; represents the k-th segmented feature map, represents the k-th gating value.
[0136] The network training module constructs the total loss function based on the class labels and prediction probabilities during the running phase , and is used to train the network to obtain the optimal automotive window clamping detection model, so as to predict each segment in the motor signal samples during the operation of the automotive window, and obtain the aging value and the running phase of the automotive window.
[0137] Among them, the network training module constructs the total loss function using Equation (3) :
[0138] (5)
[0139] In Equation (5), represents the weighted Focal Loss function, is the confidence penalty term, represents the confidence penalty coefficient, and there is:
[0140] (6)
[0141] In Equation (6), is the weighting coefficient, is the coefficient used to adjust the balance of easy and difficult classification samples;
[0142]
[0143] In this embodiment, an electronic device includes a memory and a processor. The memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0144] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium. When the computer program is run by the processor, it executes the steps of the above method.
[0145] To illustrate the performance of the above-mentioned solution of the present invention, the clamping detection performance of several typical signal classification schemes is compared with the performance obtained by the above-mentioned solution of the present invention, as shown in Table 1: including the traditional methods Support Vector Machine (SVM) and K-Nearest Neighbor Algorithm (KNN), as well as the deep learning methods Long Short-Term Memory Neural Network (LSTM), One-Dimensional Convolutional Neural Network (1DCNN), and Wavelet Transform (WT) combined with Two-Dimensional Convolutional Neural Network (2D CNN).
[0146] Table 1. Clamping detection performance of different methods on the dataset obtained from the same automotive door and window
[0147]
[0148] The comparison metrics are the accuracy and F1 score of clamping detection. All comparison schemes and the present invention use the dataset composed of the motor current ripple period signal and the DC component signal of the motor current during the operation of the same automotive door and window, and adopt the individual independent verification scheme. Individual independence means that the test data does not participate in the model training. The comparison results between the present invention and other schemes are shown in Table 1. On the same dataset, the F1 score of the automotive door and window clamping detection method based on aging compensation and neural network proposed by the present invention is 98.20%, and the accuracy is 98.81%, and the performance is better than all the above-mentioned comparison methods.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions claimed by the present invention.
Claims
1. A method for detecting automobile door and window clamping based on aging compensation and neural network, characterized in that: The steps are as follows: Step 1. Obtain a motor signal sample set of the automobile door and window from starting to clamping the obstacle under working condition A, as well as its category label and true aging value; Calculate the time domain and frequency domain features of the motor signal sample set; Step 2. Establish an automobile door and window clamping detection network, including: aging compensation network, gated convolution network and classification network, and process the time domain and frequency domain features to obtain the predicted aging value of the motor signal sample and the predicted probability of being in three types of operation stages, and pre-train the aging compensation network based on the predicted aging and true aging values; Step 3. Construct the total loss function based on the class labels and predicted probabilities of the running phase ; Step 4. Use the Adam optimizer to train the pre-trained aging compensation model, gated convolutional network, and classification network, and calculate To update the network parameters until The optimal automobile door and window clamping detection model is obtained until convergence, which is used to predict each segment in the motor signal sample when the automobile door and window are running, and obtain the aging value and operation stage of the automobile door and window.
2. The automobile door and window clamping detection method based on aging compensation and neural network according to claim 1 is characterized in that: The step 1 comprises: Step 1.
1. Obtain the motor current ripple period signal and the motor current DC component signal, and form a motor signal sample set , ;in, Indicates Motor signal sample sets of automobile doors and windows under various working conditions; and , express The cth motor signal sample in ; and , express The cth motor current ripple cycle sequence in , express The nth motor current ripple cycle segment in , N represents the total number of segments, express The cth motor current DC component sequence in ; express The nth motor current DC component fragment in ; A represents the total number of operating conditions of automobile doors and windows, and C represents the total number of samples under each operating condition; and Composed of the nth motor signal fragment sample ; set up The category label of the running stage is ,and ;like ,express In the Under this working condition, the automobile doors and windows are in the normal operation stage in the nth segment; if ,express In the Under the working condition, the car doors and windows are in the starting stage in the nth segment; if ,express In the Under the working condition, the automobile door and window are in the clamping stage at the nth segment; Perform one-hot encoding to obtain a one-hot encoding vector , express of any category, express The value in the vth category; set up The actual aging value ,and ;like ,express In the Under this condition, the car doors and windows have no aging in the nth segment; if ,express In the Under the working condition, the car doors and windows are slightly aged in the nth segment; if ,express In the Under the working condition, the car doors and windows are moderately aged in the nth segment; if ,express In the Under the working conditions, the car doors and windows are severely aged in the nth segment; among them, Respectively represent three aging thresholds; Step 1.
2. Calculation The time domain and frequency domain characteristics of The time-frequency domain feature vector of the nth motor signal fragment sample in the cth motor signal sample of the car door and window under the working condition ;in, Indicates The e-th time domain feature of the n-th motor signal segment in the c-th motor signal sample under the operating conditions of automobile doors and windows, Indicates The e-th frequency domain feature of the n-th motor signal segment in the c-th motor signal sample under the operating condition of automobile doors and windows; E represents the total number of frequency domain features.
3. The automobile door and window clamping detection method based on aging compensation and neural network according to claim 2 is characterized in that: The step 2 comprises: Step 2.
1. The aging compensation network consists of an aging prediction module and an aging compensation module. Process and obtain Predicted aging value and the compensated time-frequency domain feature vector ; Step 2.
2. Use formula (3) to construct the MSE Loss function : (3) Step 2.
3. Use the gradient descent method to train the aging compensation network and calculate the MSE Loss function To update the network parameters until Until convergence, the pre-trained aging compensation model is obtained, and Processing is performed to obtain the optimal pre-compensated motor signal fragment sample The corresponding time-frequency domain feature vector ; Step 2.
4. The gated convolutional network consists of a depth-separable convolutional module and a gating module. Process and obtain Gated time-frequency domain feature map ; Step 2.
5. The classification network contains two fully connected layers and a Softmax activation function. Process and obtain Predicted probability of being in the 3 operating stages ,in, Represents the classification network pair The probability of predicting class v.
4. The automobile door and window clamping detection method based on aging compensation and neural network according to claim 3 is characterized in that: Step 2.1 is performed as follows: Step 2.1.
1. The aging prediction module uses formula (1) to obtain Predicted aging value : (1) In formula (1), Represent 2E regression coefficients respectively, represents the e-th regression coefficient, is the intercept; Step 2.1.
2. The aging compensation module uses formula (2) to obtain Sample segment of the motor signal after compensation : (2) Step 2.1.
3. Calculation The time-frequency characteristics of The time-frequency domain feature vector of the nth compensated motor signal fragment sample in the cth motor signal sample of the car door and window under the working condition ;in, Indicates The e-th time domain feature of the n-th compensated motor signal segment in the c-th motor signal sample under the operating conditions of automobile doors and windows, Indicates The e-th frequency domain feature of the n-th compensated motor signal segment in the c-th motor signal sample under the operating conditions of automobile doors and windows.
5. The automobile door and window clamping detection method based on aging compensation and neural network according to claim 4 is characterized in that: Step 2.2 is performed as follows: Step 2.2.
1. The depthwise separable convolution module includes K parallel network units, each of which includes: two convolutional layers, an activation layer and a normalization layer, and the convolution kernel sizes of different network units are different; Will The K parallel network units of the depthwise separable convolution module are input for processing, and K two-dimensional feature maps of different scales in the time-frequency domain are output accordingly. ,in, Represents the two-dimensional feature map in the time-frequency domain of the kth scale; Step 2.2.
2. The gated module uses the gated segmentation layer to Perform gated segmentation to obtain K segmentation feature maps and gate value , and then use formula (4) to get Gated time-frequency domain feature map : (4) In formula (4), tanh represents the activation layer, Represents the sigmoid activation function; represents the kth segmentation feature map, represents the kth gate value.
6. The automobile door and window clamping detection method based on aging compensation and neural network according to claim 5 is characterized in that: In step 3, the total loss function is constructed using formula (5): : (5) In formula (5), represents the weighted Focal Loss loss function, is the confidence penalty term, represents the confidence penalty coefficient, and: (6) In formula (6), is the weighting coefficient, It is a coefficient used to adjust the balance of difficult and easy classification samples; (7)。 7. A car door and window clamping detection device based on aging compensation and neural network, characterized in that: include: The data acquisition and processing module is used to obtain the motor signal sample set, category label and true aging value of the automobile door and window from starting to clamping the obstacle under the working condition A; Calculate the time domain and frequency domain features of the motor signal sample set; Automobile door and window clamping detection network module, including: aging compensation network, gated convolution network and classification network, which are used to process time domain and frequency domain features to obtain the predicted aging value of motor signal samples and the predicted probability of being in three types of operation stages; The network training module constructs a total loss function based on the category labels and predicted probabilities in the running phase. , which is used to train the network and obtain the optimal automobile door and window clamping detection model to predict each segment in the motor signal sample when the automobile door and window are running, and obtain the aging value and operation stage of the automobile door and window.
8. The automobile door and window clamping detection device based on aging compensation and neural network according to claim 7, characterized in that: The data acquisition and processing module includes: a data acquisition unit and a data processing unit; The data acquisition unit is used to obtain the motor current ripple period signal and the motor current DC component signal, and form a motor signal sample set , ;in, Indicates Motor signal sample sets of automobile doors and windows under various working conditions; and , express The cth motor signal sample in ; and , express The cth motor current ripple cycle sequence in , express The nth motor current ripple cycle segment in , N represents the total number of segments, express The cth motor current DC component sequence in ; express The nth motor current DC component fragment in ; A represents the total number of operating conditions of automobile doors and windows, and C represents the total number of samples under each operating condition; and Composed of the nth motor signal fragment sample ; set up The category label of the running stage is ,and ;like ,express In the Under this working condition, the automobile doors and windows are in the normal operation stage in the nth segment; if ,express In the Under the working condition, the car doors and windows are in the starting stage in the nth segment; if ,express In the Under the working condition, the automobile door and window are in the clamping stage at the nth segment; Perform one-hot encoding to obtain a one-hot encoding vector , express of any category, express The value in the vth category; set up The actual aging value ,and ;like ,express In the Under this condition, the car doors and windows have no aging in the nth segment; if ,express In the Under the working condition, the car doors and windows are slightly aged in the nth segment; if ,express In the Under the working condition, the car doors and windows are moderately aged in the nth segment; if ,express In the Under the working conditions, the car doors and windows are severely aged in the nth segment; among them, Respectively represent three aging thresholds; The data processing unit is used to calculate The time domain and frequency domain characteristics of The time-frequency domain feature vector of the nth motor signal fragment sample in the cth motor signal sample of the car door and window under the working condition ;in, Indicates The e-th time domain feature of the n-th motor signal segment in the c-th motor signal sample under the operating conditions of automobile doors and windows, Indicates The e-th frequency domain feature of the n-th motor signal segment in the c-th motor signal sample under the operating condition of automobile doors and windows; E represents the total number of frequency domain features.
9. The automobile door and window clamping detection device based on aging compensation and neural network according to claim 8, characterized in that: The aging compensation network in the automobile door and window clamping detection network module consists of an aging prediction module and an aging compensation module. Process and obtain Predicted aging value and the compensated time-frequency domain feature vector , and then use formula (3) to construct the MSE Loss function , and use the gradient descent method to train the aging compensation network and calculate the MSE Loss function To update the network parameters until Until convergence, the pre-trained aging compensation model is obtained, and Processing is performed to obtain the optimal pre-compensated motor signal fragment sample The corresponding time-frequency domain feature vector ; (3) The gated convolutional network in the automobile door and window clamping detection network module consists of a depth-separable convolutional module and a gating module. Process and obtain Gated time-frequency domain feature map ; The classification network in the automobile door and window clamping detection network module includes two fully connected layers and a Softmax activation function. Process and obtain Predicted probability of being in the 3 operating stages ,in, Represents the classification network pair The probability of predicting class v.
10. The automobile door and window clamping detection device based on aging compensation and neural network according to claim 9, characterized in that: The aging prediction module uses formula (1) to obtain Predicted aging value : (1) In formula (1), Represent 2E regression coefficients respectively, represents the e-th regression coefficient, is the intercept; The aging compensation module uses formula (2) to obtain Sample segment of the motor signal after compensation , thus calculating The time-frequency characteristics of The time-frequency domain feature vector of the nth compensated motor signal fragment sample in the cth motor signal sample of the car door and window under the working condition ;in, Indicates The e-th time domain feature of the n-th compensated motor signal segment in the c-th motor signal sample under the operating conditions of automobile doors and windows, Indicates The e-th frequency domain feature of the n-th compensated motor signal segment in the c-th motor signal sample under the operating condition of automobile doors and windows; (2)。 11. The automobile door and window clamping detection device based on aging compensation and neural network according to claim 10, characterized in that: The depthwise separable convolution module includes K parallel network units, each of which includes: two convolution layers and one pooling layer, and the convolution kernel sizes of different network units are different; Will The K parallel network units of the depthwise separable convolution module are input for processing, and K two-dimensional feature maps of different scales in the time-frequency domain are output accordingly. ,in, Represents the two-dimensional feature map in the time-frequency domain of the kth scale; The gating module uses the gating segmentation layer to Perform gated segmentation to obtain K segmentation feature maps and gate value , and then use formula (4) to get Gated time-frequency domain feature map : (4) In formula (4), tanh represents the activation layer, Represents the sigmoid activation function; represents the kth segmentation feature map, represents the kth gate value.
12. The automobile door and window clamping detection device based on aging compensation and neural network according to claim 11, characterized in that: The network training module uses formula (3) to construct the total loss function : (5) In formula (5), represents the weighted Focal Loss loss function, is the confidence penalty term, represents the confidence penalty coefficient, and: (6) In formula (6), is the weighting coefficient, It is a coefficient used to adjust the balance of difficult and easy classification samples; (7)。 13. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the automobile door and window clamping detection method as described in any one of claims 1-6, and the processor is configured to execute the program stored in the memory.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the automobile door and window clamping detection method according to any one of claims 1 to 6 are executed.