Electric two-wheeled vehicle downhill speed control method

By using an electric motor reverse braking (EBS) system in electric two-wheelers, electromagnetic braking torque is used to replace mechanical friction braking, which solves the risk of thermal fade when electric two-wheelers go downhill, realizes adaptive slope speed control, and improves safety and driving experience.

CN122379310APending Publication Date: 2026-07-14苏州无界妙控科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610685563.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-18
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

When electric two-wheeled vehicles go downhill, the mechanical brakes are prone to heat fade, which can lead to a decrease in braking performance or even failure, posing a serious safety hazard.

Method used

The system uses a drive motor to generate an electromagnetic braking torque that is opposite to the direction of wheel rotation, replacing traditional mechanical friction braking. By combining slope sensing, intelligent decision-making, and electronic braking, it can automatically identify slopes and actively control downhill speed.

Benefits of technology

The problem of mechanical brake fade has been solved, improving the safety and reliability of electric two-wheelers when driving downhill, reducing the user's operating burden, and enhancing the driving experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122379310A_ABST
    Figure CN122379310A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a method for controlling the downhill speed of an electric two-wheeled vehicle, which comprises: acquiring the current slope angle and the current speed of the electric two-wheeled vehicle; in response to the downhill auxiliary function being activated and in the downhill working condition, determining the target angle range in which the current slope angle is located; and controlling the electric two-wheeled vehicle to generate an electromagnetic braking torque opposite to the rotating direction of the wheel according to the speed deviation between the current speed and the target downhill speed, so as to control the downhill speed within a preset speed range. Through the method, the technical problem that the mechanical brake of the electric two-wheeled vehicle is prone to causing heat attenuation risk when the electric two-wheeled vehicle is downhill is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electric vehicle control, and more specifically, to a method for controlling the downhill speed of an electric two-wheeled vehicle. Background Technology

[0002] When two-wheeled electric vehicles descend long, steep slopes, users must hold the mechanical brake lever (drum or disc brake) for an extended period to control speed. This continuous friction braking causes the brake pads to overheat rapidly, resulting in "heat fade," which significantly reduces braking performance or even causes complete failure, posing a major safety hazard. Summary of the Invention

[0003] This application provides a method for controlling the downhill speed of an electric two-wheeled vehicle, which at least solves the technical problem in the related art that the mechanical brakes of electric two-wheeled vehicles are prone to thermal fade when going downhill.

[0004] According to one aspect of the embodiments of this application, a method for controlling the downhill speed of an electric two-wheeled vehicle is provided, comprising: acquiring the current slope angle and current speed of the electric two-wheeled vehicle; in response to the activation of the downhill assist function of the electric two-wheeled vehicle and the electric two-wheeled vehicle being in a downhill condition, determining a target angle range in which the current slope angle is located from multiple angle ranges; each angle range in the multiple angle ranges corresponds to a different downhill speed; based on the speed deviation between the current speed and the target downhill speed corresponding to the target angle range, controlling the electric two-wheeled vehicle to generate an electromagnetic braking torque opposite to the rotation direction of the wheels of the electric two-wheeled vehicle, so as to control the downhill speed of the electric two-wheeled vehicle within a preset speed range; the preset speed range refers to a speed interval with a preset error range centered on the target downhill speed.

[0005] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed by a processor.

[0006] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.

[0007] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments through the computer program.

[0008] This application utilizes an electromagnetic braking torque generated by a drive motor to control downhill speed, replacing traditional mechanical friction braking. This solves the safety hazard caused by mechanical brake fade during downhill driving in related technologies, improving the safety and reliability of electric two-wheelers. Furthermore, by automatically adjusting the target downhill speed based on the gradient, adaptive slope speed control is achieved, enhancing the user's driving experience. Attached Figure Description

[0009] Figure 1 This is a schematic diagram of an application scenario of a method for controlling the downhill speed of an electric two-wheeled vehicle according to an embodiment of this application;

[0010] Figure 2 This is a flowchart illustrating an optional downhill speed control method for an electric two-wheeled vehicle according to an embodiment of this application.

[0011] Figure 3 This is a structural block diagram of an optional automatic vehicle speed control structure according to an embodiment of this application;

[0012] Figure 4 This is another optional workflow logic diagram according to an embodiment of this application;

[0013] Figure 5 This is a schematic diagram of the internal functional modules of another optional main controller according to an embodiment of this application;

[0014] Figure 6 This is a comparison diagram of another optional vehicle downhill speed control parameters according to an embodiment of this application. Detailed Implementation

[0015] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0016] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0017] According to one aspect of the embodiments of this application, a method for controlling the downhill speed of an electric two-wheeled vehicle is provided. Optionally, in this embodiment, the above-described method for controlling the downhill speed of an electric two-wheeled vehicle can be applied, but is not limited to, to applications such as... Figure 1 The electric two-wheeler shown includes a sensing unit 102, a main controller 104, a drive motor 106, and a user input unit 108. The sensing unit 102, drive motor 106, and user input unit 108 are all connected to the main controller 104. The sensing unit 102 collects operating status data of the electric two-wheeler, including but not limited to a slope sensor (for measuring the current slope angle), a wheel speed sensor (for measuring the current vehicle speed), and an acceleration sensor (for measuring changes in vertical acceleration). The main controller 104, as the control core of the electric two-wheeler, is responsible for processing the data collected by the sensing unit, executing the downhill speed control algorithm, and generating control commands. The drive motor 106 generates electromagnetic braking torque according to the commands from the main controller to control the vehicle speed. The user input unit 108 receives user operation commands, such as a button or switch to activate the downhill assist function.

[0018] The downhill speed control method for electric two-wheeled vehicles according to this application embodiment can be executed by the main controller 104. Figure 2 This is a schematic flowchart of an optional downhill speed control method for an electric two-wheeled vehicle according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:

[0019] Step S202: Obtain the current slope angle and current speed of the electric two-wheeled vehicle;

[0020] Step S204: In response to the activation of the downhill assist function of the electric two-wheeler and the electric two-wheeler being in a downhill condition, the target angle range of the current slope angle is determined from multiple angle ranges; each angle range in the multiple angle ranges corresponds to a different downhill speed.

[0021] Step S206: Based on the speed deviation between the current vehicle speed and the target downhill vehicle speed corresponding to the target angle range, control the electric two-wheeled vehicle to generate an electromagnetic braking torque opposite to the rotation direction of the electric two-wheeled vehicle's wheels, so as to control the downhill vehicle speed of the electric two-wheeled vehicle within a preset speed range; the preset speed range refers to the speed interval with the target downhill vehicle speed as the center and a preset error range.

[0022] The downhill speed control method for electric two-wheeled vehicles in this embodiment can be applied to the field of electric two-wheeled vehicles, specifically to the speed control scenario when electric two-wheeled vehicles are traveling downhill.

[0023] In related technologies, when two-wheeled electric vehicles descend long, steep slopes, users must hold the mechanical brake lever (drum or disc brake) for an extended period to control speed. This continuous friction braking causes a rapid increase in brake pad temperature, resulting in "heat fade," which significantly reduces braking performance or even causes complete failure, posing a major safety hazard. A direct solution to this problem in related technologies is to use a higher-level braking system (such as ventilated disc brakes), but this significantly increases costs and has limited effectiveness.

[0024] Several methods are used in related technologies for downhill speed control: Method 1: Using a purely mechanical centrifugal speed regulating mechanism. When the wheel speed exceeds a set value, the speed is limited by mechanical linkage directly rubbing against the wheel or drive shaft. However, this method is cumbersome, prone to wear, and difficult to integrate with existing electric vehicles. Method 2: Using high-precision GPS and pre-loaded map data to provide early warnings or automatically limit speed when the vehicle approaches a known steep slope. However, this method relies on external data, fails in areas without signal or where the map does not include the data, and cannot cope with temporary changes in road conditions. Method 3: Continuing to use more expensive braking systems with excellent heat dissipation (such as carbon ceramic brakes) to delay heat fade, but this does not fundamentally solve the problem and is extremely costly, making it unsuitable for the two-wheeled electric vehicle market.

