Electronic shifter for motorcycle and control method thereof
The control method for motorcycle drive-by-wire shifting systems implemented through electronic devices solves the compatibility, robustness, and modularity issues in existing technologies, improves the system's versatility and reliability, reduces maintenance costs and misjudgment rates, and enhances the consistency of human-machine interaction.
Patent Information
- Application Number
- CN202511738384.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-01-13
AI Technical Summary
Existing motorcycle shift-by-wire systems suffer from poor compatibility, insufficient robustness, low modularity, inadequate diagnostic visibility, and poor human-machine interaction consistency under strong vibration, power supply fluctuations, and environmental stress, resulting in high migration costs, high misjudgment rates, and difficult maintenance across different models.
The control method implemented using electronic devices includes hardware self-testing, positioning procedures, action sequences, and anomaly monitoring. Combined with sensor arrays and communication links, it provides scenario-based degradation strategies and robustness checks, and supports customizable combinations of CAN/LIN/discrete I/O to reduce the complexity of mechanical layout.
It improves the versatility and compatibility of motorcycle shift-by-wire systems, enhances reliability in environments with strong vibration and power supply fluctuations, reduces maintenance costs and misjudgment rates, and improves the consistency of human-machine interaction.
Smart Images

Figure CN121322643A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic control technology, and in particular to an electronic gear shifter for motorcycles, its control method, electronic equipment, and computer-readable storage medium. Background Technology
[0002] Shift-by-wire (SBW) uses electronic signals to replace traditional mechanical linkages / cables for gear selection and execution, and is widely used in passenger cars and motorcycle platforms. For motorcycles (regardless of whether they are 2-wheeled, 3-wheeled, or 4-wheeled motorcycles), the limited space, higher vibration and environmental stress (temperature and humidity, heavy rain / water intrusion, dust, salt spray), more volatile power supply (start-up voltage drops, sudden load changes), and stricter cost and layout constraints place higher demands on human-machine interface components, shift ECUs, power supply and communication, actuator drives, and diagnostic degradation strategies.
[0003] The common gear shifting procedure is as follows:
[0004] a) Collect shift intentions and perform multi-cycle debouncing, out-of-bounds and consistency checks;
[0005] b) Determine the permissibility based on factors such as vehicle speed, braking, engine speed, clutch status, parking brake or side stand switch, etc.
[0006] c) Send shift requests to the power domain / actuator via CAN / LIN or local I / O, and set timeout and retry;
[0007] d) Receive confirmation and update the current gear and display;
[0008] e) In case of an anomaly, the system will enter a general downgrade mode (hold / neutral / torque and speed limit) and issue an alarm.
[0009] The existing gear shifting process described above has the following technical defects:
[0010] Poor platform compatibility: There are significant differences in communication interfaces (CAN / LIN / discrete I / O), actuator types (motor / electromagnet / clutch mechanism), and body signals such as side support / parking / clutch. Existing solutions mostly rely on hard-coded adaptation, resulting in high migration costs and long cycles across vehicle models.
[0011] Insufficient robustness: Under typical motorcycle operating conditions (strong vibration, rain and water immersion, dust and salt spray, start-up voltage drop, EMI / ESD), the power supply and signal chain interference immunity design is weak, which can easily lead to misjudgment, disconnection or failure.
[0012] The degradation strategy is too simplistic: for anomalies such as communication timeout, sensor distortion, under / overvoltage, and actuator jamming, it only provides a single path degradation such as "hold / return to N", lacking scenario-specific priority and recovery criteria;
[0013] State machine and rigid thresholds: Permissibility criteria (vehicle speed / braking / side support / engine status, etc.) are stacked with fixed thresholds, resulting in a high false trigger rate for boundary conditions (low-speed vibration, slope, frequent start-stop).
[0014] Low modularity: Human-machine input, communication, execution drive, diagnosis, etc. are highly coupled, making it difficult to cut off or replace individual modules, which limits optimization under BOM and space constraints.
[0015] High calibration and maintenance costs: There is a lack of systematic calibration interfaces and tools for thresholds, timeouts, retry, and prompting strategies, requiring a lot of repeated parameter tuning before and after mass production, making after-sales maintenance difficult;
[0016] Insufficient diagnostic visibility: DTC has coarse granularity, limited data reporting, weak traceability and remote diagnostic capabilities, which is not conducive to quickly locating on-site problems;
[0017] Poor consistency in human-computer interaction: delayed or inconsistent instructions / screen display feedback, unclear prompts when abnormalities occur, affecting user perception and safety decisions. Summary of the Invention
[0018] To address the technical problems existing in the prior art, the present invention provides the following technical solution:
[0019] On the one hand, a control method is provided, which is implemented by an electronic device, the method comprising the following steps:
[0020] The system powers on and performs hardware self-tests and a readiness delay.
[0021] Determine if the current position is clear:
[0022] 1) If so, maintain the current position or gear;
[0023] 2) Conversely, the power-on positioning procedure for the gear shifter is executed.
[0024] Once the communication interface is ready, it receives external requests and status data, and further determines whether the security conditions are met:
[0025] 1) If so, then plan the action sequence and execution constraints, execute the action sequence, and generate periodic feedback status and diagnostic summary;
[0026] 2) If not, maintain the current status and report the reason, generating a periodic feedback status and diagnostic summary;
[0027] Continuously monitor energy status, shift actuator load, and communication links, and determine if any anomalies are detected:
[0028] 1) If so, then enter the protection or throttling mechanism, and return to the service loop when the anomaly is eliminated;
[0029] 2) If not, return to the service loop.
[0030] Furthermore, the power-on positioning procedure for the gear shifter includes the following steps:
[0031] Start finding your spot;
[0032] Configure recovery mode, execution constraints, and power limits;
[0033] Slow-speed exploration until the reference region and software limit are reached, then determine whether the reference boundary has been detected.
[0034] If so, establish a position reference and calibrate the sensor array;
[0035] If not, then determine whether the recovery timeout threshold has been reached:
[0036] If the timeout is reached, the recovery timeout is recorded and a fault flag is set. The system outputs a failed location finding notification.
[0037] If the target is not reached, continue exploring at a low speed.
[0038] Furthermore, after establishing a position reference and calibrating the sensor array, the process further includes:
[0039] Write location valid flag;
[0040] The system outputs a successful positioning notification.
[0041] Furthermore, the execution action sequence includes the following steps:
[0042] Load execution parameters and constraints;
[0043] Drive the actuator to move in the target direction;
[0044] By combining the sensor array and the stroke window, it is determined whether the motion meets the positioning conditions:
[0045] If the position is reached, the actuator stops and the position confirmation procedure begins;
[0046] If the timeout threshold has not been reached, then determine whether the timeout threshold has been reached.
[0047] Furthermore, the arrival confirmation procedure includes the following steps:
[0048] Perform a consistency check on the sensor array to determine signal consistency and jitter suppression:
[0049] If so, the system will confirm the successful execution of the action and update the current status, outputting a notification indicating that the action was executed successfully.
[0050] If not, the motor is fine-tuned, reversed, or its speed reduced, and the actuator continues to move in the target direction, returning to the service cycle.
[0051] Furthermore, the determination of whether the timeout threshold has been reached includes:
[0052] If so, the actuator is stopped and a failure to reach the target position is marked, and the system outputs a notification of failed action execution.
[0053] If not, the motor is fine-tuned, reversed, or its speed reduced, and the actuator continues to move in the target direction, returning to the service cycle.
[0054] Furthermore, after executing the action sequence, the method also includes determining whether the consistency of the sensor array is confirmed.
[0055] If confirmed, the new status is confirmed and the internal records are updated;
[0056] If not confirmed, the record is not in place and a retry or protection mechanism is triggered.
[0057] On the other hand, an electronic gear shifter for motorcycles is provided, the electronic gear shifter for motorcycles being used to implement the control method described above, the electronic gear shifter for motorcycles comprising:
[0058] A gear shift actuator is used to control the gear shift mechanism to execute corresponding gear shift commands;
[0059] A shift control unit is used to collect gear status signals and gear position signals and perform gear diagnosis based on the collected information, and to issue corresponding control commands to the shift actuator according to the control method described in any one of claims 1-7.
[0060] The shift actuator and the shift control unit are communicatively connected.
[0061] On the other hand, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, which, when executed by the processor, implement any of the control methods described above.
[0062] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement any of the above-described control methods.
[0063] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0064] For motorcycle versatility: Without being limited to wheel type (2 / 3 / 4-wheeled motorcycles), the interface and criterion set can cover common model differences (side stand / parking, clutch type, actuator type, etc.), reducing platform fragmentation.
[0065] High compatibility / easy adaptation: The communication and execution layer abstraction supports customizable combinations of CAN / LIN / discrete I / O; parameterized calibration of threshold, timeout, retry, and prompt strategies facilitates rapid deployment across vehicle models.
[0066] Robustness Enhancement: In response to the strong vibration and power supply fluctuation characteristics of motorcycles, emphasis is placed on anti-interference and power failure strategies, multi-source consistency checks of key signals, and scenario-based degradation paths to maintain availability and consistency under conditions such as rain, dust, electromagnetic interference, and startup voltage drops.
[0067] Furthermore, compared to traditional mechanical cable / rod shifting solutions, this invention replaces mechanical linkages with electronic signal transmission, reducing wiring harness and mechanism redundancy, lowering mechanical layout complexity, and avoiding NVH problems (such as vibration and abnormal noise) and poor assembly consistency caused by mechanical friction. Attached Figure Description
[0068] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0069] Figure 1 This is a schematic diagram of the system composition of an electronic gear shifter for motorcycles provided in an embodiment of the present invention;
[0070] Figure 2 This is a flowchart illustrating a method for controlling an electronic gear shifter for a motorcycle, as provided in an embodiment of the present invention.
[0071] Figure 3 This is a flowchart illustrating a power-on positioning procedure provided in an embodiment of the present invention;
[0072] Figure 4 This is a flowchart illustrating an action sequence program provided in an embodiment of the present invention;
[0073] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0074] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0075] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0076] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0077] In this embodiment of the invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0078] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0079] The components of the motorcycle gear shifting system described in this invention can be understood in conjunction with existing gear shifters. For example, the existing structure of a motorcycle gear shifting system is as follows:
[0080] Human-machine input module: handlebar buttons / lever / knob or foot pedal displacement sensor, with indicator light / small screen;
[0081] Shift ECU: Main control MCU, input sampling (Hall effect / potential sensor / encoder / button matrix), actuator drive (motor / electromagnet / actuator), vehicle communication interface (CAN / LIN / local I / O), power supply regulation and protection;
[0082] Power domain controller: EMS / VCU / transmission mechanism control unit, responsible for actual gear shifting and transmitting status back;
[0083] Vehicle status signals: vehicle speed, engine / clutch status, braking, parking / side support, fault DTC, etc., are obtained through the body / powertrain network or discrete I / O;
[0084] Relationship: Human-machine input → Shift ECU criteria / state machine → Drive actuator via communication or I / O → Power domain feedback → Indication / display closed loop.
[0085] The challenge of motorcycle SBW lies in maintaining stability and consistency in a compact space and under strong vibration / electromagnetic disturbance environments, while also ensuring rapid adaptation across different vehicle platforms and controllable costs.
[0086] Traditional mechanical cable / lever shifting solutions suffer from several drawbacks: complex mechanical layout, poor NVH and assembly consistency, risk of misoperation (PRND logic confusion), and redundant wiring harnesses / mechanisms. Existing steer-by-wire (SBW) solutions have issues such as inconsistent anti-misoperation and fail-safe strategies; complex interaction between parking / anti-rollback strategies and the power domain; and high cost or poor vehicle compatibility. Therefore, a compact, hardware-software decoupled, and tiered redundant electronic shifter system is needed that simultaneously meets regulatory / functional safety and human-machine interface requirements.
[0087] This invention relates to a SBW system-level architecture for motorcycles (applicable to 2 / 3 / 4 wheels), including human-machine input, shift ECU, power supply / EMC, communication, actuators, diagnostics and degradation, and proposes a new electronic shifter for motorcycles and its control method. This method can be implemented by an electronic device, which can be a terminal or a server.
[0088] like Figure 1 An electronic gear shifter for motorcycles is shown, which is used to implement the control method described above. The electronic gear shifter for motorcycles includes:
[0089] A gear shift actuator is used to control the gear shift mechanism to execute corresponding gear shift commands;
[0090] The shift control unit is used to collect gear status signals and gear position signals, perform gear diagnosis based on the collected information, and issue corresponding control commands to the shift actuator according to the control method described above.
[0091] The shift actuator and the shift control unit are communicatively connected.
[0092] The core unit of an electronic gear shifter for motorcycles mainly consists of an actuator and a controller (gear control unit). Its operational interaction can be referenced to the gear shifting logic of the control method of this invention.
[0093] For motorcycle electronic shifting systems, in addition to the aforementioned motorcycle electronic shifter, it also includes: a body control module, which is used to control the body and input the corresponding shift control parameters, and generate the corresponding shift command based on the shift control parameters;
[0094] The power domain control unit (ECU) or other control units are used to cooperate with the shift controller to respond to and execute corresponding shift commands, such as downshifting the throttle according to the shift deceleration command.
[0095] It also includes shift sensors, such as gear position sensor array modules (not limited to magnetic, light, and blocking sensors).
[0096] Specifically, a motorcycle's body control module typically includes a human-machine interface module, handlebar buttons / levers / knobs / pedal sensors, etc., through which users can perform gear shifting control and input corresponding control parameters. The gear shifting actuator includes one or more of the following: a reduction gear, lead screw, gear, pawl, or cam; and electronic devices and sensors for position / stroke / force / current feedback, such as a gear position sensor array module (which can monitor gear position signals and report them to the gear shifting actuator). The gear shifting actuator maps the upper-level gear shifting action to the displacement / torque / current target of a motor / electromagnet / servo motor, collects feedback, and uses a hierarchical state machine, scenario-based degradation and recovery criteria for execution. This can be implemented using the control method described in this invention. The system uses a data communication bus for data communication and gear shifting control, employing CAN, LIN, discrete I / O, etc., and can switch between or coexist with CAN, LIN, and discrete I / O. A specific implementation scheme can be implemented as follows:
[0097] 1. The human-machine interface module of the motorcycle's body control module adopts a modular design. The handlebar button group has 6 built-in waterproof tactile switches (IP67 protection rating), each button corresponding to independent shifting logic (such as upshifting, downshifting, mode switching), and the trigger signal must meet 10ms anti-shake processing. The lever-type controller converts the mechanical rotation angle (0-30°) into a 12-bit digital signal through a rotary encoder, and works with Hall sensors to achieve contactless detection. The pedal sensing component adopts a dual-redundancy design, with the main and auxiliary sensors outputting 0-5V analog signals and PWM square wave signals (frequency 1kHz) respectively, and a comparator circuit realizes fault self-diagnosis.
[0098] 2. In the mechanical transmission system of the gear shifting actuator, the reduction unit uses a 20CrMnTi alloy gear set (module 1.25, tooth width 8mm), which, together with a trapezoidal lead screw (lead 3mm, accuracy grade C7), achieves linear displacement output; the pawl-cam mechanism is injection molded from PA66+GF30 engineering plastic, and a preload spring (spring constant 5N / mm) ensures reliable gear locking. The position feedback system includes three independent sensors: one magnetic scale (resolution 0.01mm) for precise positioning, two Hall sensors (sampling frequency 2kHz) for redundant detection, and the data from all three are verified through a majority voting mechanism.
[0099] 3. The control core of the shift actuator adopts a 32-bit MCU (100MHz main frequency), with a built-in hierarchical state machine containing five state layers: standby, self-test, normal operation, degraded, and fault. In standby mode, the power consumption is less than 10mA. In self-test mode, hardware diagnosis is achieved by scanning sensor thresholds (such as the zero-point voltage of the position sensor, 1.65±0.05V). In normal operation mode, a fuzzy PID algorithm is used (dynamically adjusting the proportional coefficient Kp=5-15). In degraded mode, advanced functions are disabled and only basic shifting is retained. In fault mode, a buzzer alarm is triggered (1kHz square wave, 50% duty cycle) and the fault code is recorded (compliant with SAE J2012 standard).
[0100] 4. The data communication bus adopts a hybrid architecture: a high-speed CAN bus (500kbps) transmits control commands and real-time status (such as motor current and gear position), with a message ID range of 0x100-0x1FF; a LIN bus (19.2kbps) is used for sensor data acquisition, employing an address mapping mechanism (slave address 0x01-0x08); the discrete I / O interface is configured with 8 inputs (10kΩ pull-up resistors) and 8 outputs (500mA sink current capability). The bus switching logic is implemented through hardware arbitration: when the CAN bus has no response for 3 consecutive cycles (300ms), it automatically switches to the LIN bus; if both buses fail, the I / O direct connection mode is enabled to ensure support for at least N / R (neutral / reverse) basic control.
[0101] The control flow of the shifter of the present invention will be further described below.
[0102] like Figure 2 The control method flowchart shown illustrates the following steps for the electronic gear shifter used in this motorcycle:
[0103] The system powers on and performs hardware self-tests and a readiness delay.
[0104] Determine if the current position is clear:
[0105] 1) If so, maintain the current position or gear;
[0106] 2) Conversely, the power-on positioning procedure for the gear shifter is executed.
[0107] Once the communication interface is ready, it receives external requests and status data, and further determines whether the security conditions are met:
[0108] 1) If so, plan the action sequence and execution constraints, execute the action sequence, and determine whether the consistency of the sensor array is confirmed:
[0109] If confirmed, the new status is confirmed and the internal records are updated;
[0110] If not confirmed, the record is incomplete and a retry or protection mechanism is triggered.
[0111] Generate a summary of periodic feedback status and diagnostics;
[0112] 2) If not, maintain the current status and report the reason, generating a periodic feedback status and diagnostic summary;
[0113] Continuously monitor energy status, shift actuator load, and communication links, and determine if any anomalies are detected:
[0114] 1) If so, then enter the protection or throttling mechanism, and return to the service loop when the anomaly is eliminated;
[0115] 2) If not, return to the service loop.
[0116] like Figure 3 As shown, the power-on positioning procedure for the gear shifter further includes the following steps:
[0117] Start finding your spot;
[0118] Configure recovery mode, execution constraints, and power limits;
[0119] Slow-speed exploration until the reference region and software limit are reached, then determine whether the reference boundary has been detected.
[0120] 1) If so, establish a position reference and calibrate the sensor array, write the position valid flag, and the system outputs a successful positioning notification;
[0121] 2) If not, determine whether the recovery timeout threshold has been reached:
[0122] 2.1) If the condition is met, record the recovery timeout and set the fault flag. The system will output a failed location finding notification.
[0123] 2.2) If the target is not reached, continue exploring at a low speed.
[0124] like Figure 4 As shown, the execution action sequence further includes the following steps:
[0125] Load execution parameters and constraints;
[0126] Drive the actuator to move in the target direction;
[0127] By combining the sensor array and the stroke window, it is determined whether the motion meets the positioning conditions:
[0128] 1) If the position is reached, stop the actuator and enter the position confirmation procedure, which includes the following steps:
[0129] Perform a consistency check on the sensor array to determine signal consistency and jitter suppression:
[0130] 1.1) If so, the system confirms successful execution and updates the current status, outputting a notification of successful action execution.
[0131] 1.2) If not, then fine-tune the motor or reverse its movement or reduce its speed, and continue to drive the actuator to move in the target direction, returning to the service cycle;
[0132] 2) If not in place, determine whether the in-place timeout threshold has been reached, including:
[0133] 2.1) If so, stop the actuator and mark the incomplete operation as faulty; the system outputs a notification of failed action execution.
[0134] 2.2) If not, then fine-tune the motor or reverse it or reduce its speed, and continue to drive the actuator to move in the target direction, returning to the service cycle.
[0135] The shifting logic of the present invention will be further described below with reference to embodiments.
[0136] Example 1: Application of electronic shifter control method for street bikes (e.g., based on a 250cc single-cylinder model)
[0137] 1. System Configuration Parameters
[0138] This embodiment is for a 250cc street bike model. The electronic shifter hardware configuration is as follows: The body control module uses an STM32F103RCT6 microcontroller (72MHz main frequency), and the shift actuator uses a 12V DC geared motor (rated speed 3500rpm, stall current 8A), equipped with a magnetic scale position sensor (resolution 0.01mm) and dual Hall redundant detection circuit. The communication bus adopts the CAN 2.0B protocol (communication rate 500kbps), and the power management module supports a wide voltage input of 9-36V, with overvoltage (protection threshold 38V), undervoltage (protection threshold 8.5V), and overcurrent (protection threshold 10A) protection functions.
[0139] 2. Implementation process of control methods
[0140] 2.1 System Power-On Phase
[0141] When the ignition switch is closed, the system enters the power-on process:
[0142] (1) Hardware self-test: The MCU first initializes the CAN controller (baud rate 500kbps, sampling point 87.5%), GPIO ports (configured PA0-PA3 as sensor input, PB0-PB2 as motor drive output) and timer (TIM3 configured as 1ms interrupt for system time base). During the self-test, the sensor array is sampled. The zero-point voltage of the magnetic scale is required to be 1.65±0.05V, and the Hall sensor outputs a linear signal of 0-3.3V. If the sampling deviation exceeds ±0.1V for 3 consecutive times, the sensor is marked as faulty.
[0143] (2) Ready delay: After the self-test passes, a 200ms ready delay is entered. During this period, the power supply voltage stability monitoring (voltage fluctuation ≤ ±0.5V) is completed, the motor drive circuit pre-charge (PWM duty cycle linearly increases from 0% to 10%) and the communication bus initialization (5 empty messages are sent to detect the bus load rate, which is ≤10%).
[0144] (3) Position determination: By reading the last power-off position stored in the EEPROM (address 0x0800-0x0803), if the value is within the valid range (0-50mm, corresponding to neutral to 5th gear) and the deviation from the current sensor sampling value is ≤0.5mm, the position is determined to be clear and the current gear is maintained; otherwise, the power-on position finding program is started.
[0145] 2.2 Implementation of power-on positioning procedure (corresponding to control method steps 15-22)
[0146] When the location is uncertain (such as during initial power-on or after sensor failure recovery), the following location finding process is executed:
[0147] (1) Recovery mode setting: Enter the "safe positioning" mode, set the motor drive current limit to 3A (50% of the rated current), the speed limit to 500rpm (1 / 7 of the rated speed), and the exploration time threshold to 5s (including 3 retry opportunities).
[0148] (2) Low-speed exploration: The MCU outputs a PWM signal (frequency 10kHz, initial duty cycle 15%) to drive the motor to rotate forward, which in turn drives the shift fork mechanism to move in the upshift direction at a speed of 0.5mm / s. When the magnetic scale detects a position ≥45mm (software upper limit), the motor is immediately reversed (duty cycle 12%) to enter the downshift exploration direction.
[0149] (3) Reference boundary detection: During the downshifting process, when the output of phase A of the Hall sensor jumps from 3.3V to 0V (neutral reference slot is detected) and the duration is ≥20ms, it is determined that the mechanical zero point has been found. At this time, the current magnetic scale reading is recorded (set as point N, typical value 12.5mm), and the sensor array is calibrated based on this: point N is set to 0mm, and each 5mm increase in the upshifting direction corresponds to one gear (gear 1 17.5mm, gear 2 22.5mm...gear 5 37.5mm).
[0150] (4) Abnormal handling: If the reference boundary is not detected within 5s (such as mechanical jamming), record fault code 0x02 (position finding timeout), trigger the buzzer alarm (1kHz, 1s interval), and send the fault frame (ID 0x201, data segment 0x020x00) through the CAN bus.
[0151] 2.3 Normal Gear Shifting Procedure
[0152] Taking shifting from 2nd gear to 3rd gear as an example, the process is as follows:
[0153] (1) Communication ready: When the body control module receives a shift request frame (ID0x101, data segment 0x03 0x01, where 0x03 is the target gear and 0x01 is the request flag) from the instrument through the CAN bus, and the data of 3 consecutive frames are consistent (to prevent false triggering), then the safety condition judgment is entered.
[0154] (2) Safety condition verification: The MCU simultaneously detects the following parameters: current vehicle speed (converted from ABS sensor signal, required to be ≤80km / h), engine speed (converted from crankshaft position sensor, required to be 2000-8000rpm), clutch status (clutch switch is closed), and side support status (retracted, low level is effective). When all conditions are met, the action planning stage is entered.
[0155] (3) Motion sequence planning: Based on the current gear (2nd gear, position 22.5mm) and the target gear (3rd gear, 27.5mm), calculate the displacement of 5mm, and plan the speed curve as follows: 0-100ms uniform acceleration (acceleration 0.05m / s²), 100-300ms uniform speed (speed 0.025m / s), 300-400ms uniform deceleration (deceleration 0.05m / s²). At the same time, set the current threshold: acceleration stage ≤5A, uniform speed stage ≤3A, deceleration stage ≤2A.
[0156] (4) Execution and Feedback: The MCU controls the motor drive through a PID algorithm (Kp=8.5, Ki=0.2, Kd=0.1), and collects the position of the magnetic scale (sampling frequency 1kHz) and the motor current (sampling frequency 5kHz through an ACS712 sensor) in real time. When the actual position reaches 27.5±0.1mm and the current stabilizes at 1.2±0.2A (engagement completion flag), it is determined that the position is in place, and the current position stored in the EEPROM is updated (address 0x0800-0x0803 is written to 2750, unit 0.01mm), and a status frame is sent via CAN (ID0x301, data segment 0x03 0x00 0x00).
[0157] (5) Abnormal monitoring: If a sudden increase in current to 6A (stuck indicator) is detected during gear shifting and lasts for 100ms, the motor will be stopped immediately and reversed (duty cycle 10%, lasting for 200ms), and fault code 0x05 (actuator stuck) will be recorded. If it still fails after two retries, it will enter the downgrade mode (only neutral to 1 gear switching is allowed).
[0158] 3. Key parameter calibration
[0159] The core parameters calibrated by bench testing in this embodiment are as follows: positioning speed 0.5mm / s, shift execution time ≤400ms (neutral to 5th gear full stroke), position control accuracy ±0.1mm, communication delay ≤20ms, average power consumption ≤5W (standby state ≤1W), and operating temperature range -40℃~85℃ (meets ISO 16750-4 standard).
[0160] Example 2: Application of electronic shifter control method for off-road motorcycles (e.g., 450cc twin-cylinder model)
[0161] 1. System Configuration Parameters
[0162] This embodiment is designed for a 450cc off-road motorcycle, with the following hardware enhancements: It employs a high-performance STM32H743IGT6 MCU (400MHz main frequency), the shift actuator is upgraded to a 12V servo motor (rated torque 2.5Nm, with electromagnetic brake), and position feedback utilizes a laser displacement sensor (0.001mm resolution, 10kHz sampling frequency) and a redundant design of dual Hall effect sensors. The communication system adopts a hybrid architecture of CAN FD protocol (8Mbps) + LIN bus (19.2kbps), and the power module supports wide voltage input of 9-36V and has an IP6K9K waterproof rating (meeting the requirements of off-road environments).
[0163] 2. Implementation process of control methods
[0164] 2.1 Power-on self-test and positioning optimization
[0165] (1) Fast self-test: Using the hardware accelerator (CRC32 calculation unit) of the MCU, the traditional 200ms self-test process is compressed to 50ms, and the sensor signal integrity test (laser sensor output noise ≤5mV, Hall signal hysteresis ≤0.1mm) and actuator pre-drive (brake release voltage 10±0.5V, response time ≤10ms) are completed simultaneously.
[0166] (2) Intelligent positioning: To address the mechanical displacement deviation caused by bumpy off-road conditions, a "multi-reference point fusion" algorithm is adopted: In addition to the traditional neutral reference slot, mechanical hard limits of 1st gear (5mm) and 5th gear (35mm) are added as auxiliary references, and the cumulative error is eliminated through three-point calibration. The positioning speed is increased to 1mm / s, the exploration time threshold is set to 3s, and the number of retries is 2.
[0167] 2.2 Dynamic shift control
[0168] (1) Adaptive execution parameters: The shift parameters are dynamically adjusted according to the current working conditions: In low-speed off-road mode (vehicle speed ≤ 30km / h), the "soft contact" strategy is adopted (PWM duty cycle is gradually increased from 5% to 30%, and the inrush current is ≤ 3A); In high-speed driving mode (vehicle speed > 60km / h), the "fast engagement" mode is enabled (initial duty cycle 40%, peak current 6A, and shift time is compressed to 250ms).
[0169] (2) Road condition compensation algorithm: The vehicle body posture is detected by IMU sensor (sampling frequency 1kHz). When the slope is >15°, the shift force is automatically increased by 15% (to prevent the vehicle from slipping off the road on the slope); when the vibration acceleration is detected to be >5g (off-road bumps), the position holding mode is activated (the electromagnetic brake holds the current of 2A, and the position deviation is corrected immediately if it exceeds 0.3mm).
[0170] 2.3 Fault Diagnosis and Redundancy Switching
[0171] (1) Three-level diagnostic mechanism: Level 1 diagnosis (real time): monitoring current / position deviation (threshold ±0.5mm / 3A); Level 2 diagnosis (cycle 100ms): sensor data consistency verification (laser vs Hall deviation ≤0.1mm); Level 3 diagnosis (cycle 1s): CAN bus health assessment (error frame rate <0.1%).
[0172] (2) Seamless redundancy switching: When the main CAN FD bus fails (3 consecutive frames are lost), the system switches to the LIN bus to transmit key signals (target gear, current position) within 0.5ms. At the same time, the discrete I / O interface (5V TTL level) is enabled to control the basic gear shifting function, ensuring that the neutral-1st gear-2nd gear switching can still be completed under fault conditions.
[0173] 3. Enhanced environmental adaptability
[0174] (1) Temperature compensation: In a low temperature environment of -40℃, the actuator temperature is maintained above -10℃ by the PTC heater (power consumption ≤8W); in a high temperature environment of 85℃, the upper limit of PWM duty cycle is automatically reduced to 60% (to prevent motor overheating).
[0175] (2) Anti-mud and sand design: The sensor probe is coated with polytetrafluoroethylene (friction coefficient 0.05) and is equipped with an automatic cleaning program (rotating 0.5mm in the opposite direction after each gear shift to remove surface deposits) to ensure the reliability of detection in mud and sand environment.
[0176] 4. Performance Indicators
[0177] Key performance indicators for this embodiment: position control accuracy ±0.05mm, shift response time ≤250ms, mean time between failures (MTBF) ≥1000 hours, vibration tolerance 20-2000Hz / 10g (meets ISO 16750-3 standard), and waterproof rating IP6K9K.
[0178] Therefore, compared with existing solutions, this invention emphasizes the features of "motorcycle application + compatibility + modularity + robustness":
[0179] For motorcycle versatility: Without being limited to wheel type (2 / 3 / 4-wheeled motorcycles), the interface and criterion set can cover common model differences (side stand / parking, clutch type, actuator type, etc.), reducing platform fragmentation.
[0180] High compatibility / easy adaptation: The communication and execution layer abstraction supports customizable combinations of CAN / LIN / discrete I / O; parameterized calibration of threshold, timeout, retry, and prompt strategies facilitates rapid deployment across vehicle models.
[0181] Modular design: Human-machine input, power supply and EMC, communication, execution drive, diagnostic and degradation logic modules are decoupled, and can be flexibly selected and combined according to the overall vehicle space and cost objectives.
[0182] Example 3: Application of Electronic Gear Shifter Control Method for Electric Motorcycles (Based on 600cc Dual-Motor Model)
[0183] 1. System Configuration Parameters
[0184] This embodiment is for a 600cc electric motorcycle, with the following hardware configuration: The control core uses an STM32G474CET6 microcontroller (170MHz main frequency, integrating FPU and DSP instruction sets), and the shift actuator is a BL6210MB-01 24V brushless motor (rated speed 1100rpm, rated torque 300mN·m, peak current 3A), equipped with a KTM5900 magnetic encoder (24-bit resolution, supporting SPI+ABZ dual output). Communication adopts a CAN 2.0B (500kbps) + discrete I / O hybrid architecture: the CAN bus transmits the target gear and status frame, and the I / O interfaces (PA0-PA3) realize emergency shift signals (active high level) and fault indicator drive. The power management module supports 18-72V wide voltage input and has overvoltage (80V), undervoltage (16V) and overcurrent (5A) protection.
[0185] 2. Implementation process of control methods
[0186] 2.1 Brushless Motor Drive Control
[0187] (1) FOC algorithm implementation: The three-phase current (sampling frequency 20kHz) is converted into an α-β coordinate system by Clark transformation, and the dq axis components are obtained by Park transformation. The current closed-loop control is realized by using a PI regulator (d axis Kp=0.8, Ki=0.12; q axis Kp=1.2, Ki=0.25) with a carrier frequency of 16kHz.
[0188] (2) Encoder calibration: After power-on, perform encoder zero-position calibration, drive the motor to rotate one revolution at 50 rpm, record the ABZ pulse sequence output by KTM5900, and obtain the electrical zero position and mechanical zero position deviation value (typical value 0.3°) by least squares fitting, and store it in the on-chip Flash (address 0x08080000-0x08080003).
[0189] 2.2 Hybrid Communication Mechanism
[0190] (1) CAN communication: Receive the shift request frame (ID 0x102, data segment 0x00-0x06 indicates the target gear) sent by the instrument, and use 3 consecutive verifications to prevent false triggering; send status frame (ID 0x302, data segment includes current gear, motor temperature, fault code), period 10ms.
[0191] (2) I / O emergency control: When the CAN bus fails (no valid message for 100ms), it automatically switches to I / O control mode: the target gear (000=neutral, 001=1st gear...110=6th gear) is identified by the level combination (3-bit binary) of the PB0-PB2 pins, and the response time is ≤50ms.
[0192] 2.3 Energy Optimization Strategy
[0193] (1) Braking energy recovery coordination: During the shifting process, a torque interruption request (ID 0x401, data segment 0x01) is sent to the vehicle controller via the CAN bus. During the recovery phase, the motor current is limited to ≤1.5A. The torque output is restored within 300ms after the shift is completed.
[0194] (2) Low power mode: After the vehicle is stationary and inactive for 10 minutes, it enters sleep mode: the encoder SPI interface is turned off (power consumption drops to 8mA), and the CAN wake-up function is retained (message ID 0x501 triggers wake-up).
[0195] 3. Performance Indicators
[0196] Key performance indicators for this embodiment: shift time ≤300ms, position control accuracy ±0.02mm, motor efficiency ≥85% (under rated load), communication delay ≤15ms, operating temperature -40℃~105℃, meeting the ISO 16750-2 electric vehicle standard.
[0197] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 410 may include a first processor 2001.
[0198] Optionally, the electronic device 410 may also include a memory 2002 and a transceiver 2003.
[0199] The first processor 2001, memory 2002, and transceiver 2003 can be connected via a communication bus.
[0200] The following is combined Figure 5 A detailed description of each component of electronic device 410 is provided below:
[0201] The first processor 2001 is the control center of the electronic device 410. It can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0202] Optionally, the first processor 2001 can perform various functions of the electronic device 410 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.
[0203] In a specific implementation, as one example, the first processor 2001 may include one or more CPUs, for example... Figure 5 CPU0 and CPU1 are shown in the diagram.
[0204] In a specific implementation, as one example, the electronic device 410 may also include multiple processors, for example... Figure 5 The first processor 2001 and the second processor 2004 are shown in the diagram. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0205] The memory 2002 is used to store the software program that executes the present invention, and is controlled by the first processor 2001 to execute it. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.
[0206] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently and be connected via the interface circuit of the electronic device 410. Figure 5 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0207] The transceiver 2003 is used to communicate with network devices or with terminal devices.
[0208] Alternatively, transceiver 2003 may include a receiver and a transmitter. Figure 5 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.
[0209] Optionally, the transceiver 2003 can be integrated with the first processor 2001, or it can exist independently and be connected via the interface circuit of the electronic device 410. Figure 5 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0210] It should be noted that, Figure 5 The structure of the electronic device 410 shown does not constitute a limitation on the router. Actual knowledge structure identification devices may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0211] Furthermore, the technical effects of the electronic device 410 can be referred to the technical effects of the control method described in the above method embodiments, and will not be repeated here.
[0212] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0213] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0214] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0215] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0216] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0217] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0218] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0219] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0220] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0221] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0222] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0223] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0224] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A control method for an electronic gear shifter for motorcycles, characterized in that, The method includes the following steps: The system powers on and performs hardware self-tests and a readiness delay. Determine if the current position is clear: 1) If so, maintain the current position or gear; 2) Conversely, the power-on positioning procedure for the gear shifter is executed. Once the communication interface is ready, it receives external requests and status data, and further determines whether the security conditions are met: 1) If so, then plan the action sequence and execution constraints, execute the action sequence, and generate periodic feedback status and diagnostic summary; 2) If not, maintain the current status and report the reason, generating a periodic feedback status and diagnostic summary; Continuously monitor energy status, shift actuator load, and communication links, and determine if any anomalies are detected: 1) If so, then enter the protection or throttling mechanism, and return to the service loop when the anomaly is eliminated; 2) If not, return to the service loop.
2. The control method according to claim 1, characterized in that, The power-on positioning procedure for the gear shifter includes the following steps: Start finding your spot; Configure recovery mode, execution constraints, and power limits; Slow-speed exploration until the reference region and software limit are reached, then determine whether the reference boundary has been detected. If so, establish a position reference and calibrate the sensor array; If not, then determine whether the recovery timeout threshold has been reached: If the timeout is reached, the recovery timeout is recorded and a fault flag is set. The system outputs a failed location finding notification. If the target is not reached, continue exploring at a low speed.
3. The control method according to claim 2, characterized in that, After establishing a position reference and calibrating the sensor array, the process also includes: Write location valid flag; The system outputs a successful positioning notification.
4. The control method according to claim 1, characterized in that, The execution action sequence includes the following steps: Load execution parameters and constraints; Drive the actuator to move in the target direction; By combining the sensor array and the stroke window, it is determined whether the motion meets the positioning conditions: If the position is reached, the actuator stops and the position confirmation procedure begins; If the timeout threshold has not been reached, then determine whether the timeout threshold has been reached.
5. The control method according to claim 4, characterized in that, The arrival confirmation procedure includes the following steps: Perform a consistency check on the sensor array to determine signal consistency and jitter suppression: If so, the system will confirm the successful execution of the action and update the current status, outputting a notification indicating that the action was executed successfully. If not, the motor is fine-tuned, reversed, or its speed reduced, and the actuator continues to move in the target direction, returning to the service cycle.
6. The control method according to claim 4, characterized in that, The determination of whether the timeout threshold has been reached includes: If so, the actuator is stopped and a failure to reach the target position is marked, and the system outputs a notification of failed action execution. If not, the motor is fine-tuned, reversed, or its speed reduced, and the actuator continues to move in the target direction, returning to the service cycle.
7. The control method according to claim 1, characterized in that, After executing the action sequence, the method also includes determining whether the consistency of the sensor array is confirmed. If confirmed, the new status is confirmed and the internal records are updated; If not confirmed, the record is not in place and a retry or protection mechanism is triggered.
8. An electronic gear shifter for motorcycles, said electronic gear shifter for motorcycles being used to implement the control method as described in any one of claims 1-7, characterized in that, The electronic gear shifter for motorcycles includes: A gear shift actuator is used to control the gear shift mechanism to execute corresponding gear shift commands; A shift control unit is used to collect gear status signals and gear position signals and perform gear diagnosis based on the collected information, and to issue corresponding control commands to the shift actuator according to the control method described in any one of claims 1-7. The shift actuator and the shift control unit are communicatively connected.
9. An electronic device, characterized in that, The electronic device includes: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1 to 7.
Citation Information
Cited By
Control method based on automatic gear shifting of three-gear gearbox of electric tricycle
CN122107106A