Gear shifting mechanism control method, vehicle and storage medium

CN122544159APending Publication Date: 2026-08-11GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

在此工况下,由于驱动电机处于“非扭矩控制”状态,无法响应车辆控制系统发出的扭矩请求(如稍微转动一下,错开相位),导致两个齿轮无法啮合,换挡动作永久性失败,车辆可能因此无法挂挡行驶,用户使用体验较差

Benefits of technology

[0018] In the aforementioned technical solution, by first confirming that the vehicle is indeed in the emergency mode with limited driving capabilities, the mechanism can be prevented from being mistakenly activated during normal driving. By requiring the shift mechanism to be in a non-neutral state, it ensures that the vehicle still has driving force before shifting gears, preventing safety issues caused by shifting gears while coasting in neutral. By combining the three safeguards of the target gear not matching the actual gear, meeting the set shifting conditions, and the drive motor being in a ready state, the truly existing and safe shifting assistance needs in this emergency mode can be accurately identified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122544159A_ABST
    Figure CN122544159A_ABST
Patent Text Reader

Abstract

This application provides a gear shifting mechanism control method, a vehicle, and a storage medium. The method, applied in the field of vehicle control, generates a motor torque control request signal when the vehicle is determined to be in a pre-set abnormal operating condition and there is a genuine gear shifting need. This signal temporarily requests the motor controller to switch to torque control mode. In this torque control mode, a torque control request is sent to the motor controller, causing the motor controller to control the drive motor to rotate the gears in the gear shifting mechanism, thereby changing the gear phase. This solution effectively solves the "gear-to-gear" problem, ensuring smooth gear shifting and enabling the vehicle to engage and drive normally, thus improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle control, and more specifically, to a shift mechanism control method, a vehicle, and a storage medium in the field of vehicle gear control. Background Technology

[0002] For the rapidly developing new energy vehicles, their power systems typically include a drive motor, a reducer, a shifting mechanism (such as a two-speed automatic transmission), and wheels. The shifting mechanism contains multiple gears, and its core function is to change the transmission ratio between the drive motor and the wheels to adapt to different operating conditions such as vehicle start-up, acceleration, and cruising. In practical applications, when the driver issues a shift command (e.g., from drive to reverse), the vehicle control system controls the shifting actuator (such as a shift fork) to push the drive motor-side gear to mesh with the wheel-side gear, thereby completing the gear change.

[0003] However, when the vehicle is in an abnormal driving state (such as when the vehicle has just lost power, when a battery failure occurs while driving, or when it is in a "limp home" state), for safety and energy saving considerations, the vehicle control system will control the drive motor to enter a "non-torque control" state (i.e., the drive motor does not respond to torque requests), such as a "drive motor idling" state or a "drive motor standby preparation" state. In this state, the drive motor will not respond to torque requests from the shift mechanism, only maintaining the most basic standby or safety monitoring functions. This presents the following problems: When a vehicle is in an abnormal driving state, and the gears on both sides of the shift mechanism (i.e., the motor-side gear and the wheel-side gear) are exactly in the same phase, the tips of the two gears will be directly opposite each other and cannot mesh. This is also known as the "tooth-to-tooth" condition. Under this condition, because the drive motor is in a "non-torque control" state, it cannot respond to the torque request issued by the vehicle control system (such as slightly rotating to shift the phase), causing the two gears to fail to mesh, the shifting action to permanently fail, and the vehicle may therefore be unable to engage gears and drive, resulting in a poor user experience. Summary of the Invention

[0004] This application provides a gear shifting mechanism control method, a vehicle, and a storage medium. This method can effectively solve the "tooth-to-tooth" problem, ensure that the gear shifting action can be carried out smoothly, and that the vehicle can be engaged and driven normally, thereby improving the user experience.

[0005] In a first aspect, this application provides a method for controlling a gear shifting mechanism, the method comprising: In response to the user's gear shift request, determine the target gear; If it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the vehicle's current actual gear, a motor torque control request signal is generated. Based on the motor torque control request signal, a torque mode request is sent to the motor controller to control the drive motor to enter the torque control mode; In the torque control mode, a torque control request is sent to the motor controller, which then controls the drive motor to rotate the gears in the shifting mechanism, thereby changing the phase of the gears.

[0006] In the above technical solution, responding to the user's gear shift request and determining the target gear accurately captures the user's shifting intention. When it is determined that the vehicle is in a pre-set abnormal operating condition and the target gear differs from the vehicle's current actual gear, a motor torque control request signal is generated. This accurately identifies special scenarios requiring temporary intervention, avoiding unnecessary motor mode switching. Subsequently, based on the motor torque control request signal, a torque mode request is sent to the motor controller to control the drive motor to enter torque control mode. In torque control mode, a torque control request is sent to the motor controller, causing the motor controller to control the drive motor to rotate the gears in the shifting mechanism. This physically eliminates the "gear-to-gear" state, ensuring that the two gears can mesh smoothly, guaranteeing smooth gear shifting, and allowing the vehicle to engage and drive normally, thus improving the user experience.

[0007] In conjunction with the first aspect, in some possible implementations, the shifting mechanism includes a motor-side gear and a wheel-side gear, and the step of causing the motor controller to control the drive motor to drive the gears in the shifting mechanism to rotate includes: The motor controller controls the drive motor to rotate the motor-side gear by an angle less than one tooth pitch.

[0008] In the above technical solution, by rotating the motor-side gear by less than one tooth pitch, the gear can complete phase adjustment with minimal effective displacement, avoiding excessive gear rotation and improving work efficiency. Furthermore, the torque required for slight rotation is extremely small, and the motor energy consumption is almost negligible, saving energy and extending the service life of the drive motor.

[0009] In combination with the first aspect and the above implementation methods, in some possible implementations, the method further includes: If it is determined that the current actual gear has been switched to the same as the target gear, the motor torque control request signal is cleared, so as to send an exit torque mode request to the motor controller and control the drive motor to exit the torque control mode.

[0010] In the above technical solution, when it is determined that the current actual gear has been switched to the target gear, the motor torque control request signal is cleared and a request to exit torque mode is sent to the motor controller, controlling the drive motor to exit torque control mode. This achieves automatic and timely termination of the shift assistance function, ensuring that the drive motor is only in torque control mode for a very short time to solve the "tooth-to-tooth" problem. This avoids the additional energy consumption, safety risks and interference with normal driving control logic caused by the drive motor being in abnormal mode for a long time, forming a complete closed-loop control and improving the reliability and safety of the whole vehicle.

