Self-adaptive electric bicycle control method and device and electronic equipment

By obtaining the real-time physiological parameters of the cyclist and the speed information of the electric bicycle, combined with the on-duty cycle of the Hall element array, and calculating the target output power of the motor, the problem that the existing electric bicycle control system cannot be personalized, improving the riding experience and efficiency.

CN120364042APending Publication Date: 2025-07-25KAIDENS ELECTRIC (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510676301.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-24
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing electric bicycle control system cannot make personalized power output adjustments based on the specific situation of the cyclist, causing the cyclist to feel tired or uncomfortable, affecting the cycling experience.

Method used

By obtaining the cyclist's real-time physiological parameters, flywheel and housing speed, and the on-duty cycle of the Hall element array, the motor's target output power is comprehensively calculated, and the motor operation is adjusted in real time to provide accurate riding assistance.

Benefits of technology

It realizes that the motor output is adjusted in real time according to the actual sports status and needs of the cyclist, providing more comfortable and efficient riding assistance, and avoiding excessive exercise or insufficient assistance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120364042A_ABST
    Figure CN120364042A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive electric bicycle control method and device and electronic equipment, and relates to the field of data processing. The method comprises the steps that real-time physiological parameters of a rider are obtained, and the real-time physiological parameters comprise the heart rate and the breathing frequency of the rider; according to the real-time physiological parameters, the exercise intensity grade of the rider is judged, and the exercise intensity grade comprises low intensity, medium intensity and high intensity; collecting a first rotating speed of a flywheel of the electric bicycle through a first sensor, and collecting a second rotating speed of a shell of the electric bicycle through a second sensor; based on the first rotating speed and the second rotating speed, the speed change rate of the rider is calculated, and the speed change rate is used for reflecting the pedaling force change of the rider; obtaining a conduction duty ratio of the Hall element array; and the target output power of the motor is calculated by integrating the exercise intensity grade, the speed change rate and the conduction duty ratio, and the motor is driven to work through the target output power. By implementing the technical scheme provided by the invention, the riding experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and particularly to an adaptive electric bicycle control method, device, and electronic device. Background Art

[0002] With the increasing urban traffic congestion and people's pursuit of a healthy lifestyle, electric bicycles, as a green and convenient means of transportation, are becoming increasingly popular among consumers. Electric bicycles can not only help users easily meet the short-distance travel needs in the city, but also reduce emissions to a certain extent, contributing to environmental protection. At the same time, with the development of technology, the performance of electric bicycles has been continuously improved and has become an indispensable part of daily commuting and leisure activities.

[0003] Currently, although electric bicycles are relatively mature in the market, most of the existing electric bicycle control systems still use traditional fixed algorithms to adjust the auxiliary power. This method cannot perform personalized adjustment of power output according to the specific situation of the rider and cannot well meet the actual needs of users. This fixed control strategy may cause the rider to feel tired or uncomfortable during actual use, thus affecting the riding experience.

[0004] Therefore, there is an urgent need for an adaptive electric bicycle control method, device, and electronic device. Summary of the Invention

[0005] This application provides an adaptive electric bicycle control method, device, and electronic device, which improves the riding experience.

[0006] In the first aspect of the present application, an adaptive electric bicycle control method is provided. The method is applied to an electric bicycle. A sleeve plate is provided on the rear wheel sprocket shaft of the electric bicycle. A first sensor and a second sensor are arranged on the sleeve plate. A Hall element array and a magnetic body are arranged on the central shaft disk of the electric bicycle. The Hall element array includes at least two Hall elements. Among them, the distance between any two adjacent Hall elements is not equal. The magnetic pole direction of the magnetic body is the same as the axial direction of the central shaft disk. When the rider pedals the pedals, the rotation of the central shaft disk causes the magnetic body to rotate accordingly, so that the magnetic body coincides with each Hall element in the Hall element array in sequence. The method includes: obtaining the real-time physiological parameters of the rider, where the real-time physiological parameters include the heart rate and breathing rate of the rider; judging the exercise intensity level of the rider according to the real-time physiological parameters, and the exercise intensity level includes low intensity, medium intensity, and high intensity; collecting the first rotation speed of the flywheel of the electric bicycle through the first sensor, and collecting the second rotation speed of the outer shell of the electric bicycle through the second sensor; calculating the speed change rate of the rider based on the first rotation speed and the second rotation speed, and the speed change rate is used to reflect the change in the rider's pedaling force; obtaining the conduction duty cycle of the Hall element array; comprehensively calculating the target output power of the motor based on the exercise intensity level, the speed change rate, and the conduction duty cycle, and driving the motor to work through the target output power.

[0007] By adopting the above technical solution, the real-time physiological parameters of the rider are obtained, the exercise intensity level is judged, combined with the flywheel rotation speed, the outer shell rotation speed of the electric bicycle, and the conduction duty cycle of the Hall element array, the target output power of the motor is comprehensively calculated and the motor is driven to work. This adaptive control method can adjust the motor output in real time according to the actual exercise state and riding needs of the rider, providing a more accurate and comfortable riding assistance. By monitoring the rider's physiological parameters and judging the exercise intensity, the physical condition and exercise load of the rider can be grasped, avoiding problems of over-exercise or insufficient assistance. At the same time, by calculating the speed change rate and the conduction duty cycle, the pedaling rhythm and force change of the rider, as well as the real-time working state of the motor, can be accurately sensed, so as to provide the optimal assistance strategy in different riding scenarios, improving the riding experience and efficiency.

[0008] Optionally, calculating the rate of change of the rider's speed based on the first rotational speed and the second rotational speed specifically includes: obtaining multiple sets of sampling data of the first rotational speed and the second rotational speed within a unit time; performing low-pass filtering on the sampling data to obtain the filtered results of the first rotational speed and the second rotational speed; based on the filtered results, using the least squares method to fit the function curves of the first rotational speed and the second rotational speed changing with time; taking the first derivative of the fitted function curves of the first rotational speed and the second rotational speed, and subtracting the first derivative corresponding to the first rotational speed from the first derivative corresponding to the second rotational speed to obtain the rate of change of speed.

[0009] By adopting the above technical solution, performing low-pass filtering, least squares curve fitting, and first derivative calculation on the sampling data can effectively eliminate high-frequency noise and random fluctuations in the rotational speed signal, and extract the true trend of speed change. The calculation result of the rate of change of speed can reflect the change of the rider's pedaling force, and is an important basis for evaluating the riding state and adjusting the motor output.

[0010] Optionally, obtaining the conduction duty cycle of the Hall element array specifically includes: within a preset sampling period, sampling the conduction states of each Hall element in the Hall element array at a preset sampling frequency to obtain the conduction time series of each Hall element; counting the number of conduction times of each Hall element within the preset sampling period, dividing the number of conduction times by the sampling frequency to obtain the conduction duration of the Hall element; arranging the conduction durations of each Hall element in the order of each Hall element in the Hall element array to obtain a conduction duration sequence; calculating the maximum value, minimum value, and average value of the conduction duration sequence, and inputting the maximum value, the minimum value, and the average value into a preset conduction duty ratio formula to obtain the conduction duty ratio of each Hall element; mapping the conduction duty ratios of each Hall element to the conduction duty ratio of the Hall element array.

[0011] By adopting the above technical solution, performing high-frequency sampling on the conduction states of the Hall elements, counting the number of conduction times and the conduction duration, and combining the maximum value, minimum value, and average value of the conduction duration sequence to obtain the conduction duty ratio of each Hall element, and finally mapping it to the conduction duty ratio of the entire Hall element array. This method can accurately evaluate the working state of the motor under different rotational speeds and loads, and provide a basis for optimizing the control strategy.

[0012] Optionally, driving the motor to operate with the target output power specifically includes: comparing the target output power of the motor with the actual output power of the motor to obtain a power deviation value, where the actual output power of the motor is detected by a power sensor disposed on the motor shaft; calculating a proportional control amount, an integral control amount, and a derivative control amount of the power deviation value; linearly combining the proportional control amount, the integral control amount, and the derivative control amount to obtain a PWM control signal of the motor, and driving the motor to operate according to the PWM control signal.

[0013] By adopting the above technical solution, the proportional control amount, the integral control amount, and the derivative control amount of the power deviation value are calculated and linearly combined to obtain a PWM control signal, thereby accurately adjusting the actual operating state of the motor to make its output power consistent with the target output power. By introducing three control methods of proportional, integral, and derivative, the system output can be adjusted on different time scales, which can not only quickly respond to input changes, but also eliminate the static error, avoid overshoot and oscillation.

[0014] Optionally, the calculation formula for comprehensively calculating the target output power of the motor based on the exercise intensity level, the speed change rate, and the conduction duty ratio is specifically: p = k * L * (1 + α * a) * (1 + β * D) where p is the target output power, k is the reference value of the motor output power, α and β are the influence coefficients of the speed change rate and the conduction duty ratio respectively, L is the exercise intensity level, a is the speed change rate, D is the conduction duty ratio, α is the influence coefficient of the speed change rate, and β is the influence coefficient of the conduction duty ratio.

[0015] By adopting the above technical solution, the influencing factors such as the exercise intensity level of the rider, the speed change rate, and the motor conduction duty ratio are comprehensively considered. Through reasonable parameter settings and weight distributions, the optimal motor output control command is obtained. The target power calculation formula can more comprehensively and accurately reflect the actual needs of the rider and the working state of the motor, realizing the optimal control of human-machine cooperation. By introducing the exercise intensity level, the auxiliary force of the motor can be adaptively adjusted according to the physical condition and exercise load of the rider, providing appropriate assistance during low-intensity cycling and greater power support during high-intensity cycling to avoid excessive fatigue of the rider. As key indicators for measuring the cycling state and the working state of the motor, the speed change rate and the conduction duty ratio can dynamically adjust the motor output by multiplying them with the exercise intensity level to adapt to the real-time pedaling rhythm and force changes of the rider, improving the response speed and control accuracy. At the same time, the reference value of the motor output power and the influence coefficients of various factors are introduced into the formula. Through the optimal design of the parameters, the motor output can be automatically adjusted in different cycling scenarios to balance the power performance and energy consumption level.

[0016] Optionally, after driving the motor to work with the target output power, the method further includes: calculating the slope angle of the electric bicycle based on the first rotation speed and the second rotation speed; determining whether the slope angle is greater than or equal to a preset slope angle threshold; if it is determined that the slope angle is greater than or equal to the preset slope angle threshold, monitoring the pedaling force and pedaling frequency of the rider, and calculating the pedaling work done by the rider per unit time according to the pedaling force and the pedaling frequency; comparing the pedaling work with a preset pedaling threshold; if it is determined that the pedaling work is greater than or equal to the preset pedaling threshold, determining that the rider is in a fatigued cycling state; in the fatigued cycling state, increasing the auxiliary output power of the motor, where the auxiliary output power is proportional to the magnitude of the slope angle and the fatigue level of the rider, and the fatigue level is determined by the ratio of the pedaling work to the preset pedaling threshold.

[0017] By adopting the above technical solution, the judgment of the slope angle and the fatigued cycling state of the rider is introduced, further optimizing the auxiliary control strategy of the motor. Through the real-time detection and judgment of the slope angle and the fatigued cycling state, the auxiliary output power of the motor can be dynamically adjusted according to the cycling difficulty and the physical condition of the rider, providing more accurate and considerate cycling assistance.

[0018] Optionally, the specific calculation formula for calculating the slope angle of the electric bicycle based on the first rotation speed and the second rotation speed is: Wherein, r is the wheel radius of the electric bicycle, w1 is the first rotational speed, w2 is the second rotational speed, g is the acceleration due to gravity, and σ is the angle between the forward direction of the electric bicycle and the horizontal direction.

[0019] By adopting the above technical solution, the influences of factors such as the wheel radius, the rotational speed of the flywheel, the rotational speed of the outer shell, the acceleration due to gravity, and the angle between the forward direction and the horizontal direction are comprehensively considered. Through trigonometric function transformation and parameter substitution, the slope condition of the current road can be accurately estimated. The difference information between the rotational speed of the flywheel and the rotational speed of the outer shell is fully utilized, the interference of external factors such as road undulation and wind resistance change is eliminated, and a more real and reliable slope estimation result is obtained.

[0020] In the second aspect of the present application, an adaptive electric bicycle control device is provided. The device includes an acquisition module and a processing module, wherein: the acquisition module is used to acquire the real-time physiological parameters of the rider, and the real-time physiological parameters include the heart rate and breathing rate of the rider; the processing module is used to judge the exercise intensity level of the rider according to the real-time physiological parameters, and the exercise intensity level includes low intensity, medium intensity, and high intensity; the acquisition module is further used to collect the first rotational speed of the flywheel of the electric bicycle through the first sensor, and collect the second rotational speed of the outer shell of the electric bicycle through the second sensor; the processing module is further used to calculate the speed change rate of the rider based on the first rotational speed and the second rotational speed, and the speed change rate is used to reflect the change in the pedaling force of the rider; the acquisition module is further used to acquire the conduction duty cycle of the Hall element array; the processing module is further used to calculate the target output power of the motor by integrating the exercise intensity level, the speed change rate, and the conduction duty cycle, and drive the motor to work through the target output power.

[0021] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method described in any one of the above.

[0022] In the fourth aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, and when the instructions are executed, the method described in any one of the above is executed.

[0023] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. Obtain the real-time physiological parameters of the cyclist, judge the exercise intensity level, and comprehensively calculate the target output power of the motor by combining the flywheel speed, housing speed of the electric bicycle, and the conduction duty cycle of the Hall element array, and drive the motor to work. This adaptive control method can adjust the motor output in real time according to the actual exercise state and riding needs of the cyclist, providing a more accurate and comfortable riding assistance. By monitoring the physiological parameters of the cyclist and judging the exercise intensity, the physical condition and exercise load of the cyclist can be grasped, avoiding problems such as over-exercise or insufficient assistance. At the same time, by calculating the speed change rate and conduction duty cycle, the pedaling rhythm and force change of the cyclist, as well as the real-time working state of the motor, can be accurately perceived, so as to provide the optimal assistance strategy in different riding scenarios, improving the riding experience and efficiency. Brief Description of the Drawings

[0024] Figure 1 is a schematic flowchart of an adaptive electric bicycle control method disclosed in an embodiment of the present application; Figure 2 is an example schematic diagram of an adaptive electric bicycle control method disclosed in an embodiment of the present application; Figure 3 is a module schematic diagram of an adaptive electric bicycle control device disclosed in an embodiment of the present application; Figure 4 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.

[0025] Description of the reference numerals: 301, acquisition module; 302, processing module; 400, electronic device; 401, processor; 402, communication bus; 403, user interface; 404, network interface; 405, memory. Detailed Embodiment

[0026] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.

[0027] In the description of the embodiments of the present application, words such as "for example" or "for illustration" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "for example" or "for illustration" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "for example" or "for illustration" is intended to present relevant concepts in a specific manner.

[0028] In the description of the embodiments of the present application, the term "plurality" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the technical features indicated. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The terms "comprise", "include", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0029] The present application provides an adaptive electric bicycle control method. Referring to Figure 1 , Figure 1 is a schematic flowchart of an adaptive electric bicycle control method provided by an embodiment of the present application. This method is applied to an electric bicycle. A sleeve plate is provided on the rear wheel sprocket shaft of the electric bicycle, and a first sensor and a second sensor are arranged on the sleeve plate, as Figure 2 shown. Figure 2 is an internal schematic diagram of the rear wheel sprocket shaft provided by the present application. The first sensor is used to collect the rotational speed of the flywheel. There are 1 to 6 speed magnets arranged on the flywheel. The rotational speed of the flywheel is obtained by the cooperation of the speed magnets and the first sensor. When the rider pedals the pedal to drive the flywheel to rotate, the speed magnets on the flywheel also rotate accordingly. Whenever a speed magnet passes by the first sensor, a pulse signal will be generated inside the sensor. In unit time, the number of pulses output by the first sensor is proportional to the rotational speed of the flywheel. Let the number of speed magnets be n, and the number of pulses output by the first sensor in Δt time be m. Then the rotational speed f1 of the flywheel can be calculated by the following formula: f1 = m / (n×Δt); by counting the number of pulses output by the first sensor and combining the number of speed magnets and the sampling time, the control system can calculate the rotational speed f1 of the flywheel in real time.

