Balanced two-wheeled vehicle trajectory tracking optimization control method based on SCMG
By adaptively adjusting the pre-purpose distance and vehicle speed optimization strategy, the accuracy and stability problems of SCMG balance bikes in trajectory tracking are solved, smooth track tracking and body stability in complex paths are achieved, and the robustness and safety of the control system are improved.
Patent Information
- Application Number
- CN202510790500.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-08-15
AI Technical Summary
Traditional SCMG balance bikes have physical limitations in track tracking control. The limited handlebar angle/speed leads to a decrease in track accuracy. The control delay in high-speed operating conditions causes trajectory deviation, especially in sharp bends or low-speed scenarios, which are prone to dumping risks or tracking lags caused by control saturation.
The current attitude information is obtained through SCMG, the target trajectory error is calculated, and the pre-image distance is adaptively adjusted. Combined with the vehicle speed, curvature and lateral deviation values, the vehicle speed is preferred rather than increasing the angle range, the motion state is monitored in real time and the control strategy is updated, and the pre-image-reconnaissance dual distance coordination mechanism is built, and the control input is dynamically adjusted to optimize trajectory tracking.
It significantly improves the trajectory tracking performance and control robustness of the second-wheel vehicle, overcomes the phase lag problem caused by traditional fixed pre-sight distances, ensures that the SCMG operates within the safe bearing boundary, achieves smooth and coherent heading correction, reduces computing complexity, and provides hardware compatibility.
Smart Images

