Low-cost bicycle hardware device for self-balancing and steering control
By using standardized consumer-grade components and mechanical transmission design, combined with sensor fusion algorithms, a low-cost, high-performance self-balancing bicycle hardware device was realized, solving the problems of high cost and poor reproducibility in existing technologies, and providing a standardized hardware platform and modular design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUN YAT SEN UNIV
- Filing Date
- 2026-03-03
- Publication Date
- 2026-04-17
AI Technical Summary
Existing self-balancing bicycle hardware devices are expensive and complex, making it difficult to achieve a balance between low cost and high performance control. There is a lack of standardized and easily replicable hardware platforms, and ordinary consumer-grade components cannot meet the requirements for high-performance control.
By employing standardized consumer-grade components, including hub motors, servo motors, and embedded computing boards, and through ingenious mechanical transmission design and sensor fusion algorithms, a complete electromechanical system solution is formed, achieving low-cost, high-performance self-balancing and steering control.
It reduces hardware costs, provides a standardized hardware platform, resolves the contradiction between low cost and high performance, optimizes cost-effectiveness, and has modularity and scalability to adapt to diverse application needs.
Smart Images

Figure CN121871718A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of self-balancing bicycle technology, and more specifically to a low-cost bicycle hardware device for self-balancing and steering control. Background Technology
[0002] Bicycles are a typical dynamic nonholonomic constraint system. Their center of gravity is relatively high, and unlike four-wheeled vehicles, they lack a stable chassis support, making them inherently unstable and unable to maintain balance on their own. Therefore, the active intervention of an external controller is required to adjust the handlebars, wheels, and other actuators, thereby achieving self-balancing and steering control of the bicycle.
[0003] Currently, bicycle self-balancing control technology can be divided into two categories according to hardware configuration: (1) angular momentum conservation balance control scheme based on flywheel; (2) flywheel-less balance control scheme based on handlebar steering.
[0004] The flywheel-based angular momentum conservation balance control scheme primarily utilizes the gyroscopic effect generated by a high-speed rotating body to produce a restoring torque, thus counteracting the gravitational torque caused by vehicle tilting. Specifically, when the vehicle tilts due to a disturbance, attitude sensors mounted on the frame detect the roll angle and roll rate. Based on this information, the controller drives one or more flywheels with large moments of inertia to accelerate or decelerate along their rotation axis.
[0005] The flywheel-less balance control scheme based on handlebar steering simulates the core skill of human riding: maintaining balance by actively controlling the handlebar steering angle. The physical basis of this scheme is that actively steering changes the position of the front wheel's contact point, thereby shifting the overall support point of the system. When the bike leans to the left, the controller drives the handlebars to make a small, rapid left turn. This steering action generates a leftward centripetal acceleration on the bicycle, which in turn generates a rightward centrifugal force on the ground. This force acts on the bike's center of gravity, generating a restoring torque that corrects the bike's tilt to the right, thus counteracting the lean.
[0006] Although the above technologies have verified the feasibility of self-balancing bicycles, existing hardware devices have significant shortcomings in terms of cost, replicability, and ease of deployment, which seriously hinder the commercialization and popularization of the technology.
[0007] 1. Mainstream hardware solutions are expensive and complex, making them difficult to apply in consumer applications.
[0008] Flywheel-based solutions have inherent drawbacks: in order to generate sufficient restoring torque, flywheel systems must have considerable mass and extremely high rotational speed, which results in large size, heavy weight, extremely high power consumption and huge driving costs. They are also accompanied by noise and vibration problems, making them completely unsuitable for lightweight, low-cost consumer products.
[0009] 2. Lack of standardized, low-cost, and easily replicable hardware platforms.
[0010] Currently, hardware implementations of simpler "handlebar steering" solutions are mostly limited to laboratory customization or individual DIY projects. These devices are typically one-off, highly customized, and rely on non-standard machined parts and expensive industrial-grade components, resulting in high unit costs and difficulty in replication. The lack of a "public" hardware reference design composed of standardized and consumer-grade components makes it difficult for algorithm developers to easily obtain a stable, reliable, and low-cost physical platform to deploy and validate their control strategies.
[0011] 3. There is an irreconcilable contradiction between low-cost components and high-performance control requirements.
[0012] When using ordinary consumer-grade components to reduce costs, their accuracy, response speed, and output torque often fail to meet the stringent requirements of high-performance control algorithms on actuators, resulting in poor control performance and system instability. Ordinary servo direct-drive handlebars suffer from large gear backlash and insufficient torque. Conversely, using industrial-grade components to meet algorithm performance requirements leads back to the dilemma of high costs. How to meet the operational requirements of advanced algorithms under limited, low-cost hardware conditions through ingenious system integration and mechanical design remains a challenging problem that current technologies have not yet solved. Summary of the Invention
[0013] The purpose of this invention is to overcome the above-mentioned technical deficiencies and provide a low-cost bicycle hardware device for self-balancing and steering control, thereby solving the technical problem of the irreconcilable contradiction between low-cost components and high-performance control requirements in the prior art.
[0014] To achieve the above-mentioned technical objectives, the present invention provides a low-cost bicycle hardware device for self-balancing and steering control, comprising:
[0015] Frame;
[0016] A power source, mounted on the frame, is used to provide power to the bicycle's electrical components;
[0017] A hub motor, electrically connected to the power source, is mounted on the rear wheel of the frame and is used to provide power for the bicycle to move.
[0018] A steering servo motor is installed near the handlebars of the frame and is electrically connected to the power source. The steering servo motor is used to control the handlebars to steer.
[0019] An inertial measurement unit is fixedly installed on the frame near the center of gravity of the bicycle and electrically connected to the power source. The inertial measurement unit is used to measure the triaxial acceleration and triaxial angular velocity of the bicycle body in real time.
[0020] The central computing unit is electrically connected to the inertial measurement unit. The central computing unit calculates the vehicle roll angle and roll rate based on the vehicle's three-axis acceleration and three-axis angular velocity, and generates steering and speed commands based on the vehicle roll angle and roll rate.
[0021] Compared with the prior art, the beneficial effects of the present invention include:
[0022] 1. Solved the problems of high hardware costs and complex hardware selection.
[0023] The core innovation of the hardware device of this invention lies in providing a system integration solution based entirely on commercially available standardized, consumer-grade components. The main body of the device uses a common mountain bike frame, the execution unit employs a general-purpose hub motor and a high-torque servo motor, and the decision-making unit utilizes low-cost, low-power embedded computing boards such as ESP32, Raspberry Pi, or Jetson. Through the ingenious integration of these readily available and mature industrial products, this invention keeps the total hardware cost of the self-balancing bicycle to an extremely low level, while ensuring the replicability of the solution and its potential for future mass production.
[0024] 2. Provides a standardized, "algorithm-deployable" hardware reference platform.
[0025] This device is not merely an assembly of hardware, but a complete and proven electromechanical system solution. It clearly defines the complete hardware architecture and electrical interfaces, comprising sensing units, decision-making units, and execution units. The platform is specifically designed to support and efficiently run modern control algorithms, particularly lightweight neural network controllers, making it a "reference" hardware solution that algorithm developers can use "out of the box." This completely solves the integration challenges from algorithm to hardware deployment, significantly lowering the R&D threshold.
[0026] 3. It resolves the contradiction between low cost and high performance, achieving optimal cost-effectiveness.
[0027] This device achieves superior control performance at a low cost through a specific and innovative mechanical transmission design. Its key design element lies in a highly efficient torque and motion transmission mechanism between a standard servo motor and the bicycle handlebars. The core idea of this mechanism is to optimize power output through mechanical structure, allowing the use of a low-cost motor to meet the fast, precise, and high-torque response requirements of high-performance control algorithms for the steering actuator.
[0028] This transmission mechanism can be implemented in various specific forms, and its protection scope includes, but is not limited to: (1) Flexible transmission: for example, using a synchronous belt and synchronous pulley or a chain and sprocket scheme, effectively amplifying torque by changing the speed ratio of the pulley / sprocket, and ensuring the smoothness and accuracy of the transmission. (2) Gear transmission: for example, using a gear set or worm gear mechanism, which can achieve a high reduction ratio and torque amplification. (3) Linkage transmission: transmitting motion and force through a cleverly designed multi-link mechanism. (4) Direct drive integration: directly integrating the servo motor or its core components into the head tube of the bicycle, achieving the most direct and seamless transmission through a hard connection between the motor shaft and the handlebar assembly.
[0029] According to some embodiments of the present invention, an RGB camera and a depth camera for visual perception are also included, mounted at the front handlebars of the bicycle;
[0030] A lidar for high-precision ranging and environmental mapping is installed on the front handlebars of a bicycle.
[0031] A GNSS antenna for outdoor positioning is mounted on a vehicle frame.
[0032] According to some embodiments of the present invention, the connection method between the steering servo motor and the handle includes:
[0033] Flexible transmission: The steering servo motor is connected to the handle using a synchronous belt and synchronous pulley or a chain and sprocket.
[0034] Rigid transmission: The steering servo motor is connected to the handle using a gear set, worm gear, or precision multi-link scheme;
[0035] Direct drive: The servo motor or its core components are directly integrated into the head tube of the bicycle, and direct transmission is achieved through a hard connection between the motor shaft and the handlebar steering column.
[0036] According to some embodiments of the present invention, the central computing unit calculates the vehicle roll angle and roll rate based on the vehicle's three-axis acceleration and three-axis angular velocity, including the following steps:
[0037] The accelerometers measure the X-axis linear acceleration, Y-axis acceleration, and Z-axis acceleration in the vehicle coordinate system in real time, and the gyroscopes measure the angular velocities of the vehicle body around its three axes in real time, namely roll rate, pitch rate, and yaw rate.
[0038] Static attitude calculation is performed using real-time readings from the accelerometer to obtain the instantaneous roll angle based on the gravity reference frame, which is unaffected by integral drift.
[0039] Dynamic attitude calculation is performed using real-time readings from a gyroscope to obtain the continuous change in the vehicle body roll angle;
[0040] By fusing the instantaneous roll angle and the continuous change in the vehicle roll angle, a reliable vehicle roll angle is obtained;
[0041] The raw roll rate measured by the gyroscope is filtered and corrected to obtain the final body roll rate.
[0042] It should be noted that the inertial measurement unit includes an accelerometer and a gyroscope.
[0043] According to some embodiments of the present invention, static attitude calculation is performed using real-time readings from an accelerometer to obtain an instantaneous roll angle based on a gravity reference frame, unaffected by integral drift, including the following steps:
[0044] Based on the linear acceleration components of the gravitational acceleration vector along the Y-axis of the vehicle body and the linear acceleration components along the Z-axis of the vehicle body, the instantaneous roll angle based on the gravity reference frame, which is unaffected by integral drift, is calculated using the arctangent function.
[0045] According to some embodiments of the present invention, dynamic attitude calculation is performed using readings measured in real time by a gyroscope to obtain the continuous change in the vehicle body roll angle, including the following steps:
[0046] By integrating the roll angular velocity measured by the gyroscope over time, the continuous change in the vehicle body roll angle can be obtained.
[0047] According to some embodiments of the present invention, the instantaneous roll angle and the continuous change in the vehicle roll angle are fused to obtain a reliable vehicle roll angle, including the following steps:
[0048] A dynamic system model is established, using the continuous change in the vehicle roll angle obtained by gyroscope integration as the state prediction value, and the instantaneous roll angle calculated by accelerometer as the observation correction value.
[0049] The algorithm dynamically adjusts the trust weights by comparing the difference between the predicted and observed corrections, and by taking into account the noise characteristics of the sensor.
[0050] When the vehicle is stationary or in a low-dynamic state, increase the confidence weight of the accelerometer results to correct for gyroscope drift.
[0051] When a vehicle is in a high-dynamic state, such as rapid acceleration or sharp turns, the confidence weight of the gyroscope results should be increased to avoid interference from motion acceleration.
[0052] According to some embodiments of the present invention, it further includes: a wireless remote control receiver, mounted on the vehicle frame and communicatively connected to the central computing unit, the wireless remote control receiver being used to receive wireless operation commands from the outside.
[0053] According to some embodiments of the present invention, the central computing unit is an embedded computing board of the NVIDIA Jetson series or Raspberry Pi series.
[0054] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0055] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein the abstract drawings are to be completely consistent with one of the drawings in the specification:
[0056] Figure 1 Physical reference diagrams are provided for a low-cost bicycle vehicle hardware system for self-balancing and steering control, according to one embodiment of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0058] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0059] Reference Figure 1 , Figure 1 Physical reference diagrams are provided for a low-cost bicycle vehicle hardware system for self-balancing and steering control, according to one embodiment of the present invention.
[0060] In one embodiment, a low-cost bicycle for self-balancing and steering control is characterized by comprising: a frame; a power source mounted on the frame, the power source providing power to the bicycle's electrical components; a hub motor electrically connected to the power source and mounted on the rear wheel of the frame, the hub motor providing propulsion for the bicycle; a steering servo motor mounted near the handlebars of the frame and electrically connected to the power source, the steering servo motor controlling the handlebars for steering; an inertial measurement unit fixedly mounted on the frame near the bicycle's center of gravity and electrically connected to the power source, the inertial measurement unit measuring the bicycle's triaxial acceleration and triaxial angular velocity in real time; and a central computing unit electrically connected to the inertial measurement unit, the central computing unit calculating the body roll angle and roll rate based on the body roll angle and roll rate, and generating steering and speed commands based on the body roll angle and roll rate.
[0061] (1) Bicycle frame assembly and modification
[0062] The implementation of this device begins with selecting a standard commercially available bicycle (such as a mountain bike) with a standard geometry as the base frame. The purpose of choosing a standard commercially available bicycle is to ensure the low cost and easy accessibility of the platform from the source.
[0063] The assembly and modification process includes: First, the bicycle is basically assembled to ensure it has a complete mechanical structure, including the frame, front and rear wheels, and handlebars. Then, the frame is adapted by adding universal mounting plates or standard connecting brackets specifically designed for subsequent electronic, electrical, and transmission components to the frame's crossbeams, stem tubes, or other reasonably stressed areas, using welding or bolting. Standardized, this patent uses a platform frame fixed above the rear wheel as the main load-bearing platform for all components (hereinafter referred to as the "rear frame"). These pre-installed mechanical interfaces provide a solid physical foundation for the standardized and modular installation of all subsequent functional modules, a key step in transforming an ordinary bicycle into a scalable robotic hardware "chassis."
[0064] (2) Design and assembly of power and transmission mechanisms
[0065] This part is responsible for providing the device with forward propulsion and driving force to achieve balance and steering; it is the power core of this hardware device.
[0066] The power system includes: ① Power source: A large-capacity lithium battery pack is fixed in the lower tube or triangular area of the frame, and provides stable power to computing units, sensors and motors with different voltage requirements through one or more DC-DC power conversion modules (placed in the rear frame).
[0067] The power and transmission system includes:
[0068] ① Forward Power: A hub motor is replaced or integrated into the rear wheel of the bicycle. The FOC (Field Oriented Control) drive of this motor is mounted in a suitable position on the frame and electrically connected to the battery and hub motor. This system is responsible for providing the driving force for the bicycle to move forward and backward.
[0069] ② Actuation motor: A servo motor with high torque and high response speed (i.e., "steering servo motor") is used as the power source for steering action. It is fixed near the head tube of the frame or integrated into the head tube.
[0070] ③ Transmission Mechanism: A highly efficient torque and motion transmission mechanism is designed and installed between the output shaft of the servo motor and the bicycle's front fork or handlebar stem. This is the core innovation of this device in resolving the "contradiction between low cost and high performance." This mechanism aims to amplify and precisely transmit the power of the servo motor, selected within a controllable cost range, using mechanical principles. Its specific implementation is diverse, covering, but not limited to:
[0071] a) Flexible transmission: a solution using synchronous belts and synchronous pulleys or chains and sprockets.
[0072] b) Rigid transmission: using gear sets, worm gears, or precision multi-link systems.
[0073] c) Direct drive: The servo motor or its core components are directly integrated into the head tube of the bicycle, and direct transmission is achieved through a hard connection between the motor shaft and the handlebar steering column.
[0074] Specifically, taking the flexible transmission of synchronous belts and synchronous pulleys as an example, the large and small synchronous pulleys are fixed to the top of the handlebar headset and the output drive shaft of the servo motor through rigid connections (such as riveting, welding, etc.). It is important to ensure that the axis of the synchronous pulley is aligned with the rotation axis of the headset and the servo motor. The synchronous belt is used to tension and connect the two synchronous pulleys, thereby achieving transmission.
[0075] Through the aforementioned mechanism, this device can still achieve precise, backlash-free, and high-torque steering control without using expensive industrial-grade motors, meeting the stringent requirements of advanced self-balancing algorithms for actuator performance.
[0076] (3) Sensor and remote control system design and assembly
[0077] This section is responsible for endowing the device with environmental awareness and human-computer interaction capabilities, specifically including:
[0078] Core attitude perception: An IMU (Inertial Measurement Unit) is used as the core sensor and is firmly mounted at the center of the frame near the bicycle's center of gravity. It is responsible for measuring the bicycle's three-axis acceleration and angular velocity in real time, and calculating the body roll angle and roll rate, which are crucial for balance control, through internal algorithms.
[0079] Specifically, a commercially available nine-axis IMU sensor is used, which sends attitude data to the host computer via data channels such as RS485 / CAN / serial port. This data includes IMU data and AHRS (Attitude and Heading Reference System) data. The IMU data includes: (x, y, z) three-axis angular velocities, (x, y, z) three-axis linear accelerations, and (x, y, z) three-axis magnetic field strengths. These are the raw data acquired by the nine-axis IMU. AHRS (Attitude and Heading Reference System) is a highly integrated three-dimensional motion attitude calculation algorithm system integrated into the IMU. It acquires raw data such as triaxial acceleration and triaxial angular velocity of the vehicle in real time through the built-in inertial measurement unit (IMU), and processes and calculates this multi-source data using specific sensor fusion algorithms (such as Kalman filtering and complementary filtering). Its outputs include: (roll, pitch, yaw) triaxial attitude angles, (roll_speed, pitch_speed, yaw_speed) triaxial attitude angular velocities, and (qw, qx, qy, qz) quaternions. In summary, the vehicle roll angle and roll angular velocity are taken from the roll angle and roll_speed roll angular velocity data returned by the IMU from the AHRS data.
[0080] More specifically:
[0081] Step 1: Raw Data Collection
[0082] AHRS acquires real-time linear accelerations along the X, Y, and Z axes in the vehicle's coordinate system, measured by axial accelerometers. When the vehicle is stationary or in uniform motion, these measurements primarily reflect the components of gravitational acceleration along each axis. AHRS then acquires the raw, real-time measurements of the vehicle's angular velocities around its three axes: roll rate, pitch rate, and yaw rate.
[0083] Step 2: Preliminary calculation of static roll angle
[0084] AHRS uses accelerometer readings to calculate static attitude. Specifically, by using the components of the gravitational acceleration vector on the vehicle's lateral axis (e.g., the Y-axis) and vertical axis (e.g., the Z-axis), the instantaneous roll angle, unaffected by integral drift and based on a gravity reference frame, can be calculated using the arctangent function (atan2). The advantage of this method is that the angle does not drift over long periods, but it is susceptible to interference from the vehicle's own acceleration.
[0085] Step 3: Calculation of Dynamic Roll Angle Integral
[0086] AHRS uses gyroscope readings to calculate dynamic attitude. Specifically, by integrating the roll velocity (i.e., the angular velocity of the vehicle body around the X-axis) measured by the gyroscope over time, the continuous change in the vehicle's roll angle can be obtained. The advantage of this method is that it can accurately reflect dynamic rotation over a short period of time and is not affected by linear acceleration, but its integration results will accumulate errors (drift) over time.
[0087] Step 4: Sensor Fusion and Optimal Estimation
[0088] This is the core of AHRS. The system employs a sensor fusion algorithm to optimally fuse the roll angles obtained from the two methods mentioned above. This algorithm establishes a dynamic system model, using the result obtained from gyroscope integration as the state prediction value and the result calculated from accelerometer calculation as the observation correction value.
[0089] The algorithm dynamically adjusts the trust weights by comparing the difference between the predicted and observed values and taking into account the noise characteristics of the sensors: when the vehicle is stationary or in a low-dynamic state, the accelerometer results are trusted more to correct the gyroscope drift; when the vehicle is in a high-dynamic state (such as rapid acceleration or sharp turning), the gyroscope results are trusted more to avoid interference from motion acceleration.
[0090] Step 5: Output the final result
[0091] After the above fusion algorithm, AHRS finally outputs a high-precision vehicle roll angle that is stable and reliable under any operating conditions. At the same time, the algorithm also filters and corrects the raw roll rate measured by the gyroscope, outputting an optimized vehicle roll rate that can be directly used in the control system.
[0092] ② Scalable Multimodal Sensing: This device is designed with standardized installation interfaces, supporting flexible expansion with various sensors to meet application requirements. These include RGB and depth cameras (or integrated RGB-D cameras) for visual perception, LiDAR for high-precision ranging and environmental mapping, and GNSS antennas for outdoor positioning. This modular design gives the hardware platform the potential to upgrade from basic balance control to advanced autonomous navigation and other functions.
[0093] ③ Remote Control and External Command Reception: Install a wireless remote control receiver (such as a model aircraft handle receiver) on the vehicle or integrate support for standard input devices such as keyboards and mice. This system is responsible for receiving remote commands from the operator, such as desired forward speed, steering direction, and other advanced commands, providing an interface for human-machine co-driving or remote control.
[0094] (4) Design and assembly of communication and computing units
[0095] This section is the central hub of the entire hardware device, responsible for connecting and controlling all subsystems and running the core control algorithm. Specifically, it includes:
[0096] ① Central Computing Unit: Select and install a low-cost, low-power embedded computing board (i.e., the "decision unit") with sufficient computing power (especially floating-point operations or AI acceleration capabilities), such as the NVIDIA Jetson series or Raspberry Pi. This computing board serves as the core of data processing and decision-making for the entire system.
[0097] ② Communication bus and electrical integration: A standardized communication network is built around a central computing board to connect all sensors, controllers, and peripherals.
[0098] Sensor data link: IMU, various cameras, LiDAR and other sensors are connected to the computing board through their respective USB, serial port, MIPI or Ethernet interfaces.
[0099] Motor control chain: The computing board sends precise control commands (such as target angle, target speed, etc.) to the steering servo motor controller and the FOC driver of the rear wheel hub motor via CAN bus, RS485 bus or PWM signal.
[0100] External command chain: The remote control receiver transmits the parsed user commands to the computing board via serial port or USB.
[0101] Through the above steps, this hardware device ultimately forms a complete, physically highly integrated, and electrically clearly interconnected closed-loop control system. Sensors are responsible for perception, computing units are responsible for decision-making, and power and transmission mechanisms are responsible for execution. The three work together to form a low-cost and high-performance hardware foundation for achieving self-balancing and steering control.
[0102] The low-cost bicycle hardware device for self-balancing and steering control proposed in this invention achieves the following technical effects through the systematic integration of standardized, consumer-grade components and corresponding mechanical and electrical design:
[0103] 1. Reduce the hardware cost and implementation threshold of self-balancing bicycles.
[0104] The most direct effect of this device is that by using a standard commercial bicycle as the main body and selecting standardized components such as commercially available hub motors, servo motors, and embedded computing boards, the hardware cost of a self-balancing bicycle is controlled at a level far lower than that of existing academic research or customized solutions. This solution solves the problem of high costs caused by existing technologies relying on expensive customized parts or industrial-grade components, making the hardware construction of high-performance self-balancing bicycles no longer out of reach, and paving the way for the commercial mass production and consumer application of this technology.
[0105] 2. It provides a standardized, replicable, "algorithm-deployable" hardware platform.
[0106] This device is not only a low-cost hardware assembly, but also a complete, clear, and rapidly replicable hardware reference design. Through standardized mechanical interfaces and electrical bus design, it organically integrates sensing, decision-making, and execution units into a "out-of-the-box" platform. Algorithm developers no longer need to start from scratch with complex hardware selection, mechanical design, and electrical integration; they can directly deploy, test, and verify algorithms on this device, significantly shortening the development cycle from algorithm to product and solving the problem of the lack of a universal verification platform in existing technologies.
[0107] 3. High-performance electromechanical control was achieved under low-cost conditions.
[0108] This device effectively addresses the core pain point of insufficient torque or precision in low-cost servo motors through mechanical transmission design (such as synchronous pulleys, gear drives, or direct integration). The design optimizes the motor's output using mechanical principles, enabling low-cost actuators to meet the stringent requirements of advanced control algorithms (such as neural network controllers) for fast, precise, and high-torque response. This successfully eliminates the inherent contradiction between low cost and high performance at the hardware level, proving that robust and smooth self-balancing control is entirely feasible within a limited cost budget, achieving optimal cost-effectiveness.
[0109] 4. It achieves a high degree of modularity and scalability, adapting to diverse application needs.
[0110] This device boasts strong modularity and scalability thanks to its standardized sensor mounting interfaces (allowing for the addition of cameras, LiDAR, etc.) and universal communication buses (such as CAN and USB). Users can flexibly configure the hardware like assembling a computer, based on specific application scenarios (such as basic balancing, visual tracking, and autonomous navigation). This "basic platform + functional modules" design approach makes this device not just a single-function device, but also a robot development platform capable of continuous upgrades and adaptation to more intelligent tasks in the future.
[0111] Furthermore, the system includes RGB and depth cameras for visual perception, mounted on the bicycle's front handlebars; a LiDAR system for high-precision ranging and environmental mapping, also mounted on the handlebars; and a GNSS antenna for outdoor positioning, mounted on the frame. The RGB and depth cameras accurately capture environmental semantic information such as traffic lights and road signs, while the GNSS antenna enables precise outdoor positioning, clearly defining the bicycle's location within the global environment. The LiDAR, in conjunction with the depth camera, completes real-time environmental mapping, allowing the bicycle to know its relative position to surrounding objects.
[0112] The central computing unit calculates the vehicle roll angle and roll rate based on the vehicle's three-axis acceleration and three-axis angular velocity, including the following steps: acquiring the X-axis linear acceleration, Y-axis linear acceleration, and Z-axis linear acceleration in the vehicle coordinate system measured in real time by accelerometers; acquiring the angular velocities of the vehicle's rotation around its three axes, namely roll rate, pitch rate, and yaw rate, measured in real time by gyroscopes; performing static attitude calculation using the accelerometer readings to obtain the instantaneous roll angle based on the gravity reference frame, unaffected by integral drift; performing dynamic attitude calculation using the gyroscope readings to obtain the continuous change in the vehicle roll angle; fusing the instantaneous roll angle and the continuous change in the vehicle roll angle to obtain a reliable vehicle roll angle; and filtering and correcting the original roll rate measured by the gyroscopes to obtain the final vehicle roll rate.
[0113] After the above fusion algorithm, AHRS finally outputs a high-precision vehicle roll angle that is stable and reliable under any operating conditions. At the same time, the algorithm also filters and corrects the raw roll rate measured by the gyroscope, outputting an optimized vehicle roll rate that can be directly used in the control system.
[0114] The process of using real-time accelerometer readings to perform static attitude calculations and obtain the instantaneous roll angle based on the gravity reference frame, which is unaffected by integral drift, includes the following steps: calculating the instantaneous roll angle based on the gravity reference frame, which is unaffected by integral drift, using the arctangent function based on the linear acceleration component of the gravitational acceleration vector along the Y-axis of the vehicle body and the linear acceleration component along the Z-axis of the vehicle body.
[0115] The method involves using real-time readings from a gyroscope to perform dynamic attitude calculations and obtain the continuous change in the vehicle body roll angle. This includes the following steps: integrating the roll angular velocity measured by the gyroscope over time to obtain the continuous change in the vehicle body roll angle.
[0116] The method of fusing the instantaneous roll angle and the continuous change of the vehicle roll angle to obtain a reliable vehicle roll angle includes the following steps: establishing a dynamic system model, using the continuous change of the vehicle roll angle obtained by gyroscope integration as the state prediction value, and using the instantaneous roll angle calculated by the accelerometer as the observation correction value; the algorithm dynamically adjusts the trust weight by comparing the difference between the prediction value and the observation correction value and combining the noise characteristics of the sensors: when the vehicle is stationary or in a low dynamic state, the trust weight of the accelerometer result is increased to correct the drift of the gyroscope; when the vehicle is in a high dynamic state, including rapid acceleration and sharp turns, the trust weight of the gyroscope result is increased to avoid interference from motion acceleration.
[0117] When a vehicle is stationary or in a low-dynamic state, the primary reference for its roll angle is the accelerometer reading. In low-dynamic states, the vehicle's acceleration is extremely small, almost negligible, and the accelerometer primarily detects the component of gravitational acceleration in the tilt direction, providing a stable and accurate reference value for the roll angle. Gyroscopes, however, are prone to "drift" due to their inherent hardware characteristics. Over time, errors accumulate, requiring the stable results from the accelerometer for calibration and correction to offset the drift. In high-dynamic states, the vehicle experiences significant acceleration, which is superimposed on gravitational acceleration. Accelerometers cannot distinguish between these two types of acceleration, misinterpreting the acceleration as the gravitational component due to tilt, leading to significant errors in roll angle calculation. Gyroscopes, by directly measuring angular velocity and integrating it to obtain the roll angle, are minimally affected by acceleration and can quickly respond to changes in vehicle attitude. Therefore, their results are prioritized to avoid errors caused by acceleration. Dynamically adjusting the trust weights yields even more reliable roll angle results.
[0118] Furthermore, it also includes a wireless remote control receiver, mounted on the vehicle frame and communicatively connected to the central computing unit. The wireless remote control receiver is used to receive wireless operating commands from external sources. The wireless remote control receiver (such as a model aircraft handle receiver) can be installed on the vehicle or integrated with support for standard input devices such as keyboards and mice. This system is responsible for receiving remote commands from the operator, such as desired forward speed, steering direction, and other advanced commands, providing an interface for human-machine co-driving or remote control.
[0119] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.
[0120] The specific embodiments of the present invention described above do not constitute a limitation on the scope of protection of the present invention. Any other corresponding changes and modifications made in accordance with the technical concept of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A low cost bicycle hardware device for self-balancing and steering control, characterized by, include: Frame; A power source, mounted on the frame, is used to provide power to the bicycle's electrical components; A hub motor, electrically connected to the power source, is mounted on the rear wheel of the frame and is used to provide power for the bicycle to move. A steering servo motor is installed near the handlebars of the frame and is electrically connected to the power source. The steering servo motor is used to control the handlebars to steer. An inertial measurement unit is fixedly installed on the frame near the center of gravity of the bicycle and electrically connected to the power source. The inertial measurement unit is used to measure the triaxial acceleration and triaxial angular velocity of the bicycle body in real time. The central computing unit is electrically connected to the inertial measurement unit. The central computing unit calculates the vehicle roll angle and roll rate based on the vehicle's three-axis acceleration and three-axis angular velocity, and generates steering and speed commands based on the vehicle roll angle and roll rate.
2. A low cost bicycle for self-balancing and steering control as claimed in claim 1 wherein, It also includes an RGB camera and a depth camera for visual perception, mounted on the bicycle's front handlebars; A lidar for high-precision ranging and environmental mapping is installed on the front handlebars of a bicycle. A GNSS antenna for outdoor positioning is mounted on a vehicle frame.
3. A low cost bicycle for self balancing and steering control as claimed in claim 1 wherein, The connection method between the steering servo motor and the handle includes: Flexible transmission: The steering servo motor is connected to the handle using a synchronous belt and synchronous pulley or a chain and sprocket. Rigid transmission: The steering servo motor is connected to the handle using a gear set, worm gear, or precision multi-link scheme; Direct drive: The servo motor or its core components are directly integrated into the head tube of the bicycle, and direct transmission is achieved through a hard connection between the motor shaft and the handlebar steering column.
4. A low cost bicycle for self balancing and steering control as claimed in claim 1 wherein, The central computing unit calculates the vehicle roll angle and roll rate based on the vehicle's three-axis acceleration and three-axis angular velocity, including the following steps: The accelerometers measure the X-axis linear acceleration, Y-axis acceleration, and Z-axis acceleration in the vehicle coordinate system in real time, and the gyroscopes measure the angular velocities of the vehicle body around its three axes in real time, namely roll rate, pitch rate, and yaw rate. Static attitude calculation is performed using real-time readings from the accelerometer to obtain the instantaneous roll angle based on the gravity reference frame, which is unaffected by integral drift. Dynamic attitude calculation is performed using real-time readings from a gyroscope to obtain the continuous change in the vehicle body roll angle; By fusing the instantaneous roll angle and the continuous change in the vehicle roll angle, a reliable vehicle roll angle is obtained; The raw roll rate measured by the gyroscope is filtered and corrected to obtain the final body roll rate.
5. A low cost bicycle for self-balancing and steering control as claimed in claim 4 wherein, Static attitude calculation is performed using real-time accelerometer readings to obtain the instantaneous roll angle based on a gravity reference frame, unaffected by integral drift. The steps include: Based on the linear acceleration components of the gravitational acceleration vector along the Y-axis of the vehicle body and the linear acceleration components along the Z-axis of the vehicle body, the instantaneous roll angle based on the gravity reference frame, which is unaffected by integral drift, is calculated using the arctangent function.
6. A low cost bicycle for self-balancing and steering control as claimed in claim 4 wherein, Dynamic attitude calculation is performed using real-time readings from a gyroscope to obtain the continuous change in the vehicle body roll angle, including the following steps: By integrating the roll angular velocity measured by the gyroscope over time, the continuous change in the vehicle body roll angle can be obtained.
7. A low cost bicycle for self-balancing and steering control as claimed in claim 4 wherein, The instantaneous roll angle and the continuous change in the vehicle roll angle are fused to obtain a reliable vehicle roll angle, including the following steps: A dynamic system model is established, using the continuous change in the vehicle roll angle obtained by gyroscope integration as the state prediction value, and the instantaneous roll angle calculated by accelerometer as the observation correction value. The algorithm dynamically adjusts the trust weights by comparing the difference between the predicted and observed corrections, and by taking into account the noise characteristics of the sensor. When the vehicle is stationary or in a low-dynamic state, increase the confidence weight of the accelerometer results to correct for gyroscope drift. When a vehicle is in a high-dynamic state, such as rapid acceleration or sharp turns, the confidence weight of the gyroscope results should be increased to avoid interference from motion acceleration.
8. A low cost bicycle for self balancing and steering control as claimed in claim 1 wherein, Also includes: A wireless remote control receiver is mounted on the vehicle frame and is communicatively connected to the central computing unit. The wireless remote control receiver is used to receive wireless operation commands from the outside.
9. A low cost bicycle for self-balancing and steering control as claimed in claim 1, wherein, The central computing unit is an embedded computing board from the NVIDIA Jetson series or Raspberry Pi series.