[0030] The second sensor is used to collect the rotational speed of the housing. The second sensor is fixedly installed on the frame of the rear wheel of the bicycle, close to the housing of the rear wheel hub. Similar to the first sensor, the second sensor can also be a Hall sensor or a magnetosensitive sensor. On the housing of the rear wheel hub, one or more induction marks are provided. The induction marks can be permanent magnets or other markers that can be reliably detected by the sensor, such as protrusions, grooves or reflective stickers, etc. When the bicycle is moving, the rotation of the rear wheel drives the rotation of the hub housing. Whenever the induction mark on the housing passes by the second sensor, a pulse signal will be generated inside the sensor. Let the number of induction marks on the housing be p, and the number of pulses output by the second sensor within Δt time be q, then the rotational speed f2 of the housing can be calculated by the following formula: f2 = q / (p × Δt); The control system can calculate the rotational speed f2 of the housing in real time by counting the number of pulses output by the second sensor and combining the number of induction marks and the sampling time.

[0031] Hall element arrays and magnetic bodies are arranged on the central shaft sprocket of the electric bicycle. The Hall element array includes at least two Hall elements. Among them, the distance between any two adjacent Hall elements is not equal. The magnetic pole direction of the magnetic body is the same as the axial direction of the central shaft sprocket. When the rider pedals the pedals, the rotation of the central shaft sprocket causes the magnetic body to rotate accordingly, so that the magnetic body coincides with each Hall element in the Hall element array in turn; When the rider pedals the pedals, it drives the rotation of the central shaft and the central shaft sprocket. The magnetic body fixed on the central shaft sprocket also rotates accordingly and coincides with the positions of the Hall elements in the Hall element array in turn. When the magnetic pole of the magnetic body coincides with the Hall element, it will conduct the motor switch circuit connected to the Hall element, so that the motor rotates at a certain conduction duty cycle. As the central shaft sprocket continues to rotate, the magnetic body will coincide with different Hall elements in turn, conducting different motor switch circuits, so that the motor rotates at different conduction duty cycles. The distances between two adjacent Hall elements in the Hall element array are not equal. The purpose of this design is to make the conduction duty cycle increase as the rotational speed of the central shaft sprocket increases. When the pedaling frequency increases, the rotational speed of the central shaft sprocket will increase, the time for the magnetic body to coincide with the Hall element will be shortened, and the conduction duty cycle will increase accordingly, so that the output power of the motor increases as the pedaling frequency increases, providing stronger assistance for the rider.

