Torque adaptive control method and system for an electrically assisted bicycle

By constructing a system adjustment unit to calculate the yaw torque and tilt torque in real time, the instability problem of torque regulation in electric-assisted bicycles under complex environments is solved, and the stability and safety of electric-assisted bicycles in different environments are realized.

CN119568328BActive Publication Date: 2025-10-21SHENZHEN INVANTI IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411712226.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-10-21
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

Traditional electric-assist bicycles cannot adapt to complex dynamic environments in real time, especially when there are changes in sway angle and sway angular velocity, making it difficult to respond quickly and make precise adjustments, resulting in an unstable riding experience.

Method used

By constructing a system adjustment unit, including data acquisition, transmission, disturbance estimation, and data analysis, the system calculates the yaw torque and tilt torque in real time, performs torque adaptive regulation, and uses an inertial measurement unit to obtain the yaw angle and yaw angular velocity, calculates external disturbances, and adjusts the torque accordingly.

Benefits of technology

It improves the speed and accuracy of torque adaptive regulation, ensures real-time response and stability during riding, reduces human intervention, and enhances the stability and safety of electric-assisted bicycles in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119568328B_ABST
    Figure CN119568328B_ABST
Patent Text Reader

Abstract

The present application relates to torque calculation technical field, a kind of electric power-assisted bicycle's torque adaptability regulation method and system, comprising: receiving torque adjustment instruction, based on torque adjustment instruction to start system adjustment unit, gather side swing angle and side swing angular velocity, calculate transmission delay, if transmission delay is not in delay range, to transmission data packet set is screened, obtain standard data packet set and over-limit data packet set, to over-limit data packet set is adjusted, obtain adjustment data packet set, based on standard data packet set and adjustment data packet set obtain integrated data packet set, if transmission delay is in delay range, calculate external interference estimate value and utilize external interference estimate value to calculate side swing angular acceleration, calculate side swing torque and inclination torque, and according to side swing torque and inclination torque calculate regulation torque, according to regulation torque completes torque adaptability regulation.The present application can improve the regulation speed and accuracy of torque adaptability regulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of torque calculation, and in particular to a method and system for adaptively controlling torque of an electric power-assisted bicycle. Background Art

[0002] With the popularity of electric-assisted bicycles, their performance and comfort have become the focus of users. In order to provide a more comfortable and safe riding experience, torque adaptive adjustment has become one of the key technologies of electric-assisted bicycles. Torque adaptive adjustment ensures the stability of the electric-assisted bicycle and the comfort of the rider during riding. However, in actual use, the side swing angle and side swing angular velocity of the electric-assisted bicycle will affect the smoothness of the electric-assisted bicycle. The side swing angle and side swing angular velocity are not only related to factors such as road conditions, riding posture, and vehicle speed, but are also affected by external factors such as wind speed and slope changes, which can cause instability during riding. In order to ensure the stability and comfort of electric-assisted bicycles under different riding conditions, it is necessary to adaptively control the torque to cope with the complex external environment and the needs of the driver.

[0003] Traditional torque regulation methods rely on fixed models and preset parameters. This method is prone to failure in complex dynamic environments and cannot adapt to the torque regulation requirements under different conditions in real time. This is especially true when the roll angle and roll angular velocity change, making it difficult to respond quickly and make precise adjustments. Therefore, how to accurately estimate external disturbances based on real-time data, calculate the roll torque and yaw torque, and perform timely and accurate torque adaptive control is a critical issue that needs to be addressed. Summary of the Invention

[0004] The present invention provides a method and system for adaptively controlling torque of an electric power-assisted bicycle, the main purpose of which is to improve the control speed and accuracy of the adaptive control of torque.

[0005] To achieve the above-mentioned object, the present invention provides a method for adaptively controlling torque of an electric power-assisted bicycle, comprising:

[0006] receiving a torque adjustment instruction, and starting a pre-built system adjustment unit based on the torque adjustment instruction, wherein the system adjustment unit includes: a data acquisition unit, a data transmission unit, an interference estimation unit, and a data analysis unit;

[0007] Using the data acquisition unit to collect the side swing angle and side swing angular velocity of the electric power-assisted bicycle, and obtain a transmission data packet set;

[0008] calculating a transmission delay of the data transmission unit using the transmission data packet set;

[0009] Determining whether the transmission delay is within a preset delay range;

[0010] If the transmission delay is not within the delay range, setting a packet size threshold, filtering the transmission data packet set based on the packet size threshold to obtain a standard data packet set and an over-limit data packet set, splitting the over-limit data packets in the over-limit data packet set to obtain an adjusted data packet set, integrating the standard data packet set and the adjusted data packet set to obtain an integrated data packet set, updating the transmission data packet set using the integrated data packet set, and returning to the above step of calculating the transmission delay of the data transmission unit using the transmission data packet set;

[0011] If the transmission delay is within the delay range, transmitting the roll angle and the roll angular velocity to the interference estimation unit and calculating an external interference estimation value;

[0012] Transmitting the external disturbance estimation value to the data analysis unit using a data transmission unit and calculating the roll angular acceleration using the external disturbance estimation value;

[0013] The roll torque is calculated based on the roll angular acceleration, the yaw torque is calculated, and the control torque is calculated according to the roll torque and the yaw torque, and the torque adaptive control is completed according to the control torque.

[0014] Optionally, the collecting of the side swing angle and side swing angular velocity of the electric power-assisted bicycle by the data collection unit includes:

[0015] An inertial measurement unit is provided, wherein the inertial measurement unit includes: a gyroscope, a magnetometer, and an accelerometer;

[0016] Obtaining an initial roll angle, setting a sampling frequency, sampling time, measurement time, and time step, and measuring a preliminary angular velocity using the gyroscope and measurement time;

[0017] Set the time step number and calculate the total number of time steps based on the time step, sampling frequency, and sampling time. Calculate the preliminary angle using the time step, preliminary angular velocity, time step number, total number of time steps, initial yaw angle, and measurement time:

[0018]

[0019] Where α(t) refers to the initial angle at the measurement time t, t refers to the measurement time, α(0) refers to the initial sway angle, q refers to the time step number, w refers to the total number of time steps, β(q) refers to the initial angular velocity at the time step number q, and t1 refers to the time step length;

[0020] Performing signal filtering on the preliminary angle and preliminary angular velocity to obtain a filtered angle and a filtered angular velocity, and performing angle correction on the filtered angle and the preliminary angular velocity using the accelerometer, the filtered angular velocity, and the magnetometer to obtain a corrected angle;

[0021] A corrected angular velocity is calculated based on the corrected angle, and the corrected angle and the corrected angular velocity are respectively determined as the roll angle and the roll angular velocity.

[0022] Optionally, the using the accelerometer, the filtered angular velocity, and the magnetometer to perform angle correction on the filtered angle to obtain the corrected angle includes:

[0023] Obtain the x-axis output and y-axis output of the accelerometer, and use the x-axis output and y-axis output to calculate the accelerometer correction angle:

[0024]

[0025] Among them, γ1 refers to the accelerometer correction angle, arctan refers to the inverse tangent function, a y Refers to the y-axis output, a x Refers to the x-axis output;

[0026] Set the filter coefficient and calculate the first correction angle based on the accelerometer correction angle, filter angle, filter angular velocity and filter coefficient:

[0027] γ2=θ×(α1+β1×t1)+(1-θ)×γ1

[0028] Among them, γ2 refers to the first correction angle, θ refers to the filter coefficient, α1 refers to the filter angle, and β1 refers to the filter angular velocity;