[0011] In combination with the first aspect and the above implementation methods, in some possible implementations, the method further includes: clearing the motor torque control request signal when any of the following conditions corresponding to the set abnormal operating conditions are detected: The vehicle is powered off, the target gear matches the current gear, the set condition prohibiting gear shifting is in effect, and the drive motor is in an abnormal state.

[0012] In the above technical solution, by clearing the motor torque control request signal when the above conditions are detected, it is equivalent to establishing a multi-condition redundancy monitoring mechanism. This ensures that the motor torque control request signal is generated only within a very small time window that is truly needed and safe and effective. This avoids increased energy consumption, safety hazards, or conflicts with other control logic caused by the residual error of the motor torque control request signal, which would result in the drive motor being in torque control mode for a long time.

[0013] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the setting of abnormal operating conditions includes at least one of the following: Within a preset time period after the vehicle is powered off; The vehicle is powered on but not in motion. The vehicle enters an emergency mode that restricts its driving capabilities.

[0014] In the above technical solution, by dividing the abnormal working conditions into "a preset time period after the vehicle is powered off", "the vehicle is powered on and not in a driving state" and "the vehicle enters an emergency mode that restricts driving ability", it covers real and high-frequency edge working conditions such as the user needing to move the vehicle urgently after turning off the engine, encountering "tooth-to-tooth" working conditions when starting the vehicle, and needing to shift gears to get out of trouble when the vehicle is limping due to a malfunction. This allows the shift mechanism control method provided in this application to intervene precisely when most needed.

[0015] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, generating a motor torque control request signal when it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the vehicle's current actual gear includes: If it is determined that the vehicle is powered on and not in a driving state, it is determined whether the vehicle meets the first request signal generation conditions. The first request signal generation conditions include at least: the target gear is inconsistent with the current actual gear, the set shifting allowance conditions are met, and the drive motor is in a ready state. If the vehicle meets the conditions for generating the first request signal, a motor torque control request signal is generated.

[0016] In the above technical solution, by first checking whether the target gear is inconsistent with the current actual gear when the vehicle is powered on but not in motion, it ensures that the motor mode switching process is only initiated when there is a genuine need to shift gears, avoiding meaningless motor mode switching. Simultaneously requiring the fulfillment of set shift permission conditions ensures that the shifting mechanism itself is in a state capable of safely performing shifts, preventing forced intervention in case of hardware failure or resource conflicts. Furthermore, by requiring the drive motor to be in a ready state, it ensures that the motor can reliably respond to subsequent mode switching and torque commands, avoiding request failures or safety risks caused by drive motor malfunctions.

[0017] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, generating a motor torque control request signal when it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the vehicle's current actual gear includes: If it is determined that the vehicle is in an emergency mode that restricts driving capability, it is determined whether the vehicle meets the second request signal generation conditions. The second request signal generation conditions include at least: the vehicle is in an emergency mode that restricts driving capability, the gear shifting mechanism is currently in a non-neutral state, the target gear is inconsistent with the current actual gear, the set gear shifting permission conditions are met, and the drive motor is in a ready state. If the vehicle meets the conditions for generating the second request signal, a motor torque control request signal is generated.

[0018] In the aforementioned technical solution, by first confirming that the vehicle is indeed in the emergency mode with limited driving capabilities, the mechanism can be prevented from being mistakenly activated during normal driving. By requiring the shift mechanism to be in a non-neutral state, it ensures that the vehicle still has driving force before shifting gears, preventing safety issues caused by shifting gears while coasting in neutral. By combining the three safeguards of the target gear not matching the actual gear, meeting the set shifting conditions, and the drive motor being in a ready state, the truly existing and safe shifting assistance needs in this emergency mode can be accurately identified.

[0019] In combination with the first aspect and the above implementation methods, in some possible implementations, issuing a torque control request to the motor controller includes: A first torque control request is sent to the motor controller to cause the drive motor to rotate in a first direction; Obtain the gear position change information of the gear shifting mechanism; If it is determined from the gear change information that the phase of the gear has not changed successfully, a second torque control request is sent to the motor controller. The second torque control request is used to make the drive motor rotate in a second direction opposite to the first direction.

[0020] In the above technical solution, by sending a first torque control request to the motor controller to make the drive motor rotate in a first direction, it is possible to attempt to change the gear phase to eliminate the tooth-to-tooth state. By acquiring the gear change information of the shifting mechanism and judging whether the gear phase has been successfully changed, and if it is determined that the phase has not been successfully changed, a second torque control request is sent to the motor controller, which can make the drive motor try to change the phase again from another direction. This achieves active correction when the gear fails to rotate once, and improves the success rate of eliminating the tooth-to-tooth state.

[0021] Secondly, this application provides a schematic diagram of a gear shifting mechanism control device, the device comprising: The determination module is used to determine the target gear in response to the user's gear shift request; The generation module is used to generate a motor torque control request signal when it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the current actual gear of the vehicle. The sending module is used to send a torque mode request to the motor controller based on the motor torque control request signal, so as to control the drive motor to enter the torque control mode; The control module is used to send a torque control request to the motor controller in the torque control mode, so that the motor controller controls the drive motor to drive the gear in the shift mechanism to rotate, thereby changing the phase of the gear.

[0022] In conjunction with the second aspect, in some possible implementations, the shifting mechanism includes a motor-side gear and a wheel-side gear, and the control module is specifically used to: cause the motor controller to drive the motor-side gear to rotate by an angle less than one tooth pitch by controlling the drive motor.

[0023] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the device further includes: a clearing module, used to clear the motor torque control request signal when it is determined that the current actual gear has been switched to the same as the target gear, so as to send an exit torque mode request to the motor controller and control the drive motor to exit the torque control mode.

[0024] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the device further includes: a detection module, used to clear the motor torque control request signal when any of the following conditions corresponding to the set abnormal operating conditions are met: vehicle power off, target gear is consistent with the current actual gear, set gear shifting prohibition condition is in effect, or the drive motor is in an abnormal state.

[0025] In combination with the second aspect and the above implementation methods, in some possible implementation methods, the setting of abnormal operating conditions includes at least one of the following: within a preset time period after the vehicle is powered off; the vehicle is powered on and not in a driving state; the vehicle enters an emergency mode that restricts its driving capabilities.