[0032] This method includes steps S101 to S106, and the above steps are as follows: Step S101: Obtain the real-time physiological parameters of the rider. The real-time physiological parameters include the heart rate and breathing rate of the rider.

[0033] In step S101, the electric bicycle obtains the real-time physiological parameters of the rider, including the rider's heart rate and respiratory rate. To achieve this function, the electric bicycle can integrate a heart rate sensor and a respiratory sensor on the handlebar. The heart rate sensor can adopt a photoplethysmogram sensor, which measures the heart rate by detecting the volume change of the microvessels at the fingertips when the rider holds the handlebar. When the rider's heart rate increases, the frequency of the microvascular volume pulsation also increases accordingly, and the heart rate sensor can calculate the rider's real-time heart rate by analyzing the frequency of the pulse wave signal.

[0034] The respiratory sensor can adopt a piezoresistive respiratory sensor, which is generally made of conductive rubber or conductive foam material and can be embedded in the grip of the handlebar. When the rider holds the handlebar, the respiratory sensor will be closely attached to the rider's palm. When the rider breathes, the ups and downs of the chest and abdomen will be transmitted to the palm through the upper limbs, causing the deformation of the respiratory sensor, resulting in a periodic change in its resistance value. By measuring the change frequency of the resistance value of the respiratory sensor, the rider's real-time respiratory rate can be obtained.

[0035] For example, assume that the heart rate sensor outputs a heart rate value every 1 second, and the heart rate values output continuously 5 times are 75, 78, 80, 82, and 85 respectively. Then it can be considered that the average heart rate of the rider within these 5 seconds is (75 + 78 + 80 + 82 + 85) / 5 = 80 beats per minute. Similarly, assume that the respiratory sensor counts the respiratory rate every 10 seconds, and the respiratory rates counted continuously 3 times are 15, 18, and 16 beats per minute respectively. Then it can be considered that the average respiratory rate of the rider within these 30 seconds is (15 + 18 + 16) / 3 ≈ 16 beats per minute. The control system of the electric bicycle will receive the data of the heart rate sensor and the respiratory sensor in real time and perform a moving average to obtain a relatively stable change trend of the rider's physiological parameters.

[0036] Step S102: According to the real-time physiological parameters, judge the exercise intensity level of the rider. The exercise intensity level includes low intensity, medium intensity, and high intensity.

[0037] In step S102, the control system of the electric bicycle first calculates the maximum heart rate (HR max ) and resting heart rate (HR rest ) of the rider according to information such as the rider's age, gender, height, and weight. The maximum heart rate can be estimated by the formula "HR max = 220 - age", and the resting heart rate can be measured by the heart rate sensor when the rider sits still and rests. The electric bicycle will calculate the heart rate reserve percentage (HRR%) of the rider in real time. The heart rate reserve refers to the percentage of the difference between the rider's current heart rate and the resting heart rate in the difference between the maximum heart rate and the resting heart rate. The calculation formula is: HRR % = (HRcurrent -HR rest ) / (HR max -HR rest )×100%, where HR current represents the real-time heart rate of the cyclist.