[0029] The magnetometer correction angle is calculated, a magnetic coefficient is set, a second correction angle is calculated based on the magnetometer correction angle and the magnetic coefficient, and a correction angle is calculated based on the first correction angle and the second correction angle.

[0030] Optionally, calculating the second correction angle based on the magnetometer correction angle and the magnetic coefficient, and calculating the correction angle based on the first correction angle and the second correction angle, includes:

[0031] The second corrected angle is calculated based on the filtered angle, filtered angular velocity, magnetometer correction angle and magnetic coefficient:

[0032] Set a first correction weight and a second correction weight, and calculate a correction angle based on the first correction angle, the second correction angle, the first correction weight, and the second correction weight:

[0033] γ4=μ1×γ2+μ2×γ3

[0034] Among them, γ4 refers to the correction angle, μ1 refers to the first correction weight, μ2 refers to the second correction weight, and γ3 refers to the second correction angle.

[0035] Optionally, calculating the transmission delay of the data transmission unit by using the transmission data packet set includes:

[0036] Calculating the transmission distance from the data acquisition unit to the interference estimation unit, obtaining a plurality of test data packets of different sizes, and detecting the data packet sizes of the test data packets;

[0037] Sorting the test data packets in ascending order based on the data packet sizes and integrating them to obtain a test data packet set;

[0038] sending the test data packets to the data transmission unit in sequence based on the test data packet set and recording the processing delay and the processing quantity;

[0039] Calculate the average delay based on the processing delay, set the test duration and balance parameters, and calculate the unit processing capacity based on the processing quantity, average delay, test duration and balance parameters:

[0040]

[0041] Among them, Q1 refers to the unit processing capacity, δ refers to the balance parameter, W1 refers to the processing quantity, T refers to the test time, and E1 refers to the average delay;

[0042] Set the distance adjustment index, transmission bandwidth, congestion adjustment coefficient and node efficiency coefficient, obtain the transmission speed, distance weight parameter, congestion weight parameter and node weight parameter, and calculate the transmission delay based on the transmission distance, data packet size, unit processing capability, distance adjustment index, transmission bandwidth, congestion adjustment coefficient, node efficiency coefficient, transmission speed, distance weight parameter, congestion weight parameter and node weight parameter.

[0043] Optionally, the calculating of the transmission delay based on the transmission distance, data packet size, unit processing capability, distance adjustment index, transmission bandwidth, congestion adjustment coefficient, node efficiency coefficient, transmission speed, distance weight parameter, congestion weight parameter, and node weight parameter includes:

[0044] The propagation delay is calculated using the following formula:

[0045]

[0046] Among them, R1 refers to the transmission delay, ρ1 refers to the distance weight parameter, d refers to the transmission distance, and v1 refers to the transmission speed. refers to the distance adjustment index, ρ2 refers to the congestion weight parameter, U refers to the packet size, u1 refers to the transmission bandwidth, τ2 refers to the congestion adjustment coefficient, ρ3 refers to the node weight parameter, and τ3 refers to the node efficiency coefficient.

[0047] Optionally, calculating the external interference estimate includes:

[0048] Get the previous step angular velocity, previous step angle, and time interval, and calculate the expected angle based on the previous step angular velocity, previous step angle, and time interval:

[0049] θ2=θ3+t2×s2

[0050] Where θ2 refers to the desired angle, θ3 refers to the previous step angle, t2 refers to the time interval, and s2 refers to the previous step angular velocity;

[0051] Calculate the desired angular velocity, set the angle parameter and the angular velocity parameter, and calculate the external disturbance estimation value based on the desired angle, the desired angular velocity, the angle parameter, the angular velocity parameter, the roll angle, and the roll angular velocity:

[0052]

[0053] Among them, A1 refers to the estimated value of external interference, Refers to the angle parameter, θ1 refers to the side swing angle, Refers to the angular velocity parameter, s1 refers to the lateral angular velocity.

[0054] Optionally, calculating the roll angular acceleration using the external disturbance estimation value includes:

[0055] The external disturbance torque is calculated based on the external disturbance estimation value, and the damping torque and the moment of inertia are obtained. The yaw angular acceleration is calculated using the external disturbance torque, the damping torque and the moment of inertia:

[0056]

[0057] Where L refers to the lateral acceleration, Z refers to the external disturbance torque, X refers to the damping torque, and I refers to the moment of inertia.

[0058] Optionally, the calculating the roll torque and the yaw torque based on the roll angular acceleration, and calculating the control torque according to the roll torque and the yaw torque, includes:

[0059] Obtain the speed coefficient, vehicle speed, roll damping coefficient, and roll angle change rate, and calculate the roll torque using the rotational inertia, roll angular acceleration, speed coefficient, vehicle speed, roll angle, roll damping coefficient, and roll angle change rate:

[0060] H1=I×L+k1×v2×sin(θ1)+k2×k3

[0061] Where H1 refers to the lateral torque, k1 refers to the velocity coefficient, v2 refers to the vehicle speed, sin refers to the sine function, k2 refers to the lateral damping coefficient, and k3 refers to the lateral angle change rate;

[0062] Obtain vehicle mass, center of gravity height, roll angle, centrifugal height, and vehicle centrifugal force, and use vehicle mass, center of gravity height, roll angle, centrifugal height, and vehicle centrifugal force to calculate the yaw torque:

[0063] H2=(m1×g×h1-F1×h2)×sin(θ4)

[0064] Where H2 is the yaw torque, m1 is the vehicle mass, g is the acceleration due to gravity, h1 is the height of the center of gravity, F1 is the vehicle centrifugal force, h2 is the centrifugal height, and θ4 is the roll angle.

[0065] Set the balancing parameters and calculate the control torque based on the balancing parameters, yaw torque and pitch torque:

[0066] H3=η×H1+(1-η)×H2

[0067] Among them, H3 refers to the control torque and η refers to the balance parameter.

[0068] To achieve the above object, the present invention further provides a torque adaptive control system for an electric power-assisted bicycle, comprising:

[0069] a roll data acquisition module, configured to receive a torque adjustment command and activate a pre-built system adjustment unit based on the torque adjustment command, wherein the system adjustment unit includes a data acquisition unit, a data transmission unit, an interference estimation unit, and a data analysis unit; and utilize the data acquisition unit to collect the roll angle and roll angular velocity of the electric power-assisted bicycle and obtain a transmission data packet set;

[0070] a transmission delay determination module, configured to determine whether the transmission delay is within a preset delay range; if the transmission delay is not within the delay range, setting a packet size threshold, screening a transmission packet set based on the packet size threshold to obtain a standard packet set and an over-limit packet set, splitting the over-limit packets in the over-limit packet set to obtain an adjusted packet set, integrating the standard packet set and the adjusted packet set to obtain an integrated packet set, updating the transmission packet set using the integrated packet set, and returning to the above step of calculating the transmission delay of the data transmission unit using the transmission packet set;

[0071] an interference estimation calculation module, configured to transmit the roll angle and roll angular velocity to the interference estimation unit and calculate an external interference estimation value if the transmission delay is within the delay range;

[0072] The control torque calculation module is used to transmit the external interference estimation value to the data analysis unit using the data transmission unit and calculate the roll angle acceleration using the external interference estimation value; calculate the roll torque based on the roll angle acceleration, calculate the control torque based on the roll torque and the roll torque, and complete torque adaptive control based on the control torque.

[0073] In order to solve the above problem, the present invention further provides an electronic device, comprising:

[0074] a memory storing at least one instruction;

[0075] The processor executes the instructions stored in the memory to implement the above-mentioned torque adaptive control method for the electric power-assisted bicycle.

[0076] In order to solve the above problems, the present invention also provides a computer-readable storage medium, which stores at least one instruction. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned torque adaptive control method for an electric power-assisted bicycle.