[0026] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the generation module is specifically used for: when it is determined, based on the current operating condition information, that the vehicle is in a powered-on and non-driving state, determining whether the vehicle meets the first request signal generation conditions, the first request signal generation conditions including at least: the target gear is inconsistent with the current actual gear, the set shifting allowance conditions are met, and the drive motor is in a ready state; when it is determined that the vehicle meets the first request signal generation conditions, generating a motor torque control request signal. Furthermore, when it is determined, based on the current operating condition information, that the vehicle is in an emergency mode with limited driving capability, determining whether the vehicle meets the second request signal generation conditions, the second request signal generation conditions including at least: the vehicle has entered an emergency mode with limited driving capability, the shifting mechanism is currently in a non-neutral state, the target gear is inconsistent with the current actual gear, the set shifting allowance conditions are met, and the drive motor is in a ready state; when it is determined that the vehicle meets the second request signal generation conditions, generating a motor torque control request signal.

[0027] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the sending module is specifically used to: send a first torque control request to the motor controller to make the drive motor rotate in a first direction; obtain gear change information of the shifting mechanism; and, if it is determined from the gear change information that the phase of the gear has not been successfully changed, send a second torque control request to the motor controller, the second torque control request being used to make the drive motor rotate in a second direction opposite to the first direction.

[0028] Thirdly, this application provides a vehicle, including: Memory, used to store executable program code; A processor is configured to call and run the executable program code from the memory, causing the vehicle to perform the method described in the first aspect or any possible implementation thereof.

[0029] Fourthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in the first aspect or any possible implementation thereof.

[0030] Fifthly, this application provides a computer-readable storage medium storing computer program code that, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description

[0031] Figure 1 This is a flowchart of a gear shifting mechanism control method provided in an embodiment of this application; Figure 2 This is a flowchart of another gear shifting mechanism control method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of a gear shifting mechanism control device provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application. Detailed Implementation

[0032] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0033] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0034] First, let me explain the terms used in this application: Forward gear (also known as D gear): Used for normal forward driving of the vehicle, the transmission automatically switches between 1st gear and the highest gear.

[0035] Parking gear (also known as P gear): Used to lock the transmission output shaft after parking to prevent the vehicle from rolling.

[0036] Reverse gear (also known as R gear): used for driving the vehicle backward.

[0037] Low gear (also known as L gear): Used to limit the transmission to a lower gear (such as 1st or 2nd gear), used in scenarios such as climbing steep slopes or descending long slopes using engine braking.

[0038] Torque control mode: The motor controller uses torque value as the control target and can accurately respond to torque requests (e.g., "output 2 N·m") from external sources (such as the vehicle controller). In this mode, the motor is "obedient" and can output positive or negative torque as needed.

[0039] Non-torque control mode: The motor does not respond to torque requests and may be in one of the following states: "Speed ​​control mode: target speed (e.g., maintain 500 rpm)", "Ready state: standby, no power output", "Idle state: no control target, free rotation", "Fault protection state: torque output is prohibited", etc.

[0040] For the rapidly developing new energy vehicles, their power systems typically include a drive motor, a reducer, a shift mechanism (such as a two-speed automatic transmission), and wheels. The shift mechanism contains multiple gears, and its core function is to change the transmission ratio between the drive motor and the wheels to adapt to different operating conditions such as vehicle start-up, acceleration, and cruising. In practical applications, when the driver issues a shift command (e.g., from drive to reverse), the vehicle control system controls the shift actuator (such as a shift fork) to push the drive motor-side gear to mesh with the wheel-side gear, thus completing the gear shift. However, when the vehicle is in abnormal driving conditions (e.g., the vehicle has just lost power, the vehicle has experienced a battery failure, or is in a "limp home" state), for safety and energy conservation reasons, the vehicle control system will control the drive motor to enter a "non-torque control" state (also known as non-torque control mode, where the drive motor does not respond to torque requests), such as a "drive motor idling" state or a "drive motor standby preparation" state. In this state, the drive motor will not respond to torque requests from the shift mechanism, only maintaining basic standby or safety monitoring functions. This can lead to the following problems: When the vehicle is in an abnormal driving state, and the gears on both sides of the shift mechanism (i.e., the motor-side gear and the wheel-side gear) happen to be in the same phase, the tips of the two gears will be directly opposite each other and cannot mesh. This is also known as the "tooth-to-tooth" condition. Under this condition, because the drive motor is in a "non-torque control" state, it cannot respond to the torque request issued by the vehicle control system (such as slightly rotating to shift the phase), causing the two gears to fail to mesh, the shifting action to permanently fail, and the vehicle may therefore be unable to engage gears and drive, resulting in a poor user experience.

[0041] As described above, under abnormal driving conditions, the gears on both sides of the shift mechanism cannot mesh because they are in the same phase, which directly manifests as "tooth-to-tooth". However, the underlying reason is that, for safety and energy-saving considerations, the vehicle control system forcibly locks the drive motor in a non-torque control mode under such conditions, preventing the drive motor from responding to the torque request from the shift mechanism to offset the phase. In other words, the essence of the problem is not that the "tooth-to-tooth" state itself cannot be eliminated (this can be solved by rotating the gears through torque control under normal driving conditions), but that it is "not allowed" to eliminate the tooth-to-tooth state through torque control under abnormal driving conditions. Based on this understanding, this application proposes the following solution: When an abnormal operating condition with controllable safety risks is identified, and there is a real shifting demand (i.e., the target gear is different from the actual gear), a motor torque control request signal is generated to temporarily request the motor to switch to torque control mode. This allows the motor to respond to the torque control request and drive the gears to rotate to change the phase, thereby eliminating the tooth-to-tooth state while ensuring safety, and automatically restoring the original mode after the shift is completed.

[0042] Figure 1 This is a flowchart of a shift mechanism control method provided in an embodiment of this application. The execution subject of this method can be a vehicle controller, such as a vehicle control unit (VCU), a hybrid control unit (HCU), or a transmission control unit (TCU) integrating shift logic, etc. Figure 1 As shown, the method includes the following steps: Step 101: In response to the user's gear shift request, determine the target gear.

[0043] Step 102: If it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the vehicle's current actual gear, generate a motor torque control request signal.

[0044] Step 103: Based on the motor torque control request signal, send a torque mode request to the motor controller to control the drive motor to enter the torque control mode.

[0045] Step 104: In torque control mode, send a torque control request to the motor controller, so that the motor controller drives the gear in the shifting mechanism to rotate by controlling the drive motor, thereby changing the phase of the gear.