[0038] When HRR % <40%, it is considered that the cyclist is in a low-intensity exercise state; when 40% ≤ HRR% < 70%, it is considered that the cyclist is in a medium-intensity exercise state; when HRR% ≥ 70%, it is considered that the cyclist is in a high-intensity exercise state. The control system of the electric bicycle will judge the exercise intensity level of the cyclist in real time according to the above criteria.

[0039] For example, assume a 30-year-old male cyclist with a resting heart rate of 60 beats per minute, then his maximum heart rate is estimated to be 220 - 30 = 190 beats per minute. During cycling, if his real-time heart rate is 120 beats per minute, then his current heart rate reserve percentage is (120 - 60) / (190 - 60)×100% = 46.2%, and he is in a medium-intensity exercise state. If his real-time heart rate increases to 160 beats per minute, then the heart rate reserve percentage is (160 - 60) / (190 - 60)×100% = 76.9%, and he is already in a high-intensity exercise state.

[0040] Step S103: Collect the first rotation speed of the flywheel of the electric bicycle through the first sensor, and collect the second rotation speed of the outer shell of the electric bicycle through the second sensor.

[0041] In step S103, the electric bicycle collects the rotation speed of the flywheel through the first sensor installed on the rear wheel sprocket shaft. The first sensor can be selected from a Hall sensor or a magnetosensitive sensor, and it is used in cooperation with the speed magnet on the flywheel. The speed magnet is a small permanent magnet, and the number can be set to 1 to 6 pieces according to needs. When the cyclist pedals the pedal, the flywheel starts to rotate, and the speed magnet on the flywheel also rotates accordingly. Whenever a speed magnet passes by the first sensor, a pulse signal will be generated inside the sensor. The control system of the electric bicycle can calculate the real-time rotation speed of the flywheel by counting the number of pulses output by the first sensor within a unit time and combining the number of speed magnets.

[0042] For example, assume that 3 speed magnets are installed on the flywheel, and the first sensor outputs a total of 30 pulses within 0.1 second, then the rotation speed f1 of the flywheel can be calculated as: f1 = 30 / (3×0.1) = 1000 revolutions per minute. This means that the flywheel rotates 1000 circles in one minute. The control system will continuously collect the output pulses of the first sensor and regularly update the calculation result of the flywheel rotation speed, so as to master the change of the flywheel rotation speed in real time.

[0043] Secondly, the electric bicycle collects the rotation speed of the outer shell through a second sensor installed on the rear wheel frame. The second sensor is similar to the first sensor and can also be a Hall sensor or a magnetosensitive sensor. However, different from the first sensor, the second sensor is stationary and measures the rotation speed of the outer shell by detecting the induction marks on the outer shell of the rear wheel hub. The induction marks can be permanent magnets, protrusions, grooves, reflective stickers, etc., and the number can be set to one or more according to needs. When the electric bicycle is running, the rotation of the rear wheel drives the rotation of the hub outer shell. Whenever the induction mark on the outer shell passes by the second sensor, a pulse signal will be generated inside the sensor. The control system can calculate the real-time rotation speed of the outer shell by counting the number of pulses output by the second sensor within a unit time and combining the number of induction marks.

[0044] For example, assume that 2 induction marks are installed on the outer shell, and the second sensor outputs a total of 10 pulses within 0.2 seconds. Then the rotation speed f2 of the outer shell can be calculated as: f2 = 10 / (2 × 0.2) = 25 revolutions per second. This means that the outer shell rotates 25 circles in one second. The control system will continuously collect the output pulses of the second sensor and regularly update the calculation result of the outer shell rotation speed, so as to grasp the change of the outer shell rotation speed in real time.

[0045] Step S104: Calculate the speed change rate of the rider based on the first rotation speed and the second rotation speed, and the speed change rate is used to reflect the change of the rider's pedaling force.

[0046] In step S104, calculating the speed change rate of the rider based on the first rotation speed and the second rotation speed specifically includes: obtaining multiple groups of sampling data of the first rotation speed and the second rotation speed within a unit time; performing low-pass filtering on the sampling data to obtain the filtered results of the first rotation speed and the second rotation speed; based on the filtered results, using the least squares method to fit the function curves of the first rotation speed and the second rotation speed changing with time; taking the first derivative of the fitted function curves of the first rotation speed and the second rotation speed, and subtracting the first derivative corresponding to the first rotation speed from the first derivative corresponding to the second rotation speed to obtain the speed change rate.

[0047] Specifically, the control system of the electric bicycle will continuously collect multiple groups of sample data of the first rotation speed and the second rotation speed within a short time period (such as 0.5 seconds). These sample data may be affected by factors such as road surface bumps and sensor noise, resulting in some random fluctuations. To eliminate the influence of these fluctuations on the calculation of the speed change rate, the control system performs low-pass filtering on the collected rotation speed sample data. Low-pass filtering can filter out high-frequency noise and extract the low-frequency trend signal in the rotation speed data. The low-pass filtering algorithm can be moving average filtering, Butterworth filtering, etc. Through low-pass filtering, relatively smooth sequences of the first rotation speed and the second rotation speed can be obtained.

[0048] Next, the control system will use the least squares method to fit the function curve of the filtered first speed and second speed sequence. The least squares method can be understood as a data fitting method, which finds the parameters of the best fitting curve by minimizing the sum of squares of the errors between the fitting curve and the actual data points. Here, the control system will assume that the function curve of the first speed and the second speed changing with time is a low-order polynomial (such as a quadratic function or a cubic function), and then solve the coefficients of the polynomial by the least squares method. The fitted function curve can better describe the changing trend of the first speed and the second speed.

[0049] Finally, the control system will calculate the first-order derivative of the fitted function curves of the first speed and the second speed to obtain the two speed change rate curves. The first-order derivative reflects the speed of change of the function value, which corresponds to the speed change rate. Subtracting the first speed change rate curve from the second speed change rate curve, you can get the speed change rate curve. The positive and negative and size of the speed change rate reflect the change in the rider's pedaling force.

[0050] For example, assume that the flywheel speeds obtained at time t1 and t2 are f1(t1) and f1(t2), respectively, and the shell speeds are f2(t1) and f2(t2), respectively. Through low-pass filtering and curve fitting, the function curves of the flywheel speed and shell speed changing with time are obtained as f1(t) and f2(t). The first-order derivatives of these two function curves are obtained to obtain the flywheel speed change rate f1'(t) and the shell speed change rate f2'(t). Then the speed change rate at time t can be expressed as: v'(t) = f1'(t)-f2'(t). If v'(t)>0, it means that the increase in the flywheel speed is greater than the shell speed, and the rider's pedaling force is increasing; if v'(t)<0, it means that the rider's pedaling force is decreasing. The larger the absolute value of v'(t), the more drastic the change in the rider's pedaling force.

[0051] Step S105: Obtaining the conduction duty cycle of the Hall element array.

