Motor anti-pinch calibration method and device, electronic equipment and storage medium

By using a reinforcement learning model to collect and optimize motor status information in real time and dynamically update the anti-pinch threshold, the problem of static calibration being unable to adapt to complex scenarios is solved, thus improving the safety of motor anti-pinch and user experience.

CN121966402APending Publication Date: 2026-05-01CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
Filing Date
2026-01-27
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

The existing statically calibrated anti-pinch threshold parameters cannot adapt to the complex and ever-changing dynamic scenarios in reality, resulting in a decline in the usability of the motor anti-pinch protection function and the user experience.

Method used

A reinforcement learning model is used to collect the current and historical state information of the motor in real time, output anti-pinch parameters adapted to the current state, and optimize the model parameters through a reward function to dynamically update the anti-pinch threshold.

Benefits of technology

Accurate calibration of motor anti-pinch parameters was achieved, improving the safety and usability of the anti-pinch protection function, avoiding erroneous triggering, and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121966402A_ABST
    Figure CN121966402A_ABST
Patent Text Reader

Abstract

The invention discloses a motor anti-pinch calibration method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining the current state information and historical state information of a motor, inputting the current state information and historical state information to a pre-deployed reinforcement learning model, and obtaining a first anti-pinch parameter outputted by the reinforcement learning model, and in response to a detected motor anti-pinch event triggered by the first anti-pinch parameter, obtaining an execution result of executing the motor anti-pinch event by adopting the first anti-pinch parameter, determining an actual reward value of the motor anti-pinch event according to a preset reward function and the execution result, and adjusting the reinforcement learning model by adopting the actual reward value, so that the motor anti-pinch event is obtained. And enabling the adjusted reinforcement learning model to output a second anti-pinch parameter. According to the embodiment of the invention, the reinforcement learning model is used for autonomously reasoning and outputting the anti-pinch parameters adaptive to the current state, the accurate calibration of the anti-pinch parameters of the motor is realized, the anti-pinch parameters output by the reinforcement learning model are continuously optimized, and the anti-pinch safety and the anti-pinch effect of the motor are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of vehicle control technology, specifically relating to a motor anti-pinch calibration method, device, electronic equipment, and storage medium. Background Technology

[0002] With the development of vehicle intelligence, the anti-pinch protection of the electric system in the vehicle body has become one of the core functions to ensure the safety and experience of drivers and passengers. Among them, motor anti-pinch protection refers to the function that when the electric motor drives the vehicle's moving parts, such as windows, electric tailgates, and hoods, during the closing process, if it detects that a person's limb, object, or other obstacle is being pinched, the electric system will immediately and automatically stop and move in the opposite direction for a certain distance to prevent personal injury or equipment damage.

[0003] Currently, the mainstream anti-pinch protection in the industry mainly relies on a set of predefined and fixed anti-pinch threshold parameters, such as current threshold and speed change rate threshold. These anti-pinch threshold parameters are usually calibrated in two ways: one is manual calibration based on engineers' experience, and the other is static thresholds set by collecting data and setting them under limited standard working conditions through a large number of discrete real vehicle or bench calibration tests. However, such statically calibrated anti-pinch threshold parameters cannot adapt to the complex and ever-changing dynamic scenarios in reality, which can easily lead to erroneous triggering of anti-pinch actions, affecting the usability of the anti-pinch protection function and user experience. Summary of the Invention

[0004] The purpose of this application is to provide a motor anti-pinch calibration method, device, electronic device, and storage medium, which can solve the problem that the current statically calibrated anti-pinch threshold parameters cannot adapt to the complex and ever-changing dynamic scenarios in reality, and are prone to erroneous triggering of anti-pinch actions, affecting the usability of the anti-pinch protection function and user experience.

[0005] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a method for calibrating a motor against clamping, the method comprising: Obtain the current and historical status information of the motor; wherein the status information includes at least one of the motor's operating parameters, environmental information, and timing characteristics; The current state information and the historical state information are input into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model; wherein, the reinforcement learning model includes a state space, an action space and a reward function, and the anti-pinch parameter includes a current trigger threshold, a speed drop threshold and a temperature compensation coefficient; In response to detecting a motor anti-pinch event triggered by the first anti-pinch parameter, obtain the execution result of executing the motor anti-pinch event using the first anti-pinch parameter; The actual reward value of the motor anti-pinch event is determined based on the preset reward function and the execution result. The reinforcement learning model is adjusted using the actual reward value so that the adjusted reinforcement learning model outputs a second anti-pinch parameter.

[0006] Optionally, the step of inputting the current state information and the historical state information into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model includes: The current state information and the historical state information are input into the state space of the pre-deployed reinforcement learning model as state space information; Based on the state space information, and using the reward function as the reinforcement objective function, action space information is mapped to obtain the first anti-pinch parameter of the action space output of the reinforcement learning model.

[0007] Optionally, before inputting the current state information and the historical state information into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model, the method further includes: Collect motor anti-pinch event data under various operating conditions; The motor anti-pinch event data is configured as a state space, and the reward function is determined with the anti-pinch parameters that trigger the motor anti-pinch event as the target output of the action space. The anti-pinch parameters in the motion space are monitored to trigger the motor anti-pinch event. The reward function is used as negative feedback to iteratively adjust the anti-pinch parameters in the motion space to obtain a reinforcement learning model. The reinforcement learning model is deployed to the vehicle.

[0008] Optionally, the step of obtaining the execution result of executing the motor anti-pinch event using the first anti-pinch parameter in response to detecting the motor anti-pinch event triggered by the first anti-pinch parameter includes: Write the first anti-pinch parameter into the domain controller of the motor, and update the current anti-pinch parameter in the domain controller; In response to detecting that the domain controller triggers a motor anti-pinch event based on the first anti-pinch parameter, the execution result of the motor anti-pinch event is obtained.

[0009] Optionally, determining the actual reward value of the motor anti-pinch event based on a preset reward function and the execution result includes: Based on the preset reward function and the execution result, the safety reward value, comfort reward value, efficiency reward value and penalty item of the execution result are determined respectively; The actual reward value for the motor anti-pinch event is obtained by weighted summing of the safety reward value, comfort reward value, efficiency reward value, and penalty item.