[0046] For ease of description, the following introduction uses the vehicle controller as the executing entity to describe this solution: After receiving a user's gear shift request, such as if the user wants to shift from P to D, or from D to R, or from R to D, the vehicle controller can determine the target gear the user wants to switch to based on the gear shift request.

[0047] The vehicle controller then determines whether the vehicle is currently in a pre-defined abnormal operating condition, which includes at least the following: Within a preset time period after the vehicle is powered off; The vehicle is powered on but not in motion. The vehicle enters an emergency mode that restricts its driving capabilities.

[0048] To facilitate understanding, the following examples illustrate the abnormal operating conditions set above: "Within the preset time period after vehicle power failure" refers to the period during which, after the user presses the ignition button, the vehicle does not immediately enter a complete sleep state, but maintains the standby capability of some systems, especially communication and gear shift control modules, for a very short time window (e.g., 5 seconds). It should be noted that the reason "within the preset time period after vehicle power failure" is set as an abnormal operating condition is that, in actual applications, there are often needs to move the vehicle immediately after it has been turned off if it is not parked properly. If the gear shift mechanism fails to shift gears due to a "gear-to-gear" problem, the user has to power on the vehicle again and try again, resulting in a very poor user experience.

[0049] "Vehicle powered but not in motion" refers to a situation where the vehicle is powered on (drive ready) but at zero speed and not in motion. Specific scenarios include: the vehicle is parked and preparing to start, or the vehicle is stationary in neutral (N) or drive (D) while stopped at a red light with the brake applied. It's important to note that "Vehicle powered but not in motion" is set as an abnormal operating condition because in real-world applications, the following scenario frequently occurs: "User gets into the vehicle, starts the vehicle, and tries to shift gears." If the vehicle cannot shift gears due to a gear-to-gear misalignment issue, the user may mistakenly believe there is a vehicle malfunction and repeatedly attempt to engage the gear, or even call for roadside assistance. This solution intervenes only when it is "safe and necessary," and the powered-on, stationary state fully meets the safety requirements (the vehicle is not moving and will not cause unexpected acceleration or loss of control).

[0050] "Vehicle enters limited driving capability emergency mode (also known as Limp Home mode)" refers to a situation where the vehicle actively limits its performance due to a serious malfunction (such as internal battery abnormalities, motor overheating, etc.), restricting the maximum speed (e.g., to 20 km / h) and only allowing the vehicle to "limp" to the nearest repair shop. In this mode, the drive motor can still operate, but its responsiveness is limited. It's important to note that "Vehicle enters limited driving capability emergency mode" is set as an abnormal operating condition because: in this emergency mode, the user may still need to shift gears, for example: "When encountering a long downhill slope, it's necessary to switch from D to L to utilize engine braking and reduce brake load," "When needing to make a U-turn or reverse, it must be engaged in R," "When climbing a steep slope, a lower gear is needed," etc. If gear shifting fails due to "gear-to-gear" misalignment in these situations, the vehicle may become stuck halfway downhill, unable to make a U-turn, or experience brake overheating while descending a slope, leading to a dangerous situation. Therefore, this solution specifically lists "Vehicle enters limited driving capability emergency mode" as an abnormal operating condition that can be intervened.

[0051] By dividing abnormal operating conditions into "a preset time period after the vehicle is powered off", "the vehicle is powered on and not in a driving state", and "the vehicle enters an emergency mode with limited driving capabilities", the method covers real and high-frequency edge conditions such as the need to move the vehicle urgently after the user turns off the engine, encountering "tooth-to-tooth" conditions when starting the vehicle, and needing to shift gears to get out of trouble when the vehicle is limping due to a malfunction. This allows the shift mechanism control method provided in this application to intervene precisely when most needed.

[0052] After determining that the vehicle is in the aforementioned abnormal operating condition, it is necessary to further determine whether there is a genuine gear shifting requirement. It's important to note that although the user has previously triggered a gear shift request, this does not necessarily mean that "the current actual gear is inconsistent with the target gear." For example, the user may already be in D gear and press D again (accidental operation or duplicate request), or the user may shift from D gear to L gear, but the shift mechanism is already in L gear (e.g., a previous shift was completed, but the signal was delayed). In these situations, although the user has issued a gear shift request, a shift is not actually required (i.e., the target gear is the same as the current actual gear), therefore there is no "gear-to-gear" problem, and a motor torque control request signal should not be generated to send a torque mode request to the motor controller. It should be understood that generating a motor torque control request signal would cause unnecessary motor mode switching, wasting resources and potentially introducing risks. Therefore, in this embodiment, a motor torque control request signal is only generated when it is determined that the vehicle is in the specified abnormal operating condition and the target gear is different from the vehicle's current actual gear.

[0053] The motor torque control request signal can be a software flag, represented by a Boolean variable (0 or 1). Its function is to send a request to the motor controller: "Please allow the drive motor to enter torque control mode." For ease of understanding, an example is provided below: When the software flag is 1, it indicates that the current operating condition requires the drive motor to respond to torque requests (e.g., to resolve "gear-to-gear" issues). The vehicle controller will then send a "Enter Torque Control Mode" command to the motor controller to control the drive motor into torque control mode. When the software flag is 0, it indicates that the drive motor does not need to enter torque control mode; it can maintain its original non-torque control mode. It's important to note that this software flag itself does not directly control the drive motor; rather, it's an intermediate signal used to trigger the mode switching process. It ensures that the drive motor only temporarily changes its control mode when truly needed, and automatically resets to its original state after the shift is complete.

[0054] When it is determined that the vehicle is in a pre-set abnormal operating condition and the target gear is different from the vehicle's current actual gear, a motor torque control request signal is generated, specifically: As one implementation method, when it is determined that the vehicle is powered on but not in a driving state, it can be determined whether the vehicle meets the first request signal generation conditions. The first request signal generation conditions include at least: the target gear is inconsistent with the current actual gear, the set shifting allowable conditions are met, and the drive motor is in a ready state. If it is determined that the vehicle meets the first request signal generation conditions, a motor torque control request signal is generated.

[0055] In practical applications, when the vehicle is in a "powered but not driving state"—for example, when the user presses the brake or start button, the vehicle's high voltage is powered on and the dashboard lights up, but the vehicle remains stationary, the actual gear is P or N, and it has not yet started moving—the vehicle controller will further check the conditions for generating the first request signal. Only when all conditions are met will a motor torque control request signal be generated. These conditions include at least: the target gear is inconsistent with the current actual gear, the set shift permission conditions are met, and the drive motor is in a ready state.