[0077] The present invention solves the problems described in the background technology. By receiving torque adjustment instructions and constructing a comprehensive control process covering data acquisition, transmission delay calculation, transmission delay judgment, external interference estimation value calculation and control torque calculation, the present invention realizes adaptive control of the torque of the electric power-assisted bicycle. It not only ensures real-time response to external interference and sway changes during riding, but also improves the control speed and accuracy of torque adaptive control through efficient data transmission and interference estimation value calculation. First, by automatically receiving the torque adjustment instruction, the immediacy and accuracy of the torque adjustment are ensured. The torque adjustment instruction drives the system adjustment unit, improves the automation level of the entire system, reduces manual intervention, and enhances the real-time response capability, thereby realizing stable torque adjustment of the electric power-assisted bicycle in different riding environments, ensuring the smoothness and safety of the riding process. Secondly, the sway angle and sway angular velocity are accurately obtained through the data acquisition unit, providing key dynamic information, helping to monitor the posture changes of the electric power-assisted bicycle in real time during riding. The accurate acquisition of the sway angle and sway angular velocity provides high-quality input data for subsequent torque adjustment, thereby optimizing the reaction accuracy and response time of the control system. Then, by calculating the data transmission unit, the sway angle and sway angular velocity are accurately obtained, providing key dynamic information, helping to monitor the posture changes of the electric power-assisted bicycle in real time. The system optimizes data packet management during data transmission by setting a packet size threshold and splitting excess packets. This effectively avoids transmission delays or data loss caused by oversized packets, improving transmission stability and reliability. The updated transmission packet set ensures accurate information transfer and enhances the efficiency and accuracy of the entire system control process. Furthermore, the key roll angle and roll angular velocity are transmitted to the disturbance estimation unit, enabling precise assessment of the impact of external disturbances on riding posture. This external disturbance estimate provides a more refined control basis for subsequent torque calculation, thereby improving the system's adaptability and stability and effectively responding to external disturbances in different riding environments. Finally, the external disturbance estimate is used to calculate the roll angular acceleration, roll torque, and yaw torque. The control torque is calculated based on the roll and yaw torques, enabling the system control unit to respond to changes in the external environment in real time and make timely and accurate torque adjustments. Therefore, the present invention can improve the control speed and accuracy of torque adaptive control. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 A schematic flow chart of a method for adaptively controlling torque of an electric power-assisted bicycle provided in one embodiment of the present invention;

[0079] Figure 2A functional module diagram of a torque adaptive control system for an electric power-assisted bicycle provided by one embodiment of the present invention;

[0080] Figure 3 A schematic structural diagram of an electronic device for implementing the torque adaptive control method of an electric power-assisted bicycle provided in one embodiment of the present invention.

[0081] Description of reference numerals:

[0082] 1. Electronic device; 10. Processor; 11. Memory; 12. Bus.

[0083] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0084] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0085] The embodiment of the present application provides a method for adaptively controlling the torque of an electric power-assisted bicycle. The execution subject of the method for adaptively controlling the torque of an electric power-assisted bicycle includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for adaptively controlling the torque of an electric power-assisted bicycle can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0086] Reference Figure 1 FIG. 1 is a flow chart of a method for adaptively controlling torque of an electric power-assisted bicycle according to an embodiment of the present invention. In this embodiment, the method for adaptively controlling torque of an electric power-assisted bicycle includes:

[0087] S1. Receive a torque adjustment instruction, and start a pre-built system adjustment unit based on the torque adjustment instruction, wherein the system adjustment unit includes: a data acquisition unit, a data transmission unit, an interference estimation unit, and a data analysis unit.

[0088] It can be explained that the torque adjustment instruction refers to an instruction initiated manually to adaptively adjust the torque of the electric-assisted bicycle. Adaptive adjustment refers to adjustment according to the driving conditions of the electric-assisted bicycle. The system adjustment unit refers to a unit that adaptively adjusts the torque of the electric-assisted bicycle. It is activated by the torque adjustment instruction and includes: a data acquisition unit, a data transmission unit, an interference estimation unit and a data analysis unit. The data acquisition unit refers to a unit that collects data during the driving of the electric-assisted bicycle. The data transmission unit refers to a unit that transmits data. The interference estimation unit refers to a unit that calculates the external interference estimation value. The external interference estimation value refers to the value of the interference caused by external factors during the driving of the electric-assisted bicycle. External factors refer to external environmental factors, such as wind force. The data analysis unit refers to a unit that analyzes and calculates data.

[0089] For example, Xiao Zhang is a staff member of an electric assisted bicycle manufacturer. One day, Xiao Zhang needs to test the torque adaptive control of the electric assisted bicycle, so Xiao Zhang drives an electric assisted bicycle to test the torque adaptive control. During the driving process, Xiao Zhang initiates a torque adjustment instruction, and the electric assisted bicycle receives the torque adjustment instruction and starts the system adjustment unit according to the torque adjustment instruction. The data acquisition unit in the system adjustment unit collects data and uses the data transmission unit to transmit the collected data to the interference estimation unit, and uses the interference estimation unit to calculate the external interference estimation value, and uses the data transmission unit to transmit the interference estimation value to the data analysis unit, and calculates the torque based on the data analysis unit to complete the torque adaptive control of the electric assisted bicycle.

[0090] S2. Utilize the data acquisition unit to acquire the side swing angle and side swing angular velocity of the electric power-assisted bicycle to obtain a transmission data packet set.

[0091] To be explained, the roll angle refers to the rotational deviation of an object around the vertical axis. The object refers to the electric power-assisted bicycle, and the vertical axis refers to the center of the electric power-assisted bicycle body. For the electric power-assisted bicycle, the roll angle refers to the angle at which the front of the electric power-assisted bicycle deviates from the forward direction. The rotational deviation refers to the degree of deviation of the object from its initial state when it rotates around a fixed axis, that is, the angle difference between the front of the electric power-assisted bicycle and the forward direction. For example, when the electric power-assisted bicycle is going straight on the road, the front of the electric power-assisted bicycle is parallel to the forward direction, and the rotational deviation is 0. If the front of the electric power-assisted bicycle is deflected, the rotational deviation is a non-zero angle. The rotational deviation is used to describe the rotational behavior of the electric power-assisted bicycle, especially when it comes to turning and wind. When the electric power bicycle is affected by external factors such as force and road surface, the rotation deviation reflects the degree to which the electric power-assisted bicycle deviates from the forward direction due to steering or external factors. The lateral angular velocity refers to the rate at which the electric power-assisted bicycle rotates around the vertical axis. For example, when the electric power-assisted bicycle turns, the electric power-assisted bicycle will rotate around the vertical axis, and the speed of rotation is the lateral angular velocity. The transmission data packet set refers to the set formed by the transmission data packet. The transmission data packet refers to the data packet obtained by segmenting the data in order to efficiently transmit data during the communication process. Each data packet contains payload data and control information. The payload data refers to the effective information that needs to be transmitted, that is, the lateral angular velocity and the lateral angular velocity. The control information refers to the information used for identification, transmission and verification.

[0092] In detail, the data acquisition unit is used to collect the side swing angle and side swing angular velocity of the electric power-assisted bicycle, including:

[0093] An inertial measurement unit is provided, wherein the inertial measurement unit includes: a gyroscope, a magnetometer, and an accelerometer;

[0094] Obtaining an initial roll angle, setting a sampling frequency, sampling time, measurement time, and time step, and measuring a preliminary angular velocity using the gyroscope and measurement time;