[0010] Optionally, adjusting the reinforcement learning model using the actual reward value to cause the adjusted reinforcement learning model to output a second anti-pinch parameter includes: The actual reward value is used as a regulation factor to adjust the reinforcement learning model, and the iteration parameters of the reinforcement learning model are determined based on the regulation factor. The model parameters of the reinforcement learning model are adjusted using the iterative parameters to obtain an adjusted reinforcement learning model, so that the adjusted reinforcement learning model outputs the second anti-pinch parameter.

[0011] Optionally, after adjusting the model parameters of the reinforcement learning model using the iterative parameters to obtain an adjusted reinforcement learning model, so that the adjusted reinforcement learning model outputs the second anti-pinch parameter, the method further includes: Based on the current state space information, and using the reward function as the reinforcement objective function, action space information mapping is performed to obtain the second anti-pinch parameter of the action space output of the adjusted reinforcement learning model; Write the second anti-pinch parameter into the motor's domain controller and update the current anti-pinch parameter in the domain controller.

[0012] Secondly, embodiments of this application provide a motor anti-pinch calibration device, the device comprising: The acquisition module is used to acquire the current status information and historical status information of the motor; wherein, the status information includes at least one of the motor's operating parameters, environmental information, and timing characteristics; The first parameter module is used to input the current state information and the historical state information into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameters output by the reinforcement learning model; wherein, the reinforcement learning model includes a state space, an action space and a reward function, and the anti-pinch parameters include a current trigger threshold, a speed drop threshold and a temperature compensation coefficient. An execution module is configured to, in response to detecting a motor anti-pinch event triggered by the first anti-pinch parameter, obtain the execution result of executing the motor anti-pinch event using the first anti-pinch parameter; The evaluation module is used to determine the actual reward value of the motor anti-pinch event based on a preset reward function and the execution result. The second parameter module is used to adjust the reinforcement learning model using the actual reward value, so that the adjusted reinforcement learning model outputs a second anti-pinch parameter.

[0013] Thirdly, embodiments of this application provide an electronic device, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps of the motor anti-pinch calibration method as described in the first aspect.

[0014] Fourthly, embodiments of this application provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the motor anti-pinch calibration method as described in the first aspect.

[0015] The motor anti-pinch calibration method provided in this application obtains the current state information and historical state information of the motor. The state information includes at least one of the motor's operating parameters, environmental information, and temporal characteristics. The current state information and historical state information are input into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model. The reinforcement learning model includes a state space, an action space, and a reward function. The anti-pinch parameter includes a current trigger threshold, a speed drop threshold, and a temperature compensation coefficient. In response to the detection of a motor anti-pinch event triggered by the first anti-pinch parameter, the method obtains the execution result of the motor anti-pinch event using the first anti-pinch parameter. Based on the preset reward function and the execution result, the method determines the actual reward value of the motor anti-pinch event. The method uses the actual reward value to adjust the reinforcement learning model so that the adjusted reinforcement learning model outputs a second anti-pinch parameter. This application embodiment collects information reflecting the motor's operating status in real time, uses a trained reinforcement learning model to autonomously infer and output anti-pinch parameters adapted to the current state, achieves accurate calibration of the motor's anti-pinch parameters, executes motor anti-pinch events using the anti-pinch parameters, and continuously optimizes the anti-pinch parameters output by the reinforcement learning model according to the execution effect of the anti-pinch parameters, thereby improving the safety and anti-pinch effect of the motor anti-pinch. The dynamically updated calibrated anti-pinch parameters can adapt to complex and ever-changing scenarios in reality, avoid erroneous triggering of anti-pinch actions, and further improve the usability of the anti-pinch protection function and user experience.

[0016] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart illustrating the steps of a motor anti-pinch calibration method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the architecture of a motor anti-pinch calibration method provided in an embodiment of this application; Figure 3 This is an interactive flowchart of a motor anti-pinch calibration method provided in an embodiment of this application; Figure 4 This is a flowchart of a motor anti-pinch calibration method provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a motor anti-pinch calibration device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0020] The motor anti-pinch calibration method, device, electronic device, and storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0021] Reference Figure 1 The flowchart illustrates the steps of the motor anti-pinch calibration method provided in this application embodiment, the method may include: Step 101: Obtain the current status information and historical status information of the motor; wherein, the status information includes at least one of the motor's operating parameters, environmental information, and timing characteristics.

[0022] In this embodiment, to address the problem that statically calibrated anti-pinch threshold parameters cannot adapt to complex and ever-changing dynamic scenarios in reality, and are prone to erroneous triggering of anti-pinch actions, thus affecting the usability of the anti-pinch protection function and user experience, this application collects information reflecting the motor's operating status in real time, uses a reinforcement learning model to autonomously infer and output the motor's anti-pinch control parameters, achieves accurate calibration of the motor's anti-pinch parameters, uses the latest anti-pinch parameters in real-time inference for anti-pinch response, continuously optimizes the anti-pinch parameters output by the reinforcement learning model, and improves the safety and effectiveness of the motor's anti-pinch protection.

[0023] It should be noted that, referring to Figure 2 , Figure 2 This illustration shows a schematic diagram of the architecture of a motor anti-pinch calibration method provided in an embodiment of this application. This embodiment takes the calibration of the front hood anti-pinch parameters as an example for explanation. Each area controller collects data on anti-pinch events and transmits the information collected by the area controllers, such as the vehicle's actual environment, hood tilt angle, ambient humidity, and mechanical wear coefficient, to the central computing platform. The central computing platform is equipped with a reinforcement learning model, which is trained and optimized using the collected anti-pinch event data to output anti-pinch parameters that are adapted to the current state in real time.

[0024] In this embodiment, the current state information and historical state information of the motor are first acquired. The state information includes at least one of the motor's operating parameters, environmental information, and timing characteristics. The historical state information records past state information and is used to capture the motor's historical behavior. Operating parameters are physical quantities during motor operation, reflecting the motor's current operating state. The state information includes the motor's operating parameters, environmental information, and timing characteristics. Operating parameters may include parameters such as motor current, operating speed, motor temperature, ambient temperature, and power supply voltage. Environmental information may include the front hood tilt angle, ambient humidity, and mechanical wear coefficient. Timing characteristics reflect the dynamic changes in the motor's operating state and may include the rate of change of current, acceleration, and rate of change of temperature. The historical state information records the state information of the past N time steps and is used to capture the motor's historical behavior.

