Motor control method, device and electric two-wheeled vehicle

By using a two-way speed control switch in an electric two-wheeler to obtain throttle signals, the working mode can be directly determined and the motor current controlled, thus solving the problems of slow motor braking response and complex structure, and achieving fast and simple braking control.

CN122292986APending Publication Date: 2026-06-26CHONGQING YADEA TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING YADEA TECHNOLOGY CO LTD
Filing Date
2025-11-24
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing electric two-wheelers have slow motor braking response and complex structure, mainly due to system delays caused by reliance on multi-sensor collaborative working modes and complex control strategies.

Method used

A bidirectional speed control switch is used to obtain the throttle signal. The working mode is directly determined by the polarity and magnitude of the throttle signal, and the current reference value of the motor is controlled accordingly to achieve seamless switching between drive power mode and brake power supply mode, simplifying the sensor and circuit structure.

Benefits of technology

It improves the real-time performance and speed of braking response, simplifies the system structure, and reduces intermediate steps in signal transmission and processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122292986A_ABST
    Figure CN122292986A_ABST
Patent Text Reader

Abstract

This application discloses a motor control method, device, and electric two-wheeler, applied in the field of motor control technology, to solve the problems of slow response speed and complex structure of motor braking in existing electric two-wheelers. Specifically, it involves: acquiring the current throttle signal of the electric two-wheeler; the current throttle signal is the voltage signal output by a bidirectional speed control switch located inside the throttle of the electric two-wheeler; when the current throttle signal meets the effective operating conditions, determining the current operating mode of the electric two-wheeler based on the polarity of the current throttle signal; the current operating mode includes a braking power supply mode and a driving power supply mode; determining the current current reference value of the motor based on the magnitude of the current throttle signal; and controlling the motor based on the current current reference value and the current operating mode. In this way, operating mode determination and motor control are performed solely based on the current electronic throttle signal, resulting in a simple structure, reducing intermediate links in signal transmission and processing, and improving the real-time performance and speed of braking response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of motor control technology, and in particular to a motor control method, device and electric two-wheeler. Background Technology

[0002] With the increasing severity of the global energy crisis and environmental pollution, electric two-wheelers have experienced rapid development in the urban short-distance travel sector due to their advantages such as environmental friendliness, energy saving, and convenience. Electric two-wheelers typically use permanent magnet synchronous motors as their drive core, and their control systems are generally equipped with Hall effect sensors to detect the rotor position in real time, enabling efficient commutation control of the motor. During vehicle operation, especially downhill or braking conditions, the motor can switch to generator mode, converting mechanical energy into electrical energy to feed back into the battery pack; this process is known as regenerative braking or energy recovery.

[0003] Currently, regenerative braking in electric two-wheelers primarily relies on a multi-sensor collaborative operating mode: braking signals are acquired through independent mechanical switches or electronic sensors, wheel speed information is obtained by an additionally configured speed sensor, and these signals are processed by the main controller to switch the drive motor to generator mode. The back electromotive force generated during generator generation needs to be sampled by a dedicated detection circuit and then processed by complex algorithms to determine the intensity and timing of energy recovery. The entire system involves multiple hardware units, including brake sensors, wheel speed sensors, and back electromotive force detection modules, which not only increases the difficulty of wiring harness layout but also significantly increases manufacturing costs. In terms of control strategy, traditional solutions adopt a hierarchical processing architecture: the bottom-level sensor signals need to undergo preprocessing stages such as analog-to-digital conversion and digital filtering, and then the MCU executes algorithms such as braking judgment and torque calculation, ultimately outputting a PWM signal to control the switching of the motor's operating mode. This serial processing flow results in a system response delay of approximately 50-100 milliseconds.

[0004] In summary, existing electric two-wheelers suffer from slow response speed and complex structure in their motor braking and energy feedback systems. Summary of the Invention

[0005] This application provides a motor control method, device, and electric two-wheeler to solve the problems of slow response speed and complex structure of motor braking in existing electric two-wheelers.

[0006] The technical solution provided in this application is as follows: On the one hand, this application provides a motor control method applied to an electric two-wheeled vehicle, including: Obtain the current throttle signal of the electric two-wheeler; wherein, the current throttle signal is the voltage signal output by the bidirectional speed control switch located inside the throttle of the electric two-wheeler. When the current throttle signal meets the valid operating conditions, the current operating mode of the electric two-wheeler is determined according to the polarity of the current throttle signal. The current operating mode includes a braking power supply mode for recovering braking energy into electrical energy and a driving power consumption mode for consuming electrical energy to drive the vehicle. The current current reference value of the motor in the current operating mode is determined according to the magnitude of the current throttle signal. The motor is controlled to perform the corresponding operating operation according to the current current reference value and the current operating mode.

[0007] Optionally, the current operating mode of the electric two-wheeler can be determined based on the polarity of the current throttle signal, including: When the polarity of the current throttle signal is positive, the current working mode of the electric two-wheeler is determined to be the electric drive mode. When the polarity of the current throttle signal is negative, the current operating mode of the electric two-wheeler is determined to be the brake power depletion mode.