[0025] To at least partially address the technical problem of potential brake fade risk in electric two-wheeled vehicles when descending slopes due to mechanical braking, this embodiment utilizes the drive motor of the electric two-wheeled vehicle to generate electromagnetic braking torque opposite to the wheel rotation direction to control vehicle speed, replacing traditional mechanical friction braking. By employing wear-free electronic braking from the motor, the risk of brake failure due to brake pad fade is completely eliminated, providing inherent safety for descending steep slopes and thus avoiding brake fade. This application provides an electronic control system based on electric motor reverse braking (EBS), aiming to solve the problem of potential brake fade risk in two-wheeled electric vehicles descending steep slopes due to reliance on mechanical braking. It achieves automatic slope identification and active control of downhill speed, thereby improving driving safety, reducing user workload, and avoiding wear on mechanical brakes.

[0026] The core of the electronic control system of motor reverse braking (EBS) in this application embodiment lies in combining slope perception, intelligent decision-making and motor electronic braking (EBS) to form a closed-loop automatic speed control structure. Figure 3 A structural block diagram of an optional automatic vehicle speed control structure provided in this application embodiment is shown below. Figure 3 As shown, the automatic vehicle speed control structure includes the following hardware modules:

[0027] (1) Slope sensing unit: An IMU (inertial measurement unit) integrating a three-axis accelerometer and a three-axis gyroscope is used to measure the vehicle's pitch angle (slope angle) in real time. It is fixedly installed on the main beam of the vehicle frame or other locations close to the vehicle's center of gravity. It is connected to the main controller via an I2C or SPI communication bus.

[0028] (2) Main controller: This is the core control unit (MCU) of the electric vehicle, which integrates a dedicated "hill descent control module" in its internal firmware. This module is responsible for receiving and processing all sensor signals (such as IMU sensor, front wheel speed sensor, Hall sensor), executing control algorithms, and outputting PWM drive commands.

[0029] (3) Drive motor: The original drive motor of the vehicle can be switched from drive mode to power generation mode under the command of the controller to generate a reverse electromagnetic torque (i.e. electronic braking force) opposite to the rotation direction of the wheel.

[0030] (4) Vehicle speed detection unit: The front wheel speed sensor and the Hall sensor built into the motor are used to calculate the real-time front and rear wheel speeds, and the signals are input to the main controller.

[0031] (5) User input unit:

[0032] a) APP control function switch: Users can turn the entire steep slope descent control system on or off via a mobile APP to activate or deactivate the downhill assist function.

[0033] b) Slope threshold setting: Users can set the slope range for entering a steep slope with gentle descent through the mobile APP.

[0034] c) Downhill Speed ​​Setting: Users can set a safe downhill speed V_set according to the gradient after the function is activated via the mobile app. For example, when the gradient is <10°, the downhill speed V_set setting range is 5 < V_set_1 < 20km / h (close to the cruising speed on flat roads) to reduce the feeling of speed drop; when the gradient is ≥10°, the downhill speed V_set setting range is 5 < V_set_2 < 15km / h to ensure safety and braking stability.

[0035] d) Instrument status indication: used to display the system on / off status, slope threshold, and set downhill speed.

[0036] The downhill assist function is a speed control function that is automatically or manually activated when the electric two-wheeler encounters a downhill situation. It helps the user maintain a stable downhill speed and reduces the user's operational burden. The downhill assist function can be activated manually by the user through a button or switch on the user input unit 108, or it can be automatically activated by the system based on the current slope angle.

[0037] Downhill driving condition refers to the current state of the electric two-wheeler traveling downhill. Typically, this is determined by detecting whether the current slope angle exceeds a preset angle threshold. This preset angle threshold can be set via a user input unit. In this embodiment, the main controller can automatically identify road conditions and intervene in control. The user only needs to simply activate the downhill assist function, eliminating the need for continuous, tense braking, greatly reducing mental stress and operator fatigue.

[0038] In this embodiment, different safe downhill speeds are set according to different slope ranges. Each angle range corresponds to a different downhill speed, meaning that the main controller will set different downhill speeds based on different slope magnitudes. This is because the steeper the slope, the more pronounced the vehicle's downward trend, requiring a lower target speed to ensure safety; conversely, the shallower the slope, the weaker the downward trend, allowing for a slightly higher target speed to improve driving efficiency. In this embodiment, the different downhill speeds corresponding to each angle range can be manually adjusted via a user app, and the adjustable speed function meets the needs of different driving habits and road conditions. Optionally, this embodiment also includes a user speed setting button, providing only 1-2 fixed target downhill speed levels for selection, or using a completely non-adjustable default downhill speed.

[0039] The target angle range refers to the angle interval within which the current slope angle is located, based on a preset angle division. The target downhill speed refers to the preset downhill speed value corresponding to the target angle range, which is the target value that the main controller needs to control.

[0040] Electromagnetic braking torque refers to the torque generated by the drive motor in the opposite direction of wheel rotation when energized in reverse. It is used to counteract the vehicle's tendency to slide downhill, thus controlling the electric two-wheeler's downhill speed within a preset range. Compared to traditional mechanical braking, electromagnetic braking torque does not generate frictional heat, therefore eliminating the risk of thermal degradation. In this embodiment, only an IMU sensor and upgraded controller software are added, fully utilizing the hardware potential of the electric vehicle's original electric drive system. The modification cost is low, and it is easy to apply on a large scale in existing and new vehicle models.

[0041] The preset speed range refers to a speed interval that fluctuates within a certain margin of error, centered on the target downhill speed. The reason for controlling the downhill speed within the preset speed range is that it is difficult to achieve completely precise control of the target speed in actual driving. Allowing a certain margin of error can make the system more stable and avoid frequent control adjustments.

[0042] In some embodiments, the main controller employs a proportional-integral-derivative (PID) control algorithm to calculate the required electromagnetic braking torque based on the speed deviation.

[0043] In some embodiments, the main controller can use a pre-established speed deviation and braking torque correspondence table to directly look up the required electromagnetic braking torque based on the current speed deviation. For example, the main controller calculates the speed deviation between the current vehicle speed and the target downhill vehicle speed; based on the speed deviation, the main controller looks up the corresponding electromagnetic braking torque value in a preset lookup table; the main controller converts the found electromagnetic braking torque into a corresponding PWM duty cycle instruction and sends it to the drive motor controller; the drive motor controller controls the motor to reverse the power supply according to the PWM duty cycle instruction, generating an electromagnetic braking torque opposite to the direction of wheel rotation; the main controller dynamically adjusts the braking torque value in the lookup table according to changes in slope and vehicle status to adapt to different downhill road conditions.

[0044] Optionally, the main controller continuously collects the current slope angle and current speed of the electric two-wheeler through the sensing unit. When the user activates the downhill assist function through the user input unit, and the main controller determines that the electric two-wheeler is in a downhill condition, the main controller determines the target angle range of the current slope angle from multiple preset angle ranges. The main controller calculates the speed deviation between the current speed and the target downhill speed corresponding to the target angle range. Based on the speed deviation, the main controller calculates the required electromagnetic braking torque. The main controller converts the electromagnetic braking torque into corresponding control commands and sends them to the drive motor. The drive motor generates electromagnetic braking torque in the opposite direction to the wheel rotation according to the control commands, controlling the speed of the electric two-wheeler. The main controller continuously monitors the speed and adjusts the electromagnetic braking torque according to the speed deviation to control the speed within the preset speed range.

[0045] The embodiments provided in this application utilize an electromagnetic braking torque generated by a drive motor to control downhill speed, replacing traditional mechanical friction braking. This solves the safety hazard caused by mechanical brake fade during downhill driving of electric two-wheelers in related technologies, improving the safety and reliability of downhill driving. Furthermore, by automatically adjusting the target downhill speed according to the gradient, adaptive slope speed control is achieved, enhancing the user's driving experience.