[0025] Step 102: Input the current state information and historical state information into the pre-deployed reinforcement learning model to obtain the first anti-pinch parameters output by the reinforcement learning model; wherein, the reinforcement learning model includes a state space, an action space and a reward function, and the anti-pinch parameters include a current trigger threshold, a speed drop threshold and a temperature compensation coefficient.

[0026] In this embodiment, since the performance of the motor anti-pinch system is affected by various operating conditions, such as different ambient temperatures, humidity, hood tilt angles, and mechanical wear, the anti-pinch effect will be affected. In this embodiment, based on the real-time operating conditions, the current state information and historical state information of the motor are input into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model. The first anti-pinch parameter is the anti-pinch parameter output by the action space of the reinforcement learning model. The reinforcement learning model includes a state space, an action space, and a reward function. The anti-pinch parameter includes a current trigger threshold, a speed drop threshold, and a temperature compensation coefficient.

[0027] It should be noted that the reinforcement learning model is trained using anti-pinch event data under different working conditions. Model training can be carried out on the central computing platform and then deployed to the vehicle. The reinforcement learning model can use deep learning algorithms such as DDPG (Deep Deterministic Policy Gradient) as the algorithm for the reinforcement learning model, and output anti-pinch parameters that meet the actual state of the motor, so as to realize the effective calibration of the motor anti-pinch parameters. These will not be elaborated on here.

[0028] In this embodiment, the reinforcement learning model includes a state space, an action space, and a reward function. The current state information and historical state information of the motor collected in real time are combined into state space information and input into the state space of the reinforcement learning model. Based on the state space information, the current operating state of the motor is evaluated. Based on the current state, at least one of the action space parameters, namely the current trigger threshold, the speed drop threshold, and the temperature compensation coefficient, is adjusted to obtain the anti-pinch parameters applied to the anti-pinch control. The current trigger threshold is used to determine whether the current exceeds the safe range, the speed drop threshold is used to determine whether the speed is below the safe range, and the temperature compensation coefficient is used to adjust the influence of temperature on the anti-pinch control.

[0029] Step 103: In response to the detection of a motor anti-pinch event triggered by the first anti-pinch parameter, obtain the execution result of the motor anti-pinch event executed using the first anti-pinch parameter.

[0030] In this embodiment, the first anti-pinch parameter is written to the motor's domain controller via a communication interface such as a CAN bus. After receiving the new anti-pinch parameter, the motor's domain controller updates its internal current anti-pinch parameter. In response to detecting a motor anti-pinch event triggered by the first anti-pinch parameter, it obtains the execution result of the motor anti-pinch event using the first anti-pinch parameter. That is, it judges the triggering of the motor anti-pinch event according to the latest motor anti-pinch parameter, monitors whether the motor has triggered the anti-pinch event based on the new anti-pinch parameter, and obtains the execution result of the anti-pinch event.

[0031] In this embodiment, the execution result may include whether the anti-pinch event was successfully triggered, the execution effect of the anti-pinch event, and the occupant comfort assessment, such as whether the motor operation was stopped in time, whether pinching injury was successfully avoided, or whether the system was stable, and the impact of current fluctuations and speed changes on the occupant. The execution result is used to reflect the effect of the motor anti-pinch parameters on the execution of the motor anti-pinch event, so as to adjust the reinforcement learning model in the future.

[0032] Step 104: Determine the actual reward value of the motor anti-pinch event based on the preset reward function and the execution result.

[0033] In this embodiment, to evaluate the execution effect of the calibrated motor anti-pinch parameters, the actual reward value of the motor anti-pinch event is determined based on a preset reward function and the execution result. Specifically, based on the state space, action space, and preset reward function, the reward value of the anti-pinch execution result using the first anti-pinch parameter is calculated to evaluate the execution effect of the motor anti-pinch parameters.

[0034] It should be noted that the reward function includes safety reward, comfort reward, efficiency reward, and penalty. Therefore, the safety reward value, comfort reward value, efficiency reward value, and penalty value of the execution result are determined separately, and the safety reward value, comfort reward value, efficiency reward value, and penalty value are weighted and summed to obtain the actual reward value of the motor anti-pinch event.

[0035] Step 105: Adjust the reinforcement learning model using the actual reward value so that the adjusted reinforcement learning model outputs the second anti-pinch parameter.

[0036] In this embodiment of the application, in order to continuously optimize the anti-pinch parameters output by the reinforcement learning model, the actual reward value is used to adjust the reinforcement learning model. The actual reward value is used as an adjustment factor to guide the parameter update of the reinforcement learning model, thereby optimizing the output of the reinforcement learning model and continuously optimizing the anti-pinch parameters output by the reinforcement learning model, thus improving the safety and anti-pinch effect of the motor anti-pinch.

[0037] The motor anti-pinch calibration method provided in this application obtains the current state information and historical state information of the motor. The state information includes at least one of the motor's operating parameters, environmental information, and temporal characteristics. The current state information and historical state information are input into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameters output by the reinforcement learning model. The anti-pinch parameters include a current trigger threshold, a speed drop threshold, and a temperature compensation coefficient. In response to the detection of a motor anti-pinch event triggered by the first anti-pinch parameters, the execution result of the motor anti-pinch event using the first anti-pinch parameters is obtained. Based on a preset reward function and the execution result, the actual reward value of the motor anti-pinch event is determined. The reinforcement learning model is adjusted using the actual reward value so that the adjusted reinforcement learning model outputs a second anti-pinch parameter. This application embodiment collects information reflecting the motor's operating status in real time, uses a trained reinforcement learning model to autonomously infer and output anti-pinch parameters adapted to the current state, achieves accurate calibration of the motor's anti-pinch parameters, executes motor anti-pinch events using the anti-pinch parameters, and continuously optimizes the anti-pinch parameters output by the reinforcement learning model according to the execution effect of the anti-pinch parameters, thereby improving the safety and anti-pinch effect of the motor anti-pinch. The dynamically updated calibrated anti-pinch parameters can adapt to complex and ever-changing scenarios in reality, avoid erroneous triggering of anti-pinch actions, and further improve the usability of the anti-pinch protection function and user experience.

[0038] In some embodiments of this application, step 102 inputs the current state information and historical state information into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model, which may specifically include the following steps: Sub-step 1021: Input the current state information and historical state information into the state space of the pre-deployed reinforcement learning model as state space information; Sub-step 1022: Based on the state space information, and with the reward function as the reinforcement objective function, perform action space information mapping to obtain the first anti-pinch parameter of the action space output of the reinforcement learning model.