[0095] Set the time step number and calculate the total number of time steps based on the time step, sampling frequency, and sampling time. Calculate the preliminary angle using the time step, preliminary angular velocity, time step number, total number of time steps, initial yaw angle, and measurement time:

[0096]

[0097] Where α(t) refers to the initial angle at the measurement time t, t refers to the measurement time, α(0) refers to the initial sway angle, q refers to the time step number, w refers to the total number of time steps, β(q) refers to the initial angular velocity at the time step number q, and t1 refers to the time step length;

[0098] Performing signal filtering on the preliminary angle and preliminary angular velocity to obtain a filtered angle and a filtered angular velocity, and performing angle correction on the filtered angle and the preliminary angular velocity using the accelerometer, the filtered angular velocity, and the magnetometer to obtain a corrected angle;

[0099] A corrected angular velocity is calculated based on the corrected angle, and the corrected angle and the corrected angular velocity are respectively determined as the roll angle and the roll angular velocity.

[0100] It can be explained that the inertial measurement unit refers to IMU, the sampling frequency refers to the number of times the preliminary angular velocity of the electric-assisted bicycle is sampled per unit time, the sampling time refers to the time for sampling the preliminary angular velocity of the electric-assisted bicycle, the preliminary angular velocity refers to the angular velocity of the electric-assisted bicycle measured by the gyroscope, the measurement time refers to the current time, for example, the preliminary angular velocity of the electric-assisted bicycle is collected, and the collection time is 0.1s, then the time after 0.1s is the measurement time, the time step refers to the time interval for sampling the preliminary angular velocity of the electric-assisted bicycle, the time step sequence number refers to the sequence number obtained by sorting the sampling points, and the sampling point refers to the time when the preliminary angular velocity of the electric-assisted bicycle is sampled. The total number of time steps refers to the total number of sampling points. The preliminary angle refers to the angle of the electric assisted bicycle at the current time calculated using the sampling frequency, time step, preliminary angular velocity and measurement time. There is noise in the preliminary angular velocity and preliminary angle output by the inertial measurement unit, so signal filtering is performed on the preliminary angular velocity and preliminary angle. Signal filtering refers to the use of Kalman filtering to remove noise from the preliminary angular velocity and preliminary angle. The filtered angle refers to the angle obtained after the preliminary angle is Kalman filtered. The filtered angular velocity refers to the angular velocity obtained after the preliminary angular velocity is Kalman filtered. The corrected angle refers to the angle obtained by correcting the filtered angle using the accelerometer and magnetometer. The corrected angular velocity refers to the angular velocity calculated using the corrected angle.

[0101] For example, assuming the sampling frequency is 100 Hz, the sampling time is 0.05 s, the initial roll angle is 0°, and the initial angular velocity of each time step is 2.0 rad / s, 2.5 rad / s, 3.0 rad / s, 2.8 rad / s, 2.3 rad / s,

[0102] In detail, the filtering angle and performing angle correction using the accelerometer, the filtered angular velocity, and the magnetometer to obtain the corrected angle include:

[0103] Obtain the x-axis output and y-axis output of the accelerometer, and use the x-axis output and y-axis output to calculate the accelerometer correction angle:

[0104]

[0105] Among them, γ1 refers to the accelerometer correction angle, arctan refers to the inverse tangent function, a y Refers to the y-axis output, a x Refers to the x-axis output;

[0106] Set the filter coefficient and calculate the first correction angle based on the accelerometer correction angle, filter angle, filter angular velocity and filter coefficient:

[0107] γ2=θ×(α1+β1×t1)+(1-θ)×γ1

[0108] Among them, γ2 refers to the first correction angle, θ refers to the filter coefficient, α1 refers to the filter angle, and β1 refers to the filter angular velocity;

[0109] The magnetometer correction angle is calculated, a magnetic coefficient is set, a second correction angle is calculated based on the magnetometer correction angle and the magnetic coefficient, and a correction angle is calculated based on the first correction angle and the second correction angle.

[0110] It can be explained that the x-axis output refers to the acceleration output of the accelerometer on the x-axis, the y-axis output refers to the acceleration output of the accelerometer on the y-axis, the accelerometer correction angle refers to the side swing angle of the electric assisted bicycle calculated using the accelerometer, the filter coefficient refers to the coefficient for adjusting the influence of the accelerometer correction angle on the first correction angle, which is set to 0.89. The first correction angle refers to the side swing angle obtained after adjusting the filter angle using the accelerometer. The magnetometer correction angle refers to the azimuth angle of the electric assisted bicycle calculated using the magnetometer. The azimuth angle refers to the angle of the electric assisted bicycle relative to the geographic direction, for example, the direction of the electric assisted bicycle relative to the magnetic north on the horizontal plane. The magnetic coefficient refers to the coefficient for adjusting the influence of the magnetometer correction angle on the second correction angle. When the speed of the electric assisted bicycle is less than or equal to 10 km / h, the magnetic coefficient is 0.80. When the speed of the electric assisted bicycle is greater than 10 km / h, the magnetic coefficient is 0.40. The second correction angle refers to the side swing angle obtained after adjusting the filter angle using the magnetometer.

[0111] In detail, the calculating of the second correction angle based on the magnetometer correction angle and the magnetic coefficient, and the calculating of the correction angle based on the first correction angle and the second correction angle, include:

[0112] The second corrected angle is calculated based on the filtered angle, filtered angular velocity, magnetometer correction angle and magnetic coefficient:

[0113] Set a first correction weight and a second correction weight, and calculate a correction angle based on the first correction angle, the second correction angle, the first correction weight, and the second correction weight:

[0114] γ4=μ1×γ2+μ2×γ3

[0115] Among them, γ4 refers to the correction angle, μ1 refers to the first correction weight, μ2 refers to the second correction weight, and γ3 refers to the second correction angle.

[0116] It can be explained that the first correction weight refers to the degree of influence of the first correction angle on the correction angle, and the second correction weight refers to the degree of influence of the second correction angle on the correction angle.

[0117] S3. Calculate the transmission delay of the data transmission unit using the transmission data packet set.

[0118] To explain, transmission delay refers to the time required for a data transmission unit to transmit data.

[0119] In detail, the calculating the transmission delay of the data transmission unit by using the transmission data packet set includes:

[0120] Calculating the transmission distance from the data acquisition unit to the interference estimation unit, obtaining a plurality of test data packets of different sizes, and detecting the data packet sizes of the test data packets;

[0121] Sorting the test data packets in ascending order based on the data packet sizes and integrating them to obtain a test data packet set;

[0122] sending the test data packets to the data transmission unit in sequence based on the test data packet set and recording the processing delay and the processing quantity;

[0123] Calculate the average delay based on the processing delay, set the test duration and balance parameters, and calculate the unit processing capacity based on the processing quantity, average delay, test duration and balance parameters:

[0124]

[0125] Among them, Q1 refers to the unit processing capacity, δ refers to the balance parameter, W1 refers to the processing quantity, T refers to the test time, and E1 refers to the average delay;

[0126] Set the distance adjustment index, transmission bandwidth, congestion adjustment coefficient and node efficiency coefficient, obtain the transmission speed, distance weight parameter, congestion weight parameter and node weight parameter, and calculate the transmission delay based on the transmission distance, data packet size, unit processing capability, distance adjustment index, transmission bandwidth, congestion adjustment coefficient, node efficiency coefficient, transmission speed, distance weight parameter, congestion weight parameter and node weight parameter.