[0046] In an exemplary embodiment, the method further includes: executing at least one of the following judgment logics: determining the relationship between the current slope angle and a first angle threshold, determining whether a priority interruption signal is triggered, determining the relationship between the change in vertical acceleration of the electric two-wheeled vehicle and a preset change threshold, and determining the relationship between the front wheel speed and the rear wheel speed of the electric two-wheeled vehicle; and determining the current operating condition of the electric two-wheeled vehicle based on the judgment result of at least one of the judgment logics.

[0047] The first angle threshold refers to the critical gradient value used to determine whether an electric two-wheeler is descending a slope. It is typically set based on the vehicle's design parameters and safety standards, and is generally between 3 and 5 degrees. When the gradient angle exceeds the first angle threshold, the main controller considers the electric two-wheeler to be in a downhill state requiring assisted control. Essentially, the first angle threshold is a user-preset activation threshold. When the electric two-wheeler is descending a slope, if the gradient sensing unit (IMU) detects that the current gradient angle reaches or exceeds the first angle threshold, and other activation conditions are met, the system will automatically activate electronic reverse braking (EBS) and enter "hill descent active control mode."

[0048] A priority interruption signal is a signal generated by user-initiated operation, such as pressing the accelerator, braking, or disabling the downhill assist function. When a priority interruption signal is detected, the system will pause or deactivate the downhill assist function and prioritize responding to the user's operation command.

[0049] The change in vertical acceleration refers to the change in acceleration of the electric two-wheeled vehicle in the vertical direction, measured by an acceleration sensor. It reflects the attitude change of the vehicle during uphill and downhill driving. When the vehicle is in a stable downhill state, the change in vertical acceleration is small. In this embodiment, a_z can be used to represent the change in vertical acceleration. The preset change threshold is a critical value for judging whether the vertical acceleration is stable. When the change in vertical acceleration is less than this threshold, the system considers the vehicle to be in a stable driving state and is suitable for entering the downhill assist mode.

[0050] In this embodiment, when the current slope angle is greater than the first angle threshold and there is no priority interruption signal, the working condition determination rule combining the vertical acceleration change, front wheel speed, and rear wheel speed is as follows:

[0051] 1. When the vertical acceleration a_z experiences a momentary spike lasting ≥10ms, the vehicle is determined to be on an excessively steep slope and will not enter the steep descent control mode. This situation typically occurs when the vehicle suddenly encounters a steep downhill slope; the system will consider the current slope to be beyond the safe range, requiring manual control by the user.

[0052] 2. When the change in vertical acceleration is less than a preset threshold (i.e., no change in vertical acceleration a_z), and the front wheel speed V_f is not equal to the rear wheel speed V_r, the vehicle is determined to have tire slippage and will not enter the hill descent control mode. This situation usually occurs on wet or loose surfaces, where the vehicle's tires slip. Entering automatic control mode in this case may exacerbate the slippage, so the system will either disengage from or not enter the downhill assist mode.

[0053] 3. When the change in vertical acceleration is less than the preset threshold (i.e., the vertical acceleration a_z does not change), the front wheel speed V_f of the electric two-wheeler is equal to the rear wheel speed V_r. At this time, the vehicle is in normal downhill driving mode and steep slope descent is activated. The system then enters the "active control mode" from the "standby mode".

[0054] Optionally, the controller executes at least one of the following judgment logics: determining the relationship between the current slope angle and the first angle threshold, determining whether a priority interrupt signal is triggered, determining the relationship between the change in vertical acceleration of the electric two-wheeler and the preset change threshold, and determining the relationship between the front wheel speed and the rear wheel speed of the electric two-wheeler; if the judgment results of at least one of the judgment logics indicate that the vehicle is in a downhill state, then the current operating condition of the electric two-wheeler is determined to be a downhill state; if the judgment results of at least one of the judgment logics indicate that the vehicle is not in a downhill state, then the current operating condition of the electric two-wheeler is determined to be a non-downhill state.

[0055] This embodiment uses real-time judgment of multiple dynamic parameters (slope angle, vertical acceleration change, front and rear wheel speed difference, etc.) to accurately identify complex working conditions of electric two-wheelers (such as uphill, bumpy, slipping or loss of control risks). Through multi-dimensional fusion judgment, it avoids misjudgment by a single sensor and improves the recognition accuracy. The priority interruption signal mechanism can quickly trigger safety protection, such as speed limit or power cut-off, to reduce the risk of accidents.

[0056] In an exemplary embodiment, the method further includes: determining that the current operating condition of the electric two-wheeler is a downhill condition in response to the judgment result of at least one judgment logic including the following results: the current slope angle is greater than a first angle threshold, there is no priority interruption signal, the change in vertical acceleration of the electric two-wheeler is less than a preset change threshold, and the front wheel speed of the electric two-wheeler is equal to the rear wheel speed of the electric two-wheeler; and determining that the current operating condition of the electric two-wheeler is a non-downhill condition in response to the judgment result of at least one judgment logic not including at least one of the following results: the current slope angle is greater than a first angle threshold, there is no priority interruption signal, the change in vertical acceleration of the electric two-wheeler is less than a preset change threshold, and the front wheel speed of the electric two-wheeler is equal to the rear wheel speed of the electric two-wheeler.

[0057] Optionally, the main controller obtains the current slope angle through the slope sensor and determines whether it is greater than a first angle threshold; the main controller detects whether there is a priority interrupt signal, such as a signal from the user operating the accelerator, brake, or disabling the downhill assist function; the main controller obtains the change in vertical acceleration through the acceleration sensor and determines whether it is less than a preset change threshold; the main controller obtains the front wheel speed and rear wheel speed through the wheel speed sensors respectively and determines whether the two are equal; when the above four conditions are met simultaneously, the main controller determines that the electric two-wheeler is in a downhill condition and allows entry into the downhill assist mode; when any one condition is not met, the main controller determines that the electric two-wheeler is not in a suitable condition for entering the downhill assist mode and does not enter or exit the downhill assist mode.

[0058] For example, Figure 4 An optional workflow logic diagram is provided for embodiments of this application, such as... Figure 4As shown, the process includes the following steps: Step S401: The main controller completes power-on initialization and enters the working state. Step S402: The main controller collects the current vehicle's slope angle θ in real time through the slope sensor, serving as the basic input for condition judgment. Step S403: The main controller detects whether the user has pressed the hill descent control (downhill assist) function switch. If "no", the instrument icon lights up to remind the user that the function is not enabled, and the process jumps back to "slope detection" for continuous loop monitoring. If "yes", then proceed to step S404. Step S404: The main controller determines whether the current slope angle θ is ≥ the first angle threshold. If "no", the downhill working condition requirements are not met, and the process jumps back to "slope detection" without entering the function. If "yes", then proceed to step S405. Step S405: The main controller acquires the vertical acceleration a_z through the accelerometer and determines whether there is a sudden change (i.e., the change is less than a preset threshold, corresponding to no bumps, no sudden braking / acceleration, or other abnormal conditions). If there is a sudden change in a_z, it is determined that there is vehicle instability / priority interruption, and the process jumps back to "slope detection" without entering the function. If there is no sudden change in a_z, then proceed to step S406. Step S406: The main controller acquires the front wheel speed V_f and rear wheel speed V_r through the wheel speed sensors and determines whether they are equal (V_f=V_r, corresponding to no vehicle slippage, no sudden acceleration / acceleration, and stable driving state). If "no", it is determined that there is wheel slippage / power interruption or other abnormalities, and the process jumps back to "slope detection" without entering the function. If "yes", then proceed to step S407. Step S407: The main controller performs closed-loop PID vehicle speed control in stages according to the current slope angle θ. If the current slope angle θ < 10° (gentle slope condition), proceed to step S408. In step S408, the main controller initiates closed-loop PID vehicle speed control, targeting a set vehicle speed V_set_1, and adjusts the motor torque (braking / driving) to achieve a stable and gradual descent of the vehicle. If the current slope angle θ ≥ 10° (steep slope condition), proceed to step S409. In step S409, the main controller initiates closed-loop PID vehicle speed control, targeting a set vehicle speed V_set_2 (usually lower than V_set_1), and adjusts the motor torque to achieve a safe and gradual descent of the vehicle. For both slope conditions, proceed to step S410. In step S410, the main controller continuously performs safety interruption checks, monitoring in real time for priority interrupt signals such as user-disabled function switches, slope below a threshold, brake signals, and fault alarms. If any interruption condition is triggered, the function immediately exits; otherwise, closed-loop control continues. If "No" (no interruption condition triggered), the process jumps back to the PID control loop for the corresponding slope, continuously adjusting the vehicle speed in a closed loop.

