Balance car self-adaptive control method suitable for road surface sudden change
By collecting data in real time to determine the road surface condition and dynamically adjusting the PID parameters, the adaptability and safety issues of traditional self-balancing scooters on irregular roads are solved, realizing intelligent adaptive control and improving user experience and safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JILIN INST OF CHEM TECH
- Filing Date
- 2026-01-26
- Publication Date
- 2026-04-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional self-balancing scooter controllers have fixed control parameters when facing irregular road surfaces, resulting in poor adaptability, weak ability to cope with sudden impacts, high requirements for human-machine coupling, and insufficient user experience and safety.
By collecting real-time data on the scooter's posture and motor current, the system extracts information on the degree of road bumps, determines the road condition level in real time, and dynamically adjusts the PID control parameters, including the proportional coefficient Kp, integral coefficient Ki, and derivative coefficient Kd, based on the mapping relationship to adapt to different road conditions.
It enables intelligent adaptive control of the self-balancing scooter on uneven surfaces, improving user experience and safety, reducing the risk of falls, and without increasing hardware costs.
Smart Images

Figure CN121900138A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic control and embedded systems technology, and in particular to an adaptive control method for a self-balancing vehicle suitable for road surface changes. Background Technology
[0002] A self-balancing scooter is a wheeled personal transportation device that utilizes the principle of dynamic balance and is controlled by the body's center of gravity. However, when faced with sudden changes in road surface, such as speed bumps and potholes, traditional self-balancing scooter control methods have gradually revealed the following technical problems:
[0003] Fixed control parameters and poor adaptability: Most existing self-balancing scooters use PID controllers with fixed parameters. These parameters are typically calibrated and optimized on smooth roads to achieve optimal response speed and stability. However, when riding on bumpy roads, fixed control parameters become too rigid. For example, on gravel roads, an excessively high proportional gain (Kp) amplifies road vibration feedback, causing high-frequency shaking of the scooter and resulting in a poor user experience; while an excessively low derivative gain (Kd) fails to provide sufficient damping to suppress this shaking.
[0004] Weak ability to handle sudden impacts, insufficient comfort and safety: When a self-balancing scooter quickly passes over speed bumps or gets stuck in small potholes, the wheels experience instantaneous, severe impacts or brief periods of suspension. A controller with fixed parameters may not be able to respond optimally to such sudden situations. For example, at the moment the wheels land, due to sudden changes in sensor data and possible integral term saturation, the controller may output an excessively large corrective torque, causing the scooter to tilt uncomfortably backward or wobble violently, potentially causing inexperienced users to lose balance and fall, posing a safety hazard.
[0005] The high requirements for human-machine integration and poor universality mean that current technologies rely primarily on users to compensate for the shortcomings of the control system by adjusting their center of gravity to cope with varying road conditions. This requires riders to have a certain level of experience and skill, making it unfriendly to beginners or users with slower reaction times. Essentially, this shifts the responsibility for the system's adaptation to environmental changes to the user, rather than making the system itself smarter through technological means.
[0006] Therefore, there is a need for a method that enables the self-balancing scooter controller to automatically sense changes in road conditions and adjust its control strategy in real time without significantly increasing hardware costs and computational complexity. Summary of the Invention
[0007] To address the technical problems existing in the prior art, this invention proposes an adaptive control method for self-balancing vehicles that is suitable for road surface changes. The aim is to enable the self-balancing vehicle to automatically identify the state of the road surface and adjust the parameters or strategies of its core controller in real time and adaptively, thereby significantly improving the stability of the self-balancing vehicle when passing through uneven road surfaces without user intervention and without excessively increasing hardware costs.
[0008] To achieve the above objectives, the present invention provides an adaptive control method for a self-balancing vehicle suitable for sudden changes in road surface, comprising:
[0009] Data from the balance scooter's attitude sensor and motor current sensor are collected in real time, the data is processed, feature information representing the degree of road bumps is extracted, and the state level of the current driving road surface is determined in real time based on the feature information through a decision fusion algorithm.
[0010] Several sets of control parameters corresponding to different road surface condition levels are preset, wherein the control parameter sets include at least a proportional coefficient Kp, an integral coefficient Ki, and a differential coefficient Kd, and a mapping relationship between the road surface condition level and the control parameter sets is established.
[0011] Based on the real-time judgment of the road surface condition level and the mapping relationship, the control parameters to be used at the moment are dynamically determined, and the balance vehicle attitude control algorithm is run using the control parameters to calculate and output the motor drive signal.
[0012] Preferably, the feature information characterizing the degree of road surface bumpiness is extracted, including:
[0013] The data from the attitude sensor is filtered and fused to obtain the vehicle pitch angle signal. The high-frequency vibration component is separated from the pitch angle signal, and the variance of the high-frequency vibration component within a preset time window is calculated as the first feature information.
[0014] The rate of change is calculated from the data from the motor current sensor, and the rate of change is used as the second feature information to monitor the fluctuation amplitude.
[0015] Preferably, the high-frequency vibration component is separated from the pitch angle signal using a digital high-pass filter or band-pass filter with a cutoff frequency of 3Hz-10Hz.
[0016] Preferably, the state level of the current road surface is determined in real time based on the feature information using a decision fusion algorithm, including:
[0017] Several road surface condition levels are set;
[0018] Based on the comparison results of the first feature information and the preset range, and / or based on the comparison results of the second feature information and the corresponding threshold, the current road surface condition level is comprehensively determined.
[0019] Preferably, the road surface condition level is defined as follows:
[0020] Level 1: When the first feature information is less than the lower limit of the preset range and the second feature information does not exceed the corresponding threshold, it is determined to be a smooth road surface;
[0021] Level 2: When the first feature information is greater than the lower limit of the preset range and less than the upper limit of the preset range, or when the second feature information exceeds the corresponding threshold, it is determined to be a slightly bumpy road surface.
[0022] Level 3: When the first feature information is greater than the upper limit of the preset range, or the second feature information exceeds the corresponding threshold, it is determined to be a severely bumpy road surface.
[0023] Preferably, the mapping relationship between the road surface condition level and the control parameter set is as follows:
[0024] As the degree of bumpiness represented by the road surface condition level intensifies, the values of the proportional coefficient Kp and / or integral coefficient Ki in the mapped control parameter set decrease accordingly, while the value of the derivative coefficient Kd increases accordingly.
[0025] Preferably, in the control parameter set, as the degree of bumpiness represented by the road surface condition level increases, the differential coefficient Kd increases, and the proportional coefficient Kp and / or integral coefficient Ki decreases or is set to zero.
[0026] Preferably, the mapping relationship is pre-installed in the microcontroller of the self-balancing scooter in the form of a parameter lookup table, and the control parameters to be used are dynamically determined by querying the parameter lookup table.
[0027] The present invention also provides a self-balancing scooter control system, including a microcontroller, an attitude sensor, a motor current sensor, and a motor drive circuit, wherein the microcontroller is configured to execute the self-balancing scooter adaptive control method suitable for sudden changes in road surface.
[0028] A storage medium having a computer program stored thereon, which, when executed by a processor, implements the adaptive control method for a self-balancing vehicle applicable to sudden changes in road surface.
[0029] Compared with the prior art, the present invention has the following advantages and technical effects:
[0030] (1) Intelligence and Adaptability: This invention transforms the self-balancing vehicle from a "fixed response" to an intelligent system of "environmental perception-intelligent decision-dynamic adjustment", which can automatically adapt to different road conditions and greatly improve the universality of the product and user experience.
[0031] (2) Significantly improve comfort and stability: On bumpy roads, by adaptively increasing the damping of the control system (such as adjusting Kd) or reducing the stiffness (such as adjusting Kp), the high-frequency vibration and abnormal shaking of the vehicle body can be effectively suppressed, making the driving process more stable and smooth.
[0032] (3) Enhanced safety: By quickly identifying dangerous road conditions such as wheel suspension and violent impact, and immediately switching to a conservative control mode, it can effectively prevent sudden acceleration or violent swaying of the vehicle due to loss of control, and reduce the risk of crash.
[0033] (4) Excellent balance between cost and performance: The core of this invention lies in algorithm upgrade. Without changing the core hardware, the performance leap is achieved through software optimization alone, which has extremely high commercial application value.
[0034] (5) Fast and smooth response: The present invention uses multi-sensor information fusion and table lookup method for parameter adjustment, with extremely low decision and execution delay, ensuring the real-time control response, while avoiding system instability caused by parameter mutation. Attached Figure Description
[0035] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0036] Figure 1 This is a flowchart of an adaptive control method for a self-balancing vehicle applicable to sudden road changes, according to an embodiment of the present invention.
[0037] Figure 2 This is a comparison diagram of the balance adjustment between the embodiments of the present invention and the traditional method under the condition of sudden changes in road surface. Detailed Implementation
[0038] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0039] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0040] This embodiment proposes an adaptive control method for self-balancing vehicles suitable for sudden changes in road surface conditions, such as... Figure 1 ,include:
[0041] Data from the balance scooter's attitude sensor and motor current sensor are collected in real time, the data is processed, feature information representing the degree of road bumps is extracted, and the state level of the current driving road surface is determined in real time based on the feature information through a decision fusion algorithm.
[0042] Several sets of control parameters corresponding to different road surface condition levels are preset, wherein the control parameter sets include at least a proportional coefficient Kp, an integral coefficient Ki, and a differential coefficient Kd, and a mapping relationship between the road surface condition level and the control parameter sets is established.
[0043] Based on the real-time judgment of the road surface condition level and the mapping relationship, the control parameters to be used at the moment are dynamically determined, and the balance vehicle attitude control algorithm is run using the control parameters to calculate and output the motor drive signal.
[0044] Furthermore, feature information characterizing the degree of road surface bumpiness is extracted, including:
[0045] The data from the attitude sensor is filtered and fused to obtain the vehicle pitch angle signal. The high-frequency vibration component is separated from the pitch angle signal, and the variance of the high-frequency vibration component within a preset time window is calculated as the first feature information.
[0046] The rate of change is calculated from the data from the motor current sensor, and the rate of change is used as the second feature information to monitor the fluctuation amplitude.
[0047] Specifically, the MCU reads the angular velocity and angle data from the attitude sensor at a frequency of no less than 500Hz, and performs complementary filtering and fusion to obtain a stable vehicle pitch angle θ. At the same time, it reads the motor current value I fed back from the current sampling circuit.
[0048] High-frequency attitude angle fluctuation extraction: The stabilized pitch angle θ is passed through a digital filter with a cutoff frequency of 5Hz to filter out low-frequency attitude changes caused by normal balance control, obtaining the high-frequency angular vibration signal θ_high purely caused by road impact. The variance Var_θ of this signal within the most recent 0.1-second time window is calculated.
[0049] Current surge detection: Calculates the rate of change dI / dt of the motor current value I within a short time window, and monitors whether its absolute value exceeds a preset threshold I_thresh. Simultaneously, it can calculate the fluctuation amplitude of the current signal.
[0050] Furthermore, based on the aforementioned feature information, a decision fusion algorithm is used to determine the current road surface status level in real time, including:
[0051] Set several road surface state levels;
[0052] Based on the comparison result of the first characteristic information and the preset range, and / or based on the comparison result of the second characteristic information and the corresponding threshold, comprehensively determine the current road surface state level.
[0053] Furthermore, the set road surface state levels include:
[0054] First level: When the first characteristic information is less than the lower limit of the preset range and the second characteristic information does not exceed the corresponding threshold, it is determined as a flat road surface;
[0055] Second level: When the first characteristic information is greater than the lower limit of the preset range, less than the upper limit of the preset range, or the second characteristic information exceeds the corresponding threshold, it is determined as a slightly bumpy road surface;
[0056] Third level: When the first characteristic information is greater than the upper limit of the preset range, or the second characteristic information exceeds the corresponding threshold, it is determined as a severely bumpy road surface.
[0057] Specifically, set three road surface state levels: the first level L0 (flat), the second level L1 (slightly bumpy), and the third level L2 (severely bumpy).
[0058] Formulate the following decision rules (the following are exemplary rules and can be adjusted according to actual measurements):
[0059] If Var_θ (pitch angle variance) < Th1 (lower limit of the preset range) and there is no current impact alarm, it is determined as L0;
[0060] If Th1 (lower limit of the preset range) ≤ Var_θ (pitch angle variance) < Th2 (upper limit of the preset range), or an occasional current impact is detected, it is determined as L1;
[0061] If Var_θ (pitch angle variance) ≥ Th2 (upper limit of the preset value), or a strong current impact is continuously detected, it is determined as L2;
[0062] Output the final road surface state level signal.
[0063] [[ID=·37]]Furthermore, the mapping relationship between the road surface state level and the control parameter group is:
[0064] As the bumpiness degree represented by the road surface state level increases, in the mapped control parameter group, the values of the proportional coefficient Kp and / or the integral coefficient Ki decrease correspondingly, and the value of the differential coefficient Kd increases correspondingly.
[0065] In the control parameter set, as the degree of bumpiness represented by the road surface condition level increases, the differential coefficient Kd increases, while the proportional coefficient Kp and / or integral coefficient Ki decrease or are set to zero.
[0066] Furthermore, the mapping relationship is pre-installed in the microcontroller of the self-balancing scooter in the form of a parameter lookup table, and the control parameters to be used at the current time are dynamically determined by querying the parameter lookup table.
[0067] Specifically, a parameter mapping table, as shown in Table 1, is pre-stored in the MCU's Flash memory. This table establishes the correspondence between road surface condition levels and PID control parameter sets.
[0068] Table 1
[0069]
[0070] As the turbulence intensifies, Kp and Ki are gradually reduced to decrease the violent response and prevent integral saturation, while Kd is significantly increased to enhance system damping and suppress oscillations.
[0071] In each control cycle (e.g., 1ms), the MCU first obtains the current road surface status from the road surface status observation module.
[0072] Based on the road surface condition values, the corresponding parameter group {Kp, Ki, Kd} is indexed from Table 1.
[0073] Using the new {Kp, Ki, Kd} parameters, execute standard PID positional or incremental control algorithms to calculate the required motor torque or PWM duty cycle.
[0074] The final control signal is output to the motor drive circuit, which drives the motor to maintain vehicle balance. For example... Figure 2 This is a comparison chart of the method in this embodiment and the traditional method for balance adjustment under the condition of sudden road surface changes.
[0075] This embodiment also provides a self-balancing scooter control system, including a microcontroller, an attitude sensor, a motor current sensor, and a motor drive circuit. The microcontroller is configured to execute the self-balancing scooter adaptive control method applicable to sudden changes in road surface.
[0076] A storage medium storing a computer program that, when executed by a processor, implements the adaptive control method for a self-balancing vehicle applicable to sudden road changes.
[0077] This embodiment has the following advantages and technical effects:
[0078] Intelligentization and Adaptability: This transforms the self-balancing scooter from a "fixed response" system into an intelligent system that "perceives the environment, makes intelligent decisions, and dynamically adjusts," enabling it to automatically adapt to different road conditions and greatly improving the product's versatility and user experience.
[0079] Significantly improves comfort and stability: On bumpy roads, by adaptively increasing the damping of the control system (such as adjusting Kd) or reducing the stiffness (such as adjusting Kp), high-frequency vibrations and abnormal shaking of the vehicle body can be effectively suppressed, making the driving process more stable and smooth.
[0080] Enhanced safety: By quickly identifying dangerous road conditions such as wheels off the ground or severe impacts, and immediately switching to a conservative control mode, it can effectively prevent sudden acceleration or violent swaying of the vehicle due to loss of control, thus reducing the risk of a crash.
[0081] Excellent balance between cost and performance: The core of this embodiment lies in the algorithm upgrade. Without changing the core hardware, a leap in performance is achieved through software optimization alone, which has extremely high commercial application value.
[0082] Fast and smooth response: Parameter adjustment is performed using multi-sensor information fusion and lookup table method, resulting in extremely low decision and execution delays, ensuring real-time control response, and avoiding system instability caused by parameter mutations.
[0083] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An adaptive control method for a self-balancing vehicle suitable for sudden changes in road surface, characterized in that, include: Data from the balance scooter's attitude sensor and motor current sensor are collected in real time, the data is processed, feature information representing the degree of road bumps is extracted, and the state level of the current driving road surface is determined in real time based on the feature information through a decision fusion algorithm. Several sets of control parameters corresponding to different road surface condition levels are preset, wherein the control parameter sets include at least a proportional coefficient Kp, an integral coefficient Ki, and a differential coefficient Kd, and a mapping relationship between the road surface condition level and the control parameter sets is established. Based on the real-time judgment of the road surface condition level and the mapping relationship, the control parameters to be used at the moment are dynamically determined, and the balance vehicle attitude control algorithm is run using the control parameters to calculate and output the motor drive signal.
2. The adaptive control method for a self-balancing vehicle applicable to sudden road surface changes according to claim 1, characterized in that, Extracting feature information characterizing the degree of road surface bumpiness, including: The data from the attitude sensor is filtered and fused to obtain the vehicle pitch angle signal. The high-frequency vibration component is separated from the pitch angle signal, and the variance of the high-frequency vibration component within a preset time window is calculated as the first feature information. The rate of change is calculated from the data from the motor current sensor, and the rate of change is used as the second feature information to monitor the fluctuation amplitude.
3. The adaptive control method for a self-balancing vehicle applicable to sudden road surface changes according to claim 2, characterized in that, The high-frequency vibration component is separated from the pitch angle signal using a digital high-pass filter or band-pass filter with a cutoff frequency of 3Hz-10Hz.
4. The adaptive control method for a self-balancing vehicle applicable to sudden road surface changes according to claim 2, characterized in that, Based on the aforementioned feature information, a decision fusion algorithm is used to determine the current road surface condition level in real time, including: Several road surface condition levels are set; Based on the comparison results of the first feature information and the preset range, and / or based on the comparison results of the second feature information and the corresponding threshold, the current road surface condition level is comprehensively determined.
5. The adaptive control method for a self-balancing vehicle applicable to sudden road surface changes according to claim 4, characterized in that, The defined road surface condition levels include: Level 1: When the first feature information is less than the lower limit of the preset range and the second feature information does not exceed the corresponding threshold, it is determined to be a smooth road surface; Level 2: When the first feature information is greater than the lower limit of the preset range or less than the upper limit of the preset range, or when the second feature information exceeds the corresponding threshold, it is determined to be a slightly bumpy road surface. Level 3: When the first feature information is greater than the upper limit of the preset range, or the second feature information exceeds the corresponding threshold, it is determined to be a severely bumpy road surface.
6. The adaptive control method for a self-balancing vehicle applicable to sudden road surface changes according to claim 1, characterized in that, The mapping relationship between the road surface condition level and the control parameter set is as follows: As the degree of bumpiness represented by the road surface condition level intensifies, the values of the proportional coefficient Kp and / or integral coefficient Ki in the mapped control parameter set decrease accordingly, while the value of the derivative coefficient Kd increases accordingly.
7. The adaptive control method for a self-balancing vehicle applicable to sudden road surface changes according to claim 6, characterized in that, In the control parameter set, as the degree of bumpiness represented by the road surface condition level increases, the differential coefficient Kd increases, while the proportional coefficient Kp and / or integral coefficient Ki decrease or are set to zero.
8. The adaptive control method for a self-balancing vehicle applicable to sudden road surface changes according to claim 1, characterized in that, The mapping relationship is pre-installed in the microcontroller of the self-balancing vehicle in the form of a parameter lookup table, and the control parameters to be used are dynamically determined by querying the parameter lookup table.
9. A self-balancing scooter control system, comprising a microcontroller, an attitude sensor, a motor current sensor, and a motor drive circuit, characterized in that, The microcontroller is configured to perform the adaptive control method for self-balancing vehicles applicable to sudden road changes as described in any one of claims 1 to 8.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the adaptive control method for a self-balancing vehicle applicable to sudden road changes as described in any one of claims 1 to 8.