[0052] In step S105, obtaining the conduction duty cycle of the Hall element array specifically includes: within a preset sampling period, sampling the conduction states of each Hall element in the Hall element array at a preset sampling frequency to obtain the conduction time series of each Hall element; counting the number of conduction times of each Hall element within the preset sampling period, dividing the number of conduction times by the sampling frequency to obtain the conduction duration of the Hall element; arranging the conduction durations of each Hall element in the order of the Hall elements in the Hall element array to obtain a conduction duration sequence; calculating the maximum value, minimum value, and average value of the conduction duration sequence, and inputting the maximum value, minimum value, and average value into a preset conduction duty ratio formula to obtain the conduction duty ratio of each Hall element; mapping the conduction duty ratios of each Hall element to the conduction duty ratio of the Hall element array.

[0053] Specifically, the control system of the electric bicycle will continuously sample the conduction states of each Hall element in the Hall element array within a preset sampling period (for example, 100 milliseconds) at a fixed sampling frequency (for example, 1000 Hertz). The Hall element can be regarded as a switch, which conducts (the switch closes) when it coincides with the magnetic body, and otherwise disconnects (the switch opens). Through high-frequency sampling, the control system can accurately capture the conduction and disconnection moments of each Hall element and record the corresponding timestamps. After a sampling period ends, the control system will obtain a sequence of the conduction states of each Hall element changing with time, that is, the conduction time series.

[0054] Next, the control system will count the number of conduction times of each Hall element within the sampling period. The number of conduction times reflects the number of times the magnetic body coincides with the Hall element within the sampling period. Dividing the number of conduction times by the sampling frequency can obtain the conduction duration of the Hall element within the sampling period. The conduction duration represents the cumulative time that the Hall element is in the conduction state throughout the sampling period.

[0055] Then, the control system will arrange the conduction durations of each Hall element in sequence according to their order in the Hall element array to form a conduction duration sequence. This sequence reflects the conduction time distribution of the elements at different positions in the Hall element array. Since the spacing between adjacent two elements in the Hall element array is unequal, the values in the conduction duration sequence will also show a certain trend of change.

[0056] To convert the conduction duration sequence into the conduction duty cycle, the control system calculates the maximum value, minimum value, and average value of the conduction duration sequence. The maximum value corresponds to the Hall element with the longest conduction time, the minimum value corresponds to the Hall element with the shortest conduction time, and the average value reflects the average conduction duration of the entire Hall element array. Substituting the maximum value, minimum value, and average value into the preset conduction duty cycle formula, the conduction duty cycle of each Hall element within the sampling period can be calculated. The conduction duty cycle formula can be designed according to the characteristics of the motor and control requirements. The general form is: Duty cycle = (Conduction duration - Minimum value) / (Maximum value - Minimum value). This formula maps the conduction duration to the interval [0, 1], obtaining a normalized conduction duty cycle value.

[0057] Finally, the control system combines the conduction duty cycles of each Hall element into the overall conduction duty cycle of the Hall element array. The overall conduction duty cycle can take the average value of the duty cycles of each Hall element, or different weight coefficients can be set according to needs. The magnitude of the overall conduction duty cycle determines the output power of the motor in the current state. The larger the conduction duty cycle, the greater the output power of the motor, and vice versa.

[0058] For example, assume that an electric bicycle uses a Hall element array containing 5 Hall elements, with a sampling period of 100 milliseconds and a sampling frequency of 1000 Hertz. Within one sampling period, the conduction times of the 5 Hall elements are 30 times, 35 times, 40 times, 38 times, and 34 times respectively. Then their conduction durations are 30ms, 35ms, 40ms, 38ms, and 34ms respectively, and the conduction duration sequence is [30, 35, 40, 38, 34]. The maximum value of this sequence is 40, the minimum value is 30, and the average value is 35.4. Substituting into the conduction duty cycle formula, the conduction duty cycles of the 5 Hall elements can be obtained as 0, 0.5, 1, 0.8, and 0.4 respectively. Taking the average value of these 5 duty cycles, the overall conduction duty cycle of the Hall element array can be obtained as 0.54.

[0059] Step S106: Synthesize the exercise intensity level, speed change rate, and conduction duty cycle, calculate the target output power of the motor, and drive the motor to work through the target output power.

[0060] In step S106, the specific calculation formula for synthesizing the exercise intensity level, speed change rate, and conduction duty cycle to calculate the target output power of the motor is: p = k * L * (1 + α * a) * (1 + β * D) Where, p is the target output power, k is the reference value of the motor output power, α and β are the influence coefficients of the speed change rate and conduction duty cycle respectively, L is the exercise intensity level, a is the speed change rate, D is the conduction duty cycle, α is the influence coefficient of the speed change rate, and β is the influence coefficient of the conduction duty cycle.

[0061] Drive the motor to work through the target output power, specifically including: comparing the target output power of the motor with the actual output power of the motor to obtain a power deviation value, where the actual output power of the motor is detected by a power sensor arranged on the motor shaft; calculating the proportional control amount, integral control amount, and derivative control amount of the power deviation value; linearly combining the proportional control amount, integral control amount, and derivative control amount to obtain the PWM control signal of the motor, and driving the motor to work according to the PWM control signal.

[0062] Specifically, the control system of the electric bicycle will calculate the target output power of the motor based on the above formula. This formula takes into account the influence of three key factors on the motor output, namely the exercise intensity level (L), the speed change rate (a), and the conduction duty cycle (D). Among them, the exercise intensity level reflects the current exercise load level of the rider and can be evaluated according to physiological parameters such as the rider's heart rate and breathing rate; the speed change rate reflects the change in the rider's pedaling force and can be calculated by the difference between the flywheel speed and the housing speed; the conduction duty cycle reflects the output ability of the motor in the current state and can be estimated by the conduction duration of the Hall element array.

[0063] When calculating the target output power, the formula introduces a reference power value k, which represents the rated output power of the motor in the standard state. Then, the formula uses two factors (1 + αa) and (1 + βD) to describe the influence degree of the speed change rate and the conduction duty cycle on the motor output respectively. Among them, α and β are two influence coefficients, and their magnitudes determine the importance of the speed change rate and the conduction duty cycle. By adjusting the values of α and β, the electric bicycle can provide a more flexible and adaptable assistive output in different riding scenarios. Finally, the formula uses the exercise intensity level L as an overall adjustment factor to control the overall level of the motor output power. The larger the L value, the higher the current exercise intensity of the rider, and the greater the output power the motor needs to provide to provide assistance.

[0064] For example, assume that a rider's exercise intensity level is 3 (medium intensity), the speed change rate is 0.2 (accelerating), and the conduction duty cycle is 0.6 (medium-high output). The reference power of the motor is 200 watts, and the values of α and β are 0.5 and 0.8 respectively. Then, according to the formula, the target output power of the motor is: p = 200×3×(1 + 0.5×0.2)×(1 + 0.8×0.6) = 200×3×1.1×1.48 = 976.8 watts. This output power is equivalent to 4.88 times the reference power, indicating that the electric bicycle needs to provide a large amount of assistance to meet the current riding needs of the rider.

[0065] Once the target output power of the motor is calculated, the control system will compare it with the actual output power of the motor to obtain a power deviation value. The actual output power of the motor can be measured in real time by a power sensor installed on the motor shaft. The power deviation value reflects the gap between the current output of the motor and the target output. The control system will use the PID control algorithm to adjust the working state of the motor according to this deviation value, so that its output power is as close as possible to the target value.