[0059] The embodiments provided in this application employ multi-dimensional condition judgment to determine whether an electric two-wheeler is in a suitable condition for entering downhill assist mode, thereby improving the system's safety and reliability. Simultaneously, by judging the operating conditions in different scenarios, the system ensures that it can make correct decisions under various road conditions, avoiding entering automatic control mode in unsuitable situations, further enhancing user driving safety.

[0060] In one exemplary embodiment, based on the speed deviation between the current vehicle speed and the target downhill speed corresponding to the target angle range, the electric two-wheeler is controlled to generate an electromagnetic braking torque opposite to the rotation direction of the electric two-wheeler's wheels. This includes: determining a proportional coefficient, an integral coefficient, and a derivative coefficient; performing proportional-integral-derivative processing on the speed deviation based on the proportional coefficient, integral coefficient, and derivative coefficient to obtain a torque command; converting the torque command into a target pulse width duty cycle; outputting the target pulse width duty cycle to the drive motor of the electric two-wheeler; and controlling the electric two-wheeler to reverse direction via the drive motor to generate an electromagnetic braking torque opposite to the rotation direction of the electric two-wheeler's wheels.

[0061] In this embodiment, the speed deviation between the current vehicle speed and the target downhill vehicle speed corresponding to the target angle range is processed using PID control to obtain the torque command. PID stands for Proportional-Integral-Derivative, a feedback control algorithm commonly used in industrial control. It achieves precise control of the system through a combination of proportional, integral, and derivative components. The torque command is the control signal used to control the drive motor to generate a specific torque, typically in the form of current or voltage.

[0062] Among them, the proportional coefficient (Kp) is a control coefficient that is proportional to the speed deviation and is used to quickly respond to speed deviation; the integral coefficient (Ki) is a control coefficient that is proportional to the integral of the speed deviation and is used to eliminate steady-state error; the derivative coefficient (Kd) is a control coefficient that is proportional to the rate of change of the speed deviation and is used to suppress system oscillation and improve stability.

[0063] The proportional coefficient, integral coefficient, and derivative coefficient can be preset static values, such as proportional coefficient Kp=5.0, integral coefficient Ki=0.5, and derivative coefficient Kd=1.2, or they can be dynamic parameters determined based on the actual operating parameters of the electric two-wheeler.

[0064] For example, the main controller adjusts the proportional, integral, and derivative coefficients based on the current slope, vehicle speed, and road conditions to obtain dynamic proportional, integral, and derivative coefficients. Specifically, assuming a base proportional coefficient Kp0 = 4.0, a base integral coefficient Ki0 = 0.4, and a base derivative coefficient Kd0 = 1.0, the slope weighting coefficient α = 1 + 0.1 × θ is determined based on the current slope angle (denoted as θ); the vehicle speed weighting coefficient β = 1 + 0.05 × v is determined based on the current vehicle speed (v, unit: m / s); and the road friction coefficient weighting coefficient γ = 1 + 0.2 × (1 - μ) is determined based on the road friction coefficient (denoted as μ). The final PID parameters are: Kp = Kp0 × α × γ, Ki = Ki0 × β, Kd = Kd0 × α.

[0065] For example, the main controller retrieves PID parameters by looking up a table based on different gradient and vehicle speed ranges. Specifically, the main controller divides the gradient into three ranges: light gradient (3-6 degrees), medium gradient (6-10 degrees), and heavy gradient (>10 degrees); and divides the vehicle speed into three ranges: low speed (<5m / s), medium speed (5-10m / s), and high speed (>10m / s); it establishes a 3×3 PID parameter lookup table, with each cell storing the Kp, Ki, and Kd values ​​for the corresponding gradient and vehicle speed range; the main controller looks up the PID parameters for the corresponding range based on the current gradient and vehicle speed.

[0066] After determining the proportional coefficient, integral coefficient, and differential coefficient, the product of the speed deviation between the current vehicle speed and the target downhill speed corresponding to the target angle range and the proportional coefficient is determined as the instantaneous correction amount; the speed deviation is integrated to obtain the cumulative error term, and the product of the cumulative error term and the integral coefficient is determined as the steady-state compensation amount; the product of the rate of change of the speed deviation and the differential coefficient is determined as the dynamic damping amount; the sum of the instantaneous correction amount, the steady-state compensation amount, and the dynamic damping amount is determined as the torque command.

[0067] Among them, the instantaneous correction quantity refers to the control quantity that is proportional to the current speed deviation and is used to quickly respond to speed changes; the cumulative error term refers to the integral of the speed deviation over time, reflecting the long-term error of the system; the steady-state compensation quantity refers to the control quantity that is proportional to the cumulative error term and is used to eliminate the steady-state error of the system; and the dynamic damping quantity refers to the control quantity that is proportional to the rate of change of speed deviation and is used to suppress system oscillations and improve stability.

[0068] In this embodiment, the torque command can be expressed by the following formula (1):

[0069]

[0070] Here, u(t) represents the torque command. After receiving the torque command, it is converted into a target pulse width duty cycle. The target pulse width duty cycle refers to the duty cycle of the PWM (Pulse Width Modulation) signal output by the motor controller, which is used to control the average voltage of the motor, thereby controlling the output torque of the motor.

[0071] In some embodiments, the main controller pre-establishes a correspondence table between torque commands and pulse width duty cycles, storing the optimal duty cycle corresponding to different torque command values. The main controller searches for the closest torque command value in the correspondence table based on the current torque command value. The main controller obtains the pulse width duty cycle corresponding to the found torque command value. If the current torque command value is between two adjacent values ​​in the table, the main controller calculates the target pulse width duty cycle using a linear interpolation method.