[0127] It can be explained that the transmission distance refers to the distance that the roll angle and roll angular velocity need to be transmitted, the test data packet refers to the data packets of different sizes obtained in order to calculate the data transmission unit's ability to process data, the data packet size refers to the number of bytes in the data packet, the test data packet set refers to the set obtained by sorting the test data packets from small to large according to the data packet size and then integrating them, the processing delay refers to the time required for the data transmission unit to process the test data packet, the processing quantity refers to the number of test data packets successfully processed by the data transmission unit per unit time, the average delay refers to the delay obtained by averaging the processing delays of all test data packets, the test duration refers to the time for the test, the balance parameter refers to the parameter that adjusts the degree of influence of the processing quantity and average delay on the unit processing capability, the unit processing capability refers to a comprehensive indicator of the efficiency of the data transmission unit in processing test data packets, and the comprehensive indicator reflects the relative balance between the processing quantity and processing delay of the data transmission unit for test data packets per unit time.

[0128] It can be understood that the distance adjustment index refers to a parameter that adjusts the degree of influence of the transmission distance on the transmission delay, the transmission bandwidth refers to the bandwidth of the data transmission unit, which reflects the ability of the data transmission unit to transmit data, the congestion adjustment coefficient refers to a coefficient that reflects the network congestion of the data transmission unit, and the value is set between 0 and 1. The closer the congestion adjustment coefficient is to 1, the more severe the congestion and the greater the transmission delay. The node efficiency coefficient refers to the coefficient of the data transmission unit to adjust the unit processing capacity, and the value is set between 0 and 1. The closer the node efficiency coefficient is to 1, the smaller the transmission delay. The transmission speed refers to the speed at which the data transmission unit transmits. The distance weight parameter refers to the degree of influence of the transmission distance on the transmission delay, the congestion weight parameter refers to the degree of influence of the transmission bandwidth on the transmission delay, and the node weight parameter refers to the degree of influence of the unit processing capacity on the transmission delay.

[0129] In detail, the calculation of the transmission delay based on the transmission distance, data packet size, unit processing capability, distance adjustment index, transmission bandwidth, congestion adjustment coefficient, node efficiency coefficient, transmission speed, distance weight parameter, congestion weight parameter and node weight parameter includes:

[0130] The propagation delay is calculated using the following formula:

[0131]

[0132] Among them, R1 refers to the transmission delay, ρ1 refers to the distance weight parameter, d refers to the transmission distance, and v1 refers to the transmission speed. refers to the distance adjustment index, ρ2 refers to the congestion weight parameter, U refers to the packet size, u1 refers to the transmission bandwidth, τ2 refers to the congestion adjustment coefficient, ρ3 refers to the node weight parameter, and τ3 refers to the node efficiency coefficient.

[0133] S4. Determine whether the transmission delay is within a preset delay range.

[0134] It can be explained that the delay range refers to a pre-set range of transmission delays, within which timely transmission can be guaranteed.

[0135] If the transmission delay is not within the delay range, execute S5, set a data packet size threshold, filter the transmission data packet set based on the data packet size threshold to obtain a standard data packet set and an over-limit data packet set, split the over-limit data packets in the over-limit data packet set to obtain an adjusted data packet set, integrate the standard data packet set and the adjusted data packet set to obtain an integrated data packet set, use the integrated data packet set to update the transmission data packet set and return to the above step of using the transmission data packet set to calculate the transmission delay of the data transmission unit.

[0136] It can be explained that the data packet size threshold refers to the numerical value of the pre-set maximum data packet size. If the data packet size exceeds the data packet size threshold, it will affect the transmission delay. The transmission data packet set is screened based on the data packet size threshold to obtain the standard data packet set and the over-limit data packet set, which refers to comparing the data packet size of the transmission data packet with the data packet size threshold, integrating the transmission data packets that exceed the data packet size threshold to obtain the over-limit data packet set, integrating the transmission data packets that do not exceed the data packet size threshold to obtain the standard data packet set, the over-limit data packet set refers to the set formed by the transmission data packets that exceed the data packet size threshold, the standard data packet set refers to the set formed by the transmission data packets that do not exceed the data packet size threshold, the over-limit data packet refers to the transmission data packet in the over-limit data packet set, splitting the over-limit data packets in the over-limit data packet set to obtain the adjusted data packet set, which refers to adjusting the data packet size of the over-limit data packet to obtain the adjusted data packet, the adjusted data packet set refers to the set formed by the adjusted data packet, the adjusted data packet refers to the transmission data packet obtained after adjusting the data packet size of the over-limit data packet, and the integrated data packet set refers to the set obtained by integrating the standard data packet set and the adjusted data packet set.

[0137] If the transmission delay is within the delay range, step S6 is executed to transmit the roll angle and roll angular velocity to the disturbance estimation unit and calculate an external disturbance estimation value.

[0138] Specifically, the calculating of the external interference estimation value includes:

[0139] Get the previous step angular velocity, previous step angle, and time interval, and calculate the expected angle based on the previous step angular velocity, previous step angle, and time interval:

[0140] θ2=θ3+t2×s2

[0141] Where θ2 refers to the desired angle, θ3 refers to the previous step angle, t2 refers to the time interval, and s2 refers to the previous step angular velocity;

[0142] Calculate the desired angular velocity, set the angle parameter and the angular velocity parameter, and calculate the external disturbance estimation value based on the desired angle, the desired angular velocity, the angle parameter, the angular velocity parameter, the roll angle, and the roll angular velocity:

[0143]

[0144] Among them, A1 refers to the estimated value of external interference, Refers to the angle parameter, θ1 refers to the side swing angle, Refers to the angular velocity parameter, s1 refers to the lateral angular velocity.

[0145] It can be explained that the previous step angular velocity refers to the roll angular velocity at a time interval from the current time, the previous step angle refers to the roll angle at a time interval from the current time, the time interval refers to the time interval between calculating the roll angular velocity and the roll angle, for example, the time for the first calculation of the roll angular velocity and the roll angle is 0.00s, and the time for the second calculation of the roll angular velocity and the roll angle is 0.01s, then the time interval is 0.01s, the expected angle refers to the ideal roll angle under the condition that there are no external factors affecting it, the expected angular velocity refers to the ideal roll angular velocity under the condition that there are no external factors affecting it, the angle parameter refers to the parameter for adjusting the degree of influence of the roll angle on the estimated value of external interference, and the angular velocity parameter refers to the parameter for adjusting the degree of influence of the roll angular velocity on the estimated value of external interference.

[0146] S7. Utilize the data transmission unit to transmit the external disturbance estimation value to the data analysis unit and calculate the roll angular acceleration using the external disturbance estimation value.

[0147] It can be explained that the roll angular acceleration refers to the physical quantity that describes the rate of change of the roll angular velocity.

[0148] Specifically, the calculation of the roll angular acceleration using the external disturbance estimation value includes:

[0149] The external disturbance torque is calculated based on the external disturbance estimation value, and the damping torque and the moment of inertia are obtained. The yaw angular acceleration is calculated using the external disturbance torque, the damping torque and the moment of inertia:

[0150]

[0151] Where L refers to the lateral acceleration, Z refers to the external disturbance torque, X refers to the damping torque, and I refers to the moment of inertia.

[0152] It can be explained that the external interference torque refers to the torque exerted by external factors on the side swing direction of the electric assisted bicycle, the damping torque refers to the torque generated by the electric assisted bicycle itself to counteract the interference of external factors, the moment of inertia refers to the inertia of the electric assisted bicycle in the side swing direction, and the side swing direction refers to the direction in which the electric assisted bicycle rotates around the vertical axis.

[0153] S8. Calculate the roll torque and the yaw torque based on the roll angular acceleration, calculate the control torque according to the roll torque and the yaw torque, and perform torque adaptive control according to the control torque.