[0066] The PID control algorithm consists of three parts: proportional control, integral control, and derivative control. Among them, proportional control determines the amplitude of the control quantity according to the size of the deviation value. The larger the deviation, the larger the control quantity; integral control eliminates the static error according to the cumulative value of the deviation value, so that the motor output is stabilized near the target value; derivative control predicts the future deviation trend according to the change rate of the deviation value, improving the response speed of the system. By weighted summing the three control quantities, the control system can obtain a comprehensive control signal, that is, the PWM (pulse width modulation) signal. The duty cycle of the PWM signal determines the actual output power of the motor. The control system applies the PWM signal to the drive circuit of the motor, thereby precisely controlling the speed and torque of the motor to make its output power consistent with the target value.

[0067] In a possible implementation manner, after step S106, the method further includes: calculating the slope angle of the electric bicycle based on the first rotation speed and the second rotation speed; determining whether the slope angle is greater than or equal to a preset slope angle threshold; if it is determined that the slope angle is greater than or equal to the preset slope angle threshold, monitoring the pedaling force and pedaling frequency of the rider, and calculating the pedaling work done by the rider per unit time according to the pedaling force and pedaling frequency; comparing the pedaling work with a preset pedaling threshold; if it is determined that the pedaling work is greater than or equal to the preset pedaling threshold, determining that the rider is in a fatigued riding state; in the fatigued riding state, increasing the auxiliary output power of the motor, and the auxiliary output power is proportional to the size of the slope angle and the fatigue level of the rider, and the fatigue level is determined by the ratio of the pedaling work to the preset pedaling threshold.

[0068] Specifically, the electric bicycle calculates the current slope angle based on the first rotational speed (flywheel rotational speed) and the second rotational speed (housing rotational speed). Generally, on an uphill section, due to the effect of gravity, the flywheel rotational speed will be significantly greater than the housing rotational speed. By comparing the difference between the two rotational speeds and combining parameters such as the wheel radius and gravitational acceleration, the electric bicycle can estimate the current slope angle. The larger the slope angle, the steeper the current uphill section. Then, the electric bicycle determines whether the calculated slope angle is greater than or equal to a preset slope angle threshold. The preset slope angle threshold can be set according to factors such as the rider's physical condition and riding habits, for example, 15 degrees or 20 degrees. If the slope angle exceeds the preset slope angle threshold, it means that the current uphill section is relatively challenging for the rider, and the rider may feel strenuous or fatigued.

[0069] After determining that the slope angle exceeds the preset slope angle threshold, the electric bicycle starts to monitor the rider's pedaling force and pedaling frequency. The pedaling force can be measured by a pressure sensor on the pedal, and the pedaling frequency can be calculated by a Hall element array or other rotational speed sensors. The electric bicycle calculates the pedaling work done by the rider per unit time based on the pedaling force and pedaling frequency. The pedaling work done reflects the actual pedaling output power of the rider, which is proportional to the product of the pedaling force and the pedaling frequency.

[0070] Then, the electric bicycle compares the calculated pedaling work done with a preset pedaling threshold. The preset pedaling threshold can be set according to factors such as the rider's age, weight, and athletic ability, representing the reasonable range of pedaling work done by the rider in a normal riding state. If the actual pedaling work done is greater than or equal to the preset pedaling threshold, it means that the rider's current pedaling output power is relatively high, and the rider may be in a state of fatigued riding.

[0071] Once it is determined that the rider is in a state of fatigued riding, the electric bicycle automatically increases the auxiliary output power of the motor to provide more power support for the rider. The magnitude of the auxiliary output power takes into account the slope angle and the rider's fatigue level. On the one hand, the larger the slope angle, the greater the auxiliary output power the motor needs to provide to help the rider overcome greater ramp resistance. On the other hand, the higher the rider's fatigue level, the more power compensation the motor also needs to provide. The fatigue level can be measured by the ratio of the rider's current pedaling work done to the preset pedaling threshold. The larger the ratio, the more fatigued the rider is and the more motor assistance is needed.

[0072] For example, assume that the electric bicycle detects that the current slope angle is 20 degrees, exceeding the preset slope angle threshold of 15 degrees. At the same time, it is monitored that the pedaling work done by the rider is 120 watts, while the preset pedaling work threshold is 100 watts. Then the fatigue level of the rider can be calculated as 120 / 100 = 1.2, which belongs to moderate fatigue. In this case, the electric bicycle may increase the auxiliary output power of the motor to about 1.5 times the usual level to adapt to the larger slope angle and the rider's fatigue level. If the rider's fatigue level further increases to 1.5 or 2.0, the electric bicycle will correspondingly increase the motor auxiliary output power to 2 times or 2.5 times the usual level to meet the actual needs of the rider.

[0073] In a possible implementation manner, the specific calculation formula for calculating the slope angle of the electric bicycle based on the first rotational speed and the second rotational speed is: where r is the wheel radius of the electric bicycle, w1 is the first rotational speed, w2 is the second rotational speed, g is the acceleration due to gravity, and σ is the angle between the forward direction of the electric bicycle and the horizontal direction.

[0074] Specifically, the electric bicycle obtains the values of several key parameters, including the wheel radius r, the first rotational speed w1, the second rotational speed w2, the acceleration due to gravity g, and the angle σ between the forward direction and the horizontal direction. Among them, the wheel radius r is a fixed value that can be calibrated when the electric bicycle leaves the factory; the first rotational speed w1 and the second rotational speed w2 can be measured in real time by a speed measuring device such as a Hall sensor or an encoder; the acceleration due to gravity g is a constant, and its value near the Earth's surface is approximately 9.8 m / s 2 ; the angle σ between the forward direction and the horizontal direction can be measured by an attitude sensor such as an electronic compass or a gyroscope.

[0075] Then, the control system of the electric bicycle will substitute the obtained parameters into the formula for calculation. The physical principle of the formula is based on the law of conservation of angular momentum, that is, during the uniform forward movement of the electric bicycle, the angular momentum of the wheel remains unchanged. When the electric bicycle is traveling on a slope, due to the conversion of gravitational potential energy, the angular velocity of the wheel will change, resulting in a difference between the first rotational speed and the second rotational speed. By comparing the difference between the first rotational speed and the second rotational speed and combining other parameters, the current slope angle can be estimated.

[0076] Specifically, in the formula, r·w2 represents the linear velocity of the outer shell, and r·w1 represents the linear velocity of the flywheel. Their difference r·w2 - r·w1 reflects the speed change caused by the conversion of gravitational potential energy into kinetic energy when traveling on a slope. This speed difference is equal to the product of the gravitational acceleration g and the tangent value of the slope angle tanθ. At the same time, since the electric bicycle may be inclined to a certain extent during forward movement, the included angle σ between the forward direction and the horizontal direction will also affect the speed difference. Therefore, the formula introduces cosσ in the denominator term as a correction factor to compensate for the influence of the inclination angle.

[0077] Finally, by taking the arctangent of the ratio of the speed difference to (g·cosσ), the current slope angle θ can be obtained. The function of the arctangent function arctan is to convert the ratio into an angle value, and the unit of its result is radians. If it is necessary to convert radians into degrees, the conversion factor of 180 / π can be multiplied again.

[0078] The control system can determine the auxiliary output power of the motor according to this slope angle, combined with other riding parameters, to provide appropriate power compensation for the rider. The electric bicycle can determine the value of the auxiliary output power through a preset auxiliary power table, and the preset auxiliary power table includes the corresponding relationship between the slope angle and the auxiliary output power.