[0039] In this embodiment, real-time collected information reflecting the motor's operating status is input into a pre-deployed reinforcement learning model. The reinforcement learning model autonomously infers and outputs optimized, dynamic anti-pinch control parameters. Specifically, current and historical state information are input into the state space of the pre-deployed reinforcement learning model as state space information. Based on the state space information, and using the reward function as the reinforcement objective function, action space information is mapped to obtain the first anti-pinch parameter output by the reinforcement learning model in the action space. The first anti-pinch parameter includes a current trigger threshold, a speed drop threshold, and a temperature compensation coefficient.

[0040] In this embodiment, the state space is a core component of the reinforcement learning model, used to describe the operating state of the motor at a certain moment. The current state information and historical state information are input into the state space of the pre-deployed reinforcement learning model as state space information. The model infers the anti-pinch parameters based on the motor's operating state. The current state information includes the motor's operating parameters, environmental information, and temporal characteristics, while the historical state information is the state information over a past period.

[0041] It should be noted that the status information includes the motor's operating parameters, environmental information, and temporal characteristics. The operating parameters S_core directly reflect the motor's operating status and may include parameters such as motor current I (A), operating speed V (mm / s), motor temperature T_motor (°C), ambient temperature T_env (°C), and power supply voltage U (V). The environmental information S_env reflects the impact of the external environment on the motor's operation and may include the hatch tilt angle θ (degrees), ambient humidity H (%), and mechanical wear coefficient ω. The mechanical wear coefficient is estimated through historical data and can range from [0, 1]. The temporal characteristics S_temporal reflect the dynamic changes in the motor's operating status and may include the current change rate dI / dt (A / s), acceleration a = dV / dt (mm / s²), used to capture abnormal fluctuations, and the temperature change rate dT / dt (°C / s). The historical state information S_historical records the state information of the past N time steps and is used to capture the historical behavior of the motor. The single time step length is ΔT=5ms. The historical state information can be represented as: s_t= [I, V, T_motor, T_env, U, θ, H, ω, dI / dt, a, dT / dt, s_{t-1}, s_{t-2}, ...,s_{tN}].

[0042] In this embodiment, the action space defines all possible actions that can be taken in a certain state when the motor is anti-pinch. The action space in this embodiment is used to dynamically adjust the threshold and compensation coefficient of the motor anti-pinch control. The anti-pinch parameters output by the action space include the current trigger threshold, the speed drop threshold, and the temperature compensation coefficient. The current trigger threshold ΔIth is used to determine whether the current exceeds the safe range, the speed drop threshold ΔVth is used to determine whether the speed is lower than the safe range, and the temperature compensation coefficient ΔKtemp is used to adjust the influence of temperature on the anti-pinch control.

[0043] In this embodiment, a preset reward function is used to evaluate the effectiveness of the motor anti-pinch system in taking a certain action under a certain state. Based on state space information, the reward function is used as the reinforcement objective function to map action space information, obtaining the first anti-pinch parameter output by the reinforcement learning model. In this embodiment, the reward function comprehensively considers occupant comfort and the effectiveness of the front hood anti-pinch system. For example, occupant comfort can be evaluated by the motor's operating state; excessive current or speed fluctuations will reduce comfort. Safety is evaluated by the effectiveness of the motor anti-pinch system, such as whether the anti-pinch system responds promptly and avoids pinching accidents. The reward function is used to evaluate the anti-pinch parameters output by the reinforcement learning model, optimize the performance of the anti-pinch system, and thus improve occupant comfort and safety.

[0044] In practice, the system collects the motor's operating parameters, environmental information, and temporal characteristics in real time. The state information of the past N time steps is used as historical state information. The current state information and historical state information are combined into state space information, which is then input into the state space of the reinforcement learning model. Based on the state space information, the current operating state of the motor is evaluated. Based on the current state, at least one of the action space parameters—current trigger threshold, speed drop threshold, and temperature compensation coefficient—is adjusted and applied to anti-pinch control. The anti-pinch parameters are adjusted, and a reward value is calculated based on the anti-pinch effect and passenger comfort. The parameters of the reinforcement learning model are updated based on the reward value to optimize future anti-pinch parameters.

[0045] This application embodiment is based on real-time collected information reflecting the motor's operating status. It utilizes a pre-deployed reinforcement learning model, which autonomously infers and outputs dynamic anti-pinch parameters that adapt to the current state.

[0046] In some embodiments of this application, before step 102 inputs the current state information and historical state information into the pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model, the following steps may also be included: S11, collect motor anti-pinch event data under various operating conditions; S12, Configure the motor anti-pinch event data into the state space, and determine the reward function with the anti-pinch parameters that trigger the motor anti-pinch event as the target of the action space output; S13, monitor the anti-pinch parameters in the motion space to trigger the motor anti-pinch event, use the reward function as negative feedback, iteratively adjust the anti-pinch parameters in the motion space, and obtain the reinforcement learning model; S14 deploys the reinforcement learning model to the vehicle.

[0047] In this embodiment, the performance of the motor anti-pinch system is affected by various operating conditions. Different ambient temperatures, humidity, hatch tilt angles, and mechanical wear levels will all affect the anti-pinch performance. Considering the continuity of the state space and action space, deep learning algorithms such as DDPG (Deep Deterministic Policy Gradient) can be used as the algorithm for the reinforcement learning model. In order to train the reinforcement learning model and output anti-pinch parameters that meet the actual state of the motor, and to achieve effective calibration of the motor anti-pinch parameters, this embodiment trains and deploys a reinforcement learning model for inference output of anti-pinch parameters.

[0048] In this embodiment, anti-pinch event data under different operating conditions is first collected. This data can be obtained through real vehicle data collection, simulation injection, or data upload. Real vehicle data collection can be performed in high and low temperature environments, collecting parameters such as motor current, voltage, ambient temperature, and speed at different temperatures; or simulating power supply voltage to record the motor's operating status under different voltages; or simulating the wear of the motor after long-term operation to record changes in the mechanical wear coefficient. Simulation injection can simulate extreme scenarios, such as the hatch being stuck by ice or soft obstacles, such as a hand being trapped, recording the motor's response data under these scenarios. Sensors under the vehicle's area controller can also be used to collect and upload real-time status information such as motor current, voltage, ambient temperature, and road surface smoothness.