[0008] Optionally, the current current reference value of the motor in the current operating mode can be determined based on the magnitude of the current throttle signal, including: When the magnitude of the current throttle signal does not exceed the preset voltage threshold, the motor torque corresponding to the magnitude of the current throttle control signal is determined as the current motor torque based on the preset correspondence between the magnitude of the throttle control signal and the motor torque. When the magnitude of the current throttle signal exceeds the preset voltage threshold, obtain the safe torque corresponding to the current working mode and use the safe torque as the current motor torque; Based on the current motor torque and the motor's basic parameters, determine the current reference value of the motor current.

[0009] Optionally, when the current operating mode is braking power supply mode, the safety torque corresponding to the current operating mode is obtained, including: Obtain safe braking distance, vehicle weight, current speed, and vehicle parameters; Determine the current deceleration based on the safe braking distance and the current vehicle speed; Determine the target braking force based on the vehicle weight and current deceleration; The safe torque is determined based on vehicle parameters and target braking force.

[0010] Optionally, the motor can be controlled to perform corresponding operating operations based on the current current reference value and the current operating mode, including: Get the current current of the motor; When the current working mode is the drive power consumption mode, the battery is controlled to transfer energy to the motor based on the SVPWM modulation method, according to the current current and the current current reference value. When the current operating mode is braking power supply mode, the motor is controlled to feed energy back to the battery based on PWM modulation and the current current and the current current reference value.

[0011] Optionally, the current current reference value includes the current direct-axis current reference value and the current quadrature-axis current reference value; based on PWM modulation, the motor is controlled to feed energy back to the battery according to the current current and the current current reference value, including: The current is reconstructed to obtain the current direct-axis current and the current quadrature-axis current. The current direct-axis error and the current quadrature-axis error are determined based on the current direct-axis current, the current quadrature-axis current, the current direct-axis current reference value, and the current quadrature-axis current reference value. Generate the current direct-axis voltage command and the current quadrature-axis voltage command based on the current direct-axis error and the current quadrature-axis error; A PWM signal is generated based on the current direct-axis voltage command and the current quadrature-axis voltage command to control the switching state of the inverter so that energy flows from the motor to the battery.

[0012] Optionally, the motor control method also includes: If the current quadrature axis current reference value is greater than the preset safe current, update the current quadrature axis current reference value according to the preset safe current to obtain a new current quadrature axis current reference value.

[0013] Optionally, the motor control method also includes: When the current throttle signal does not meet the effective action conditions, the control stops supplying power to the motor in the electric two-wheeler.

[0014] On the other hand, this application provides a motor control device, including: The data acquisition unit is used to acquire the current throttle signal of the electric two-wheeler; wherein, the current throttle signal is the voltage signal output by the bidirectional speed control switch located inside the throttle of the electric two-wheeler. The first motor control unit is used to determine the current operating mode of the electric two-wheeler based on the polarity of the current throttle signal when the current throttle signal meets the valid operating conditions; wherein the current operating mode includes a braking power supply mode for recovering braking energy into electrical energy and a driving power consumption mode for consuming electrical energy to drive the vehicle; determine the current current reference value of the motor under the current operating mode based on the magnitude of the current throttle signal; and control the motor to perform corresponding operating operations based on the current current reference value and the current operating mode.

[0015] On the other hand, this application provides an electric two-wheeled vehicle, including: a battery module, a motor module, a power conversion module, a throttle with a two-way speed control switch, and the aforementioned motor control device; The battery module is connected to the motor module via the power conversion module. The motor control device is connected to the control terminal of the motor module, the control terminal of the power conversion module, the output terminal of the bidirectional speed control switch, and the communication terminal of the battery module.

[0016] The beneficial effects of this application are as follows: In this application, the current operating mode of the electric two-wheeler is determined based on the polarity of the current throttle signal, and the current current reference value of the motor in the current operating mode is determined based on the magnitude of the current throttle signal. This enables seamless switching between drive power mode and brake power supply mode using only a single current electronic throttle signal, without the need for numerous additional complex sensors and circuits, resulting in a relatively simple structure. By directly determining the operating mode and controlling the motor using the polarity and magnitude of the current throttle signal, intermediate links in signal transmission and processing are reduced, enabling brake commands to be transmitted and executed quickly, significantly improving the real-time performance and speed of braking response.

[0017] Other features and advantages of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic flowchart illustrating the general process of the motor control method in the embodiments of this application; Figure 2 This is a schematic diagram of the bidirectional speed control switch in the embodiments of this application; Figure 3 This is a schematic diagram of the output voltage curve of the bidirectional speed control switch in the embodiments of this application; Figure 4 This is a schematic diagram illustrating the specific process of determining the safe torque in the embodiments of this application; Figure 5 This is a schematic diagram illustrating the specific process of the energy feedback method in the embodiments of this application; Figure 6 This is a schematic diagram of the functional structure of the motor control in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of the electric two-wheeled vehicle in the embodiments of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and beneficial effects of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] It should be noted that the terms "first," "second," etc., used in 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 terms can be used interchangeably where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein.