[0056] Specifically, regarding the condition "the target gear is inconsistent with the current actual gear," assuming the user wants to shift gears (e.g., from D to R, or from R to D), if the target gear already matches the current actual gear (e.g., the vehicle is already in D, and the user has pressed D again), it means there is no need to shift gears, and therefore no shifting is required. Therefore, setting this condition is necessary.

[0057] For "meeting the set shifting allowable conditions", that is, the shifting mechanism itself allows shifting, such as the axle control unit (ACU) being in normal condition, no shifting suppression fault, and no torque output from the shifting actuator, if the shifting system itself is faulty or occupied, even if the gear-to-gear connection is resolved, shifting cannot be safely performed. Therefore, setting this condition is necessary.

[0058] The ACU (Automatic Controller Unit) is a small controller specifically responsible for controlling the rear axle shift mechanism. Its main functions include receiving shift commands from the vehicle controller or user, driving the shift actuator to push the gears, and monitoring the position, speed, and fault status of the shift mechanism. A normal ACU status means that: the ACU's hardware and software are functioning normally (no crashes, no communication interruptions, no internal errors); the ACU can correctly receive and execute shift commands; and the sensor signals fed back by the ACU are valid and reliable. "Shift suppression" is a safety protection mechanism. When the vehicle detects certain conditions that do not meet the shifting requirements, it will actively prohibit shifting, i.e., "shift suppression function is active." Common reasons for triggering shift suppression include: excessive vehicle speed, excessive vehicle speed, and the system detecting a serious fault (such as motor overcurrent or position sensor failure). A "no shift suppression fault" means that none of these suppression conditions are met, and the system allows normal shifting. A gear shift actuator is typically a servo motor or stepper motor. In practical applications, it can output torque to convert rotary motion into linear motion through mechanisms such as lead screws and cams, thereby driving the gear shift actuator to rotate gears. "Gear shift actuator with no torque output" means that the gear shift actuator is not currently outputting any force to drive the gear shift actuator, that is, it is in an idle or stationary state and is not performing a gear shifting action.

[0059] The condition "drive motor is ready" means that the motor controller reports that the motor is ready and can respond to mode switching and torque commands. If the drive motor itself is faulty or not ready, it is meaningless to request it to enter torque control, and may even cause risks. Therefore, setting this condition is necessary.

[0060] By first verifying the discrepancy between the target gear and the current gear when the vehicle is powered on but not in motion, this ensures that the motor mode switching process is only initiated when there is a genuine need to shift gears, avoiding meaningless motor mode switching. Simultaneously, by requiring the fulfillment of set shift permission conditions, this ensures the shifting mechanism itself is in a safe state to perform shifts, preventing forced intervention in case of hardware failure or resource conflicts. Furthermore, by requiring the drive motor to be in a ready state, this ensures the motor can reliably respond to subsequent mode switching and torque commands, avoiding request failures or safety risks due to drive motor malfunctions. In summary, this solution, through the combination of these three conditions, accurately identifies scenarios where shift assistance is truly needed and safe to implement under the common condition of "powered on but not in motion," thereby maximizing the shift success rate while ensuring system safety and avoiding energy waste or potential hazards caused by erroneous generation of motor torque control request signals when conditions are not met.

[0061] As another implementation, when it is determined that the vehicle is in an emergency mode that restricts its driving capabilities, it can be determined whether the vehicle meets the conditions for generating a second request signal. The conditions for generating a second request signal include at least: the vehicle is in an emergency mode that restricts its driving capabilities, the gear shifting mechanism is currently in a non-neutral state, the target gear is inconsistent with the current actual gear, the set shifting allowance conditions are met, and the drive motor is in a ready state. If it is determined that the vehicle meets the conditions for generating a second request signal, a motor torque control request signal is generated.

[0062] It should be noted that the "emergency mode with limited driving capability (also known as Limp Home mode)" refers to the following: when the vehicle experiences a serious malfunction (such as an internal battery pack failure, motor overheating, or high-voltage system abnormality), in order to protect core components and allow the driver to barely drive the car to the nearest repair shop, the vehicle will actively limit power output (e.g., limit the maximum speed to 20 km / h, limit accelerator pedal response), and simultaneously illuminate the malfunction indicator lamp. In this mode, the vehicle is still moving slowly, and the driver may still have a need to shift gears, such as shifting from D to L to obtain greater climbing torque, or shifting from D to R to make a U-turn or reverse into a parking space. However, in this mode, the drive motor is usually also in a non-torque control mode and cannot respond to normal torque requests. If a "gear-to-gear" problem occurs at this time, the shift will permanently fail. Therefore, this application embodiment designs a second request signal generation condition, which includes at least: the vehicle enters the emergency mode with limited driving capability, the shift mechanism is currently not in neutral, the target gear is inconsistent with the current actual gear, the set shift permission conditions are met, and the drive motor is in a ready state.

[0063] For the specific implementation of "the target gear is inconsistent with the current actual gear, the set shifting conditions are met, and the drive motor is in a ready state", please refer to the above embodiments, which will not be repeated here.

[0064] Regarding "the vehicle entering an emergency mode that restricts driving capabilities," it indicates that the vehicle has been confirmed to have entered this emergency mode.

[0065] The phrase "the shift mechanism is currently not in neutral" indicates that the vehicle's current actual gear is not N (it could be D, R, etc.). In emergency mode, the primary task should be to prompt the driver to return to a gear, not to assist with shifting. If the drive motor were to rotate the gears to assist with shifting at this time, even if successful, it would merely be shifting from neutral to a gear, but the vehicle would already be coasting in neutral, creating a safety risk. A more typical and frequent scenario is: the vehicle is in D gear in emergency mode, and the driver requests to shift to L gear for climbing a hill. In this case, the shift mechanism is not in neutral (D gear), the vehicle has driving force, and the basic safety requirements are met. Under these circumstances, if a "gear-to-gear" misalignment occurs, the shift failure will prevent the vehicle from obtaining the high torque output of a lower gear, potentially causing it to get stuck on the slope. Therefore, this application sets "the shift mechanism is currently not in neutral" as a necessary component of the second request signal generation condition.