[0049] In this embodiment, after data acquisition, these data are configured as the state space and action space of the reinforcement learning model, and a reward function is designed. This reward function not only compensates for anti-pinch performance defects in some complex working conditions but also plays a good compensating role in the magnetization mechanical aging problem caused by the long service life of the motor. The acquired motor operating data is used as state space information. To ensure the integrity of the state space information, the historical state information of the motor is also included. To obtain the anti-pinch parameters output by the action space, such as the current trigger threshold, speed drop threshold, and temperature compensation coefficient, the reward function is determined with the anti-pinch parameters that trigger the motor anti-pinch event output by the action space as the objective. Specifically, with the triggering of the motor anti-pinch event as the objective, a reward function R(s,a) is designed, comprehensively considering safety, comfort, efficiency, and penalty terms.

[0050] In the specific implementation, the anti-pinch event of the motor is triggered by monitoring the anti-pinch parameters in the motion space. A reward function is used as negative feedback to continuously adjust the motion space parameters, resulting in a trained reinforcement learning model. For example, in a simulation environment, the motor's operating state under different conditions is simulated. Whether the motion space parameters trigger the anti-pinch event is monitored. Based on the triggering effect of the anti-pinch event, a reward value is calculated. If pinching is successfully avoided and occupant comfort is high, the reward value is positive, and the reinforcement learning model will tend to output motion space parameters with high reward values. Conversely, if the event is not triggered in time or the movement is too large, causing instability in the anti-pinch mechanism, the reward value is negative, and the reinforcement learning model will adjust the motion space parameters to avoid similar situations. Through multiple iterations, the motion space parameters are continuously optimized to obtain a trained reinforcement learning model. After the model training is completed, the reinforcement learning model is deployed to the vehicle and fine-tuned through real-vehicle demonstrations. Finally, it is updated to all vehicle models via OTA (Over-The-Air).

[0051] It should be noted that the pre-trained reinforcement learning model is first integrated into the vehicle's domain controller. In a real vehicle environment, different operating conditions such as high and low temperatures, voltage fluctuations, and mechanical aging are simulated to verify the anti-pinch effect of the reinforcement learning model. Based on the anti-pinch results demonstrated in the real vehicle, the reinforcement learning model is fine-tuned to optimize the anti-pinch parameters output by the reinforcement learning model. The optimized reinforcement learning model is then updated to all vehicle models via OTA to ensure that all vehicles obtain the latest anti-pinch parameter inference model.

[0052] For example, refer to Figure 3 The diagram illustrates an interactive flowchart of a motor anti-pinch calibration method provided in this application embodiment. The domain controller uses sensors to collect parameters such as current, voltage, ambient temperature, and speed of the motor in real time at different temperatures, which are used as the current state space information and input into the reinforcement learning model of the central computing platform. The reward function is used as the reinforcement objective function to guide the reinforcement learning model to infer the anti-pinch parameters. The anti-pinch parameters are transmitted to the central computing platform through the service interface and further transmitted to the motor's domain controller. After receiving the new anti-pinch parameters, the domain controller writes them into the storage unit to update the current anti-pinch parameters. The updated anti-pinch parameters take effect immediately so that the motor system uses the updated anti-pinch parameters to judge and trigger subsequent motor anti-pinch events.

[0053] This application embodiment trains a reinforcement learning model based on motor anti-pinch event data, so that the reinforcement learning model can autonomously reason and output optimized motor anti-pinch parameters, so that the anti-pinch parameters can meet the anti-pinch requirements under complex working conditions, and improve the robustness and adaptability of the anti-pinch parameters output by the reinforcement learning model.

[0054] In some embodiments of this application, step 103, in response to detecting a motor anti-pinch event triggered by the first anti-pinch parameter, obtains the execution result of executing the motor anti-pinch event using the first anti-pinch parameter, which may specifically include the following steps: Sub-step 1031: Write the first anti-pinch parameter into the domain controller of the motor and update the current anti-pinch parameter in the domain controller; Sub-step 1032: In response to detecting that the domain controller triggers a motor anti-pinch event based on the first anti-pinch parameter, obtain the execution result of the motor anti-pinch event.

[0055] In this embodiment, after the reinforcement learning model outputs the first anti-pinch parameter, the first anti-pinch parameter is written into the domain controller of the motor to update the current anti-pinch parameter in the domain controller. The first anti-pinch parameter includes the current trigger threshold ΔIth, the speed drop threshold ΔVth, and the temperature compensation coefficient ΔKtemp. Specifically, the output first anti-pinch parameter can be transmitted to the central computing platform through the service interface. The central computing platform transmits the anti-pinch parameter to the domain controller of the motor through network communication. After receiving the new anti-pinch parameter, the domain controller of the motor writes it into the storage unit to update the current anti-pinch parameter. The updated anti-pinch parameter takes effect immediately and is used for subsequent motor anti-pinch event judgment and triggering. In response to detecting that the domain controller triggers a motor anti-pinch event based on the first anti-pinch parameter, the execution result of the motor anti-pinch event is obtained.

[0056] In the specific implementation, the first anti-pinch parameter is written to the motor's domain controller through a communication interface such as the CAN bus. After receiving the new anti-pinch parameter, the motor's domain controller updates its internal current anti-pinch parameter, judges the motor anti-pinch event trigger according to the latest motor anti-pinch parameter, monitors whether the motor has triggered the anti-pinch event based on the new anti-pinch parameter, and obtains the execution result of the anti-pinch event.

[0057] In this embodiment, the domain controller of the motor monitors the operating status of the motor in real time and determines whether to trigger the motor anti-pinch event based on the updated anti-pinch parameters. For example, when the motor current exceeds the current trigger threshold or the speed is lower than the speed drop threshold, or the ambient temperature is lower than the temperature compensation coefficient, the domain controller determines that the anti-pinch event triggering conditions are met. When the motor meets the anti-pinch event triggering conditions, the domain controller immediately executes the anti-pinch action, controls the motor operation or adjusts the motor speed, and obtains the execution result of the anti-pinch event. The execution result may include whether the anti-pinch event was successfully triggered, the execution effect of the anti-pinch event, and the occupant comfort assessment, such as whether the motor operation was stopped in time, whether pinching injury was successfully avoided, or whether the system is stable, and the impact of current fluctuations and speed changes on the occupant.