[0021] This application provides a motor control method for electric two-wheeled vehicles, see below. Figure 1 As shown in the embodiments of this application, the general flow of the motor control method for electric two-wheeled vehicles is as follows: Step 101: Obtain the current throttle signal of the electric two-wheeler; wherein, the current throttle signal is the voltage signal output by the bidirectional speed control switch located inside the throttle of the electric two-wheeler. In practical applications, the throttle handlebars of electric two-wheelers integrate a bidirectional speed control switch. Unlike traditional unidirectional throttle handlebars, this bidirectional speed control switch can rotate in both forward and reverse directions from an initial position. When the throttle handlebar is at the center zero position, the voltage signal output by the bidirectional speed control switch is zero, meaning the current throttle signal is zero. When the driver rotates the throttle handlebar forward from the zero position, the bidirectional speed control switch outputs a positive voltage signal whose magnitude is proportional to the rotation angle; that is, the current throttle signal is a positive value. When the driver rotates the throttle handlebar backward from the zero position, the bidirectional speed control switch outputs a negative voltage signal whose magnitude is proportional to the rotation angle; that is, the current throttle signal is a negative value. By analyzing the polarity and magnitude of the current throttle signal, the driver's driving intention can be determined.

[0022] For details on the structure of the bidirectional speed control switch, please refer to [link / reference]. Figure 2As shown, the throttle includes an inner ring 1 fixed to the handlebars and an outer ring 2 that the rider can grip and rotate. The bidirectional speed control switch is a non-contact sensor based on the Hall effect, its core comprising a linear magnetic field magnet 3 and a linear Hall element 4. The linear magnetic field magnet 3 is typically mounted on the inner wall of the rotatable outer ring 2 and rotates with it; the linear Hall element 4 is fixed to the inner wall of the stationary inner ring 1. When the rider rotates the outer ring 2, the linear magnetic field magnet 3 and the linear Hall element 4 move relative to each other, causing a linear change in the magnetic induction intensity passing through the Hall element 4. The Hall element 4 then outputs a voltage signal that is linearly related to the rotation angle and direction, i.e., the current throttle signal. Figure 2 and Figure 3 As shown, when the bidirectional speed control switch is stationary in its original position, the output voltage is B. When the throttle is turned, causing the linear magnetic field magnet to rotate in the positive direction to the limit position N, the output voltage is C. When the throttle is turned, causing the linear magnetic field magnet to rotate in the opposite direction to the limit position M, the output voltage is A. The linear output range is represented by line segments UV, where line segment BV represents the current throttle signal corresponding to the current operating mode being drive power mode, and line segment BU represents the current throttle signal corresponding to the current operating mode being brake power mode.

[0023] Step 102: When the current throttle signal meets the valid action conditions, determine the current working mode of the electric two-wheeler according to the polarity of the current throttle signal; wherein, the current working mode includes a braking power supply mode for recovering braking energy into electrical energy and a driving power consumption mode for consuming electrical energy to drive the vehicle; determine the current current reference value of the motor in the current working mode according to the magnitude of the current throttle signal; control the motor to perform the corresponding operation according to the current current reference value and the current working mode.

[0024] In practical applications, the effective operating condition is that the magnitude of the current throttle signal exceeds a preset, non-zero dead-zone voltage threshold. This dead-zone voltage threshold is a voltage cutoff value set to distinguish between invalid signal interference and the valid current throttle signal. When the controller detects the current throttle signal, it determines whether the signal meets the effective operating condition, resulting in one of two possible outcomes: The first possible outcome is that the current throttle signal does not meet the conditions for effective operation. In this case, the control stops supplying power to the motor in the electric two-wheeler.

[0025] In practical applications, if the current throttle signal does not meet the conditions for effective operation, it indicates that the driver has neither the intention to accelerate nor the intention to actively brake. At this time, the controller will cut off the energy supply from the battery to the motor, and the motor will be in a state where it does not actively generate driving or braking force. The vehicle may coast due to inertia, i.e., the vehicle is in standby or neutral mode.

[0026] The second judgment result: The current throttle signal meets the conditions for valid action.

[0027] In practical applications, the current throttle signal meeting the valid action conditions indicates that the driver intends to accelerate or actively brake. A pre-defined correspondence between the polarity of the current throttle signal and the operating mode is established. When the controller detects that the current throttle signal is not zero, it first determines the vehicle's current operating mode by judging the polarity (positive or negative). Then, based on the absolute value of the throttle signal, it determines the current current reference value of the motor under this operating mode through a pre-defined mapping relationship or calculation formula. Finally, based on the determined current operating mode and current reference value, the controller adjusts the duty cycle or phase current of the power converter to control the motor to perform corresponding torque output or regenerative braking operations, thereby achieving precise control of vehicle driving or braking energy recovery.