[0066] By first confirming that the vehicle is indeed in the emergency mode that restricts driving capabilities, the mechanism can be prevented from being mistakenly activated during normal driving. By requiring the shift mechanism to be in a non-neutral state, it ensures that the vehicle still has driving force before shifting gears, preventing safety issues caused by shifting while coasting in neutral. By combining the three safeguards of a discrepancy between the target gear and the actual gear, meeting the set shifting conditions, and the drive motor being in a ready state, the actual and safe shifting assistance needs in this emergency mode can be accurately identified.

[0067] Furthermore, the conditions for generating the request signal "within the preset time period after the vehicle is powered off" may include: the preset time period has not been exceeded after the vehicle is powered off, the target gear is inconsistent with the current actual gear, the set shifting allowable conditions are met, and the drive motor is in a ready state, which will not be elaborated here.

[0068] Following the above, a motor torque control request signal is generated, and based on this signal, a torque mode request is sent to the motor controller. After the drive motor enters torque control mode, it can output positive or negative torque as needed. At this point, the vehicle controller can send a torque control request to the motor controller (e.g., request 2 N·m of torque). Upon receiving this torque control request, the motor controller will precisely control the drive motor to output this torque, thereby causing the motor shaft to drive the motor-side gear in the shift mechanism to rotate, changing the gear phase and resolving the "tooth-to-tooth" problem.

[0069] During this process, the motor controller can control the drive motor to rotate the motor-side gear by less than one tooth pitch. In specific implementation, the vehicle controller can send a precise torque control request to the motor controller, such as "Please output 2 N·m of torque and rotate 0.5 degrees." At this time, the motor controller will precisely control the drive motor to output this torque, thereby causing the motor shaft to drive the motor-side gear in the shift mechanism to rotate very slightly, engaging with the wheel-side gear in the shift mechanism.

[0070] By rotating the motor-side gear by less than one tooth pitch, phase adjustment can be achieved with minimal effective displacement, preventing excessive gear rotation and improving work efficiency. Furthermore, the torque required for slight rotation is extremely small, making motor energy consumption negligible, thus saving energy and extending the lifespan of the drive motor.

[0071] Furthermore, the process of the motor controller controlling the drive motor to rotate the gear on the motor side is not always successful. If it fails, the aforementioned "gear-to-gear" problem still cannot be solved. In view of this, this application provides a fallback solution. Specifically, sending a torque mode request to the motor controller includes: sending a first torque control request to the motor controller to make the drive motor rotate in a first direction; obtaining gear change information of the shifting mechanism; and if it is determined from the gear change information that the phase of the gear has not changed successfully, sending a second torque control request to the motor controller, the second torque control request being used to make the drive motor rotate in a second direction opposite to the first direction.

[0072] In practice, the vehicle controller first sends a first torque control request to the motor controller, commanding the drive motor to rotate a small angle (e.g., 0.5 degrees) in a first direction (e.g., clockwise) to rotate the gears in the shifting mechanism, thereby shifting the gears from a "tooth-to-tooth" state to a meshable phase. After issuing the first torque control request, the vehicle controller obtains the gear position change information of the shifting mechanism, which reflects whether the gears have successfully disengaged from the "tooth-to-tooth" state and completed engagement. If the gear position change information determines that the gear phase has not been successfully changed (i.e., the "tooth-to-tooth" state still exists, and the shift is not yet complete), the vehicle controller sends a second torque control request to the motor controller, commanding the drive motor to rotate in a second direction opposite to the first direction (e.g., counterclockwise) to try to change the gear phase again. Finally, by rotating in the opposite direction, the "tooth-to-tooth" state is eliminated from another direction, allowing the gears to mesh and completing the shift.

[0073] By sending a first torque control request to the motor controller to make the drive motor rotate in a first direction, an attempt can be made to change the gear phase to eliminate the tooth-to-tooth state. By acquiring the gear change information of the shifting mechanism and determining whether the gear phase has been successfully changed, and if it is determined that the phase has not been successfully changed, a second torque control request is sent to the motor controller, which can make the drive motor try to change the phase again from another direction. This achieves active correction when the gear fails to rotate once, improving the success rate of eliminating the tooth-to-tooth state.

[0074] Based on the above, the gear shifting mechanism control method provided in this application responds to the user's gear shifting request, determines the target gear, and can accurately obtain the user's gear shifting intention. When it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the vehicle's current actual gear, a motor torque control request signal is generated. This can accurately identify special scenarios requiring temporary intervention and avoid unnecessary motor mode switching. Subsequently, based on the motor torque control request signal, a torque mode request is sent to the motor controller to control the drive motor to enter torque control mode. In torque control mode, a torque control request is sent to the motor controller, causing the motor controller to control the drive motor to rotate the gears in the gear shifting mechanism. This physically eliminates the "tooth-to-tooth" state, ensuring that the two "tooth-to-tooth" gears can mesh smoothly, guaranteeing smooth gear shifting, and allowing the vehicle to engage and drive normally, thus improving the user experience.

[0075] Figure 2 A flowchart of another gear shifting mechanism control method provided in the embodiments of this application is shown below. Figure 2 As shown, the method includes the following steps: Step 201: In response to the user's gear shift request, determine the target gear.

[0076] Step 202: If it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the vehicle's current actual gear, generate a motor torque control request signal.

[0077] Step 203: Based on the motor torque control request signal, send a torque mode request to the motor controller to control the drive motor to enter the torque control mode.

[0078] Step 204: In torque control mode, send a torque control request to the motor controller, so that the motor controller controls the drive motor to drive the gears in the shifting mechanism to rotate, thereby changing the phase of the gears.

[0079] Step 205: If it is determined that the current actual gear has been switched to the same as the target gear, clear the motor torque control request signal to send an exit torque mode request to the motor controller and control the drive motor to exit the torque control mode.

[0080] For the specific implementation of steps 201-204, please refer to the above embodiments, which will not be repeated here.

[0081] Regarding step 205, it is understood that the drive motor entering torque control mode should be conditional and time-limited. It should exit promptly after the shift assistance task is completed; otherwise, the drive motor will remain in torque control mode for an extended period, causing the vehicle control logic to deviate from its original design. Therefore, a clear termination condition needs to be set to trigger the exit. This application selects "the current actual gear has been switched to the same as the target gear" as the termination condition because satisfying this condition directly indicates that the shifting action has been completed, the gear-to-gear problem has been resolved, and the motor no longer needs to be in torque control mode to respond to torque requests. Therefore, it is a very precise termination timing.