[0058] In this embodiment, the anti-pinch parameters output by the reinforcement learning model are written into the domain controller of the motor, and the triggering and execution results of the anti-pinch event are monitored in real time to ensure that the latest anti-pinch parameters are used for anti-pinch response in real time and to obtain the execution results, so as to further optimize the anti-pinch parameters.

[0059] In some embodiments of this application, step 104, determining the actual reward value of the motor anti-pinch event based on a preset reward function and the execution result, may specifically include the following steps: Sub-step 1041: Based on the preset reward function and the execution result, determine the safety reward value, comfort reward value, efficiency reward value and penalty item of the execution result respectively; Sub-step 1042 involves weighted summation of the safety reward value, comfort reward value, efficiency reward value, and penalty item to obtain the actual reward value for the motor anti-pinch event.

[0060] In this embodiment of the application, in order to evaluate the execution effect of the calibrated motor anti-pinch parameters, the safety reward value, comfort reward value, efficiency reward value and penalty item of the execution result are determined according to the preset reward function and the execution result. The safety reward value, comfort reward value, efficiency reward value and penalty item are then weighted and summed to obtain the actual reward value of the motor anti-pinch event, which reflects the effect of the motor anti-pinch parameters on the execution of the motor anti-pinch event and is used for subsequent adjustment of the reinforcement learning model.

[0061] Specifically, in this embodiment, based on the state space s, the action space a, and the preset reward function... To evaluate the effectiveness of the motor anti-pinch parameters, a reward value is calculated. The execution result reflects whether the motor anti-pinch function was successful and whether it caused harm to the user. Therefore, a safety reward value, a comfort reward value, an efficiency reward value, and a penalty are determined for the execution result. The safety reward value, comfort reward value, efficiency reward value, and penalty are then weighted and summed to obtain the actual reward value for the motor anti-pinch event. The actual reward value for the motor anti-pinch event can be calculated using the following formula:

[0062] in, This represents the actual reward value for the motor anti-pinch event. For security reward value, For comfort bonus value, For efficiency reward value, For the penalty term, α is the comfort weight coefficient, β is the efficiency weight coefficient, and γ is the penalty term weight coefficient.

[0063] In practice, the safety reward value, comfort reward value, efficiency reward value, and penalty item for determining the execution result can be calculated using the following formula:

[0064] in, As safety reward values, R_success reflects that the motor successfully prevents pinching without causing damage, R_fail reflects that the motor fails to prevent pinching and causes damage, and R_false reflects that the motor is accidentally triggered. R_success, R_fail, and R_false are values ​​mapped based on the above-mentioned anti-pinch execution results.

[0065]

[0066] in, For comfort bonus value, The current trigger threshold, For the speed drop threshold, Here, t_response is the system response time, and w1 is the temperature compensation coefficient. , w4 and w4 are the weighting coefficients of each parameter.

[0067]

[0068] in, E_consumption is the energy consumption during the motor anti-pinch process, t_operation is the execution time of the motor anti-pinch process, and w5 is the efficiency reward value. These are the weighting coefficients for each parameter.

[0069]

[0070] in, For the penalty term, I_overshoot is the overshoot of the motor current parameter, V_overshoot is the overshoot of the running speed parameter, R_count is the number of times the parameter exceeds the safe range, and w7, w9 and w9 are the weighting coefficients of each parameter.

[0071] For example, refer to Figure 4 The diagram shows a flowchart of a motor anti-pinch calibration method provided in an embodiment of this application. Based on the anti-pinch parameters output by the reinforcement learning model, hard anti-pinch processing and soft anti-pinch processing are performed. Hard anti-pinch processing is used to determine whether the anti-pinch action is executed, and soft anti-pinch results are used to determine the occupant comfort and anti-pinch effect of the anti-pinch event. Based on the execution result and the reward function, the reward value of the execution result is determined in order to optimize the anti-pinch parameters. Based on the anti-pinch parameters, motor stall determination is performed. If the motor operating parameters meet the anti-pinch trigger condition, the motor controller executes the anti-pinch action; otherwise, the motor operates normally.

[0072] The embodiments of this application obtain the actual reward value of the motor anti-pinch event through multiple dimensions, reflecting the effect of the motor anti-pinch parameters in executing the motor anti-pinch event, which is used to subsequently adjust the reinforcement learning model and optimize the anti-pinch parameters output by the model inference.

[0073] In some embodiments of this application, step 105, adjusting the reinforcement learning model using actual reward values ​​so that the adjusted reinforcement learning model outputs a second anti-pinch parameter, may specifically include the following steps: Sub-step 1051: Use the actual reward value as a regulation factor to adjust the reinforcement learning model, and determine the iteration parameters of the reinforcement learning model based on the regulation factor. Sub-step 1051 involves adjusting the model parameters of the reinforcement learning model using iterative parameters to obtain the adjusted reinforcement learning model, so that the adjusted reinforcement learning model outputs the second anti-pinch parameter.

[0074] In this embodiment of the application, in order to continuously optimize the anti-pinch parameters output by the reinforcement learning model, the actual reward value is used to adjust the reinforcement learning model. During the training process of the reinforcement learning model, the actual reward value is an important indicator for evaluating the model performance. By using the actual reward value as an adjustment factor, the iteration direction and iteration gradient of the model parameters are determined, thereby optimizing the output of the reinforcement learning model.

[0075] In practice, the actual reward value is used as an adjustment factor to guide the parameter updates of the reinforcement learning model. This adjustment factor reflects the model's current performance. If the actual reward value is high, such as close to 1, it indicates that the reinforcement learning model is performing well, and the parameter adjustment can be appropriately reduced. If the actual reward value is low, such as close to 0, it indicates that the reinforcement learning model is performing poorly, requiring a larger degree of parameter adjustment. Iteration parameters include the iteration direction and iteration gradient. An optimizer can be used to iterate the model's parameters, for example, using gradient descent or policy gradient methods to determine the amount of parameter adjustment. This embodiment does not impose specific limitations on this.

[0076] In this embodiment, after determining the iteration parameters, the model parameters of the reinforcement learning model are adjusted to optimize the model output. Based on the iteration parameters, the model parameters of the reinforcement learning model are updated so that the adjusted reinforcement learning model outputs the second anti-pinch parameter based on the current state information and historical state information. The second anti-pinch parameter is transmitted to the domain controller of the motor through the service interface to update the anti-pinch control of the motor.