[0028] In this way, by determining the current operating mode of the electric two-wheeler based on the polarity of the current throttle signal, and determining the current current reference value of the motor under the current operating mode based on the magnitude of the current throttle signal, seamless switching between drive and regenerative braking modes can be achieved using only a single current electronic throttle signal. This eliminates the need for numerous additional complex sensors and wiring, resulting in a relatively simple structure. By directly determining the operating mode and controlling the motor using the polarity and magnitude of the current throttle signal, intermediate links in signal transmission and processing are reduced, enabling braking commands to be transmitted and executed quickly, significantly improving the real-time performance and speed of braking response.

[0029] In practice, the current operating mode of the electric two-wheeler is determined based on the direction of the current throttle signal, and can be achieved in, but is not limited to, the following ways: When the polarity of the current throttle signal is positive, the current working mode of the electric two-wheeler is determined to be the electric drive mode. When the polarity of the current throttle signal is negative, the current operating mode of the electric two-wheeler is determined to be the brake power depletion mode.

[0030] In practical applications, when the polarity of the current throttle signal is positive, the electric two-wheeler's current operating mode is determined to be the drive-powered mode. For example, when the driver turns the throttle in the forward direction, the controller receives a positive voltage signal and determines that the vehicle has entered the drive-powered mode. In this mode, the battery supplies power to the motor, driving the vehicle. When the polarity of the current throttle signal is negative, the electric two-wheeler's current operating mode is determined to be the brake-powered mode. For example, when the driver turns the throttle in the reverse direction, the controller receives a negative voltage signal and determines that the vehicle has entered the brake-powered mode. In this mode, the motor converts the energy generated by braking into electrical energy and feeds it back to the battery to charge it, thus achieving energy recovery and motor braking.

[0031] In practice, the current reference value of the motor in the current working mode is determined based on the magnitude of the current throttle signal. This can be achieved, but is not limited to, the following methods: First, when the magnitude of the current throttle signal does not exceed the voltage threshold corresponding to the current working mode, the motor torque corresponding to the magnitude of the current throttle control signal is determined as the current motor torque based on the preset correspondence between the magnitude of the throttle control signal and the motor torque. When the magnitude of the current throttle signal exceeds the preset voltage threshold, the safety torque corresponding to the current working mode is obtained and used as the current motor torque.

[0032] Then, based on the current motor torque and the motor's basic parameters, the current reference value of the motor is determined.

[0033] In practical applications, to balance smooth operation and safety in extreme situations, a segmented current reference value determination method is adopted based on preset voltage thresholds. A first voltage threshold and a second voltage threshold are preset, with different voltage thresholds corresponding to different operating modes. The first voltage threshold is the maximum voltage value for achieving normal acceleration control in drive power mode. The second voltage threshold is the maximum voltage value for achieving normal braking energy recovery control in brake power regeneration mode. When the current operating mode is drive power mode, the magnitude of the current throttle signal is compared with the first voltage threshold. When the current operating mode is brake power regeneration mode, the magnitude of the current throttle signal is compared with the second voltage threshold. When the magnitude of the current throttle signal does not exceed the corresponding voltage threshold, corresponding to the normal control area, the controller considers the driver to be in a normal acceleration or normal braking state. The controller directly converts the current throttle voltage signal magnitude into a corresponding current motor torque based on a preset mapping table, which includes the correspondence between the magnitude of the throttle control signal and the motor torque for different operating modes. The relationship between the throttle control signal and the motor torque can be designed to be linear or non-linear to optimize the driving experience, such as a smooth initial response and a sensitive later response. When the current throttle signal exceeds a preset voltage threshold, it indicates that the driver is performing maximum acceleration or braking. At this time, the safety torque corresponding to the current operating mode is acquired. If the current operating mode is drive-powered mode, the acceleration safety torque is acquired and used as the current motor torque; if the current operating mode is brake-powered mode, the braking safety torque is acquired and used as the current motor torque. The acceleration safety torque is the maximum acceleration torque designed for the vehicle, and the braking safety torque is the torque required for safe braking within a preset braking distance.

[0034] After determining the current motor torque, the controller calculates the current value required to generate that torque based on the torque value and the motor's inherent parameters. This current reference value includes the current direct-axis current reference value and the current quadrature-axis current reference value. The current direct-axis current reference value is usually set according to the control objective, and is often set to zero to achieve maximum efficiency control. The motor's inherent parameters include the number of pole pairs and the permanent magnet flux linkage.

[0035] The current reference value can be calculated using the following formula.

[0036] Te = 1.5 * P * [Ψf * Iq-ref + (Ld-Lq)*Id-ref *Iq-ref] Where Te is the current motor torque, P is the number of pole pairs of the motor, Ψf is the permanent magnet flux linkage, Id-ref is the current direct-axis current reference value, which is generally taken as 0, Iq-ref is the current quadrature-axis current reference value, Ld is the direct-axis inductance value, and Lq is the quadrature-axis inductance value.