[0154] It can be explained that the lateral swing torque refers to the torque when the electric assisted bicycle rotates around the vertical axis, the tilt torque refers to the torque that prevents the electric assisted bicycle from excessively tilting and maintains the balance of the vehicle body, and the control torque refers to the torque that is the combination of the lateral swing torque and the tilt torque.

[0155] In detail, the calculating of the roll torque and the yaw torque based on the roll angular acceleration, and the calculating of the control torque according to the roll torque and the yaw torque include:

[0156] Obtain the speed coefficient, vehicle speed, roll damping coefficient, and roll angle change rate, and calculate the roll torque using the rotational inertia, roll angular acceleration, speed coefficient, vehicle speed, roll angle, roll damping coefficient, and roll angle change rate:

[0157] H1=I×L+k1×v2×sin(θ1)+k2×k3

[0158] Where H1 refers to the lateral torque, k1 refers to the velocity coefficient, v2 refers to the vehicle speed, sin refers to the sine function, k2 refers to the lateral damping coefficient, and k3 refers to the lateral angle change rate;

[0159] Obtain vehicle mass, center of gravity height, roll angle, centrifugal height, and vehicle centrifugal force, and use vehicle mass, center of gravity height, roll angle, centrifugal height, and vehicle centrifugal force to calculate the yaw torque:

[0160] H2=(m1×g×h1-F1×h2)×sin(θ4)

[0161] Where H2 is the yaw torque, m1 is the vehicle mass, g is the acceleration due to gravity, h1 is the height of the center of gravity, F1 is the vehicle centrifugal force, h2 is the centrifugal height, and θ4 is the roll angle.

[0162] Set the balancing parameters and calculate the control torque based on the balancing parameters, yaw torque and pitch torque:

[0163] H3=η×H1+(1-η)×H2

[0164] Among them, H3 refers to the control torque and η refers to the balance parameter.

[0165] It can be explained that the speed coefficient refers to the coefficient for adjusting the balance between vehicle speed and roll angle, vehicle speed refers to the current speed of the electric power-assisted bicycle, roll damping coefficient refers to the coefficient used to control the speed of change of roll angle, roll angle change rate refers to the speed of change of roll angle, vehicle mass refers to the weight of the electric power-assisted bicycle, center of gravity height refers to the height of the center of gravity of the electric power-assisted bicycle, roll angle refers to the angle of lateral tilt of the electric power-assisted bicycle, centrifugal height refers to the height of the point where the electric power-assisted bicycle is acted upon by centrifugal force, vehicle centrifugal force refers to the centrifugal force exerted on the electric power-assisted bicycle, balance parameter refers to the parameter for balancing roll torque and yaw torque, and the value range is 0 to 1.

[0166] The present invention solves the problems described in the background technology. By receiving torque adjustment instructions and constructing a comprehensive control process covering data acquisition, transmission delay calculation, transmission delay judgment, external interference estimation value calculation and control torque calculation, the present invention realizes adaptive control of the torque of the electric power-assisted bicycle. It not only ensures real-time response to external interference and sway changes during riding, but also improves the control speed and accuracy of torque adaptive control through efficient data transmission and interference estimation value calculation. First, by automatically receiving the torque adjustment instruction, the immediacy and accuracy of the torque adjustment are ensured. The torque adjustment instruction drives the system adjustment unit, improves the automation level of the entire system, reduces manual intervention, and enhances the real-time response capability, thereby realizing stable torque adjustment of the electric power-assisted bicycle in different riding environments, ensuring the smoothness and safety of the riding process. Secondly, the sway angle and sway angular velocity are accurately obtained through the data acquisition unit, providing key dynamic information, helping to monitor the posture changes of the electric power-assisted bicycle in real time during riding. The accurate acquisition of the sway angle and sway angular velocity provides high-quality input data for subsequent torque adjustment, thereby optimizing the reaction accuracy and response time of the control system. Then, by calculating the data transmission unit, the sway angle and sway angular velocity are accurately obtained, providing key dynamic information, helping to monitor the posture changes of the electric power-assisted bicycle in real time. The system optimizes data packet management during data transmission by setting a packet size threshold and splitting excess packets. This effectively avoids transmission delays or data loss caused by oversized packets, improving transmission stability and reliability. The updated transmission packet set ensures accurate information transfer and enhances the efficiency and accuracy of the entire system control process. Furthermore, the key roll angle and roll angular velocity are transmitted to the disturbance estimation unit, enabling precise assessment of the impact of external disturbances on riding posture. This external disturbance estimate provides a more refined control basis for subsequent torque calculation, thereby improving the system's adaptability and stability and effectively responding to external disturbances in different riding environments. Finally, the external disturbance estimate is used to calculate the roll angular acceleration, roll torque, and yaw torque. The control torque is calculated based on the roll and yaw torques, enabling the system control unit to respond to changes in the external environment in real time and make timely and accurate torque adjustments. Therefore, the present invention can improve the control speed and accuracy of torque adaptive control.

[0167] like Figure 2 , which is a functional module diagram of a torque adaptive control system for an electric power-assisted bicycle provided by one embodiment of the present invention.

[0168] The torque adaptive control system 100 for an electric-assisted bicycle described in the present invention can be installed in an electronic device. Depending on the functionality to be implemented, the torque adaptive control system 100 can include a sway data acquisition module 101, a transmission delay determination module 102, an interference estimation and calculation module 103, and a control torque calculation module 104. A module, also referred to as a unit, is a series of computer program segments that can be executed by an electronic device processor and perform a fixed function. These are stored in the electronic device's memory.

[0169] The roll data acquisition module 101 is configured to receive a torque adjustment instruction and activate a pre-built system adjustment unit based on the torque adjustment instruction, wherein the system adjustment unit includes a data acquisition unit, a data transmission unit, an interference estimation unit, and a data analysis unit; the data acquisition unit is used to collect the roll angle and roll angular velocity of the electric power-assisted bicycle to obtain a transmission data packet set;

[0170] The transmission delay determination module 102 is configured to determine whether the transmission delay is within a preset delay range; if the transmission delay is not within the delay range, setting a packet size threshold, filtering a transmission packet set based on the packet size threshold to obtain a standard packet set and an over-limit packet set, splitting the over-limit packets in the over-limit packet set to obtain an adjusted packet set, integrating the standard packet set and the adjusted packet set to obtain an integrated packet set, updating the transmission packet set using the integrated packet set, and returning to the above step of calculating the transmission delay of the data transmission unit using the transmission packet set;

[0171] The interference estimation calculation module 103 is configured to transmit the roll angle and roll angular velocity to the interference estimation unit and calculate an external interference estimation value if the transmission delay is within the delay range;

[0172] The control torque calculation module 104 is used to transmit the external interference estimation value to the data analysis unit using the data transmission unit and calculate the roll angle acceleration using the external interference estimation value; calculate the roll torque based on the roll angle acceleration, calculate the control torque based on the roll torque and the roll torque, and complete torque adaptive control based on the control torque.

[0173] In detail, the modules in the torque adaptive control system 100 of the electric power-assisted bicycle in the embodiment of the present invention are used in the same manner as above. Figure 1 The technical means are the same as the torque adaptive control method of the electric power-assisted bicycle described in and can produce the same technical effects, so they will not be repeated here.

[0174] like Figure 3FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a method for adaptively controlling torque of an electric power-assisted bicycle provided by an embodiment of the present invention.

[0175] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a torque adaptive control method program for an electric power-assisted bicycle.

[0176] Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Furthermore, the memory 11 also includes an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed on the electronic device 1, such as the code of the torque adaptive control method program of the electric power-assisted bicycle, but can also be used to temporarily store data that has been output or is to be output.