[0077] The embodiments of this application are based on using actual reward values ​​to determine the iteration direction and iteration gradient of model parameters, and optimize and adjust the reinforcement learning model, thereby continuously optimizing the anti-pinch parameters output by the reinforcement learning model and improving the safety and anti-pinch effect of the motor anti-pinch.

[0078] In some embodiments of this application, sub-step 1051 uses the iterative parameters to adjust the model parameters of the reinforcement learning model to obtain an adjusted reinforcement learning model. After the adjusted reinforcement learning model outputs the second anti-pinch parameter, it may further include the following steps: Based on the current state space information, the reward function is used as the reinforcement objective function to perform action space information mapping, and the second anti-pinch parameter of the action space output of the adjusted reinforcement learning model is obtained. Write the second anti-pinch parameter to the motor's domain controller and update the current anti-pinch parameter in the domain controller.

[0079] In this embodiment, based on the current state space information, the reward function is used as the reinforcement objective function to perform action space information mapping, thereby obtaining the second anti-pinch parameter of the action space output of the adjusted reinforcement learning model. The adjusted reinforcement learning model is used to output the second anti-pinch parameter and write it into the domain controller of the motor to update the current anti-pinch parameter.

[0080] In this embodiment, an adjusted reinforcement learning model is used. Based on the current state space information, the reward function is used as the reinforcement objective function to infer the second anti-pinch parameter. Specifically, the adjusted reinforcement learning model infers the second anti-pinch parameter based on the current state information, writes the second anti-pinch parameter into the motor's domain controller, updates the current anti-pinch parameter in the domain controller, and transmits the inferred second anti-pinch parameter to the central computing platform through the service interface. The central computing platform transmits the second anti-pinch parameter to the motor's domain controller through network communication. After receiving the new anti-pinch parameter, the domain controller writes it into the storage unit and updates the current anti-pinch parameter. The updated anti-pinch parameter takes effect immediately and is used for subsequent motor anti-pinch event judgment and triggering.

[0081] This application embodiment utilizes the adjusted reinforcement learning model to output anti-pinch parameters, which are then written into the motor's domain controller to update the current anti-pinch parameters. By continuously optimizing the anti-pinch parameters, the safety and effectiveness of the motor's anti-pinch function are improved.

[0082] Reference Figure 5 The diagram shows a structural schematic of a motor anti-pinch calibration device provided in an embodiment of this application. The device includes: The acquisition module 201 is used to acquire the current status information and historical status information of the motor; wherein, the status information includes at least one of the motor's operating parameters, environmental information, and timing characteristics; The first parameter module 202 is used to input the current state information and the historical state information into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameters output by the reinforcement learning model; wherein, the reinforcement learning model includes a state space, an action space and a reward function, and the anti-pinch parameters include a current trigger threshold, a speed drop threshold and a temperature compensation coefficient. The execution module 203 is used to, in response to detecting a motor anti-pinch event triggered by the first anti-pinch parameter, obtain the execution result of executing the motor anti-pinch event using the first anti-pinch parameter; Evaluation module 204 is used to determine the actual reward value of the motor anti-pinch event based on a preset reward function and the execution result; The second parameter module 205 is used to adjust the reinforcement learning model using the actual reward value, so that the adjusted reinforcement learning model outputs a second anti-pinch parameter.

[0083] Optionally, the first parameter module 202 includes: The processing submodule is used to input the current state information and the historical state information into the state space of the pre-deployed reinforcement learning model as state space information; The first mapping submodule is used to perform action space information mapping based on the state space information and with the reward function as the reinforcement objective function, to obtain the first anti-pinch parameter of the action space output of the reinforcement learning model.

[0084] Optionally, the device further includes: The data acquisition module is used to collect motor anti-pinch event data under various operating conditions; The parameter determination module is used to configure the motor anti-pinch event data into a state space, and to determine the reward function with the anti-pinch parameters that trigger the motor anti-pinch event as the target of the action space output; The model training module is used to monitor the anti-pinch parameters of the action space to trigger the motor anti-pinch event, and uses the reward function as negative feedback to iteratively adjust the anti-pinch parameters of the action space to obtain a reinforcement learning model. The model deployment module is used to deploy the reinforcement learning model to the vehicle.

[0085] Optionally, the execution module 203 includes: The first update submodule is used to write the first anti-pinch parameter into the domain controller of the motor and update the current anti-pinch parameter in the domain controller; The anti-pinch trigger submodule is used to respond to the detection that the domain controller triggers a motor anti-pinch event based on the first anti-pinch parameter, and to obtain the execution result of the motor anti-pinch event.

[0086] Optionally, the evaluation module 204 includes: The reward determination submodule is used to determine the safety reward value, comfort reward value, efficiency reward value, and penalty item of the execution result based on the preset reward function and the execution result. The evaluation submodule is used to perform a weighted summation of the safety reward value, comfort reward value, efficiency reward value, and penalty item to obtain the actual reward value of the motor anti-pinch event.

[0087] Optionally, the second parameter module 205 includes: A determination submodule is used to use the actual reward value as a regulation factor to adjust the reinforcement learning model, and to determine the iteration parameters of the reinforcement learning model based on the regulation factor. The adjustment submodule is used to adjust the model parameters of the reinforcement learning model using the iteration parameters to obtain the adjusted reinforcement learning model, so that the adjusted reinforcement learning model outputs the second anti-pinch parameter.

[0088] Optionally, the second parameter module 205 further includes: The second mapping submodule, based on the current state space information, uses the reward function as the reinforcement objective function to perform action space information mapping, and obtains the second anti-pinch parameters of the action space output of the adjusted reinforcement learning model; The second update submodule is used to write the second anti-pinch parameter into the domain controller of the motor and update the current anti-pinch parameter in the domain controller.

[0089] The motor anti-pinch calibration device provided in this application embodiment can realize all the processes of the motor anti-pinch calibration method in the above embodiments of this application. To avoid repetition, it will not be described again here.