[0037] In one possible implementation, see [reference] Figure 4 As shown, when the current operating mode is braking power supply mode, the steps for obtaining the safety torque corresponding to the current operating mode include: Step 401: Obtain safe braking distance, vehicle weight, current speed, and vehicle parameters.

[0038] In practical applications, the safe braking distance is the maximum distance a vehicle can decelerate from its current speed to a complete stop in braking power-off mode. Vehicle weight refers to the total mass of the electric two-wheeler under full load or specific operating conditions. Current speed refers to the real-time speed of the electric two-wheeler at the moment braking begins. Vehicle parameters include wheel radius and gear ratio. Wheel radius refers to the rolling radius of the drive wheels. Gear ratio refers to the overall speed ratio of the entire transmission system from the motor output shaft to the wheels.

[0039] Step 402: Determine the current deceleration based on the safe braking distance and the current vehicle speed.

[0040] In practical applications, based on the following kinematic formula, the controller can calculate the current deceleration required to stop the vehicle within a safe braking distance.

[0041]

[0042] Where v is the current vehicle speed, s is the safe braking distance, and a is the current deceleration.

[0043] Step 403: Determine the target braking force based on the vehicle weight and current deceleration.

[0044] In practical applications, according to Newton's second law, the product of the vehicle's weight and the current deceleration is used as the target braking force.

[0045] Step 404: Determine the safe torque based on vehicle parameters and target braking force.

[0046] In practical applications, based on the following torque relationship formula, the target braking force at the wheel is equivalently mapped to the safe torque that the motor should generate, thereby completing the accurate conversion from the safe torque required for vehicle braking.

[0047]

[0048] in, For safe torque, F is the target braking force, R is the wheel radius, and X is the transmission ratio.

[0049] In practice, the motor is controlled to perform corresponding operating operations based on the current current reference value and the current operating mode. This can be achieved, but is not limited to, the following methods: First, obtain the current current of the motor; Then, when the current operating mode is the drive power consumption mode, the battery is controlled to transfer energy to the motor based on the SVPWM modulation method and the current current and the current current reference value; when the current operating mode is the brake power supply mode, the motor is controlled to feed energy back to the battery based on the PWM modulation method and the current current and the current current reference value.

[0050] In practical applications, the controller obtains the motor's current current in real time as feedback value through sensors. When the current operating mode is drive-powered mode, the controller uses Space Vector Pulse Width Modulation (SVPWM) to calculate the required voltage vector using the current current reference value as the target and the measured current current as feedback. Then, it generates a control signal through the SVPWM algorithm to precisely control the on / off state of the power switching transistors in the inverter of the power conversion module. This ensures efficient energy transfer from the battery to the motor, precisely matching the motor's actual output with the driver's intentions. In drive-powered mode, the current direct-axis current reference value is zero, the current quadrature-axis current reference value is positive, the modulation method is SVPWM, and the energy flow is from the battery to the motor.

[0051] When the current operating mode is braking-fed mode, the controller uses pulse width modulation (PWM). The motor operates as a generator, and the controller controls the switching state of the inverter in the power conversion module by adjusting the duty cycle of the PWM signal, thus creating a controllable rectifier channel to stably feed the electrical energy generated by the motor back to the battery. In the braking-fed mode, the current reference value of the direct-axis current is zero, the current reference value of the quadrature-axis current is negative, the modulation method is synchronous rectification PWM, and the energy flow is from the motor to the battery.

[0052] In one possible implementation, see [reference] Figure 5 As shown, the current current reference value includes the current direct-axis current reference value and the current quadrature-axis current reference value; based on PWM modulation, the motor is controlled to feed energy back to the battery according to the current current and the current current reference value; Step 501: Perform current reconstruction transformation on the current current to obtain the current direct-axis current and the current quadrature-axis current.

[0053] In practical applications, the current of the motor is acquired through sampling resistors or current sensors by collecting the three-phase stator currents Ia, Ib, and Ic. The Clark transformation converts these three-phase currents Ia, Ib, and Ic in a stationary coordinate system (abc) into current components Iα and Iβ in a two-phase stationary Cartesian coordinate system (α-β). The transformation formula can be expressed as: Iα=Ia Iβ = (Ia + 2*Ib) / √3 Obtain the electrical angle θ of the motor rotor detected by the position sensor. Transform the current components (Iα, Iβ) in the two-phase stationary coordinate system (α-β) to the two-phase synchronous rotating coordinate system (dq) using the Park transformation, thus obtaining the final current direct-axis current Id and current quadrature-axis current Iq. The transformation formula can be expressed as: Id = Iα * cosθ + Iβ * sinθ Iq = -Iα * sinθ + Iβ * cosθ In this rotating coordinate system, the current direct-axis current Id corresponds to the excitation current component that generates the motor's magnetic field, while the current quadrature-axis current Iq corresponds to the torque current component that generates the electromagnetic torque.