[0079] Referring to Figure 3 , this application also provides an adaptive electric bicycle control device, which is an electric bicycle. The electric bicycle includes an acquisition module 301 and a processing module 302, where: The acquisition module 301 is used to acquire the real-time physiological parameters of the rider, and the real-time physiological parameters include the heart rate and breathing frequency of the rider; The processing module 302 is used to judge the exercise intensity level of the rider according to the real-time physiological parameters, and the exercise intensity level includes low intensity, medium intensity, and high intensity; The acquisition module 301 is also used to collect the first rotation speed of the flywheel of the electric bicycle through the first sensor, and collect the second rotation speed of the outer shell of the electric bicycle through the second sensor; The processing module 302 is also used to calculate the speed change rate of the rider based on the first rotation speed and the second rotation speed, and the speed change rate is used to reflect the change in the pedaling force of the rider; The acquisition module 301 is also used to acquire the conduction duty ratio of the Hall element array; The processing module 302 is also used to comprehensively calculate the target output power of the motor based on the exercise intensity level, the speed change rate, and the conduction duty ratio, and drive the motor to work through the target output power.

[0080] In a possible implementation, the processing module 302 calculates the rate of change of the rider's speed based on the first rotational speed and the second rotational speed. Specifically, it includes: the acquisition module 301 acquires multiple sets of sampling data of the first rotational speed and the second rotational speed within a unit time; the processing module 302 performs low-pass filtering on the sampling data to obtain the filtered results of the first rotational speed and the second rotational speed; the processing module 302, based on the filtered results, uses the least squares method to fit the function curves of the first rotational speed and the second rotational speed changing with time; the processing module 302 takes the first derivative of the fitted function curves of the first rotational speed and the second rotational speed, and subtracts the first derivative corresponding to the second rotational speed from the first derivative corresponding to the first rotational speed to obtain the rate of change of speed.

[0081] In a possible implementation, the acquisition module 301 acquires the conduction duty ratio of the Hall element array. Specifically, it includes: the acquisition module 301 samples the conduction states of each Hall element in the Hall element array at a preset sampling frequency within a preset sampling period to obtain the conduction time series of each Hall element; the processing module 302 counts the number of conduction times of each Hall element within the preset sampling period, divides the number of conduction times by the sampling frequency to obtain the conduction duration of the Hall element; the processing module 302 arranges the conduction durations of each Hall element in the order of the Hall elements in the Hall element array to obtain a conduction duration sequence; the processing module 302 calculates the maximum value, minimum value, and average value of the conduction duration sequence, and inputs the maximum value, minimum value, and average value into a preset conduction duty ratio formula to obtain the conduction duty ratio of each Hall element; the processing module 302 maps the conduction duty ratios of each Hall element to the conduction duty ratio of the Hall element array.

[0082] In a possible implementation, the processing module 302 drives the motor to work through the target output power. Specifically, it includes: the processing module 302 compares the target output power of the motor with the actual output power of the motor to obtain a power deviation value, where the actual output power of the motor is detected by a power sensor arranged on the motor shaft; the processing module 302 calculates the proportional control amount, integral control amount, and derivative control amount of the power deviation value; the processing module 302 linearly combines the proportional control amount, integral control amount, and derivative control amount to obtain the PWM control signal of the motor, and drives the motor to work according to the PWM control signal.

[0083] In a possible implementation, the calculation formula for calculating the target output power of the motor by integrating the exercise intensity level, the rate of change of speed, and the conduction duty ratio is specifically: p = k * L * (1 + α * a) * (1 + β * D) Wherein, p is the target output power, k is the reference value of the motor output power, α and β are the influence coefficients of the speed change rate and the conduction duty cycle respectively, L is the exercise intensity level, a is the speed change rate, D is the conduction duty cycle, α is the influence coefficient of the speed change rate, and β is the influence coefficient of the conduction duty cycle.

[0084] In a possible implementation manner, after the processing module 302 drives the motor to work through the target output power, the method further includes: the processing module 302 calculates the slope angle of the electric bicycle based on the first rotational speed and the second rotational speed; the processing module 302 determines whether the slope angle is greater than or equal to a preset slope angle threshold; if the processing module 302 determines that the slope angle is greater than or equal to the preset slope angle threshold, the processing module 302 monitors the pedaling force and pedaling frequency of the rider, and calculates the pedaling work done by the rider per unit time according to the pedaling force and pedaling frequency; the processing module 302 compares the pedaling work with a preset pedaling threshold; if the processing module 302 determines that the pedaling work is greater than or equal to the preset pedaling threshold, it is determined that the rider is in a fatigued riding state; in the fatigued riding state, the processing module 302 increases the auxiliary output power of the motor, and the auxiliary output power is proportional to the magnitude of the slope angle and the fatigue level of the rider, and the fatigue level is determined by the ratio of the pedaling work to the preset pedaling threshold.

[0085] In a possible implementation manner, the specific calculation formula for calculating the slope angle of the electric bicycle based on the first rotational speed and the second rotational speed is: Wherein, r is the wheel radius of the electric bicycle, w1 is the first rotational speed, w2 is the second rotational speed, g is the acceleration due to gravity, and σ is the angle between the forward direction of the electric bicycle and the horizontal direction.

[0086] It should be noted that: when the device provided in the above embodiments realizes its functions, only the division of the above function modules is used for illustration. In actual applications, the above functions can be allocated to different function modules according to needs, that is, the internal structure of the device is divided into different function modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be seen in the method embodiments, which will not be repeated here.

[0087] This application also provides an electronic device. Refer to Figure 4 , Figure 4 is a schematic structural diagram of an electronic device provided in an embodiment of this application. The electronic device 400 may include: at least one processor 401, at least one network interface 404, a user interface 403, a memory 405, and at least one communication bus 402.

[0088] Among them, the communication bus 402 is used to realize the connection and communication between these components.

[0089] Among them, the user interface 403 may include a display screen and a camera. Optionally, the user interface 403 may further include a standard wired interface and a wireless interface.

[0090] Among them, the network interface 404 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface).

[0091] Among them, the processor 401 may include one or more processing cores. The processor 401 connects various parts within the entire server through various interfaces and circuits. By running or executing instructions, programs, code sets or instruction sets stored in the memory 405, and by calling the data stored in the memory 405, it executes various functions of the server and processes data. Optionally, the processor 401 may be implemented in at least one of the hardware forms of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 401 may integrate one or several combinations of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 401 and may be implemented separately through a single chip.

[0092] Among them, the memory 405 may include a Random Access Memory (RAM), or may also include a Read-Only Memory. Optionally, the memory 405 includes a non-transitory computer-readable storage medium. The memory 405 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 405 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments. Optionally, the memory 405 may also be at least one storage device located far from the aforementioned processor 401. Refer to Figure 4 In the memory 405, as a computer storage medium, an operating system, a network communication module, a user interface module, and an application program of an adaptive electric bicycle control method may be included.