[0090] The motor anti-pinch calibration device provided in this application obtains the current state information and historical state information of the motor. The state information includes at least one of the motor's operating parameters, environmental information, and temporal characteristics. The current state information and historical state information are input into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model. The reinforcement learning model includes a state space, an action space, and a reward function. The anti-pinch parameter includes a current trigger threshold, a speed drop threshold, and a temperature compensation coefficient. In response to the detection of a motor anti-pinch event triggered by the first anti-pinch parameter, the device obtains the execution result of the motor anti-pinch event using the first anti-pinch parameter. Based on the preset reward function and the execution result, the device determines the actual reward value of the motor anti-pinch event. The actual reward value is used to adjust the reinforcement learning model so that the adjusted reinforcement learning model outputs a second anti-pinch parameter. This application embodiment collects information reflecting the motor's operating status in real time, uses a trained reinforcement learning model to autonomously infer and output anti-pinch parameters adapted to the current state, achieves accurate calibration of the motor's anti-pinch parameters, executes motor anti-pinch events using the anti-pinch parameters, and continuously optimizes the anti-pinch parameters output by the reinforcement learning model according to the execution effect of the anti-pinch parameters, thereby improving the safety and anti-pinch effect of the motor anti-pinch. The dynamically updated calibrated anti-pinch parameters can adapt to complex and ever-changing scenarios in reality, avoid erroneous triggering of anti-pinch actions, and further improve the usability of the anti-pinch protection function and user experience.

[0091] Reference Figure 6 This application also provides an electronic device, such as... Figure 6 As shown, it includes a processor 301, a communication interface 302, a memory 303, and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304. Processor 301, memory 303 for storing processor-executable instructions; The processor 301 is configured to execute the instructions to implement the motor anti-pinch calibration method described above.

[0092] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0093] The communication interface is used for communication between the aforementioned terminal and other devices.

[0094] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0095] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0096] In another embodiment provided in this application, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the motor anti-pinch calibration method described in any of the above embodiments.

[0097] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0098] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0099] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0100] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A method for calibrating a motor against clamping, characterized in that, The method includes: Obtain the current and historical status information of the motor; wherein the status information includes at least one of the motor's operating parameters, environmental information, and timing characteristics; The current state information and the historical state information are input into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model; wherein, the reinforcement learning model includes a state space, an action space and a reward function, and the anti-pinch parameter includes a current trigger threshold, a speed drop threshold and a temperature compensation coefficient; In response to detecting a motor anti-pinch event triggered by the first anti-pinch parameter, obtain the execution result of executing the motor anti-pinch event using the first anti-pinch parameter; The actual reward value of the motor anti-pinch event is determined based on the preset reward function and the execution result. The reinforcement learning model is adjusted using the actual reward value so that the adjusted reinforcement learning model outputs a second anti-pinch parameter.

2. The method according to claim 1, characterized in that, The step of inputting the current state information and the historical state information into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model includes: The current state information and the historical state information are input into the state space of the pre-deployed reinforcement learning model as state space information; Based on the state space information, and using the reward function as the reinforcement objective function, action space information is mapped to obtain the first anti-pinch parameter of the action space output of the reinforcement learning model.

3. The method according to claim 1 or 2, characterized in that, Before inputting the current state information and the historical state information into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameter output by the reinforcement learning model, the method further includes: Collect motor anti-pinch event data under various operating conditions; The motor anti-pinch event data is configured as a state space, and the reward function is determined with the anti-pinch parameters that trigger the motor anti-pinch event as the target output of the action space. The anti-pinch parameters in the motion space are monitored to trigger the motor anti-pinch event. The reward function is used as negative feedback to iteratively adjust the anti-pinch parameters in the motion space to obtain a reinforcement learning model. The reinforcement learning model is deployed to the vehicle.

4. The method according to claim 1, characterized in that, The step of responding to the detection of a motor anti-pinch event triggered by the first anti-pinch parameter and obtaining the execution result of executing the motor anti-pinch event using the first anti-pinch parameter includes: Write the first anti-pinch parameter into the domain controller of the motor, and update the current anti-pinch parameter in the domain controller; In response to detecting that the domain controller triggers a motor anti-pinch event based on the first anti-pinch parameter, the execution result of the motor anti-pinch event is obtained.

5. The method according to claim 1, characterized in that, The step of determining the actual reward value of the motor anti-pinch event based on the preset reward function and the execution result includes: Based on the preset reward function and the execution result, the safety reward value, comfort reward value, efficiency reward value and penalty item of the execution result are determined respectively; The actual reward value for the motor anti-pinch event is obtained by weighted summing of the safety reward value, comfort reward value, efficiency reward value, and penalty item.

6. The method according to claim 1, characterized in that, The step of adjusting the reinforcement learning model using the actual reward value so that the adjusted reinforcement learning model outputs a second anti-pinch parameter includes: The actual reward value is used as a regulation factor to adjust the reinforcement learning model, and the iteration parameters of the reinforcement learning model are determined based on the regulation factor. The model parameters of the reinforcement learning model are adjusted using the iterative parameters to obtain the adjusted reinforcement learning model, so that the adjusted reinforcement learning model outputs the second anti-pinch parameter.

7. The method according to claim 6, characterized in that, After adjusting the model parameters of the reinforcement learning model using the iterative parameters to obtain the adjusted reinforcement learning model, and after the adjusted reinforcement learning model outputs the second anti-pinch parameter, the method further includes: Based on the current state space information, and using the reward function as the reinforcement objective function, action space information mapping is performed to obtain the second anti-pinch parameter of the action space output of the adjusted reinforcement learning model; Write the second anti-pinch parameter into the motor's domain controller and update the current anti-pinch parameter in the domain controller.

8. A motor anti-pinch calibration device, characterized in that, The device includes: The acquisition module is used to acquire the current status information and historical status information of the motor; wherein, the status information includes at least one of the motor's operating parameters, environmental information, and timing characteristics; The first parameter module is used to input the current state information and the historical state information into a pre-deployed reinforcement learning model to obtain the first anti-pinch parameters output by the reinforcement learning model; wherein, the reinforcement learning model includes a state space, an action space and a reward function, and the anti-pinch parameters include a current trigger threshold, a speed drop threshold and a temperature compensation coefficient. An execution module is configured to, in response to detecting a motor anti-pinch event triggered by the first anti-pinch parameter, obtain the execution result of executing the motor anti-pinch event using the first anti-pinch parameter; The evaluation module is used to determine the actual reward value of the motor anti-pinch event based on a preset reward function and the execution result. The second parameter module is used to adjust the reinforcement learning model using the actual reward value, so that the adjusted reinforcement learning model outputs a second anti-pinch parameter.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the instructions to implement the motor anti-pinch calibration method as described in any one of claims 1 to 7.

10. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the motor anti-pinch calibration method as described in any one of claims 1 to 7.