[0054] Step 502: Determine the current direct-axis error and the current quadrature-axis error based on the current direct-axis current, the current quadrature-axis current, the current direct-axis current reference value, and the current quadrature-axis current reference value.

[0055] In practical applications, the current direct-axis current reference value is usually set according to the control objective, and is often set to zero to achieve maximum efficiency control. The current direct-axis error is obtained by subtracting the current direct-axis current from the current direct-axis current reference value. The current quadrature-axis error is obtained by subtracting the current quadrature-axis current from the current quadrature-axis current reference value.

[0056] Step 503: Generate the current direct axis voltage command and the current quadrature axis voltage command based on the current direct axis error and the current quadrature axis error.

[0057] In practical applications, based on the current direct-axis error and the current quadrature-axis error, a closed-loop adjustment is performed using a current-loop PI controller to generate the current direct-axis voltage command and the current quadrature-axis voltage command for controlling the motor. Specifically, the current direct-axis error and the current quadrature-axis error are input to the direct-axis current PI controller and the quadrature-axis current PI controller, respectively. The direct-axis current PI controller performs proportional-integral calculations based on the current direct-axis error and outputs the current direct-axis voltage command; the quadrature-axis current PI controller performs proportional-integral calculations based on the current quadrature-axis error and outputs the current quadrature-axis voltage command.

[0058] Step 504: Generate a PWM signal based on the current direct-axis voltage command and the current quadrature-axis voltage command to control the switching state of the inverter so that energy flows from the motor to the battery.

[0059] In practical applications, under braking-feed mode, the amplitude of the current quadrature-axis voltage command directly reflects the strength of the generator braking torque. The current quadrature-axis voltage command is used as a control input, and through a controller or a preset mapping relationship, it is converted into a target PWM duty cycle for adjusting the current intensity. The target PWM duty cycle is proportional to the absolute value of the current quadrature-axis voltage. For the lower arm switch in the inverter that needs to participate in energy feedback within the current commutation interval, the target PWM duty cycle is applied to the PWM generator of that lower arm, generating a PWM signal with the corresponding duty cycle. This PWM signal is directly used to drive the lower arm switch. When the PWM signal is high, the switch is turned on, providing a low-impedance path for the current instead of through its body diode, achieving synchronous rectification and significantly reducing the on-state voltage drop and heat loss. For the corresponding upper arm switch in the inverter within the current commutation interval, its drive signal remains at a constant low level, i.e., completely off. For all switches in the inverter's other bridge arms that are not involved in the current commutation, their drive signals are also kept at a constant low level, i.e., completely off. The average current of this circuit can be controlled by adjusting the target PWM duty cycle. The larger the target PWM duty cycle, the longer the conduction time of the lower bridge arm switch, the smaller the equivalent impedance of the circuit, the larger the average feedback current, and the greater the braking torque.

[0060] In one possible implementation, the motor control method further includes: If the current quadrature axis current reference is greater than the preset safe current, update the current quadrature axis current reference value according to the preset safe current to obtain a new current quadrature axis current reference value.

[0061] In practical applications, throughout the entire control process, whether in drive or braking mode, the controller continuously monitors the current quadrature-axis current reference value to be used for calculation. The safe current is set based on the maximum continuous or instantaneous current that the motor, controller, and battery can withstand. If, under any circumstances, the current quadrature-axis current reference value exceeds the preset safe current, the controller will forcibly limit it within that safe value, updating the current quadrature-axis current reference value accordingly to obtain a new quadrature-axis current reference value. For example, if the calculated current quadrature-axis current reference value is 50A, and the safe current threshold is 40A, the controller will ultimately use 40A as the new reference value for subsequent control. This measure effectively prevents excessive current due to user error or calculation errors, thereby protecting the motor, controller, and battery from damage.

[0062] Based on the above embodiments, this application provides a motor control device, see below. Figure 6 As shown, the motor control device 600 provided in this application embodiment includes at least: The data acquisition unit 601 is used to acquire the current throttle signal of the electric two-wheeler; wherein, the current throttle signal is the voltage signal output by the bidirectional speed control switch located inside the throttle of the electric two-wheeler. The first motor control unit 602 is used to determine the current operating mode of the electric two-wheeler based on the polarity of the current throttle signal when the current throttle signal meets the valid operating conditions; wherein the current operating mode includes a braking power supply mode for recovering braking energy into electrical energy and a driving power consumption mode for consuming electrical energy to drive the vehicle; determine the current current reference value of the motor in the current operating mode based on the magnitude of the current throttle signal; and control the motor to perform corresponding operating operations based on the current current reference value and the current operating mode.

[0063] In one possible implementation, the first motor control unit 602 is specifically used for: When the polarity of the current throttle signal is positive, the current working mode of the electric two-wheeler is determined to be the electric drive mode. When the polarity of the current throttle signal is negative, the current operating mode of the electric two-wheeler is determined to be the brake power depletion mode.