[0082] In practice, the motor-side gear in the shifting mechanism is rotated by the drive motor and meshes with the wheel-side gear, thus solving the "gear-to-gear" problem. At this point, the vehicle's current gear can be smoothly shifted to the target gear. After the gear shift is completed, the motor torque control mode, which was temporarily requested to overcome the "gear-to-gear" problem, can be disengaged.

[0083] To make it easier to understand, the following example is provided: Suppose that within 5 seconds of powering off, the user shifts from P to R and encounters a "gear-to-gear" problem. At this point, the vehicle controller generates a motor torque control request signal, requesting the drive motor to enter torque control mode and issuing a small torque command. The shift is successful, and the actual gear becomes R. The vehicle controller then detects that both the target gear and the current actual gear are R, meaning they are the same gear. The vehicle controller then performs the following operation: clears the motor torque control request signal and sends a message to the motor controller saying "Please exit torque control mode and return to standby state," causing the motor controller to switch the drive motor back to non-torque control mode.

[0084] By clearing the motor torque control request signal and sending an exit torque mode request to the motor controller when it is determined that the current actual gear has been switched to the target gear, the drive motor is controlled to exit the torque control mode, thus realizing the automatic and timely termination of the shift assistance function. This ensures that the drive motor is in torque control mode only for a very short time to solve the "tooth-to-tooth" problem, thereby avoiding the extra energy consumption, safety risks and interference with normal driving control logic caused by the drive motor being in abnormal mode for a long time. This forms a complete closed-loop control, improving the reliability and safety of the entire vehicle.

[0085] Furthermore, it should be noted that after generating the motor torque control request signal, the vehicle controller needs to continuously monitor a series of "termination conditions." If any one of these conditions is met, the system must immediately clear the motor torque control request signal and then request the motor to exit torque control mode. This is a safety redundancy design to ensure that the flag is not incorrectly held when it should not be activated. Specifically, the motor torque control request signal is cleared when any of the following conditions corresponding to the set abnormal operating conditions are detected: vehicle power off, target gear matching the current actual gear, set gear shift prohibition condition taking effect, or drive motor abnormal status (e.g., drive motor not in ready state, not in idling state, and not in torque control mode).

[0086] To facilitate understanding, examples are provided below for each of the above "termination conditions": 1. Regarding "vehicle power off". Assume the following scenario: "After the motor torque control request signal is generated, the user has not yet completed the gear shift, but accidentally presses the ignition button again, and the vehicle begins to power off". The vehicle controller detects the power off command (i.e., the "vehicle power off" condition is met), immediately clears the motor torque control request signal, and requests the drive motor to exit the torque control mode to avoid abnormal torque output by the drive motor during the power off process, thus realizing hardware protection.

[0087] 2. Regarding the condition "the target gear matches the current actual gear": Assume the following scenario: "Within 5 seconds of powering off, the user shifts from P to D and encounters a gear-to-gear mismatch. The vehicle controller generates a motor torque control request signal, the drive motor enters torque control mode, and emits a small amount of torque to change the gear phase in the shift mechanism, resulting in a successful shift. At this point, the actual gear becomes D." The vehicle controller detects that both the target gear and the current actual gear are D, satisfying the condition "the target gear matches the current actual gear." In this case, the vehicle controller immediately clears the motor torque control request signal and requests the drive motor to exit torque control mode; the drive motor no longer responds to additional torque requests.

[0088] 3. Regarding "Setting the condition to prohibit shifting (also known as suppressing shifting)". Assume the following scenario: "After the motor torque control request signal is generated, the shift actuator suddenly reports an internal fault, and the system determines that shifting is prohibited." The vehicle controller detects that "Setting the condition to prohibit shifting is effective" has become true. At this time, the vehicle controller immediately clears the motor torque control request signal and requests the drive motor to exit torque control mode. It will not request the drive motor to rotate again, because even if it rotates, it cannot shift gears, thus avoiding invalid operations.

[0089] 4. Regarding "abnormal drive motor status": Assume the following scenario: "After the motor torque control request signal is generated, it requests the drive motor to enter torque control mode, but the motor controller reports that the drive motor is in a fault state." The vehicle controller detects that the drive motor status does not conform to any normal mode (i.e., the drive motor status is abnormal), and the above conditions are met. At this time, the vehicle controller immediately clears the motor torque control request signal and requests the drive motor to exit torque control mode.

[0090] By clearing the motor torque control request signal when the above conditions are detected, a multi-condition redundancy monitoring mechanism is established to ensure that the motor torque control request signal is generated only within a very small time window that is truly needed and safe and effective. This avoids increased energy consumption, safety hazards, or conflicts with other control logic caused by the residual error of the motor torque control request signal, which would result in the drive motor being in torque control mode for a long time.

[0091] The following describes the conditions for clearing the motor torque control request signal under different abnormal operating conditions: For the "preset time period after the vehicle is powered off", the corresponding clearing conditions can at least include: 1. Vehicle power off: When the preset time period ends, the vehicle may be completely powered off, or the user may press and hold the ignition button again to force power off, triggering the "vehicle power off" condition and clearing the motor torque control request signal.

[0092] 2. The target gear matches the current actual gear: This setting will be automatically cleared after a successful gear shift.

[0093] 3. The drive motor is in an abnormal state.

[0094] For the condition "the vehicle is powered on but not in motion", the corresponding clearing conditions can include at least the following: 1. Vehicle power failure, including vehicle power failure caused by high voltage drop.

[0095] 2. The target gear is consistent with the current actual gear.

[0096] 3. The setting of the condition prohibiting gear shifting is now in effect.

[0097] 4. The drive motor is in an abnormal state.

[0098] For "vehicle entering emergency mode with limited driving capabilities", the corresponding clearing conditions can include at least the following: 1. Vehicle power off, including.

[0099] 2. The target gear is consistent with the current actual gear.

[0100] 3. The drive motor is in an abnormal state.

[0101] Furthermore, the clearing condition corresponding to "the vehicle enters an emergency mode that restricts driving ability" can also include "the vehicle is no longer in an emergency mode that restricts driving ability".

[0102] Figure 3 This is a schematic diagram of the structure of a gear shifting mechanism control device provided in an embodiment of this application, as shown below. Figure 3 As shown, the device includes: a determining module 31, a generating module 32, a sending module 33, and a control module 34.

[0103] The determination module 31 is used to determine the target gear in response to the user's gear shift request.