[0093] In Figure 4 In the electronic device 400 shown, the user interface 403 is mainly used to provide an input interface for the user to obtain user input data; and the processor 401 can be used to call an application program of an adaptive electric bicycle control method stored in the memory 405. When executed by one or more processors 401, the electronic device 400 is caused to execute one or more of the methods as described in the above embodiments. It should be noted that for the foregoing method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0094] The present application also provides a computer-readable storage medium storing instructions. When executed by one or more processors 401, the electronic device 400 is caused to execute one or more of the methods as described in the above embodiments.

[0095] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0096] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection to each other can be through some service interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.

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

[0098] In addition, the functional units in each embodiment of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present application. And the aforementioned memory includes: various media such as USB flash drives, mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0100] The above are only exemplary embodiments of the present disclosure and should not be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. Those skilled in the art will easily think of other implementation schemes of the present disclosure after considering the specification and the disclosure of the practical truth.

[0101] The present application aims to cover any variations, uses, or adaptive changes of the present disclosure. These variations, uses, or adaptive changes follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and the embodiments are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. An adaptive electric bicycle control method, characterized in that, The method is applied to an electric bicycle. A sleeve plate is provided on the rear wheel sprocket shaft of the electric bicycle. A first sensor and a second sensor are arranged on the sleeve plate. A Hall element array and a magnetic body are arranged on the central shaft disk of the electric bicycle. The Hall element array includes at least two Hall elements. The distance between any two adjacent Hall elements is not equal. The magnetic pole direction of the magnetic body is the same as the axial direction of the central shaft disk. When the rider pedals the pedal, the rotation of the central shaft disk causes the magnetic body to rotate accordingly, so that the magnetic body coincides with each Hall element in the Hall element array in sequence. The method includes: Obtain the real-time physiological parameters of the rider, where the real-time physiological parameters include the rider's heart rate and breathing rate; Judge the exercise intensity level of the rider according to the real-time physiological parameters. The exercise intensity level includes low intensity, medium intensity, and high intensity; Collect the first rotation speed of the flywheel of the electric bicycle through the first sensor, and collect the second rotation speed of the outer shell of the electric bicycle through the second sensor; Calculate the speed change rate of the rider based on the first rotation speed and the second rotation speed. The speed change rate is used to reflect the change in the rider's pedaling force; Obtain the conduction duty ratio of the Hall element array; Calculate the target output power of the motor by integrating the exercise intensity level, the speed change rate, and the conduction duty ratio, and drive the motor to work through the target output power.

2. The method according to claim 1, wherein The calculating the speed change rate of the rider based on the first rotation speed and the second rotation speed specifically includes: Obtain multiple groups of sampling data of the first rotation speed and the second rotation speed within a unit time; Perform low-pass filtering on the sampling data to obtain the filtered results of the first rotation speed and the second rotation speed; Based on the filtered results, use the least squares method to fit the function curves of the first rotation speed and the second rotation speed changing with time; Take the first derivative of the function curves of the first rotation speed and the second rotation speed obtained by fitting, and subtract the first derivative corresponding to the first rotation speed from the first derivative corresponding to the second rotation speed to obtain the speed change rate.

3. The method according to claim 1, wherein The obtaining the conduction duty ratio of the Hall element array specifically includes: Within a preset sampling period, sample the conduction states of each Hall element in the Hall element array at a preset sampling frequency to obtain the conduction time series of each Hall element; Count the number of conduction times of each Hall element within the preset sampling period, divide the number of conduction times by the sampling frequency to obtain the conduction duration of the Hall element; Arrange the conduction durations of each Hall element in the order of each Hall element in the Hall element array to obtain a conduction duration sequence; Calculate the maximum value, minimum value, and average value of the conduction duration sequence, and input the maximum value, the minimum value, and the average value into a preset conduction ratio formula to obtain the conduction duty ratio of each Hall element; Map the conduction duty ratios of each Hall element to the conduction duty ratio of the Hall element array.

4. The method according to claim 1, wherein Driving the motor to work through the target output power specifically includes: Comparing the target output power of the motor with the actual output power of the motor to obtain a power deviation value, where the actual output power of the motor is detected by a power sensor arranged on the motor shaft; Calculating the proportional control amount, integral control amount, and derivative control amount of the power deviation value; Linearly combining the proportional control amount, the integral control amount, and the derivative control amount to obtain a PWM control signal of the motor, and driving the motor to work according to the PWM control signal.

5. The method according to claim 1, characterized in that, The specific calculation formula for comprehensively calculating the target output power of the motor based on the exercise intensity level, the speed change rate, and the conduction duty ratio is: p = k * L * (1 + α * a) * (1 + β * D) Where p is the target output power, k is the reference value of the motor output power, α and β are the influence coefficients of the speed change rate and the conduction duty ratio respectively, L is the exercise intensity level, a is the speed change rate, D is the conduction duty ratio, α is the influence coefficient of the speed change rate, and β is the influence coefficient of the conduction duty ratio.

6. The method according to claim 4, wherein After driving the motor to work through the target output power, the method further includes: Calculating the slope angle of the electric bicycle based on the first rotation speed and the second rotation speed; Judging whether the slope angle is greater than or equal to a preset slope angle threshold; If it is determined that the slope angle is greater than or equal to the preset slope angle threshold, monitoring the pedaling force and pedaling frequency of the rider, and calculating the pedaling work done by the rider per unit time according to the pedaling force and the pedaling frequency; Comparing the pedaling work with a preset pedaling threshold; If it is determined that the pedaling work is greater than or equal to the preset pedaling threshold, judging that the rider is in a fatigued riding state; In the fatigued riding state, increasing the auxiliary output power of the motor, where the auxiliary output power is proportional to the magnitude of the slope angle and the fatigue level of the rider, and the fatigue level is determined by the ratio of the pedaling work to the preset pedaling threshold.

7. The method according to claim 6, characterized in that The specific calculation formula for calculating the slope angle of the electric bicycle based on the first rotation speed and the second rotation speed is: Where r is the wheel radius of the electric bicycle, w1 is the first rotation speed, w2 is the second rotation speed, g is the acceleration due to gravity, and σ is the angle between the forward direction of the electric bicycle and the horizontal direction.

8. An adaptive electric bicycle control device, characterized in that, The device includes an acquisition module (301) and a processing module (302), where: The acquisition module (301) is used to acquire the real-time physiological parameters of the rider, and the real-time physiological parameters include the heart rate and breathing frequency of the rider; The processing module (302) is used to judge the exercise intensity level of the rider according to the real-time physiological parameters, and the exercise intensity level includes low intensity, medium intensity, and high intensity; The acquisition module (301) is further used to collect the first rotation speed of the flywheel of the electric bicycle through the first sensor and collect the second rotation speed of the outer shell of the electric bicycle through the second sensor; The processing module (302) is further configured to calculate a speed change rate of the rider based on the first rotational speed and the second rotational speed, where the speed change rate is used to reflect a change in the pedaling force of the rider; The acquisition module (301) is further configured to acquire a conduction duty ratio of the Hall element array; The processing module (302) is further configured to calculate a target output power of the motor by synthesizing the exercise intensity level, the speed change rate, and the conduction duty ratio, and drive the motor to operate through the target output power.

9. An electronic device, characterized in that, It includes a processor (401), a memory (405), a user interface (403), and a network interface (404). The memory (405) is used to store instructions. The user interface (403) and the network interface (404) are used to communicate with other devices. The processor (401) is used to execute the instructions stored in the memory (405) so that the electronic device (400) executes the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1-7 is executed.