[0064] In one possible implementation, the first motor control unit 602 is specifically used for: When the magnitude of the current throttle signal does not exceed the preset voltage threshold, the motor torque corresponding to the magnitude of the current throttle control signal is determined as the current motor torque based on the preset correspondence between the magnitude of the throttle control signal and the motor torque. When the magnitude of the current throttle signal exceeds the preset voltage threshold, obtain the safe torque corresponding to the current working mode and use the safe torque as the current motor torque; Based on the current motor torque and the motor's basic parameters, determine the current reference value of the motor current.

[0065] In one possible implementation, when the current operating mode is the brake power supply mode, the first motor control unit 602 is specifically used for: Obtain safe braking distance, vehicle weight, current speed, and vehicle parameters; Determine the current deceleration based on the safe braking distance and the current vehicle speed; Determine the target braking force based on the vehicle weight and current deceleration; The safe torque is determined based on vehicle parameters and target braking force.

[0066] In one possible implementation, the first motor control unit 602 is specifically used for: Get the current current of the motor; When the current working mode is the drive power consumption mode, the battery is controlled to transfer energy to the motor based on the SVPWM modulation method, according to the current current and the current current reference value. When the current operating mode is braking power supply mode, the motor is controlled to feed energy back to the battery based on PWM modulation and the current current and the current current reference value.

[0067] In one possible implementation, the current current reference value includes a current direct-axis current reference value and a current quadrature-axis current reference value; the first motor control unit 602 is specifically used for: Based on PWM modulation, the motor is controlled to feed energy back to the battery according to the current current and the current current reference value. The current is reconstructed to obtain the current direct-axis current and the current quadrature-axis current. The current direct-axis error and the current quadrature-axis error are determined based on the current direct-axis current, the current quadrature-axis current, the current direct-axis current reference value, and the current quadrature-axis current reference value. Generate the current direct-axis voltage command and the current quadrature-axis voltage command based on the current direct-axis error and the current quadrature-axis error; A PWM signal is generated based on the current direct-axis voltage command and the current quadrature-axis voltage command to control the switching state of the inverter so that energy flows from the motor to the battery.

[0068] In one possible implementation, the motor control device 600 further includes: The protection unit 603 is used to update the current quadrature axis current reference value according to the preset safe current when the current quadrature axis current reference value is greater than the preset safe current, so as to obtain a new current quadrature axis current reference value.

[0069] In one possible implementation, the motor control device 600 further includes: The second motor control unit 604 is used to stop supplying power to the motor in the electric two-wheeler when the current throttle signal does not meet the effective operating conditions.

[0070] It should be noted that the principle of the motor control device 600 provided in this application embodiment to solve the technical problem is similar to that of the motor control method provided in this application embodiment. Therefore, the implementation of the motor control device 600 provided in this application embodiment can refer to the implementation of the motor control method provided in this application embodiment, and the repeated parts will not be described again.

[0071] Based on the above embodiments, this application provides an electric two-wheeled vehicle, see reference. Figure 7 As shown, the electric two-wheeled vehicle 700 provided in this application embodiment includes at least: a battery module 701, a motor module 702, a power conversion module 703, a throttle 705 equipped with a bidirectional speed control switch 704, and the aforementioned motor control device 600. The battery module 701 is connected to the motor module 702 via the power conversion module 703. The motor control device 600 is connected to the control terminal of the motor module 702, the control terminal of the power conversion module 703, the output terminal of the bidirectional speed control switch 704, and the communication terminal of the battery module 701.

[0072] In practical applications, battery module 701 stores electrical energy and provides power to the electric two-wheeler. The communication terminal of battery module 701 interacts with motor control device 600, transmitting data such as battery voltage, current, charge status, and temperature parameters. Motor module 702 acts as an actuator; its control terminal receives control commands from motor control device 600 to realize the driving or braking energy recovery function of the electric two-wheeler. Power conversion module 703 connects between battery module 701 and motor module 702. Its control terminal receives modulation signals from motor control device 600 to achieve bidirectional energy flow control. Specifically, in driving mode, it converts the DC power from battery module 701 into AC power suitable for motor module 702 operation; in braking power-recharge mode, it converts the AC power generated by motor module 702 into DC power that can charge battery module 701. Specifically, power conversion module 703 may include an inverter composed of switching transistors. A two-way speed control switch 704 mounted on the throttle 705 is used to sense user operation. The output terminal of the Hall element in the two-way speed control switch 704 is connected to the motor control device 600 to output a voltage signal corresponding to the rotation angle and direction to the motor control device 600. The motor control device 600, as the control core, executes the above-mentioned motor control method based on the received throttle signal, battery status information, and motor operating status, generates corresponding control commands, and achieves precise control of the motor module 702 through the control terminal of the power conversion module 703, thereby completing the comprehensive management of the electric two-wheeler's drive, braking, and energy recovery.

[0073] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0074] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0075] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0076] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

Claims