[0104] The generation module 32 is used to generate a motor torque control request signal when it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the current actual gear of the vehicle.

[0105] The sending module 33 is used to send a torque mode request to the motor controller based on the motor torque control request signal, so as to control the drive motor to enter the torque control mode.

[0106] The control module 34 is used to send a torque control request to the motor controller in the torque control mode, so that the motor controller controls the drive motor to drive the gear in the shift mechanism to rotate, thereby changing the phase of the gear.

[0107] In one possible implementation, the shifting mechanism includes a motor-side gear and a wheel-side gear, and the control module 34 is specifically used to: enable the motor controller to drive the motor-side gear to rotate by an angle less than one tooth pitch by controlling the drive motor.

[0108] In one possible implementation, the device further includes a clearing module, configured to clear the motor torque control request signal when it is determined that the current actual gear has been switched to the same as the target gear, so as to send an exit torque mode request to the motor controller and control the drive motor to exit the torque control mode.

[0109] In one possible implementation, the device further includes a detection module, configured to clear the motor torque control request signal when any of the following conditions corresponding to the set abnormal operating conditions are met: vehicle power off, target gear is consistent with the current actual gear, set gear shifting prohibition condition is in effect, or the drive motor is in an abnormal state.

[0110] In one possible implementation, the abnormal operating conditions include at least one of the following: within a preset time period after the vehicle is powered off; the vehicle is powered on and not in a driving state; the vehicle enters an emergency mode that restricts its driving capabilities.

[0111] In one possible implementation, the generation module 32 is specifically configured to: when it is determined that the vehicle is powered on but not in a driving state, determine whether the vehicle meets a first request signal generation condition, the first request signal generation condition including at least: the target gear is inconsistent with the current actual gear, the set shift permission condition is met, and the drive motor is in a ready state; if it is determined that the vehicle meets the first request signal generation condition, generate a motor torque control request signal. Furthermore, when it is determined that the vehicle is in an emergency mode that restricts driving capability, determine whether the vehicle meets a second request signal generation condition, the second request signal generation condition including at least: the vehicle is in an emergency mode that restricts driving capability, the shift mechanism is currently in a non-neutral state, the target gear is inconsistent with the current actual gear, the set shift permission condition is met, and the drive motor is in a ready state; if it is determined that the vehicle meets the second request signal generation condition, generate a motor torque control request signal.

[0112] In one possible implementation, the sending module is specifically configured to: send a first torque control request to the motor controller to make the drive motor rotate in a first direction; acquire gear change information of the shifting mechanism; and, if it is determined from the gear change information that the phase of the gear has not been successfully changed, send a second torque control request to the motor controller, the second torque control request being used to make the drive motor rotate in a second direction opposite to the first direction.

[0113] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0114] This application also provides a vehicle. Figure 4 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application.

[0115] Typically, vehicle 400 includes one or more processors 401 and one or more memories 402.

[0116] Processor 401 may include one or more processing cores, such as a quad-core processor. Processor 401 may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0117] Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 402 are used to store at least one computer program, which is executed by processor 401 to implement the power margin determination method provided in the method embodiments of this application.

[0118] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on vehicle 400 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0119] In addition, the apparatus provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the method provided in the above embodiments.

[0120] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the aforementioned method steps to implement the method provided in the above embodiment.

[0121] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the method provided in the above embodiment.

[0122] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0123] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0124] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0125] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A shift mechanism control method characterized by, The method includes: In response to the user's gear shift request, determine the target gear; If it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the vehicle's current actual gear, a motor torque control request signal is generated. Based on the motor torque control request signal, a torque mode request is sent to the motor controller to control the drive motor to enter the torque control mode; In the torque control mode, a torque control request is sent to the motor controller, which then controls the drive motor to rotate the gears in the shifting mechanism, thereby changing the phase of the gears.

2. The method of claim 1, wherein, The shifting mechanism includes a motor-side gear and a wheel-side gear. The step of having the motor controller control the drive motor to rotate the gears in the shifting mechanism includes: The motor controller controls the drive motor to rotate the motor-side gear by an angle less than one tooth pitch.

3. The method of claim 1, wherein, Also includes: If it is determined that the current actual gear has been switched to the same as the target gear, the motor torque control request signal is cleared, so as to send an exit torque mode request to the motor controller and control the drive motor to exit the torque control mode.

4. The method of claim 1, wherein, Also includes: The motor torque control request signal is cleared when any of the following conditions corresponding to the set abnormal operating conditions are met: The vehicle is powered off, the target gear matches the current gear, the set condition prohibiting gear shifting is in effect, and the drive motor is in an abnormal state.

5. The method according to any one of claims 1 to 4, characterized in that, The abnormal operating conditions set include at least one of the following: Within a preset time period after the vehicle is powered off; The vehicle is powered on but not in motion. The vehicle enters an emergency mode that restricts its driving capabilities.

6. The method of claim 5, wherein, The step of generating a motor torque control request signal when it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the vehicle's current actual gear includes: If it is determined that the vehicle is powered on and not in a driving state, it is determined whether the vehicle meets the first request signal generation conditions. The first request signal generation conditions include at least: the target gear is inconsistent with the current actual gear, the set shifting allowance conditions are met, and the drive motor is in a ready state. If the vehicle meets the conditions for generating the first request signal, a motor torque control request signal is generated.

7. The method of claim 5, wherein, The step of generating a motor torque control request signal when it is determined that the vehicle is in a set abnormal operating condition and the target gear is different from the vehicle's current actual gear includes: If it is determined that the vehicle is in an emergency mode that restricts driving capability, it is determined whether the vehicle meets the second request signal generation conditions. The second request signal generation conditions include at least: the vehicle is in an emergency mode that restricts driving capability, the gear shifting mechanism is currently in a non-neutral state, the target gear is inconsistent with the current actual gear, the set gear shifting permission conditions are met, and the drive motor is in a ready state. If the vehicle meets the conditions for generating the second request signal, a motor torque control request signal is generated.

8. The method according to claim 1, characterized in that, Sending a torque control request to the motor controller includes: A first torque control request is sent to the motor controller to cause the drive motor to rotate in a first direction; Obtain the gear position change information of the gear shifting mechanism; If it is determined from the gear change information that the phase of the gear has not changed successfully, a second torque control request is sent to the motor controller. The second torque control request is used to make the drive motor rotate in a second direction opposite to the first direction.

9. A vehicle, characterized in that, The vehicles include: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the vehicle to perform the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 8.