Figure CN120491481A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent vehicle control technology, and in particular to a trajectory tracking optimization control method for a two-wheeled balancing vehicle based on SCMG, which is suitable for autonomous driving scenarios of two-wheeled vehicles such as balancing vehicles and electric bicycles. Background Art
[0002] Traditional SCMG balancing scooters maintain their upright position through gyroscopic effects, but physical limitations exist in trajectory tracking control: limited handlebar angles and rotational speeds lead to reduced tracking accuracy; and control delays at high speeds can cause trajectory deviations. Existing methods often employ pure tracking algorithms with a fixed preview distance, failing to fully consider the dynamic coupling between the SCMG's load capacity and its motion state. This is particularly true in tight corners or low-speed scenarios, where control saturation can lead to tipping risks or tracking lag. Summary of the Invention
[0003] The present application aims to provide a trajectory tracking optimization control method for a balancing two-wheeled vehicle based on SCMG, comprising the following steps: obtaining current posture information data of a target two-wheeled vehicle, including pitch angle and angular velocity, through SCMG; calculating a target position, target posture angle, and target velocity based on a preset target trajectory, and generating a position error, a velocity error, and a posture error based on the error between the current posture information and the target trajectory; adaptively adjusting a preview distance based on the error information, calculating a preview distance based on vehicle speed, curvature, and lateral deviation, and maintaining the preview distance between preset maximum and minimum values; presetting an SCMG target model, generating control inputs based on the preset target model, and controlling the dynamic behavior of the balancing two-wheeled vehicle; coupling the maximum handlebar angle and rotation speed of the target two-wheeled vehicle with the vehicle speed, giving priority to reducing the vehicle speed when encountering a sharp turn rather than increasing restrictions on the rotation angle range or angular velocity, applying the control inputs to the balancing two-wheeled vehicle, and gradually causing the balancing two-wheeled vehicle to approach the target trajectory by adjusting the rotation speed of the drive wheels and the vehicle body posture; monitoring the motion state of the balancing two-wheeled vehicle in real time, updating error information, and adjusting the control strategy based on the latest state data to continuously optimize the trajectory tracking process.
[0004] In one embodiment, the calculation formula for the preview distance is:
[0005]
[0006] , where l d is the preview distance, v is the vehicle speed, kappa is the curvature, is the lateral deviation value, k1, k2, and k3 are the coefficients of the latter three. It should be noted that they can generally be obtained by looking up a table or through experience. dThe maximum handlebar angle and speed of a two-wheeled vehicle can be coupled to vehicle speed. When encountering a sharp turn, it's best to prioritize reducing speed rather than increasing limits on the turning range or speed.
[0007] In one embodiment, the method further includes: calculating a reconnaissance distance based on the current speed, the vehicle's deceleration, a constant value, and a speed cost distance; finding a reconnaissance point through the reconnaissance distance, wherein the principle of finding a reconnaissance point is the same as the method of finding a preview point using the pure tracking method, and the preview distance is replaced with the calculated reconnaissance distance; calculating a reconnaissance curvature based on the coordinates of the reconnaissance point, the coordinates of the vehicle's current position, and the yaw angle of the vehicle body; and calculating a speed limit value based on the current speed limit value.
[0008] In one embodiment, the calculation formula of the reconnaissance distance is:
[0009]
[0010] Where l is the reconnaissance distance. v is the current speed, a is the deceleration of the vehicle, l p is a constant greater than zero, l c It is the speed penalty distance. It should be noted that if there are passengers, comfort must be taken into consideration. In other cases, the maximum achievable deceleration can generally be used. p It is a constant greater than zero and can be set depending on the vehicle condition, length, weight, etc.
[0011] In one embodiment, the calculation formula of the speed cost distance is:
[0012] l c =λv 2 (λ≥0)
[0013] λ is a coefficient greater than or equal to zero.
[0014] In one embodiment, the deceleration of the vehicle is set taking into account comfort when carrying passengers, and adopts the maximum achievable deceleration when not carrying passengers.
[0015] In one embodiment, the constant value is set according to at least one parameter of vehicle condition, vehicle length, and vehicle weight.
[0016] In one embodiment, the coupling relationship between the maximum handlebar angle, the rotation speed and the vehicle speed is achieved through a pre-established mapping table or function relationship.
[0017] Furthermore, the reconnaissance curvature is calculated. The specific calculation logic of the reconnaissance curvature is as follows:
[0018] Δx=x t -x0
[0019]
[0020] where x t 、y t Where x0 and y0 are the coordinates of the detection point, and θ0 is the yaw angle of the vehicle. curvatureDetect is the detection curvature. Calculate the speed limit. The current speed limit is determined by the current detection curvature and can be obtained as follows:
[0021]
[0022] Here, τ is an empirical value, which can be measured on a real vehicle based on the critical situation between "the SCMG can keep the vehicle upright" and "it is about to fall over". It is different for different vehicle models and different SCMGs. maxSpeed is the current speed limit.
[0023] The present invention also provides an embodiment, including a trajectory tracking optimization control system for a balancing two-wheeled vehicle based on SCMG, which is applied to any of the above-mentioned trajectory tracking optimization control methods for a balancing two-wheeled vehicle based on SCMG, including: a preview distance calculation module for performing adaptive preview distance calculation; an adaptive speed limit module, including a multi-threaded processor, for parallel calculation of reconnaissance distance and curvature; a dynamic speed limit controller module, generating a PWM speed regulation signal according to the reconnaissance curvature; and a balance compensation module, connected to the SCMG gyroscope, to monitor the risk of tipping in real time and trigger emergency braking.
[0024] In one embodiment, the dynamic speed limit controller module adopts a feedforward-feedback composite control structure, wherein the feedforward term calculates the ideal vehicle speed based on the reconnaissance curvature, and the feedback term performs PID adjustment according to the actual tracking error.
[0025] Beneficial effects
[0026] The present invention significantly improves the trajectory tracking performance and control robustness of the two-wheeled vehicle while ensuring the safety of the SCMG carrying boundary by constructing a preview-reconnaissance dual-distance collaborative mechanism. Based on the feedforward compensation strategy of dynamic preview, the system can autonomously adjust the forward range of trajectory tracking according to the comprehensive evaluation of real-time vehicle speed, path curvature and lateral deviation, effectively overcoming the phase lag problem caused by the traditional fixed preview distance. This mechanism shows unique advantages in curved scenarios. Through the curvature adaptive algorithm, the preview window is intelligently shrunk, so that the steering control instructions are more in line with the instantaneous motion state, thereby achieving smooth and coherent heading correction in complex paths. At the same time, the innovatively introduced concept of reconnaissance distance injects forward-looking decision-making capabilities into the system. Its composite calculation model that integrates braking distance, vehicle body characteristics and speed cost can predict the steering requirements of the path ahead in advance and generate speed constraint boundaries, fundamentally avoiding the risk of control failure caused by steering mechanism response delay or angle saturation. This speed-steering collaborative optimization strategy enables the system to maintain a reasonable distribution of steering torque under high-speed conditions, ensuring that the gyroscopic effect of the SCMG always operates within a safe load range, and establishes a balance-priority control hierarchy through a dynamic weight distribution algorithm to achieve an adaptive trade-off between trajectory tracking and vehicle body stability. When it is detected that the lateral acceleration is approaching the critical threshold, the system automatically increases the decision weight of the balance control and gradually releases the steering load through a gradient speed limit strategy. The present invention is suitable for manned scenarios, and the constraint boundary adjustment mechanism is compatible with operating habits, maximizing trajectory tracking accuracy while ensuring the safety bottom line. In addition, the layered control architecture greatly reduces the computational complexity. Through the parallel decoupling operations of the pre-aiming layer and the reconnaissance layer, the system can still maintain a high-frequency control cycle on a low-computing-power embedded platform, providing hardware compatibility guarantees for engineering deployment.
[0027] This invention breaks through the serial control limitations of the traditional SCMG self-balancing vehicle, which is "balance first, then track", and innovatively integrates path curvature prediction, load boundary assessment, and dynamic control parameters into a unified decision-making framework. This proactive control paradigm based on model prediction not only provides a new technical path for two-wheeled automatic balancing vehicles, but also reveals the "speed-curvature-load" coupling law, which provides a theoretical reference for subsequent research. In terms of practical application, this solution has demonstrated wide adaptability to complex urban roads, warehousing and logistics channels, and narrow indoor environments. Its core algorithm module can be seamlessly integrated into existing vehicle control systems, providing a plug-and-play solution for the intelligent upgrade of vehicles such as self-balancing vehicles, electric motorcycles, and unmanned delivery vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0029] Figure 1 A working step diagram of the trajectory tracking optimization control method for a balancing two-wheeled vehicle based on SCMG provided in this embodiment;
[0030] Figure 2 A block diagram of the trajectory tracking optimization control system for a balancing two-wheeled vehicle based on SCMG provided in this embodiment;
[0031] Figure 3 This is a trajectory diagram of the actual effect of the adaptive speed limit module provided in this embodiment;
[0032] Figure 4 This is an aerial view of the actual trajectory of the target two-wheeled vehicle provided in this embodiment. DETAILED DESCRIPTION
[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0034] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture. If the specific posture changes, the directional indications will also change accordingly.
[0035] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features limited to "first" and "second" may explicitly or implicitly include at least one of such features. In addition, if "and / or" or "and / or" appears in the full text, its meaning includes three parallel solutions. Taking "A and / or B" as an example, it includes solution A, solution B, or solutions that satisfy both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0036] Traditional SCMG balancing scooters maintain their upright position through gyroscopic effects, but physical limitations exist in trajectory tracking control: limited handlebar angles and rotational speeds lead to reduced tracking accuracy; and control delays at high speeds can cause trajectory deviations. Existing methods often employ pure tracking algorithms with a fixed preview distance, failing to fully consider the dynamic coupling between the SCMG's load capacity and its motion state. This is particularly true in tight corners or low-speed scenarios, where control saturation can lead to tipping risks or tracking lag.
[0037] To address the above-mentioned problems in the prior art, the present invention provides a trajectory tracking optimization control method for a balancing two-wheeled vehicle based on SCMG, comprising the following steps: obtaining current posture information data of a target two-wheeled vehicle, including a pitch angle and angular velocity, through SCMG; calculating a target position, target posture angle, and target velocity based on a preset target trajectory, and generating a position error, a velocity error, and a posture error based on the error between the current posture information and the target trajectory; adaptively adjusting a preview distance based on the error information, calculating a preview distance based on vehicle speed, curvature, and lateral deviation, and maintaining the preview distance between preset maximum and minimum values; presetting an SCMG target model, and generating control inputs based on the preset target model to control the dynamic behavior of the balancing two-wheeled vehicle; coupling the maximum handlebar angle and rotation speed of the target two-wheeled vehicle with the vehicle speed, prioritizing vehicle speed reduction when encountering a sharp turn rather than increasing restrictions on the rotation angle range or angular velocity; applying the control inputs to the balancing two-wheeled vehicle, and gradually causing the balancing two-wheeled vehicle to approach the target trajectory by adjusting the rotation speed of the drive wheels and the vehicle body posture; and monitoring the motion state of the balancing two-wheeled vehicle in real time, updating error information, and adjusting the control strategy based on the latest state data to continuously optimize the trajectory tracking process.
[0038] Example 1
[0039] refer to Figure 1The present application aims to provide a trajectory tracking control method for a balancing two-wheeled vehicle based on SCMG, comprising the following steps: obtaining current posture information data of a target two-wheeled vehicle, including pitch angle and angular velocity, through SCMG; calculating a target position, target posture angle, and target velocity based on a preset target trajectory, and generating a position error, velocity error, and posture error based on the error between the current posture information and the target trajectory; adaptively adjusting a preview distance based on the error information, calculating a preview distance based on vehicle speed, curvature, and lateral deviation, and maintaining the preview distance between preset maximum and minimum values; presetting an SCMG target model, generating control inputs based on the preset target model, and controlling the dynamic behavior of the balancing two-wheeled vehicle; coupling the maximum handlebar angle and rotation speed of the target two-wheeled vehicle with the vehicle speed, prioritizing vehicle speed reduction when encountering a sharp turn rather than increasing restrictions on the rotation angle range or angular velocity; applying the control inputs to the balancing two-wheeled vehicle, and gradually approaching the target trajectory by adjusting the rotation speed of the drive wheels and the vehicle body posture; and monitoring the motion state of the balancing two-wheeled vehicle in real time, updating error information, and adjusting the control strategy based on the latest state data to continuously optimize the trajectory tracking process.
[0040] Exemplarily, in step S110, acquiring the target two-wheeled vehicle's current posture information data also includes collecting the vehicle's pitch angle and angular velocity: Using the SCMG's sensors, the target two-wheeled vehicle's current pitch angle (tilt angle) and angular velocity are acquired. The sensors include an inertial measurement unit (IMU) sensor for real-time monitoring of the vehicle's posture. This data is collected and transmitted to the control system for real-time processing.
[0041] Exemplarily, the calculation of the target position, attitude angle, and target velocity in step S120 includes target trajectory definition: defining the target trajectory, typically generated by a path planning algorithm. The path can be a smooth curve or a discrete point trajectory. Calculating target position and velocity: Based on the target trajectory, the target position, velocity (including vehicle speed and angular velocity), and desired pitch angle are calculated. These data are calculated using a reference path tracking algorithm or model prediction.
[0042] Exemplarily, the errors calculated in step S130 include position error, velocity error, and attitude error. It should be noted that position error is defined as the distance between the target position and the actual position. Velocity error is defined as the difference between the target velocity and the actual velocity. Attitude error is defined as the difference between the target attitude angle and the actual attitude angle. This error information is fed back to the control system as a basis for adjusting the control strategy.
[0043] Exemplarily, in step S140, the preview distance is adaptively adjusted, including the calculation of vehicle speed, curvature and lateral deviation value: the preview distance is calculated based on the current vehicle speed, path curvature and the lateral deviation value between the vehicle body and the target trajectory. The preview distance is dynamically adjusted as the vehicle speed and curvature change. The handlebar angle, rotation speed and vehicle speed are coupled, and the handlebar angle is coupled with the vehicle speed: the relationship between the maximum handlebar angle, rotation speed and current vehicle speed is considered. When encountering sharp turns or trajectories with large curvature, the vehicle speed is reduced to avoid excessive tilting or instability. Reduce the vehicle speed: based on the handlebar angle and speed limit, the required degree of speed reduction is calculated to keep the vehicle stable.
[0044] The range of preview distance should be kept between the preset maximum and minimum values to avoid too short or too long preview distance affecting the system response.
[0045] Furthermore, a pre-set SCMG-based target model is used to generate control inputs. This model is based on the target trajectory, current vehicle posture, and vehicle speed, taking into account the target vehicle speed, posture, and speed errors.
[0046] The dynamic behavior of the vehicle body is adjusted through control algorithms (such as PID controller, LQR, etc.), control instructions are output, and the movement of the balanced two-wheeled vehicle is controlled.
[0047] In some embodiments, control inputs are applied to the drive wheels, adjusting the speed of the drive wheels to control forward or reverse movement. The vehicle's posture is adjusted, and the dynamic balance control system corrects the pitch angle to maintain vehicle balance. The vehicle's posture and drive wheel speeds are adjusted to gradually approach the target trajectory.
[0048] Sensors continuously collect the vehicle's real-time motion status, including pitch angle, angular velocity, speed, and lateral offset. Error information is updated based on this real-time motion data, and control strategies are calculated and adjusted. This optimizes the trajectory tracking process to ensure the vehicle remains stable along the target trajectory.
[0049] Control parameters are adjusted based on error feedback to further optimize the trajectory tracking process and reduce position error, velocity error, and attitude error. In some embodiments, a closed-loop control system is used to continuously adjust the control input to approximate the target trajectory, achieving more efficient trajectory tracking.
[0050] In one embodiment, the calculation formula for the preview distance is:
[0051]
[0052] , where l d is the preview distance, v is the vehicle speed, kappa is the curvature, is the lateral deviation value, k1, k2, and k3 are the coefficients of the latter three. It should be noted that they can generally be obtained by looking up a table or through experience. d The maximum handlebar angle and speed of a two-wheeled vehicle can be coupled to vehicle speed. When encountering a sharp turn, it's best to prioritize reducing speed rather than increasing limits on the turning range or speed.
[0053] In one embodiment, the method further includes: calculating a reconnaissance distance based on the current speed, the vehicle's deceleration, a constant value, and a speed cost distance; finding a reconnaissance point through the reconnaissance distance, wherein the principle of finding a reconnaissance point is the same as the method of finding a preview point using the pure tracking method, and the preview distance is replaced with the calculated reconnaissance distance; calculating a reconnaissance curvature based on the coordinates of the reconnaissance point, the coordinates of the vehicle's current position, and the yaw angle of the vehicle body; and calculating a speed limit value based on the current speed limit value.
[0054] In one embodiment, the calculation formula of the reconnaissance distance is:
[0055]
[0056] Where l is the reconnaissance distance. v is the current speed. a is the deceleration of the vehicle. l p is a constant greater than zero, l c It is the speed penalty distance. It should be noted that if there are passengers, comfort must be taken into consideration. In other cases, the maximum achievable deceleration can generally be used. p It is a constant greater than zero and can be set depending on the vehicle condition, length, weight, etc.
[0057] In one embodiment, the calculation formula of the speed cost distance is:
[0058] l c =λv 2 (λ≥0)
[0059] λ is a coefficient greater than or equal to zero.
[0060] In one embodiment, the deceleration of the vehicle is set taking into account comfort when carrying passengers, and adopts the maximum achievable deceleration when not carrying passengers.
[0061] In one embodiment, the constant value is set according to at least one parameter of vehicle condition, vehicle length, and vehicle weight.
[0062] In one embodiment, the coupling relationship between the maximum handlebar angle, the rotation speed and the vehicle speed is achieved through a pre-established mapping table or function relationship.
[0063] Furthermore, the reconnaissance curvature is calculated. The specific calculation logic of the reconnaissance curvature is as follows:
[0064] Δx=x t -x0
[0065]
[0066] where x t 、y t Where x0 and y0 are the coordinates of the detection point, and θ0 is the yaw angle of the vehicle. curvatureDetect is the detection curvature. Calculate the speed limit. The current speed limit is determined by the current detection curvature and can be obtained as follows:
[0067]
[0068] Here, τ is an empirical value, which can be measured on a real vehicle based on the critical situation between "the SCMG can keep the vehicle upright" and "it is about to fall over". It is different for different vehicle models and different SCMGs. maxSpeed is the current speed limit.
[0069] Example 2
[0070] refer to Figure 2-Figure 4 The present invention also provides an embodiment, including a trajectory tracking optimization control system for a balancing two-wheeled vehicle based on SCMG, which is applied to any of the above-mentioned trajectory tracking optimization control methods for a balancing two-wheeled vehicle based on SCMG, including: a preview distance calculation module, which is used to perform adaptive preview distance calculation; a reconnaissance decision module, which includes a multi-threaded processor, which is used to parallelly calculate the reconnaissance distance and curvature; an adaptive speed limit module, which generates a PWM speed regulation signal according to the reconnaissance curvature; and a balance compensation module, which is connected to the SCMG gyroscope to monitor the risk of tipping in real time and trigger emergency braking.
[0071] The look-ahead distance calculation module plays a crucial role in vehicle control. This distance is the safe distance that the vehicle needs to predict in advance based on its current speed and curvature. By dynamically adjusting the look-ahead distance, the vehicle can more accurately respond to upcoming turns or trajectory changes. This calculation is based on real-time speed and road curvature information, combined with an adaptive algorithm to optimize the look-ahead distance, thereby improving system sensitivity and responsiveness.
[0072] The reconnaissance decision module incorporates several multi-threaded processors for real-time calculation of reconnaissance distance and curvature, and their impact on trajectory tracking control. Reconnaissance distance refers to the distance between the vehicle's current trajectory and the target trajectory, used to calculate the optimal path, while curvature refers to the curvature of the trajectory. Through parallel processing, the module efficiently processes large amounts of sensor data, reducing computational latency and ensuring smoother and more responsive trajectory adjustments.
[0073] The adaptive speed limit module uses information provided by the reconnaissance and decision-making module (such as detected curvature) to prevent the vehicle from losing control during turns or in complex terrain. The adaptive speed limit algorithm generates a PWM (pulse width modulation) speed control signal to dynamically adjust the vehicle's speed based on changes in road curvature, ensuring that the vehicle's speed is automatically reduced to a safe range in sharp turns or complex road conditions. This intelligent speed limit not only improves safety but also optimizes energy efficiency and extends battery life.
[0074] The balance compensation unit module, combined with the SCMG, monitors the vehicle's tilt in real time. If the vehicle is in danger of tipping over, the SCMG quickly adjusts and triggers the emergency braking mechanism. The SCMG provides highly accurate posture detection, ensuring the vehicle maintains balance at all times. If the tilt angle is detected outside the set safety range, the system immediately applies the brakes to prevent an accident.
[0075] It should be noted that the reference Figure 3 and Figure 4 , is the actual effect trajectory diagram of the adaptive speed limit module, according to Figure 3 It can be seen that the speed of the target two-wheeled vehicle can be reduced to an appropriate value before the sudden steering in actual driving conditions. Figure 4 , Figure 4 This is an aerial view of the target two-wheeled vehicle's trajectory. The white box trajectory is the target trajectory, which starts from the lower left corner and goes clockwise back to the starting point. The white irregular curve trajectory is the actual trajectory, and the maximum speed reaches 2.8m / s.
[0076] In one embodiment, the dynamic speed limit controller module adopts a feedforward-feedback composite control structure, wherein the feedforward term calculates the ideal vehicle speed based on the reconnaissance curvature, and the feedback term performs PID adjustment according to the actual tracking error.
[0077] The embodiment of the present application also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, is used to execute a trajectory tracking optimization control method for a balancing two-wheeled vehicle based on SCMG. The trajectory tracking optimization control method for a balancing two-wheeled vehicle based on SCMG includes the following steps: obtaining current posture information data of a target two-wheeled vehicle through SCMG, including pitch angle and angular velocity; calculating the target position, target posture angle and target velocity according to a preset target trajectory, and generating a position error, a velocity error and a posture error according to the error between the current posture information and the target trajectory; performing adaptive adjustment of the preview distance according to the error information, and adjusting the target position according to the error information; The preview distance is calculated based on the vehicle speed, curvature, and lateral deviation value, and the preview distance is maintained between the preset maximum and minimum values. The SCMG target model is preset, and the control input is generated through the preset target model to control the dynamic behavior of the balancing two-wheeled vehicle; the maximum handlebar angle and rotation speed of the target two-wheeled vehicle are coupled with the vehicle speed. When encountering a large turn, priority is given to reducing the vehicle speed rather than increasing the restrictions on the angle range or angle speed. The control input is applied to the balancing two-wheeled vehicle, and the rotation speed of the drive wheel and the body posture are adjusted to make the balancing two-wheeled vehicle gradually approach the target trajectory; the motion state of the balancing two-wheeled vehicle is monitored in real time, the error information is updated, and the control strategy is adjusted based on the latest status data to continuously optimize the trajectory tracking process.
[0078] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks, or tape drives; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system that is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., embodied as a computer program) that can be executed by one or more processors.
[0079] Of course, the storage medium containing computer-executable instructions provided in an embodiment of the present application is not limited to the above-mentioned trajectory tracking optimization control method for a balanced two-wheeled vehicle based on SCMG, and can also execute related operations in the trajectory tracking optimization control method for a balanced two-wheeled vehicle based on SCMG provided in any embodiment of the present application.
[0080] The present invention significantly improves the trajectory tracking performance and control robustness of the two-wheeled vehicle while ensuring the safety of the SCMG carrying boundary by constructing a preview-reconnaissance dual-distance collaborative mechanism. Based on the feedforward compensation strategy of dynamic preview, the system can autonomously adjust the forward range of trajectory tracking according to the comprehensive evaluation of real-time vehicle speed, path curvature and lateral deviation, effectively overcoming the phase lag problem caused by the traditional fixed preview distance. This mechanism shows unique advantages in curved scenarios. Through the curvature adaptive algorithm, the preview window is intelligently shrunk, so that the steering control instructions are more in line with the instantaneous motion state, thereby achieving smooth and coherent heading correction in complex paths. At the same time, the innovatively introduced concept of reconnaissance distance injects forward-looking decision-making capabilities into the system. Its composite calculation model that integrates braking distance, vehicle body characteristics and speed cost can predict the steering requirements of the path ahead in advance and generate speed constraint boundaries, fundamentally avoiding the risk of control failure caused by steering mechanism response delay or angle saturation. This speed-steering collaborative optimization strategy enables the system to maintain a reasonable distribution of steering torque under high-speed conditions, ensuring that the gyroscopic effect of the SCMG always operates within a safe load range, and establishes a balance-priority control hierarchy through a dynamic weight distribution algorithm to achieve an adaptive trade-off between trajectory tracking and vehicle body stability. When it is detected that the lateral acceleration is approaching the critical threshold, the system automatically increases the decision weight of the balance control and gradually releases the steering load through a gradient speed limit strategy. The present invention is suitable for manned scenarios, and the constraint boundary adjustment mechanism is compatible with operating habits, maximizing trajectory tracking accuracy while ensuring the safety bottom line. In addition, the layered control architecture greatly reduces the computational complexity. Through the parallel decoupling operations of the pre-aiming layer and the reconnaissance layer, the system can still maintain a high-frequency control cycle on a low-computing-power embedded platform, providing hardware compatibility guarantees for engineering deployment.
[0081] This invention breaks through the serial control limitations of the traditional SCMG self-balancing vehicle, which is "balance first, then track", and innovatively integrates path curvature prediction, load boundary assessment, and dynamic control parameters into a unified decision-making framework. This proactive control paradigm based on model prediction not only provides a new technical path for two-wheeled automatic balancing vehicles, but also reveals the "speed-curvature-load" coupling law, which provides a theoretical reference for subsequent research. In terms of practical application, this solution has demonstrated wide adaptability to complex urban roads, warehousing and logistics channels, and narrow indoor environments. Its core algorithm module can be seamlessly integrated into existing vehicle control systems, providing a plug-and-play solution for the intelligent upgrade of vehicles such as self-balancing vehicles, electric motorcycles, and unmanned delivery vehicles.
[0082] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. All equivalent structural transformations made by using the contents of the present invention description and drawings under the inventive concept of the present invention, or direct / indirect application in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A trajectory tracking optimization control method for a balancing two-wheeled vehicle based on SCMG, characterized in that: The following steps are involved: Obtain the current posture information data of the target two-wheeled vehicle through SCMG, including pitch angle and angular velocity; According to the preset target trajectory, the target position, target attitude angle and target speed are calculated, and the position error, speed error and attitude error are generated according to the error between the current attitude information and the target trajectory; Based on the error information, the preview distance is adaptively adjusted. The preview distance is calculated based on the vehicle speed, curvature, and lateral deviation value, and the preview distance is kept between the preset maximum and minimum values. The SCMG target model is preset, and the control input is generated through the preset target model to control the dynamic behavior of the balanced two-wheeled vehicle; The maximum handlebar angle and rotation speed of the target two-wheeled vehicle are coupled with the vehicle speed. When encountering a sharp turn, the vehicle speed is reduced. The control input is applied to the balancing two-wheeled vehicle. By adjusting the speed of the drive wheels and the body posture, the balancing two-wheeled vehicle gradually approaches the target trajectory. Monitor the motion status of the balancing two-wheeled vehicle in real time, update error information, adjust the control strategy based on the latest status data, and continuously optimize the trajectory tracking process.
2. The trajectory tracking optimization control method of a balancing two-wheeled vehicle based on SCMG according to claim 1, characterized in that: The calculation formula of the preview distance is: l d =k1*v-k2*kappa+k3*Err y where l d is the preview distance, v is the vehicle speed, kappa is the curvature, Err y is the lateral deviation value, k1, k2, k3 are the coefficients of the latter three respectively.
3. The trajectory tracking optimization control method of a balancing two-wheeled vehicle based on SCMG according to claim 1, characterized in that: Also includes, Calculate the reconnaissance distance based on the current speed, vehicle deceleration, constant value, and speed cost distance; Find the reconnaissance point by using the reconnaissance distance. The principle of finding the reconnaissance point is the same as that of finding the preview point by pure tracking method. Replace the preview distance with the calculated reconnaissance distance. Calculate the reconnaissance curvature based on the coordinates of the reconnaissance point, the current position coordinates of the vehicle, and the yaw angle of the current vehicle body; Calculate the speed limit value and calculate the current speed limit value based on the reconnaissance curvature.
4. The trajectory tracking optimization control method of a balancing two-wheeled vehicle based on SCMG according to claim 1, characterized in that: The calculation formula for the reconnaissance distance is: Where l is the reconnaissance distance, v is the current speed, a is the deceleration of the vehicle, l p is a constant greater than zero, l c The cost of speed is distance.
5. The trajectory tracking optimization control method of a balancing two-wheeled vehicle based on SCMG according to claim 1, characterized in that: The calculation formula of the speed cost distance is: l c =λv 2 (λ≥0) λ is a coefficient greater than or equal to zero.
6. The trajectory tracking optimization control method of a balancing two-wheeled vehicle based on SCMG according to claim 3, characterized in that: The deceleration of the vehicle is set taking into account comfort when carrying passengers, and the maximum achievable deceleration is used when not carrying passengers.
7. The trajectory tracking optimization control method of a balancing two-wheeled vehicle based on SCMG according to claim 3, characterized in that: The constant value is set according to at least one parameter of vehicle condition, vehicle length, and vehicle weight.
8. The trajectory tracking optimization control method of a balancing two-wheeled vehicle based on SCMG according to claim 1 or 3, characterized in that: The coupling relationship between the maximum handlebar angle, the rotation speed and the vehicle speed is achieved through a pre-established mapping table or function relationship.
9. A trajectory tracking optimization control system for a two-wheeled balancing vehicle based on SCMG, applied to a trajectory tracking control method for a two-wheeled balancing vehicle based on SCMG according to any one of claims 1 to 8, characterized in that: include: A preview distance calculation module, used to perform adaptive preview distance calculation; The reconnaissance decision module includes a multi-threaded processor for parallel calculation of reconnaissance distance and curvature; Adaptive speed limit module generates PWM speed regulation signal according to the detected curvature; The balance compensation module is connected to the SCMG to monitor the risk of tipping in real time and trigger emergency braking.
10. The trajectory tracking optimization control system of a two-wheeled balancing vehicle based on SCMG according to claim 9, characterized in that: The adaptive speed limit module adopts a feedforward-feedback composite control structure, in which the feedforward term calculates the ideal vehicle speed based on the reconnaissance curvature, and the feedback term performs PID adjustment according to the actual tracking error.
11. A storage medium containing computer-executable instructions, characterized in that: The computer executable instructions, when executed by a computer processor, are used to execute the trajectory tracking optimization control method for a balancing two-wheeled vehicle based on SCMG as described in any one of claims 1 to 8.
Citation Information
Cited By
Fixed-wing unmanned aerial vehicle electronic fence avoidance method
CN120909319A
A fixed-wing unmanned aerial vehicle electronic fence avoidance method
CN120909319B