[0177] In some embodiments, the processor 10 may be composed of an integrated circuit, such as a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting the various components of the entire electronic device using various interfaces and lines. It executes or runs programs or modules stored in the memory 11 (such as a torque adaptive control method program for an electric power-assisted bicycle), and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0178] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0179] Figure 3 Only the electronic device with components is shown, and it can be understood by those skilled in the art that Figure 3 The structure shown does not constitute a limitation on the electronic device 1 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0180] For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for powering the various components. Preferably, the power source may be logically connected to the at least one processor 10 via a power management device, thereby implementing functions such as charging management, discharging management, and power consumption management through the power management device. The power source may further include any components such as one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, etc. The electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0181] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0182] Optionally, the electronic device 1 may further include a user interface, which may be a display or an input unit (such as a keyboard). Optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0183] The torque adaptive control method program for the electric power-assisted bicycle stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve the following:

[0184] receiving a torque adjustment instruction, and starting a pre-built system adjustment unit based on the torque adjustment instruction, wherein the system adjustment unit includes: a data acquisition unit, a data transmission unit, an interference estimation unit, and a data analysis unit;

[0185] Using the data acquisition unit to collect the side swing angle and side swing angular velocity of the electric power-assisted bicycle, and obtain a transmission data packet set;

[0186] calculating a transmission delay of the data transmission unit using the transmission data packet set;

[0187] Determining whether the transmission delay is within a preset delay range;

[0188] If the transmission delay is not within the delay range, setting a packet size threshold, filtering the transmission data packet set based on the packet size threshold to obtain a standard data packet set and an over-limit data packet set, splitting the over-limit data packets in the over-limit data packet set to obtain an adjusted data packet set, integrating the standard data packet set and the adjusted data packet set to obtain an integrated data packet set, updating the transmission data packet set using the integrated data packet set, and returning to the above step of calculating the transmission delay of the data transmission unit using the transmission data packet set;

[0189] If the transmission delay is within the delay range, transmitting the roll angle and the roll angular velocity to the interference estimation unit and calculating an external interference estimation value;

[0190] Transmitting the external disturbance estimation value to the data analysis unit using a data transmission unit and calculating the roll angular acceleration using the external disturbance estimation value;

[0191] The roll torque is calculated based on the roll angular acceleration, the yaw torque is calculated, and the control torque is calculated according to the roll torque and the yaw torque, and the torque adaptive control is completed according to the control torque.

[0192] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0193] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0194] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor of an electronic device, the computer program can implement:

[0195] receiving a torque adjustment instruction, and starting a pre-built system adjustment unit based on the torque adjustment instruction, wherein the system adjustment unit includes: a data acquisition unit, a data transmission unit, an interference estimation unit, and a data analysis unit;

[0196] Using the data acquisition unit to collect the side swing angle and side swing angular velocity of the electric power-assisted bicycle, and obtain a transmission data packet set;

[0197] calculating a transmission delay of the data transmission unit using the transmission data packet set;

[0198] Determining whether the transmission delay is within a preset delay range;

[0199] If the transmission delay is not within the delay range, setting a packet size threshold, filtering the transmission data packet set based on the packet size threshold to obtain a standard data packet set and an over-limit data packet set, splitting the over-limit data packets in the over-limit data packet set to obtain an adjusted data packet set, integrating the standard data packet set and the adjusted data packet set to obtain an integrated data packet set, updating the transmission data packet set using the integrated data packet set, and returning to the above step of calculating the transmission delay of the data transmission unit using the transmission data packet set;

[0200] If the transmission delay is within the delay range, transmitting the roll angle and the roll angular velocity to the interference estimation unit and calculating an external interference estimation value;

[0201] Transmitting the external disturbance estimation value to the data analysis unit using a data transmission unit and calculating the roll angular acceleration using the external disturbance estimation value;

[0202] The roll torque is calculated based on the roll angular acceleration, the yaw torque is calculated, and the control torque is calculated according to the roll torque and the yaw torque, and the torque adaptive control is completed according to the control torque.

[0203] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only exemplary, and actual implementations may have other division methods.

[0204] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.

[0205] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.

[0206] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0207] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for adaptively controlling torque of an electric power-assisted bicycle, characterized in that: The method comprises: receiving a torque adjustment instruction, and starting a pre-built system adjustment unit based on the torque adjustment instruction, wherein the system adjustment unit includes: a data acquisition unit, a data transmission unit, an interference estimation unit, and a data analysis unit; Using the data acquisition unit to collect the side swing angle and side swing angular velocity of the electric power-assisted bicycle, and obtain a transmission data packet set; calculating a transmission delay of the data transmission unit using the transmission data packet set; Determining whether the transmission delay is within a preset delay range; If the transmission delay is not within the delay range, setting a packet size threshold, filtering the transmission data packet set based on the packet size threshold to obtain a standard data packet set and an over-limit data packet set, splitting the over-limit data packets in the over-limit data packet set to obtain an adjusted data packet set, integrating the standard data packet set and the adjusted data packet set to obtain an integrated data packet set, updating the transmission data packet set using the integrated data packet set, and returning to the above step of calculating the transmission delay of the data transmission unit using the transmission data packet set; If the transmission delay is within the delay range, transmitting the roll angle and the roll angular velocity to the interference estimation unit and calculating an external interference estimation value; Transmitting the external disturbance estimation value to the data analysis unit using the data transmission unit and calculating the roll angular acceleration using the external disturbance estimation value; The roll torque and the yaw torque are calculated based on the roll angular acceleration, and the control torque is calculated according to the roll torque and the yaw torque, and the torque adaptive control is completed according to the control torque.

2. The torque adaptive control method for an electric power-assisted bicycle according to claim 1, wherein: The method of collecting the side swing angle and side swing angular velocity of the electric power-assisted bicycle by using the data acquisition unit includes: An inertial measurement unit is provided, wherein the inertial measurement unit includes: a gyroscope, a magnetometer, and an accelerometer; Obtaining an initial roll angle, setting a sampling frequency, sampling time, measurement time, and time step, and measuring a preliminary angular velocity using the gyroscope and measurement time; Set the time step number and calculate the total number of time steps based on the time step, sampling frequency, and sampling time. Calculate the preliminary angle using the time step, preliminary angular velocity, time step number, total number of time steps, initial yaw angle, and measurement time: Where α(t) refers to the initial angle at the measurement time t, t refers to the measurement time, α(0) refers to the initial sway angle, q refers to the time step number, w refers to the total number of time steps, β(q) refers to the initial angular velocity at the time step number q, and t1 refers to the time step length; Performing signal filtering on the preliminary angle and preliminary angular velocity to obtain a filtered angle and a filtered angular velocity, and performing angle correction on the filtered angle and the preliminary angular velocity using the accelerometer, the filtered angular velocity, and the magnetometer to obtain a corrected angle; A corrected angular velocity is calculated based on the corrected angle, and the corrected angle and the corrected angular velocity are respectively determined as the roll angle and the roll angular velocity.

3. The torque adaptive control method for an electric power-assisted bicycle according to claim 2, wherein: The filtering angle and performing angle correction using the accelerometer, the filtered angular velocity, and the magnetometer to obtain the corrected angle include: Obtain the x-axis output and y-axis output of the accelerometer, and use the x-axis output and y-axis output to calculate the accelerometer correction angle: Among them, γ1 refers to the accelerometer correction angle, arctan refers to the inverse tangent function, a y Refers to the y-axis output, a x Refers to the x-axis output; Set the filter coefficient and calculate the first correction angle based on the accelerometer correction angle, filter angle, filter angular velocity and filter coefficient: γ2=θ×(α1+β1×t1)+(1-θ)×γ1 Among them, γ2 refers to the first correction angle, θ refers to the filter coefficient, α1 refers to the filter angle, and β1 refers to the filter angular velocity; The magnetometer correction angle is calculated, a magnetic coefficient is set, a second correction angle is calculated based on the magnetometer correction angle and the magnetic coefficient, and a correction angle is calculated based on the first correction angle and the second correction angle.