1. A motor control method, characterized in that, Applications in electric two-wheelers include: Obtain the current throttle signal of the electric two-wheeler; wherein, the current throttle signal is the voltage signal output by the bidirectional speed control switch located inside the throttle of the electric two-wheeler. When the current throttle signal meets the valid operating conditions, the current operating mode of the electric two-wheeler is determined according to the polarity of the current throttle signal; wherein, the current operating mode includes a braking power supply mode for recovering braking energy into electrical energy and a driving power consumption mode for consuming electrical energy to drive the vehicle; the current current reference value of the motor in the current operating mode is determined according to the magnitude of the current throttle signal; and the motor is controlled to perform corresponding operating operations according to the current current reference value and the current operating mode.

2. The motor control method as described in claim 1, characterized in that, Determining the current operating mode of the electric two-wheeler based on the polarity of the current throttle signal includes: When the polarity of the current throttle signal is positive, the current working mode of the electric two-wheeler is determined to be the electric drive mode; When the polarity of the current throttle signal is negative, the current operating mode of the electric two-wheeler is determined to be the brake power-off mode.

3. The motor control method as described in claim 1, characterized in that, Determining the current current reference value of the motor in the current operating mode based on the magnitude of the current throttle signal includes: When the magnitude of the current throttle signal does not exceed a preset voltage threshold, the motor torque corresponding to the magnitude of the current throttle control signal is determined as the current motor torque based on the preset correspondence between the magnitude of the throttle control signal and the motor torque. When the magnitude of the current throttle signal exceeds a preset voltage threshold, the safe torque corresponding to the current working mode is obtained, and the safe torque is used as the current motor torque; Based on the current motor torque and the basic parameters of the motor, determine the current reference value of the motor.

4. The motor control method as described in claim 3, characterized in that, When the current operating mode is the braking power supply mode, obtaining the safety torque corresponding to the current operating mode includes: Obtain safe braking distance, vehicle weight, current speed, and vehicle parameters; The current deceleration is determined based on the safe braking distance and the current vehicle speed; The target braking force is determined based on the vehicle weight and the current deceleration. The safe torque is determined based on the vehicle parameters and the target braking force.

5. The motor control method as described in claim 3, characterized in that, The step of controlling the motor to perform corresponding operating operations based on the current current reference value and the current operating mode includes: Obtain the current current of the motor; When the current working mode is the drive power consumption mode, the battery is controlled to transfer energy to the motor based on the SVPWM modulation method, according to the current current and the current current reference value. When the current operating mode is the braking power supply mode, the motor is controlled to feed energy back to the battery based on the PWM modulation method, according to the current current and the current current reference value.

6. The motor control method as described in claim 5, characterized in that, The current current reference value includes the current direct-axis current reference value and the current quadrature-axis current reference value; The method based on PWM modulation, controlling the motor to feed energy back to the battery according to the current current and the current current reference value, includes: The current current is reconstructed to obtain the current direct-axis current and the current quadrature-axis current; The current direct-axis error and the current quadrature-axis error are determined based on the current direct-axis current, the current quadrature-axis current, the current direct-axis current reference value, and the current quadrature-axis current reference value. Generate the current direct-axis voltage command and the current quadrature-axis voltage command based on the current direct-axis error and the current quadrature-axis error; A PWM signal is generated based on the current direct-axis voltage command and the current quadrature-axis voltage command to control the switching state of the inverter so that energy flows from the motor to the battery.

7. The motor control method as described in claim 6, characterized in that, Also includes: If the current quadrature axis current reference value is greater than the preset safe current, the current quadrature axis current reference value is updated according to the preset safe current to obtain a new current quadrature axis current reference value.

8. The motor control method as described in claim 1, characterized in that, Also includes: When the current throttle signal does not meet the valid operating conditions, the control stops supplying power to the motor in the electric two-wheeler.

9. A motor control device, characterized in that, include: The data acquisition unit is used to acquire the current throttle signal of the electric two-wheeler; wherein, the current throttle signal is the voltage signal output by the bidirectional speed control switch located inside the throttle of the electric two-wheeler. A first motor control unit is configured to, when the current throttle signal meets the valid operating conditions, determine the current operating mode of the electric two-wheeler based on the polarity of the current throttle signal; wherein the current operating mode includes a braking power-feeding mode for recovering braking energy into electrical energy and a driving power-consuming mode for consuming electrical energy to drive the vehicle; determine the current current reference value of the motor under the current operating mode based on the magnitude of the current throttle signal; and control the motor to perform corresponding operating operations based on the current current reference value and the current operating mode.

10. An electric two-wheeled vehicle, characterized in that, include: The battery module, motor module, power conversion module, throttle with a bidirectional speed control switch, and motor control device as described in claim 9; The battery module is connected to the motor module via the power conversion module, and the motor control device is connected to the control terminal of the motor module, the control terminal of the power conversion module, the output terminal of the bidirectional speed control switch, and the communication terminal of the battery module.