[0072] Optionally, the main controller calculates the speed deviation ΔV between the current vehicle speed and the target downhill vehicle speed; the main controller determines the proportional coefficient Kp, integral coefficient Ki, and derivative coefficient Kd; the main controller calculates the instantaneous correction (i.e., The main controller calculates the cumulative error term. The steady-state compensation is calculated as Ki × cumulative error term; the main controller calculates the rate of change of speed deviation. And calculate the dynamic damping (i.e. The main controller adds the instantaneous correction, steady-state compensation, and dynamic damping to obtain the torque command; the main controller converts the torque command into a target pulse width duty cycle; the main controller outputs the target pulse width duty cycle to the drive motor; the drive motor controls the electric two-wheeled vehicle to reverse according to the target pulse width duty cycle, generating an electromagnetic braking torque opposite to the direction of wheel rotation.

[0073] In some embodiments, Figure 5 This is a schematic diagram of the internal functional modules of an optional main controller provided in this embodiment, such as... Figure 5As shown, the system includes a hill descent control module, a signal receiving and processing module, and a PWM drive output module. The signal receiving and processing module, as the system's input, first receives the raw control signal from the outside, performs filtering, calibration, and signal parsing to remove noise interference and extract valid control commands, providing a clean and accurate data foundation for subsequent core calculations. The hill descent control module receives commands from the signal processing module and, combined with real-time operational data such as PID feedback, vehicle speed, and gradient, performs core logic judgments. Based on the PID algorithm and vehicle speed closed-loop control logic, it calculates the required electromagnetic braking torque under the current road conditions. Simultaneously, through real-time data feedback, it continuously corrects the control strategy, forming a closed-loop adjustment mechanism to ensure the vehicle remains in a stable downhill state. The hill descent control module transmits the calculated target pulse width duty cycle to the PWM drive output module. The PWM drive output module generates a pulse width modulation signal with a corresponding duty cycle based on the received target pulse width duty cycle, driving the back-end actuators (such as the braking system or motor) to achieve precise control of vehicle braking or power. The system transmits the actual operating status (vehicle speed, gradient, etc.) and PID feedback data corresponding to the PWM drive output back to the hill descent control module and signal receiving and processing module in real time. The control core dynamically adjusts the subsequent PWM output parameters based on the deviation between the actual feedback effect and the target value. This process is repeated to form a complete closed-loop control system, ensuring the continuous, stable, and accurate operation of the hill descent control function.

[0074] The embodiments provided in this application employ a PID control algorithm to process speed deviations, achieving precise control of the downhill speed of an electric two-wheeled vehicle. Simultaneously, the PID parameters are determined using multiple methods, improving the system's adaptability and stability. Various implementation methods for converting electromagnetic braking torque into torque commands ensure reliable system operation in different scenarios.

[0075] In an exemplary embodiment, determining the proportional coefficient, integral coefficient, and differential coefficient includes: determining the potential energy change rate, kinetic energy change rate, and braking power of the electric two-wheeler, and determining the difference between the potential energy change rate, kinetic energy change, and braking power as the energy imbalance quantity, and determining the ratio between the energy imbalance quantity and braking power as the energy imbalance rate; determining the average value of the energy imbalance quantity rate and the rate of change of the energy imbalance rate over a preset time period; the energy imbalance quantity characterizes the degree of imbalance between energy input and output; the energy imbalance rate characterizes the relative degree of energy imbalance; selecting the maximum value from 0 and the energy imbalance rate, and determining the proportional coefficient based on the product of the maximum value, the energy imbalance weight coefficient, and the preset basic proportional coefficient; determining the integral coefficient based on the product of the average energy imbalance weight coefficient, the average value of the energy imbalance rate, and the preset basic integral coefficient; and determining the differential coefficient based on the energy change rate weight coefficient, the rate of change of the energy imbalance rate, and the preset basic differential coefficient.

[0076] The existing static proportional, integral, and derivative coefficients are designed based on fixed operating conditions and cannot adapt to the complex and ever-changing road conditions and energy states of electric two-wheelers during downhill driving. When the gradient, vehicle speed, and road conditions change, static PID parameters may lead to poor control performance, or even system oscillation or response lag.

[0077] To address this issue, this embodiment uses dynamic determination of proportional, integral, and derivative coefficients based on the potential energy change rate, kinetic energy change rate, and braking power of the electric two-wheeler. This allows the PID parameters to adapt to the vehicle's energy state in real time, improving the system's response speed and control accuracy, while reducing energy loss and increasing energy utilization efficiency.

[0078] Among these parameters, the potential energy change rate, kinetic energy change rate, and braking power of electric two-wheelers can reflect changes in road conditions (such as gradient changes) and load (such as vehicle weight) in real time, enabling PID parameters to quickly adapt to these changes. Compared with other indirect parameters (such as the statistical characteristics of vehicle speed deviation), energy parameters have clear physical meaning and can more accurately describe the vehicle's motion state and energy conversion process, thus making the adjustment of PID parameters more reasonable and effective. By monitoring the energy state in real time, PID parameters can more accurately adapt to the actual operating conditions of the vehicle, improving the accuracy and stability of speed control. Regardless of changes in road conditions (such as gradient and road surface friction coefficient), the system can automatically adjust PID parameters through monitoring energy parameters to adapt to different driving conditions.

[0079] Among them, the potential energy change rate refers to the rate of change of gravitational potential energy of the electric two-wheeler during downhill driving. The formula for calculating the potential energy change rate is: Pp = m × g × v × sinθ, where m is the vehicle mass (kg), g is the gravitational acceleration (9.81 m / s²), v is the current vehicle speed (m / s), and θ is the current slope angle. The kinetic energy change rate refers to the rate of change of kinetic energy of the electric two-wheeler during downhill driving. The formula for calculating the kinetic energy change rate is: Pk = m × v × dv / dt, where dv / dt is the rate of change of the current vehicle speed (acceleration). Braking power refers to the power consumed by the braking force of the electric two-wheeler during downhill driving. The formula for calculating braking power is: Pb = F_brake × v, where F_brake is the actual braking force output (N).

[0080] Energy imbalance refers to the difference between the rate of change of potential energy, the rate of change of kinetic energy, and braking power. Energy imbalance can be expressed as: ΔP = Pp - Pk - Pb, which characterizes the degree of imbalance between energy input and output.

[0081] The energy imbalance rate is the ratio between the energy imbalance amount and the braking power. The formula for calculating the energy imbalance rate can be expressed as ΔP / Pb, which characterizes the relative degree of energy imbalance.

[0082] The average value of the energy imbalance rate refers to the arithmetic mean of the energy imbalance rates over a preset time period (e.g., 1 second). The average value of the energy imbalance rate can be expressed as: (1 / T) (ΔP / Pb)dt, where T is the preset duration. The absolute value of the calculated energy imbalance rate is taken to uniformly measure the degree of energy imbalance, regardless of whether the vehicle is accelerating or decelerating. A 1-second sliding time window is used to collect data at a fixed sampling frequency (e.g., 100Hz). A sliding window with a length equal to the number of sampling points per second is maintained (e.g., 100 data points when sampling at 100Hz). Each time new data is collected, the oldest data is removed from the window and new data is added. The arithmetic mean of all data points within the window is calculated to obtain the average value of the energy imbalance rate.

[0083] The rate of change of the energy imbalance rate refers to the rate of change of the energy imbalance rate over time. The rate of change of the energy imbalance rate can be expressed as: d(ΔP / Pb) / dt.

[0084] When determining the proportional gain, there is a case where the energy imbalance rate is negative. When the energy imbalance rate is negative, it indicates that the system's energy output is greater than its input. In this case, it is not necessary to increase the braking force; instead, it may be necessary to reduce the braking force to maintain energy balance. Therefore, in this embodiment, the maximum value between 0 and the energy imbalance rate is selected, rather than directly using the energy imbalance rate for calculation. Selecting the maximum value ensures that the proportional gain is only adjusted when the energy input is greater than the output, avoiding over-braking. Furthermore, the energy imbalance weighting coefficient is a coefficient used to adjust the degree of influence of the energy imbalance rate on the proportional gain, and its value range is usually 0.4-0.8, for example, 0.6. This embodiment sets the energy imbalance weighting coefficient to balance the influence of the energy imbalance rate on the proportional gain, avoiding large fluctuations in the proportional gain caused by small changes in the energy imbalance rate. The base proportional gain refers to the proportional gain value under standard operating conditions, which is usually set according to the vehicle's design parameters and performance requirements, for example, 5.0.

[0085] In this embodiment, the proportionality coefficient can be calculated using the following formula (2):

[0086]

[0087] Where Kp0 is the basic proportionality coefficient and kp1 is the energy imbalance weighting coefficient. To avoid Kp being 0 when the maximum value selected between 0 and the energy imbalance rate is 0, in this embodiment, Adding the result to 1 ensures that even when the energy imbalance rate is 0, the PID coefficients remain at their base values ​​(Kp0, Ki0, Kd0) instead of becoming 0. If a direct multiplication method were used, the PID coefficients would become 0 when the energy imbalance rate is 0, causing the control system to fail. By introducing the energy imbalance rate, the proportional coefficient can be adjusted in real time according to the vehicle's energy state. When the energy input is greater than the output, the proportional coefficient is increased to increase braking force; when the energy input is less than or equal to the output, the base proportional coefficient remains unchanged to avoid over-braking.

[0088] When determining the integral coefficient, the average energy imbalance weighting coefficient is a coefficient used to adjust the influence of the average energy imbalance rate on the integral coefficient, typically ranging from 0.2 to 0.5, for example, 0.3. The base integral coefficient refers to the integral coefficient value under standard operating conditions, usually set according to the vehicle's design parameters and performance requirements, for example, 0.5. Setting the average energy imbalance weighting coefficient is to balance the influence of the average energy imbalance rate on the integral coefficient, avoiding excessive adjustment of the integral coefficient that could lead to system oscillation.

[0089] In this embodiment, the integral coefficient can be calculated using the following formula (3):

[0090]

[0091] Where Ki0 is the basic integral coefficient and ki1 is the average energy imbalance weighting coefficient. This represents the average value of the energy imbalance rate. By introducing the average value of the energy imbalance rate, the integral coefficient can reflect the long-term energy state of the system. When a persistent energy imbalance exists in the system, increasing the integral coefficient can eliminate steady-state errors and improve the control accuracy of the system. Simultaneously, The result is added to 1, ensuring that even if the rate of change of the energy imbalance rate is 0, the differential coefficient can remain at the base value, thus preventing the control system from failing.

[0092] When determining the differential coefficients, the energy change rate weighting coefficient is a coefficient used to adjust the degree of influence of the energy imbalance rate on the differential coefficients. Its value typically ranges from 0.3 to 0.7, for example, 0.5. The basic differential coefficient refers to the differential coefficient value under standard operating conditions, usually set according to the vehicle's design parameters and performance requirements, for example, 1.2. The reason for setting the energy change rate weighting coefficient is to balance the influence of the energy imbalance rate on the differential coefficients, avoiding excessive adjustment of the differential coefficients that could lead to an overly fast or slow system response.

[0093] In this embodiment, the differential coefficients can be calculated using the following formula (4):

[0094]

[0095] Where Kd0 is the basic differential coefficient and kd1 is the weighting coefficient for the rate of energy change. This represents the absolute value of the rate of change of the energy imbalance rate. By introducing the rate of change of the energy imbalance rate, the differential coefficient can reflect the changing trend of the system's energy state. When the energy state changes rapidly, increasing the differential coefficient can suppress system oscillations and improve system stability. Simultaneously, The result is added to 1, ensuring that even if the rate of change of the energy imbalance rate is 0, the differential coefficient can remain at the base value, thus preventing the control system from failing.

[0096] The embodiments provided in this application demonstrate that the PID coefficient determination method based on energy balance can adapt to the energy state of an electric two-wheeler during downhill driving in real time, improving the system's response speed and control accuracy. Simultaneously, by rationally setting weighting coefficients and calculation formulas, the system's stability and reliability are ensured, avoiding over-braking or under-braking. This method not only improves the safety of downhill driving but also reduces energy loss and improves energy utilization efficiency.

[0097] In one exemplary embodiment, the friction coefficients of different road surfaces (such as dry asphalt, wet and slippery surfaces, and icy and snowy surfaces) vary significantly, directly affecting the effectiveness of braking force. On surfaces with a low friction coefficient, the same braking force may cause tire slippage, while on surfaces with a high friction coefficient, a greater braking force may be required. Secondly, environmental factors such as temperature, humidity, and wind speed affect vehicle performance and energy consumption. For example, battery performance deteriorates in low-temperature environments, potentially affecting braking force output. The aforementioned scheme, which dynamically determines the proportional, integral, and derivative coefficients based on the potential energy change rate, kinetic energy change rate, and braking power of an electric two-wheeled vehicle, while reflecting the basic state of the vehicle through energy parameters, does not consider other influencing factors such as vehicle load and tire wear, resulting in poor speed control. To address these issues, this embodiment further introduces a road friction coefficient correction factor (μ_factor) and an environmental parameter correction factor (E_factor) to correct the proportional, integral, and derivative coefficients.

[0098] The road surface friction coefficient correction factor (μ_factor) is a correction factor used to adjust PID parameters based on the road surface friction coefficient. The calculation formula is: μ_factor = 1.0 + 0.5 × (1 - μ), where μ is the road surface friction coefficient. When the road surface friction coefficient μ decreases, μ_factor increases to increase braking force reserve, ensuring sufficient braking force is still provided on low-friction road surfaces. In this embodiment, the road surface friction coefficient μ is directly measured using a road surface friction coefficient sensor.

[0099] The environmental parameter correction factor (E_factor) is a correction factor used to adjust PID parameters according to weather conditions. Specifically, its values ​​are: E_factor = 1.0 for dry roads, E_factor = 1.1 for wet roads, and E_factor = 1.3 for icy / snowy roads. When road conditions worsen, E_factor increases to improve the system's response speed and braking force.

[0100] In this embodiment, the proportional coefficient Kp is corrected using a road surface friction coefficient correction factor and an environmental parameter correction factor, including the following steps: First, calculate the road surface friction coefficient correction factor: subtract the current road surface friction coefficient from 1, multiply the result by 0.5, and add 1.0 to obtain the road surface friction coefficient correction factor; determine the environmental parameter correction factor according to the current weather conditions: take 1.0 for dry road surface, 1.1 for wet road surface, and 1.3 for icy and snowy road surface; calculate the energy imbalance: subtract the kinetic energy change rate from the potential energy change rate, and then subtract the braking power; calculate the energy imbalance rate: divide the energy imbalance by the braking power; take the maximum value of the energy imbalance rate and 0; calculate the ratio of the absolute value of the vehicle speed deviation to the target downhill vehicle speed; calculate the proportional coefficient: multiply the basic proportional coefficient by the road surface friction coefficient correction factor, then multiply by the environmental parameter correction factor, and then multiply by a coefficient, which is 1, plus the energy imbalance weight coefficient multiplied by the maximum value of the energy imbalance rate and 0, and then add the vehicle speed deviation weight coefficient multiplied by the ratio of the absolute value of the vehicle speed deviation to the target downhill vehicle speed.

[0101] In this embodiment, the corrected scaling factor can be expressed as the following formula (5):

[0102]

[0103] Among them, Kp0 is the basic proportional coefficient, kp1 is the energy imbalance weight coefficient (value range: 0.4-0.8), and kp2 is the vehicle speed deviation weight coefficient (value range: 0.3-0.6).

[0104] In this embodiment, the road surface friction coefficient correction factor and environmental parameter correction factor are placed first to ensure that these basic corrections can be applied to the PID parameters first, adapting to different driving conditions. Secondly, [the following is introduced]... Ensure that the proportional gain is increased only when the energy input exceeds the output to avoid over-braking. Finally, introduce... This allows the proportional coefficient to be adjusted according to the relative magnitude of the vehicle speed deviation, ensuring that appropriate braking force can be obtained at different target vehicle speeds.

[0105] In this embodiment, the integral coefficient Ki is corrected using a road surface friction coefficient correction factor and an environmental parameter correction factor, including the following steps: First, calculate the road surface friction coefficient correction factor: subtract the current road surface friction coefficient from 1, multiply the result by 0.5, and add 1.0 to obtain the road surface friction coefficient correction factor; calculate the energy imbalance: subtract the kinetic energy change rate from the potential energy change rate, and then subtract the braking power; calculate the energy imbalance rate: divide the energy imbalance by the braking power; calculate the average energy imbalance rate within the last second; calculate the ratio of the absolute value of the vehicle speed deviation to the target downhill vehicle speed, and take the minimum value of this ratio to 1; calculate the integral coefficient: multiply the basic integral coefficient by the road surface friction coefficient correction factor, and then multiply by a coefficient, which is 1 plus the average energy imbalance weight coefficient multiplied by the average energy imbalance rate, plus the vehicle speed deviation weight coefficient multiplied by the minimum value of the ratio of the absolute value of the vehicle speed deviation to the target downhill vehicle speed.

[0106] In this embodiment, the corrected integral coefficient can be expressed as the following formula (6):

[0107]

[0108] Where Ki0 is the basic integral coefficient, ki1 is the average energy imbalance weighting coefficient (range: 0.2-0.5), and ki2 is the vehicle speed deviation weighting coefficient (range: 0.1-0.3). This represents the average energy imbalance rate over the most recent second.

[0109] In this embodiment, the influence of the road surface friction coefficient on the integral coefficient is mainly reflected in steady-state control; therefore, only μ_factor is introduced, not E_factor. Secondly, using the average energy imbalance rate over the most recent second reflects the long-term energy state of the system, helping to eliminate steady-state errors. Finally, μ_factor is introduced... Limit the impact of vehicle speed deviation on the integral coefficient to avoid integral saturation.

[0110] In this embodiment, the differential coefficient Kd is corrected using a road surface friction coefficient correction factor and an environmental parameter correction factor, including the following steps: Determine the environmental parameter correction factor based on current weather conditions: 1.0 for dry roads, 1.1 for wet roads, and 1.3 for icy / snowy roads; Calculate the energy imbalance: subtract the kinetic energy change rate from the potential energy change rate, then subtract the braking power; Calculate the energy imbalance rate: divide the energy imbalance by the braking power; Calculate the rate of change of the energy imbalance rate; Calculate the ratio of the vehicle speed change rate to the target downhill vehicle speed; Calculate the differential coefficient: multiply the basic differential coefficient by the environmental parameter correction factor, then multiply by a coefficient of 1, plus the energy change rate weighting coefficient multiplied by the energy imbalance rate change rate, plus the vehicle speed change rate weighting coefficient multiplied by the ratio of the vehicle speed change rate to the target downhill vehicle speed.

[0111] In this embodiment, the corrected integral coefficient can be expressed as the following formula (7):

[0112]

[0113] Where Kd0 is the basic differential coefficient, kd1 is the energy change rate weighting coefficient (range: 0.3-0.7), kd2 is the vehicle speed change rate weighting coefficient (range: 0.2-0.5), and |d(Pp-Pk-Pb) / dt| is the rate of change of energy imbalance rate.

[0114] In this embodiment, environmental parameters have a significant impact on the system's dynamic response; therefore, only the E_factor is introduced, not the μ_factor. Secondly, the rate of change of the energy imbalance rate can reflect the changing trend of the energy state, allowing for early adjustment of the braking force and suppression of system oscillations. Finally, [the following is introduced]... This allows the differential coefficients to be adjusted according to the relative rate of change in vehicle speed, thereby improving the stability of the system.

[0115] This embodiment integrates energy parameters, vehicle speed parameters, road surface parameters, and environmental parameters into the PID parameter calculation, achieving multi-dimensional adaptive control. By setting different weighting coefficients, the influence of each parameter on the PID parameters can be flexibly adjusted to adapt to different driving conditions. By introducing road friction coefficient correction factors and environmental parameter correction factors, the PID parameters can more comprehensively adapt to different driving conditions, further improving the system's control accuracy and safety.

[0116] In one exemplary embodiment, converting a torque command into a target pulse width duty cycle includes: determining a ratio between the torque command and the maximum braking torque, and determining the target pulse width duty cycle by multiplying the ratio by the maximum pulse duty cycle.

[0117] The maximum braking torque refers to the maximum electromagnetic braking torque that an electric two-wheeler can generate within a safe range, and it is usually determined by the rated power of the motor and the vehicle's design parameters. The ratio between the torque command and the maximum braking torque represents the normalized proportion of the currently required braking torque to the maximum braking torque.

[0118] Maximum pulse duty cycle refers to the maximum duty cycle of the PWM (Pulse Width Modulation) signal output by the motor controller, which is usually 100%. Duty cycle is the ratio of the duration of the high level to the total time of the cycle within a PWM period. It is used to control the average voltage of the motor, thereby controlling the output torque of the motor.

[0119] A torque command u(t) greater than 0 indicates the current mode is braking mode; a torque command u(t) less than 0 indicates the current mode is assist mode; and a torque command u(t) equal to 0 indicates the current mode is non-braking mode. The pulse width duty cycle corresponding to the torque command in different modes is as follows. For example, the pulse width duty cycle corresponding to the torque command in different modes can be expressed as shown in the following formula (8):

[0120] (8)

[0121] in, This indicates the maximum pulse duty cycle (usually 100%). Indicates the maximum braking torque; This indicates the maximum assist torque.

[0122] Optionally, the main controller calculates the required electromagnetic braking torque based on the PID controller, obtains the maximum braking torque T_max of the electric two-wheeler, calculates the ratio r = T / T_max, obtains the maximum pulse duty cycle D_max (usually 100%), calculates the torque command D = r × D_max, and outputs the torque command D to the motor controller. The motor controller generates a corresponding PWM signal based on the torque command D to control the motor to produce the required electromagnetic braking torque.

[0123] For example, with a trigger threshold (i.e., the first angle threshold) of 5°, a current slope angle θ = 15°, a target downhill speed Vset = 10 km / h (the safe downhill speed set by the user through the APP), and an initial speed Vinit = 25 km / h (simulating the cruising speed on a flat road before a steep slope), let's take this as an example. Figure 6 A comparison chart of optional vehicle downhill speed control parameters provided for embodiments of this application, such as... Figure 6 As shown, the rapid adjustment phase is within 0-2s (after the system is activated, the vehicle speed is quickly reduced through PID control); the stable control phase is from 2-10s (the vehicle speed fluctuates slightly around the target value, reflecting the anti-interference capability); and the exit transition phase is after 10s (the gradient drops to below the exit threshold of 4°, and the system gradually returns to the cruising speed on a flat road).

[0124] The method for converting electromagnetic braking torque into torque commands, as provided in this application, is simple, direct, computationally efficient, and has a fast response time. Furthermore, by using proportional scaling, a linear relationship between the torque command and the electromagnetic braking torque is ensured, facilitating precise system control. This method is not only applicable to downhill speed control of electric two-wheeled vehicles but also to other scenarios requiring motor torque control via PWM signals.

[0125] In an exemplary embodiment, the method further includes: increasing the electromagnetic braking torque in response to a speed deviation between the current vehicle speed and the target downhill vehicle speed corresponding to the target angle range being greater than 0; and decreasing the electromagnetic braking torque in response to a speed deviation between the current vehicle speed and the target downhill vehicle speed corresponding to the target angle range being less than 0.

[0126] Speed ​​deviation refers to the difference between the current vehicle speed and the target downhill speed, calculated as: ΔV = Current vehicle speed - Target downhill speed. When the speed deviation is greater than 0, it indicates that the current vehicle speed is higher than the target downhill speed, requiring increased braking torque to decelerate; when the speed deviation is less than 0, it indicates that the current vehicle speed is lower than the target downhill speed, requiring decreased braking torque to accelerate.

[0127] Optionally, the main controller calculates the speed deviation ΔV = V_now - V_set between the current vehicle speed V_now and the target downhill vehicle speed V_set. The main controller determines the sign of the speed deviation: if ΔV > 0, the main controller increases the electromagnetic braking torque; if ΔV < 0, the main controller decreases the electromagnetic braking torque; if ΔV = 0, the main controller keeps the current electromagnetic braking torque unchanged. The main controller determines the adjustment range of the braking torque based on the magnitude of the speed deviation: the larger the speed deviation, the larger the adjustment range.

[0128] For example, assuming the target downhill speed is 10 km / h and the current speed is 12 km / h, the speed deviation ΔV = 2 km / h > 0, the main controller increases the electromagnetic braking torque; if the current speed is 8 km / h, the speed deviation ΔV = -2 km / h < 0, the main controller decreases the electromagnetic braking torque.

[0129] The embodiments provided in this application demonstrate that the method for adjusting electromagnetic braking torque based on speed deviation can respond to changes in vehicle speed in real time, ensuring that the speed of the electric two-wheeled vehicle remains within the target range. This method is simple, intuitive, and easy to implement, enabling rapid adjustment of braking torque to adapt to changes in vehicle speed, thus improving the system's response speed and control accuracy. Furthermore, by adjusting the braking torque according to the sign and magnitude of the speed deviation, the stability and reliability of the system are ensured.

[0130] In one exemplary embodiment, the method further includes: disengaging the downhill assist function in response to the electric two-wheeler detecting a priority interruption signal.

[0131] Throughout the control process, the controller continuously scans for priority interrupt signals. Once it detects that the user is turning the accelerator or pressing the brake, the system will pause or completely exit the descent mode within milliseconds, ensuring the user's control when autonomous operation is required.

[0132] Priority interruption signals refer to signals generated by user-initiated operations, such as pressing the accelerator, braking, or disabling the downhill assist function. These signals indicate that the user wishes to manually control the vehicle, and the system must respond to the user's operation command with priority. In this embodiment, the user has absolute priority control (the accelerator / brake can override the system at any time), ensuring the driver's initiative and confidence in safety.

[0133] Optionally, the main controller continuously monitors for the presence of a priority interrupt signal; when a priority interrupt signal is detected, the main controller immediately stops calculating and outputting the electromagnetic braking torque command; the main controller sets the torque command to 0 and stops the reverse braking of the motor; the main controller exits the downhill assist mode and returns control to the user; the main controller records the reason for exiting and the vehicle status at the time of exiting for subsequent analysis.

[0134] For example, when a user is using the downhill assist function and encounters a situation where they need to accelerate to pass, the user presses the accelerator. The system detects the accelerator input signal, immediately disengages the downhill assist function, and allows the user to accelerate normally.

[0135] The method for disengaging the downhill assist function upon detecting a priority interruption signal, as provided in the embodiments of this application, ensures the user's ultimate control over the vehicle, improving system safety and reliability. Simultaneously, this method can quickly respond to user commands, avoiding conflicts between the system and user operations, thus enhancing the user's driving experience.

[0136] In one exemplary embodiment, the method further includes: exiting the downhill assist function in response to the current slope angle being less than a second angle threshold.

[0137] In some embodiments, the second angle threshold is less than the first angle threshold.

[0138] The second angle threshold refers to the critical gradient value used to determine whether the electric two-wheeler needs to continue using the downhill assist function. It is usually lower than the first angle threshold (the threshold used to determine whether the vehicle has entered a downhill condition), and is generally set at 2-3 degrees. When the gradient angle is less than the second angle threshold, the system considers that the vehicle is no longer in a downhill state that requires assisted control and automatically disengages the downhill assist function.

[0139] To prevent vehicles from frequently entering / exiting the downhill mode at the critical point of the slope and to improve system stability, in this embodiment, the second angle threshold can be the difference between a preset exit threshold and a preset value. For example, the second angle threshold can be the difference between the preset exit threshold and 1. When the current slope angle is less than the second angle threshold, the system automatically exits the downhill descent function.

[0140] Optionally, the main controller continuously monitors the current slope angle via the slope sensor; the main controller compares the current slope angle with a second angle threshold; when the current slope angle is less than the second angle threshold, the main controller starts timing; if the current slope angle remains less than the second angle threshold for a preset duration (e.g., 3 seconds), the main controller exits the downhill assist function; the main controller stops calculating and outputting electromagnetic braking torque commands, sets the torque command to 0; the main controller exits the downhill assist mode, and control is returned to the user.

[0141] For example, assuming the second angle threshold is 2 degrees, when the electric two-wheeler travels to a section of road with a slope of 1.5 degrees, the main controller detects that the current slope angle is less than the second angle threshold and starts timing. If the slope is still less than 2 degrees after 3 seconds, the main controller automatically disengages the downhill assist function.

[0142] The method for disabling downhill assist when the current slope angle is less than a second angle threshold, as provided in this application, can automatically identify whether the vehicle still needs downhill assist, avoiding continued occupation of system resources when assistance is not required. This method improves the intelligence of the system, reduces unnecessary energy consumption, and ensures that users can drive the vehicle normally on flat or gently sloping roads.

[0143] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0145] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for controlling the downhill speed of an electric two-wheeled vehicle, characterized in that, include: Obtain the current slope angle and current speed of the electric two-wheeled vehicle; In response to the activation of the downhill assist function of the electric two-wheeler and the electric two-wheeler being in a downhill condition, the target angle range of the current slope angle is determined from multiple angle ranges; each angle range in the multiple angle ranges corresponds to a different downhill speed; Based on the speed deviation between the current vehicle speed and the target downhill speed corresponding to the target angle range, the electric two-wheeler is controlled to generate an electromagnetic braking torque opposite to the rotation direction of the electric two-wheeler's wheels, so as to control the downhill speed of the electric two-wheeler within a preset speed range; the preset speed range refers to the speed interval with the target downhill speed as the center and a preset error range.

2. The method according to claim 1, characterized in that, The method further includes: Execute at least one of the following judgment logics: determine the relationship between the current slope angle and the first angle threshold, determine whether to trigger a priority interruption signal, determine the relationship between the change in vertical acceleration of the electric two-wheeled vehicle and the preset change threshold, and determine the relationship between the front wheel speed and the rear wheel speed of the electric two-wheeled vehicle. The current operating condition of the electric two-wheeler is determined based on the judgment result of at least one of the judgment logics.

3. The method according to claim 2, characterized in that, Determining the current operating condition of the electric two-wheeler based on the judgment result of at least one of the judgment logics includes: The judgment result in response to the at least one judgment logic includes the following results, determining that the current working condition of the electric two-wheeler is the downhill working condition: the current slope angle is greater than the first angle threshold, there is no priority interruption signal, the change in vertical acceleration of the electric two-wheeler is less than the preset change threshold, and the front wheel speed of the electric two-wheeler is equal to the rear wheel speed of the electric two-wheeler. In response to the fact that the judgment result of the at least one judgment logic does not include at least one of the following results, the current working condition of the electric two-wheeler is determined to be a non-downhill working condition: the current slope angle is greater than the first angle threshold, there is no priority interruption signal, the change in vertical acceleration of the electric two-wheeler is less than the preset change threshold, and the front wheel speed of the electric two-wheeler is equal to the rear wheel speed of the electric two-wheeler.

4. The method according to claim 1, characterized in that, The step of controlling the electric two-wheeler to generate an electromagnetic braking torque opposite to the direction of wheel rotation, based on the speed deviation between the current vehicle speed and the target downhill vehicle speed corresponding to the target angle range, includes: Determine the proportional coefficient, integral coefficient, and differential coefficient; Based on the proportional coefficient, the integral coefficient, and the derivative coefficient, the speed deviation is processed by proportional-integral-derivative to obtain the torque command. The torque command is converted into a target pulse width duty cycle, and the target pulse width duty cycle is output to the drive motor of the electric two-wheeler. The drive motor controls the electric two-wheeler to reverse, so as to generate an electromagnetic braking torque opposite to the rotation direction of the wheels of the electric two-wheeler.

5. The method according to claim 4, characterized in that, The determination of the proportional coefficient, integral coefficient, and differential coefficient includes: The potential energy change rate, kinetic energy change rate, and braking power of the electric two-wheeled vehicle are determined, and the difference between the potential energy change rate, the kinetic energy change rate, and the braking power is determined as the energy imbalance quantity. The ratio between the energy imbalance quantity and the braking power is determined as the energy imbalance rate. The average value of the energy imbalance quantity rate and the rate of change of the energy imbalance rate are determined over a preset time period. The energy imbalance quantity represents the degree of imbalance between energy input and output. The energy imbalance rate represents the relative degree of energy imbalance. The maximum value is selected from 0 and the energy imbalance rate, and the proportional coefficient is determined based on the product of the maximum value, the energy imbalance weighting coefficient, and the preset basic proportional coefficient. The integral coefficient is determined by multiplying the average energy imbalance weighting coefficient, the average value of the energy imbalance rate, and the preset basic integral coefficient. The differential coefficients are determined based on the energy change rate weighting coefficient, the rate of change of the energy imbalance rate, and the preset basic differential coefficients.

6. The method according to claim 4, characterized in that, The step of converting the torque command into a target pulse width duty cycle includes: The ratio between the torque command and the maximum braking torque is determined, and the product of the ratio and the maximum pulse duty cycle is determined as the target pulse width duty cycle.

7. The method according to claim 4, characterized in that, The method further includes: In response to a speed deviation greater than 0 between the current vehicle speed and the target downhill vehicle speed corresponding to the target angle range, the electromagnetic braking torque is increased; In response to the speed deviation between the current vehicle speed and the target downhill vehicle speed corresponding to the target angle range being less than 0, the electromagnetic braking torque is reduced.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: In response to the electric two-wheeler detecting a priority interruption signal, the downhill assist function is deactivated.

9. The method according to any one of claims 1 to 7, characterized in that, The method further includes: In response to the current slope angle being less than the second angle threshold, the downhill assist function is deactivated.

10. The method according to claim 9, characterized in that, The second angle threshold is less than the first angle threshold.