4. The torque adaptive control method for an electric power-assisted bicycle according to claim 3, wherein: The calculating of the second correction angle based on the magnetometer correction angle and the magnetic coefficient, and the calculating of the correction angle based on the first correction angle and the second correction angle, comprises: The second corrected angle is calculated based on the filtered angle, filtered angular velocity, magnetometer correction angle and magnetic coefficient: Set a first correction weight and a second correction weight, and calculate a correction angle based on the first correction angle, the second correction angle, the first correction weight, and the second correction weight: γ4=μ1×γ2+μ2×γ3 Among them, γ4 refers to the correction angle, μ1 refers to the first correction weight, μ2 refers to the second correction weight, and γ3 refers to the second correction angle.

5. The torque adaptive control method for an electric power-assisted bicycle according to claim 4, characterized in that: The calculating the transmission delay of the data transmission unit by using the transmission data packet set includes: Calculating the transmission distance from the data acquisition unit to the interference estimation unit, obtaining a plurality of test data packets of different sizes, and detecting the data packet sizes of the test data packets; Sorting the test data packets in ascending order based on the data packet sizes and integrating them to obtain a test data packet set; sending the test data packets to the data transmission unit in sequence based on the test data packet set and recording the processing delay and the processing quantity; Calculate the average delay based on the processing delay, set the test duration and balance parameters, and calculate the unit processing capacity based on the processing quantity, average delay, test duration and balance parameters: Among them, Q1 refers to the unit processing capacity, δ refers to the balance parameter, W1 refers to the processing quantity, T refers to the test time, and E1 refers to the average delay; Set the distance adjustment index, transmission bandwidth, congestion adjustment coefficient and node efficiency coefficient, obtain the transmission speed, distance weight parameter, congestion weight parameter and node weight parameter, and calculate the transmission delay based on the transmission distance, data packet size, unit processing capability, distance adjustment index, transmission bandwidth, congestion adjustment coefficient, node efficiency coefficient, transmission speed, distance weight parameter, congestion weight parameter and node weight parameter.

6. The torque adaptive control method for an electric power-assisted bicycle according to claim 5, characterized in that: The calculating of the transmission delay based on the transmission distance, data packet size, unit processing capability, distance adjustment index, transmission bandwidth, congestion adjustment coefficient, node efficiency coefficient, transmission speed, distance weight parameter, congestion weight parameter and node weight parameter includes: The propagation delay is calculated using the following formula: Among them, R1 refers to the transmission delay, ρ1 refers to the distance weight parameter, d refers to the transmission distance, and v1 refers to the transmission speed. refers to the distance adjustment index, ρ2 refers to the congestion weight parameter, U refers to the packet size, u1 refers to the transmission bandwidth, τ2 refers to the congestion adjustment coefficient, ρ3 refers to the node weight parameter, and τ3 refers to the node efficiency coefficient.

7. The torque adaptive control method for an electric power-assisted bicycle according to claim 6, characterized in that: The calculating of the external interference estimation value comprises: Get the previous step angular velocity, previous step angle, and time interval, and calculate the expected angle based on the previous step angular velocity, previous step angle, and time interval: θ2=θ3+t2×s2 Where θ2 refers to the desired angle, θ3 refers to the previous step angle, t2 refers to the time interval, and s2 refers to the previous step angular velocity; Calculate the desired angular velocity, set the angle parameter and the angular velocity parameter, and calculate the external disturbance estimation value based on the desired angle, the desired angular velocity, the angle parameter, the angular velocity parameter, the roll angle, and the roll angular velocity: Among them, A1 refers to the estimated value of external interference, Refers to the angle parameter, θ1 refers to the side swing angle, Refers to the angular velocity parameter, s1 refers to the lateral angular velocity.

8. The torque adaptive control method for an electric power-assisted bicycle according to claim 7, wherein: The calculating of the roll angular acceleration by using the external disturbance estimation value includes: The external disturbance torque is calculated based on the external disturbance estimation value, and the damping torque and the moment of inertia are obtained. The yaw angular acceleration is calculated using the external disturbance torque, the damping torque and the moment of inertia: Where L refers to the lateral acceleration, Z refers to the external disturbance torque, X refers to the damping torque, and I refers to the moment of inertia.

9. The torque adaptive control method for an electric power-assisted bicycle according to claim 8, characterized in that: The calculating of the roll torque and the yaw torque based on the roll angular acceleration, and the calculating of the control torque according to the roll torque and the yaw torque, includes: Obtain the speed coefficient, vehicle speed, roll damping coefficient, and roll angle change rate, and calculate the roll torque using the rotational inertia, roll angular acceleration, speed coefficient, vehicle speed, roll angle, roll damping coefficient, and roll angle change rate: H1=I×L+k1×v2×sin(θ1)+k2×k3 Where H1 refers to the lateral torque, k1 refers to the velocity coefficient, v2 refers to the vehicle speed, sin refers to the sine function, k2 refers to the lateral damping coefficient, and k3 refers to the lateral angle change rate; Obtain vehicle mass, center of gravity height, roll angle, centrifugal height, and vehicle centrifugal force, and use vehicle mass, center of gravity height, roll angle, centrifugal height, and vehicle centrifugal force to calculate the yaw torque: H2=(m1×g×h1-F1×h2)×sin(θ4) Where H2 is the yaw torque, m1 is the vehicle mass, g is the acceleration due to gravity, h1 is the height of the center of gravity, F1 is the vehicle centrifugal force, h2 is the centrifugal height, and θ4 is the roll angle. Set the balancing parameters and calculate the control torque based on the balancing parameters, yaw torque and pitch torque: H3=η×H1+(1-η)×H2 Among them, H3 refers to the control torque and η refers to the balance parameter.

10. A torque adaptive control system for an electric power-assisted bicycle, characterized in that: The system comprises: a roll data acquisition module, configured to receive a torque adjustment command and activate a pre-built system adjustment unit based on the torque adjustment command, wherein the system adjustment unit includes a data acquisition unit, a data transmission unit, an interference estimation unit, and a data analysis unit; and utilize the data acquisition unit to collect the roll angle and roll angular velocity of the electric power-assisted bicycle and obtain a transmission data packet set; a transmission delay determination module, configured to determine whether the transmission delay is within a preset delay range; if the transmission delay is not within the delay range, setting a packet size threshold, screening a transmission packet set based on the packet size threshold to obtain a standard packet set and an over-limit packet set, splitting the over-limit packets in the over-limit packet set to obtain an adjusted packet set, integrating the standard packet set and the adjusted packet set to obtain an integrated packet set, updating the transmission packet set using the integrated packet set, and returning to the above step of calculating the transmission delay of the data transmission unit using the transmission packet set; an interference estimation calculation module, configured to transmit the roll angle and roll angular velocity to the interference estimation unit and calculate an external interference estimation value if the transmission delay is within the delay range; The control torque calculation module is used to transmit the external interference estimation value to the data analysis unit using the data transmission unit and calculate the roll angle acceleration using the external interference estimation value; calculate the roll torque based on the roll angle acceleration, calculate the control torque based on the roll torque and the roll torque, and complete torque adaptive control based on the control torque.

Citation Information

Patent Citations

  • Intelligent bicycle power assisting device

    CN113911255A

  • Bicycle power assisting safety control system and method and bicycle power assisting device

    CN118991997A