Assistance output control method of electric bicycle, electric bicycle and storage medium
By dynamically adjusting the combination of low-pass filter and PD controller, the problem of uneven assist output of electric bicycles is solved, achieving more stable assist output and higher riding comfort.
Patent Information
- Application Number
- CN202510550013.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-07-22
AI Technical Summary
The power output of the electric bicycle is uneven due to mechanical jitter or resonance, which affects riding comfort and vehicle life.
By collecting the motor speed and pedal torque values, dynamically adjusting the cutoff frequency of the low-pass filter, and combining with the PD controller to calculate the motor torque compensation value, achieving smooth control of the power output.
Effectively suppress motor speed fluctuations, reduce mechanical jitter and resonance, improve the smoothness and stability of the power output, and improve the riding experience.
Smart Images

Figure CN120348392A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of electric bicycles, and more particularly, to a method for controlling the assist output of an electric bicycle, an electric bicycle, and a storage medium. Background Art
[0002] An electric bicycle (ebike) is a transportation vehicle that combines traditional bicycle and electric assist technologies, and has been widely popularized and applied globally in recent years.
[0003] However, the assist system of the ebike is coupled with mechanical structures such as the frame and the transmission system, resulting in serious mechanical vibrations or resonances of these mechanical structures, which not only affect the riding comfort but also may reduce the service life of the vehicle. Summary of the Invention
[0004] Embodiments of the present application provide a method for controlling the assist output of an electric bicycle, an electric bicycle, and a storage medium, so as to at least solve the technical problem in the related art that the assist output of the electric bicycle is not smooth due to mechanical vibrations or resonances.
[0005] According to one aspect of the embodiments of the present application, there is provided a method for controlling the assist output of an electric bicycle, including: collecting the current motor speed of the electric bicycle and the current torque value applied to the pedal of the electric bicycle; adjusting the cut-off frequency of a first low-pass filter based on the current motor speed, and filtering the current motor speed through the adjusted first low-pass filter to obtain a smoothed speed; determining a motor torque compensation value based on the motor speed fluctuation amount between the smoothed speed and the current motor speed; determining a motor torque output value based on the motor torque compensation value and the current torque value, and controlling the assist output of the electric bicycle according to the motor torque output value.
[0006] According to another aspect of the embodiments of the present application, there is also provided an electric bicycle, including: a sensor for collecting the current motor speed of the electric bicycle and the current torque value applied to the pedal of the electric bicycle; a first low-pass filter for adjusting the cut-off frequency of the first low-pass filter based on the current motor speed and filtering the current motor speed to obtain a smoothed speed; a PD controller for determining a motor torque compensation value based on the motor speed fluctuation amount between the smoothed speed and the current motor speed; determining a motor torque output value based on the motor torque compensation value and the current torque value, and controlling the assist output of the electric bicycle according to the motor torque output value.
[0007] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0008] According to another aspect of the embodiments of the present application, there is provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the above method embodiments.
[0009] According to another aspect of the embodiments of the present application, there is also provided an electronic device including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the steps in any one of the above method embodiments through the computer program.
[0010] Through the present application, by dynamically adjusting the cut-off frequency of the first low-pass filter according to the current motor speed, it is possible to more effectively suppress the motor speed fluctuation. Especially in the case of high-speed operation or sudden load change, it can better track the fluctuation of the motor speed, reduce the mechanical jitter and resonance caused by the speed fluctuation, and thus improve the smoothness of the assist output. Based on the motor speed fluctuation amount between the smooth speed and the current motor speed, the motor torque compensation value is determined, and the current torque value is compensated using the motor torque compensation value. This method of suppressing the speed fluctuation amount according to active damping effectively improves the mechanical jitter and resonance of the electric bicycle, solves the technical problem that the assist output of the electric bicycle is not smooth due to mechanical jitter or resonance, and improves the stability of the electric bicycle. Description of the Drawings
[0011] Figure 1 is a structural block diagram of an electric bicycle according to an embodiment of the present application;
[0012] Figure 2 is a schematic flowchart of an optional assist output control method for an electric bicycle according to an embodiment of the present application;
[0013] Figure 3 is a schematic diagram of another optional assist output control method for an electric bicycle according to an embodiment of the present application;
[0014] Figure 4 is a structural block diagram of another optional electric bicycle according to an embodiment of the present application;
[0015] Figure 5 is a computer system structural block diagram of an optional electronic device according to an embodiment of the present application. Detailed implementation manners
[0016] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned accompanying drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0018] According to one aspect of the embodiments of the present application, a method for controlling the assist output of an electric bicycle is provided. Optionally, in this embodiment, the method for controlling the assist output of the above-mentioned electric bicycle may but is not limited to being applied to an electric bicycle as Figure 1 shown, where the electric bicycle includes a sensor 102, a first low-pass filter 104, and a PD controller 106. The sensor 102 is used to collect the current motor speed of the electric bicycle and the current torque value applied to the pedal of the electric bicycle; the first low-pass filter 104 is used to adjust the cut-off frequency of the first low-pass filter based on the current motor speed and filter the current motor speed to obtain a smoothed speed; the PD controller 106 is used to determine a motor torque compensation value based on the motor speed fluctuation amount between the smoothed speed and the current motor speed; determine a motor torque output value based on the motor torque compensation value and the current torque value, and control the assist output of the electric bicycle according to the motor torque output value.
[0019] The method for controlling the assist output of the electric bicycle in the embodiments of the present application is applied to an electric bicycle. Figure 2 is a schematic flowchart of an optional method for controlling the assist output of an electric bicycle according to the embodiments of the present application, as Figure 2 shown. The process of this method may include the following steps:
[0020] Step S202, collect the current motor speed of the electric bicycle and the current torque value applied to the pedal of the electric bicycle.
[0021] Among them, the current motor speed (denoted as n_fbk) refers to the measured value of the motor rotation speed, usually expressed in revolutions per minute (RPM). The current motor speed is used to evaluate whether the motor operation state is stable, and whether there are unnecessary fluctuations and noises. The fluctuations in the current motor speed may lead to uneven power assistance output, increasing the risk of mechanical jitter and resonance, thus affecting the riding comfort and safety.
[0022] The current torque value (denoted as t_fbk) refers to the magnitude of the torque currently applied to the pedal of the electric bicycle, reflecting the magnitude of the rider's pedaling force and the torque that the electric power assistance needs to compensate. The current torque value can be collected by a torque sensor installed on the pedal or at the connection between the pedal and the crank. The torque sensor can be of the strain gauge type. The change rate and magnitude of the current torque value directly affect the response speed of the power assistance output. Too slow a response may not be able to meet the rider's needs in time, resulting in inappropriate power assistance timing.
[0023] Optionally, the electric bicycle monitors the current rotation speed of the motor in real time through an encoder or Hall effect sensor installed on the motor shaft. The sensor sends the current rotation speed to the control system of the electric bicycle in the form of a pulse or digital signal, and the control system then converts the current rotation speed into the current motor speed. The electric bicycle calculates the current torque value applied to the pedal of the electric bicycle by detecting the tiny deformation generated when the pedal or crank is stressed through a torque sensor installed on the pedal or at the connection between the pedal and the crank. The torque sensor converts the collected current torque value into an electrical signal and sends it to the control system of the electric bicycle for subsequent processing.
[0024] Step S204, based on the current motor speed, adjust the cut-off frequency of the first low-pass filter, and filter the current motor speed through the adjusted first low-pass filter to obtain a smoothed speed.
[0025] Among them, the first low-pass filter is a signal processing component designed to attenuate or eliminate the high-frequency components in the input signal, and only allow the signal components below a specific cut-off frequency to pass through, thereby generating a smoother output signal. The mathematical model of the low-pass filter can be represented by a transfer function, and this transfer function describes the response of the filter to different frequency components of the input signal. The form of the transfer function is such as H(s) = w c / (s + w c ), where, H(s) is the transfer function, s is the complex frequency variable used for the Laplace transform representation; w cis the cut-off frequency of the low-pass filter. In the embodiments of the present application, the first low-pass filter is used to process the data stream of the current motor speed (n_fbk). By setting an appropriate cut-off frequency (w c ), the high-frequency noise and vibration components in the current motor speed are effectively removed, the fluctuation of the current motor speed of the electric bicycle is smoothed, so as to ensure that the motor runs more stably, the output torque is more smooth, reduce mechanical jitter and resonance, and finally improve the driving comfort and efficiency of the electric bicycle.
[0026] The cut-off frequency of the first low-pass filter refers to the frequency threshold of the first low-pass filter, which is used to filter out the noise signals higher than this frequency and retain the low-frequency signals. If the frequency of the current motor speed is lower than the cut-off frequency of the first low-pass filter, the current motor speed is hardly attenuated; if the frequency of the current motor speed is higher than the cut-off frequency of the first low-pass filter, the current motor speed will be significantly attenuated.
[0027] The cut-off frequency of the traditional low-pass filter is fixed, which means that it can only work effectively at a preset frequency and cannot flexibly cope with the change of signal frequency under different working conditions. However, in the assist output control of an electric bicycle, the frequencies of signals such as motor speed and cadence are not constant, but change with factors such as riding conditions, terrain, and the pedaling behavior of the rider. If the cut-off frequency of the first low-pass filter cannot change dynamically accordingly, then in some cases, useful low-frequency signals may be filtered out, resulting in a slow assist response; while in other cases, it may not be able to effectively suppress high-frequency noise, causing uneven assist output or even mechanical jitter and resonance. Therefore, in order to ensure a smooth and responsive assist output under various riding conditions, the embodiments of the present application dynamically adjust the cut-off frequency of the first low-pass filter based on the current motor speed, so as to eliminate unnecessary high-frequency interference while maintaining signal integrity, and improve control accuracy and system stability.
[0028] In the embodiments of the present application, an adaptive filtering algorithm, such as an adaptive notch filter, can be used to automatically adjust the parameters of the filter, including the cut-off frequency, according to the real-time analysis result of the motor speed. The adaptive filtering algorithm can identify the periodic disturbances in the current motor speed signal and automatically adjust to suppress these disturbances while maintaining the integrity of the useful signal. For example, a neural network model can also be trained to learn how to adjust the cut-off frequency of the filter based on historical motor speed data and corresponding riding experience feedback. In practical applications, the model receives the motor speed information in real time and outputs the adjusted cut-off frequency of the filter. For example, a fuzzy logic controller can also be designed to define the input (such as the current motor speed) and output variables (such as the cut-off frequency of the filter), and set the membership function and fuzzy rules. The control system maps the motor speed value to the corresponding fuzzy set, calculates the appropriate cut-off frequency according to the fuzzy rules, and then defuzzifies the output to the first low-pass filter for adjustment.
[0029] To achieve the dynamic change of the cut-off frequency, a frequency-adjustable circuit structure or software algorithm is configured in the first low-pass filter, which can calculate and set the cut-off frequency according to the real-time input data. For example, this can be achieved by modifying the values of the resistors and capacitors in the filter (for analog circuits) or adjusting the parameters of the filtering algorithm (for digital signal processing).
[0030] The smoothed speed (denoted as n_fbk_filter) refers to the motor speed after filtering, whose fluctuations and noises are effectively suppressed, presenting a smoother curve, which helps the motor to operate stably, reduces mechanical jitter and resonance, and improves the response speed of the electric assist.
[0031] Optionally, the electric bicycle analyzes the current motor speed, such as by using any one of an adaptive filtering algorithm, a trained neural network model, a fuzzy logic controller, etc., processes the current motor speed to obtain the cut-off frequency of the filter, adjusts the cut-off frequency of the first low-pass filter to the obtained cut-off frequency of the filter, and filters the current motor speed through the adjusted first low-pass filter to filter out the signals in the current motor speed whose frequencies are greater than the cut-off frequency of the first low-pass filter, thereby obtaining the smoothed speed.
[0032] Step S206: Determine the motor torque compensation value based on the motor speed fluctuation amount between the smoothed speed and the current motor speed.
[0033] Among them, the motor speed fluctuation (denoted as n_err) refers to the difference between the actual motor speed and its desired speed. The motor speed fluctuation is calculated by comparing the filtered motor speed (i.e., the smoothed speed n_fbk_filter) with the current unfiltered motor speed (n_fbk), and the difference between the two is the motor speed fluctuation. The magnitude of the motor speed fluctuation reflects the instantaneous change degree of the motor speed. If the fluctuation is large, it means that the motor runs unstably, with obvious speed fluctuations, which may be caused by various factors, including mechanical component wear, load changes, unstable power supply voltage, or improper control algorithms, etc. By monitoring and calculating the motor speed fluctuation, control parameters such as the motor torque compensation value can be adjusted in real time to reduce speed fluctuations, ensure smoother assist output, reduce mechanical jitter and resonance, and at the same time speed up the response speed of the assist output, thereby improving the riding experience and the overall performance of the electric bicycle.
[0034] The motor torque compensation value (denoted as t_comp) is calculated based on the motor speed fluctuation between the smoothed speed and the current motor speed, and is a key parameter for adjusting the actual output torque of the motor to match the rider's needs and achieve smooth assist output. Challenges faced by electric bicycles (e-bikes) include issues such as uneven assist output and slow response. The calculation of the motor torque compensation value aims to identify the torque demand deviation in the speed fluctuation by comparing the current motor speed (n_fbk) with the smoothed speed (n_fbk_filter), and dynamically adjust the motor's output torque accordingly to overcome these challenges. The smoothed speed represents the ideal motor operation trend, while the current motor speed reflects the actual operating conditions. The difference between the two, i.e., the motor speed fluctuation (n_err), is the basis for determining the motor torque compensation value.
[0035] Optionally, the electric bicycle calculates the difference between the smoothed speed and the current motor speed to obtain the motor speed fluctuation, and performs differential and proportional processing on the motor speed fluctuation to obtain the motor torque compensation value.
[0036] In step S208, based on the motor torque compensation value and the current torque value, determine the motor torque output value, and control the assist output of the electric bicycle according to the motor torque output value.
[0037] Among them, the motor torque output value (denoted as t_out) is calculated based on the motor torque compensation value and the current torque value, representing the actual motor torque value that the electric bicycle system needs to output, used to control the assist output of the motor to ensure it matches the rider's needs and the system operating state.
[0038] In some embodiments, determining the motor torque output value based on the motor torque compensation value and the current torque value includes: determining the sum of the motor torque compensation value and the current torque value as the motor torque output value.
[0039] Optionally, the electric bicycle determines the sum of the motor torque compensation value and the current torque value as the motor torque output value, and controls the assist output of the electric bicycle according to the motor torque output value through the motor drive module.
[0040] Through the embodiments provided in the present application, by dynamically adjusting the cut-off frequency of the first low-pass filter according to the current motor speed, it is possible to more effectively suppress the motor speed fluctuation. Especially in the case of high-speed operation or sudden load change, it can better track the fluctuation of the motor speed, reduce the mechanical jitter and resonance caused by the speed fluctuation, and thus improve the smoothness of the assist output; based on the motor speed fluctuation amount between the smooth speed and the current motor speed, the motor torque compensation value is determined, and the motor torque compensation value is used to compensate the current torque value. This method of suppressing the speed fluctuation amount according to active damping effectively improves the mechanical jitter and resonance of the electric bicycle, solves the technical problem of the uneven assist output of the electric bicycle due to mechanical jitter or resonance, and improves the stability of the electric bicycle.
[0041] In an exemplary embodiment, adjusting the cut-off frequency of the first low-pass filter based on the current motor speed includes:
[0042] Performing a spectrum analysis on the current motor speed to obtain the maximum fluctuation frequency corresponding to the current motor speed; adjusting the cut-off frequency of the first low-pass filter to half of the maximum fluctuation frequency.
[0043] Wherein, the maximum fluctuation frequency (denoted as w max ) of the current motor speed refers to the highest frequency component that dominates the current motor speed fluctuation within a specific time. By performing a spectrum analysis on the current motor speed, the main frequencies in the speed fluctuation can be identified, and the frequency with the largest peak is the maximum fluctuation frequency.
[0044] If the cut-off frequency of the first low-pass filter is too high, although a high response speed can be maintained, it will amplify high-frequency noise and cause system instability; on the contrary, if the cut-off frequency is too low, although the system can be stabilized, the response speed will become slow, affecting the riding experience. Setting the cut-off frequency of the first low-pass filter to half of the maximum fluctuation frequency achieves an optimal balance between the two while ensuring that the system can quickly respond to the rider's operation and suppressing the high-frequency fluctuations that cause jitter and resonance. It can be understood that adjusting the cut-off frequency of the first low-pass filter to half of the maximum fluctuation frequency, that is, (w c = w max / 2). Such a design is to enable the first low-pass filter to better suppress rotational speed fluctuations, reduce mechanical jitter and resonance, while ensuring the smoothness and response speed of the assist output.
[0045] Optionally, Figure 3 is a schematic diagram of another optional assist output control method for an electric bicycle according to an embodiment of the present application. As Figure 3 shown, the electric bicycle processes the current motor rotational speed by methods such as sweep frequency method or Fourier transform wave, etc., to obtain the maximum fluctuation frequency corresponding to the current motor rotational speed, and adjusts the cut-off frequency of the first low-pass filter to half of the maximum fluctuation frequency.
[0046] Through this embodiment, the cut-off frequency of the first low-pass filter is dynamically adjusted to half of the maximum fluctuation frequency, closely associating the cut-off frequency of the first low-pass filter with the maximum fluctuation frequency, and being able to adjust the filtering intensity in real time to adapt to the change of the motor rotational speed fluctuation frequency; when the motor rotational speed fluctuation frequency rises, the cut-off frequency of the first low-pass filter will also increase accordingly, thereby more effectively suppressing high-frequency fluctuations and reducing the occurrence of mechanical jitter and resonance. On the contrary, when the rotational speed fluctuation frequency is low, the cut-off frequency of the first low-pass filter will also decrease, avoiding unnecessary signal attenuation and maintaining the smoothness and response speed of the assist output.
[0047] In an exemplary embodiment, based on the motor rotational speed fluctuation amount between the smoothed rotational speed and the current motor rotational speed, determining the motor torque compensation value includes:
[0048] Differentiating the motor rotational speed fluctuation amount between the smoothed rotational speed and the current motor rotational speed to obtain the rotational speed fluctuation amount change rate; adjusting the proportional coefficient and differential coefficient of the PD controller according to the rotational speed fluctuation amount change rate and the motor rotational speed fluctuation amount, and performing proportional and differential processing on the motor rotational speed fluctuation amount through the adjusted PD controller to obtain the motor torque compensation value.
[0049] Among them, the rotational speed fluctuation amount change rate (denoted as n_err_d) is obtained by differentiating the motor rotational speed fluctuation amount (n_err), reflecting the rate of change of the motor rotational speed fluctuation amount over time, and is an important parameter for judging the dynamic response and stability of the electric bicycle.
[0050] The PD controller is a commonly used closed-loop control algorithm, consisting of two parts: proportional (P) and differential (D). The proportional part is controlled based on the instantaneous value of the error, while the differential part is controlled based on the rate of change of the error. The parameters of traditional PD controllers are often fixed, which may lead to poor control effects under different operating conditions and road conditions. In this embodiment, the PD controller is used to dynamically adjust the torque output by the motor according to the motor rotational speed fluctuation amount and the rotational speed fluctuation amount change rate to smooth the assist output.
[0051] For example, a method for adjusting PD parameters using fuzzy logic can be adopted. Specifically, if both the change rate of the rotational speed fluctuation amount (n_err_d) and the rotational speed fluctuation amount of the motor (n_err) are greater than their corresponding thresholds, that is, the rotational speed fluctuation of the motor is large and the change rate is fast. At this time, the electric bicycle is in an unstable state. According to the fuzzy rules, it is indicated that the PD controller increases the differential coefficient (k_d) to respond to the fluctuation faster, and at the same time increases the proportional coefficient (k_p) to stabilize the system and prevent excessive deviation accumulation. If the change rate of the rotational speed fluctuation amount (n_err_d) is less than the corresponding threshold, while the rotational speed fluctuation amount of the motor (n_err) is greater than the corresponding threshold, that is, the rotational speed fluctuation of the motor is large but the change rate is slow. At this time, the electric bicycle may not need to respond quickly, but requires a large torque compensation to stabilize the rotational speed. At this time, according to the fuzzy rules, the proportional coefficient (k_p) is maintained or increased, and at the same time the differential coefficient (k_d) is decreased to avoid system oscillation caused by over-control.
[0052] For example, it is also possible to preset three types of threshold intervals for the change rate of the rotational speed fluctuation amount (n_err_d) and the rotational speed fluctuation amount of the motor (n_err) according to their magnitudes, namely, a low-level threshold interval, a medium-level threshold interval, and a high-level threshold interval. Each interval corresponds to a different PD control parameter adjustment strategy. For example, if both the change rate of the rotational speed fluctuation amount (n_err_d) and the rotational speed fluctuation amount of the motor (n_err) are within their corresponding low-level threshold intervals, it indicates that the electric bicycle is relatively stable, and the proportional coefficient (k_p) and the differential coefficient (k_d) can be reduced to reduce the energy consumption of the control system and improve the smoothness. If the change rate of the rotational speed fluctuation amount (n_err_d) is within its high-level threshold interval, while the rotational speed fluctuation amount of the motor (n_err) is within its medium-level threshold interval, it indicates that the electric bicycle may need to enhance the suppression of rapid changes. At this time, the differential coefficient (k_d) can be increased, and at the same time the proportional coefficient (k_p) can be appropriately adjusted according to the magnitude of the rotational speed fluctuation amount of the motor (n_err) to ensure that the system can respond quickly and stabilize the rotational speed fluctuation. If the rotational speed fluctuation amount of the motor (n_err) is within its high-level threshold interval, while the change rate of the rotational speed fluctuation amount (n_err_d) is within its low-level threshold interval or medium-level threshold interval, it indicates that the electric bicycle requires a large torque compensation to stabilize the rotational speed. At this time, the proportional coefficient (k_p) should be mainly increased, and at the same time the differential coefficient (k_d) is appropriately adjusted according to the change rate to avoid excessive differential control.
[0053] In this embodiment, according to the change rate of the rotational speed fluctuation amount and the rotational speed fluctuation amount of the motor, the proportional coefficient and the differential coefficient of the PD controller are adjusted. This PD parameter adjustment strategy based on the real-time fluctuation situation can significantly improve the smoothness and response speed of the assist output, and reduce mechanical jitter and resonance. The motor torque compensation value calculated by the PD controller can instantaneously compensate for the torque change caused by the rotational speed fluctuation, avoiding the problem that the torque output lags behind the rotational speed fluctuation in the traditional control strategy.
[0054] In an exemplary embodiment, before determining the motor torque output value based on the motor torque compensation value and the current torque value, the assist output control method of the electric bicycle further includes:
[0055] Filter the current torque value through a second low-pass filter to obtain the filtered current torque value, and continue to execute the step of determining the motor torque output value based on the motor torque compensation value and the current torque value based on the filtered current torque value.
[0056] Among them, the second low-pass filter is a signal processing component designed to attenuate or eliminate the high-frequency components in the input signal and only allow the signal components below a specific cut-off frequency to pass through, thereby generating a smoother output signal. In this embodiment, the second low-pass filter is used to process the data stream of the current torque value (t_fbk). By setting an appropriate cut-off frequency (w c ), the high-frequency noise and vibration components in the current torque value are effectively removed, the basic trend of the torque is retained, ensuring that the subsequent torque compensation calculation is based on more accurate torque information, and the second low-pass filter can make the assist output show a rising or falling trend along a smooth curve, thereby effectively improving the smoothness of the assist output.
[0057] Optionally, as Figure 3 shown, the electric bicycle filters the current torque value through a second low-pass filter to obtain the filtered current torque value (denoted as t_fbk_filter), and determines the sum of the motor torque compensation value and the filtered current torque value as the motor torque output value.
[0058] In this embodiment, the second low-pass filter is used to filter the current torque value to remove the high-frequency noise and fluctuations in the torque signal and retain its basic trend and effective information to achieve a smoother assist output, solving the problem that the assist output is unstable due to insufficient consideration of the noise processing of the torque signal in the related art. At the same time, the introduction of the second low-pass filter can make the assist output show a rising or falling trend along a smooth curve, thereby effectively improving the smoothness of the assist output.
[0059] In an exemplary embodiment, before filtering the current torque value through the second low-pass filter, the assist output control method of the electric bicycle further includes:
[0060] Collecting the pedal frequency value of the electric bicycle; the pedal frequency value represents the number of rotations of the pedal per unit time; based on the pedal frequency value, adjusting the cut-off frequency of the second low-pass filter.
[0061] Wherein, the pedal frequency value (denoted as f_fbk) is a parameter representing the number of rotations of the pedal of the electric bicycle rider per unit time. The pedal frequency value reflects the riding intensity and rhythm of the rider. Different pedal frequency values will cause changes in the characteristics of the torque signal. For example, at a high pedal frequency, the torque signal may contain more high-frequency components, which may cause unnecessary mechanical jitter.
[0062] In the assist output control of the electric bicycle, the current torque value (t_fbk) collected by the torque sensor may contain high-frequency noise and fluctuations caused by the riding environment, rider operation, and the motor itself. In order to smooth these signals and extract their effective components, in the above embodiment, a second low-pass filter is introduced. However, the characteristic of the low-pass filter is that although a lower cut-off frequency can effectively filter out high-frequency noise, it may also delay the signal transmission, resulting in a slower response speed of the assist output. On the contrary, a higher cut-off frequency can speed up the response speed, but it may not be able to fully filter out the noise, resulting in an uneven assist output.
[0063] The pedal frequency value (f_fbk) is a direct reflection of the rotation frequency of the rider's pedal, and it indirectly reflects the immediacy of the rider's demand for assistance. In the case of a high pedal frequency (when riding fast or climbing a slope), the rider expects the assist system to quickly respond to changes in their torque demand. Therefore, the second low-pass filter needs to have a higher cut-off frequency to ensure the immediacy of signal transmission. However, a higher cut-off frequency means that the electric bicycle has a weakened ability to filter out high-frequency noise, which may cause jitter or instability in the assist output. On the contrary, in the case of a low pedal frequency (when riding slowly or on a flat road), the rider's demand for immediate response is relatively low, and they are more focused on the smoothness of the assist output. At this time, the second low-pass filter should adopt a lower cut-off frequency to more effectively filter out high-frequency noise and ensure a smooth and jitter-free assist output.
[0064] Therefore, dynamically adjusting the cut-off frequency of the second low-pass filter according to the pedal frequency value is essentially dynamically optimizing the filter parameters based on real-time analysis of the riding state, in order to achieve the purpose of balancing the smoothness of the assist output and the response speed. Specifically, when the pedal frequency value is high, the electric bicycle increases the cut-off frequency of the second low-pass filter to reduce signal delay, ensuring that the assist system can immediately respond to the rider's needs and provide a fast and effective assist output. When the pedal frequency value is low, the electric bicycle reduces the cut-off frequency of the second low-pass filter to enhance the filtering of high-frequency noise, ensuring the smoothness and stability of the assist output. Even when riding slowly or smoothly, unnecessary mechanical vibrations can be avoided. This dynamic adjustment strategy, by real-time monitoring the pedal frequency value and adjusting the cut-off frequency of the second filter accordingly, enables the assist output control system to provide a smooth and fast-responsive assist output under various riding conditions, significantly improving the riding experience and overall performance of the electric bicycle.
[0065] Optionally, as Figure 3 shown, the electric bicycle collects the number of rotations of the pedal within a unit time, and determines the pedal frequency value of the electric bicycle based on this number and the unit time; when the pedal frequency value is high, the electric bicycle increases the cut-off frequency of the second low-pass filter; when the pedal frequency value is low, the electric bicycle reduces the cut-off frequency of the second low-pass filter.
[0066] Through this embodiment, when the pedal frequency value is high, the cut-off frequency is automatically increased to reduce signal delay, ensuring that the assist output can quickly respond to the torque demand changes brought about by high pedal frequencies; when the pedal frequency value is low, the cut-off frequency is reduced to enhance the filtering of high-frequency noise, ensuring the smoothness and stability of the assist output during slow or smooth riding; based on the pedal frequency value, adjusting the cut-off frequency of the second low-pass filter can also effectively balance the smoothness of the assist output and the response speed of the assist output.
[0067] In an exemplary embodiment, adjusting the cut-off frequency of the second low-pass filter based on the pedal frequency value includes:
[0068] Calculating the angular frequency based on the angular frequency calculation formula and the pedal frequency value, and adjusting the cut-off frequency of the second low-pass filter to the angular frequency; the angular frequency calculation formula characterizes the correlation between the cut-off frequency of the second low-pass filter and the pedal frequency value.
[0069] Among them, the angular frequency calculation formula characterizes the correlation between the cut-off frequency of the second low-pass filter and the pedal frequency value. For example, the angular frequency calculation formula can be w = 2×π×f_fbk, where w is the angular frequency.
[0070] Optionally, the electric bicycle inputs the pedal frequency value into the angular frequency calculation formula (such as ω = 2×π×f_fbk) to obtain the angular frequency ω, and adjusts the cut-off frequency of the second low-pass filter to the angular frequency to obtain the adjusted second low-pass filter.
[0071] Through this embodiment, the angular frequency is calculated in real time according to the pedal frequency value of the rider, and then the cut-off frequency of the second low-pass filter is adjusted. This dynamic adjustment ensures that under different riding conditions, the second low-pass filter can maintain the best state, neither over-filtering resulting in slow assist response nor under-filtering resulting in uneven output or mechanical jitter; after the cut-off frequency of the second low-pass filter is adjusted to the angular frequency calculated based on the pedal frequency value, the second low-pass filter can more effectively filter out the high-frequency noise in the torque signal and retain the useful signal corresponding to the change in pedal frequency; in the case of low pedal frequency, the lower cut-off frequency better suppresses the high-frequency noise in the signal and ensures the smoothness of the assist output; while in the case of high pedal frequency, the higher cut-off frequency allows more dynamic changes in the torque signal to pass through, avoiding the output lag caused by over-filtering.
[0072] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this 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 essential to this application.
[0073] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of this application, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory), RAM (Random Access Memory), magnetic disk, optical disc), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of this application.
[0074] According to another aspect of the embodiments of the present application, an electric bicycle is further provided. This electric bicycle device can be used to implement the assist output control method of the electric bicycle provided in the above embodiments, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0075] Figure 1 is a structural block diagram of an optional electric bicycle according to an embodiment of the present application. As Figure 1 shown in the figure, the electric bicycle includes:
[0076] A sensor 102 for collecting the current motor speed of the electric bicycle and the current torque value applied to the pedal of the electric bicycle;
[0077] A first low-pass filter 104 for adjusting the cut-off frequency of the first low-pass filter based on the current motor speed and filtering the current motor speed to obtain a smoothed speed;
[0078] A PD controller 106 for determining a motor torque compensation value based on the motor speed fluctuation amount between the smoothed speed and the current motor speed; determining a motor torque output value based on the motor torque compensation value and the current torque value, and controlling the assist output of the electric bicycle according to the motor torque output value.
[0079] It should be noted that the sensor 102 in this embodiment can be used to execute the above step S202, the first low-pass filter 104 in this embodiment can be used to execute the above step S204, and the PD controller 106 in this embodiment can be used to execute the above step S206 and step S208.
[0080] Through the embodiments provided by the present application, dynamically adjusting the cut-off frequency of the first low-pass filter according to the current motor speed can more effectively suppress the motor speed fluctuation. Especially in the case of high-speed operation or sudden load changes, it can better track the fluctuation of the motor speed, reduce mechanical jitter and resonance caused by speed fluctuation, and thus improve the smoothness of the assist output; determining the motor torque compensation value based on the motor speed fluctuation amount between the smoothed speed and the current motor speed, and using the motor torque compensation value to compensate the current torque value. This method of suppressing the speed fluctuation amount according to active damping effectively improves the mechanical jitter and resonance of the electric bicycle, solves the technical problem of uneven assist output of the electric bicycle due to mechanical jitter or resonance, and improves the stability of the electric bicycle.
[0081] In an exemplary embodiment, the first low-pass filter 104 is further configured to perform a spectrum analysis on the current motor speed to obtain the maximum fluctuation frequency corresponding to the current motor speed; and adjust the cut-off frequency of the first low-pass filter to half of the maximum fluctuation frequency.
[0082] In an exemplary embodiment, the PD controller 106 is further configured to perform a differential processing on the motor speed fluctuation amount between the smoothed speed and the current motor speed to obtain the change rate of the speed fluctuation amount; adjust the proportional coefficient and the differential coefficient of the PD controller according to the change rate of the speed fluctuation amount and the motor speed fluctuation amount, and perform proportional and differential processing on the motor speed fluctuation amount through the adjusted PD controller to obtain the motor torque compensation value.
[0083] In an exemplary embodiment, Figure 4 is a structural block diagram of another alternative electric bicycle according to an embodiment of the present application, as Figure 4 shown, the electric bicycle further includes a second low-pass filter 108. The second low-pass filter 108 is configured to perform a filtering process on the current torque value to obtain the filtered current torque value; the PD controller 106 is further configured to determine the motor torque output value based on the motor torque compensation value and the filtered current torque value.
[0084] In an exemplary embodiment, the sensor 102 is further configured to collect the pedal frequency value of the electric bicycle; the pedal frequency value represents the number of rotations of the pedal per unit time; the second low-pass filter 108 is further configured to adjust the cut-off frequency of the second low-pass filter based on the pedal frequency value.
[0085] In an exemplary embodiment, the second low-pass filter 108 is further configured to calculate the angular frequency based on the angular frequency calculation formula and the pedal frequency value, and adjust the cut-off frequency of the second low-pass filter to the angular frequency; the angular frequency calculation formula represents the correlation between the cut-off frequency of the second low-pass filter and the pedal frequency value.
[0086] In an exemplary embodiment, the PD controller 106 is further configured to determine the sum of the motor torque compensation value and the current torque value as the motor torque output value.
[0087] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited thereto: the above-mentioned modules are all located in the same processor; or, the above-mentioned various modules are respectively located in different processors in any combination form.
[0088] According to another aspect of the embodiments of the present application, there is provided a computer-readable storage medium. The computer-readable storage medium includes a stored program, wherein when the program runs, it executes the steps in any one of the above method embodiments.
[0089] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs such as USB flash drives, ROMs, RAMs, mobile hard disks, magnetic disks, or optical discs.
[0090] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor is configured to execute the steps in any of the above method embodiments through the computer program. In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0091] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.
[0092] According to another aspect of the embodiments of the present application, a computer program product is further provided. The computer program product includes computer programs / instructions, and the computer programs / instructions include program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit 501, various functions provided by the embodiments of the present application are executed. The above serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0093] Figure 5 Schematically shows a block diagram of a computer system of an electronic device for implementing the embodiments of the present application. As Figure 5 shown, the computer system 500 includes a CPU (Central Processing Unit) 501, which can perform various appropriate actions and processes according to the program stored in the ROM 502 or the program loaded from the storage part 508 into the RAM 503. In the random access memory 503, various programs and data required for system operation are also stored. The central processing unit 501, the read-only memory 502, and the random access memory 503 are connected to each other through a bus 504. The I / O (Input / Output) interface 505 is also connected to the bus 504.
[0094] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including such as a CRT (Cathode Ray Tube), an LCD (Liquid Crystal Display), etc. and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. The drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read from it can be installed into the storage section 508 as needed.
[0095] Specifically, according to an embodiment of the present application, the processes described in each method flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit 501, various functions defined in the system of the present application are executed.
[0096] It should be noted that Figure 5 The computer system 500 of the electronic device shown is only an example, and should not bring any limitation to the functions and usage scope of the embodiments of the present application.
[0097] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in the storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.
[0098] The above are only the preferred embodiments of the present application, and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for controlling the assist output of an electric bicycle, characterized in that, Comprising: Collecting the current motor speed of the electric bicycle and the current torque value applied to the pedal of the electric bicycle; Based on the current motor speed, adjusting the cut-off frequency of the first low-pass filter, and filtering the current motor speed through the adjusted first low-pass filter to obtain a smoothed speed; Based on the motor speed fluctuation amount between the smoothed speed and the current motor speed, determining a motor torque compensation value; Based on the motor torque compensation value and the current torque value, determining a motor torque output value, and controlling the assist output of the electric bicycle according to the motor torque output value.
2. The method according to claim 1, wherein The adjusting the cut-off frequency of the first low-pass filter based on the current motor speed includes: Performing a spectrum analysis on the current motor speed to obtain the maximum fluctuation frequency corresponding to the current motor speed; adjusting the cut-off frequency of the first low-pass filter to half of the maximum fluctuation frequency.
3. The method according to claim 1, characterized in that The determining the motor torque compensation value based on the motor speed fluctuation amount between the smoothed speed and the current motor speed includes: Performing a differential process on the motor speed fluctuation amount between the smoothed speed and the current motor speed to obtain a change rate of the speed fluctuation amount; According to the change rate of the speed fluctuation amount and the motor speed fluctuation amount, adjusting the proportional coefficient and the differential coefficient of the PD controller, and performing proportional and differential processes on the motor speed fluctuation amount through the adjusted PD controller to obtain the motor torque compensation value.
4. The method according to claim 1, wherein Before determining the motor torque output value based on the motor torque compensation value and the current torque value, the method further includes: Filtering the current torque value through a second low-pass filter to obtain the filtered current torque value, and continuing to execute the step of determining the motor torque output value based on the motor torque compensation value and the current torque value based on the filtered current torque value.
5. The method according to claim 4, wherein Before filtering the current torque value through the second low-pass filter, the method further includes: Collecting the pedal frequency value of the electric bicycle; the pedal frequency value represents the number of rotations of the pedal per unit time; Based on the pedal frequency value, adjusting the cut-off frequency of the second low-pass filter.
6. The method according to claim 5, wherein The adjusting the cut-off frequency of the second low-pass filter based on the pedal frequency value includes: Calculating an angular frequency based on the angular frequency calculation formula and the pedal frequency value, and adjusting the cut-off frequency of the second low-pass filter to the angular frequency; the angular frequency calculation formula represents the correlation between the cut-off frequency of the second low-pass filter and the pedal frequency value.
7. The method according to claim 1, characterized in that The determining the motor torque output value based on the motor torque compensation value and the current torque value includes: Determining the sum of the motor torque compensation value and the current torque value as the motor torque output value.
8. An electric bicycle, characterized in that, Comprising: A sensor for collecting the current motor speed of the electric bicycle and the current torque value applied to the pedal of the electric bicycle; A first low-pass filter for adjusting the cut-off frequency of the first low-pass filter based on the current motor speed and filtering the current motor speed to obtain a smoothed speed; A PD controller is configured to determine a motor torque compensation value based on the motor speed fluctuation amount between the smoothed speed and the current motor speed; determine a motor torque output value based on the motor torque compensation value and the current torque value, and control the assist output of the electric bicycle according to the motor torque output value.
9. The electric bicycle according to claim 8, wherein The electric bicycle further includes: A second low-pass filter for filtering the current torque value to obtain the filtered current torque value; The PD controller is further configured to determine a motor torque output value based on the motor torque compensation value and the filtered current torque value.
10. The electric bicycle according to claim 9, characterized in that, The sensor is further configured to collect the pedal frequency value of the electric bicycle; the pedal frequency value represents the number of rotations of the pedal per unit time; The second low-pass filter is further configured to adjust the cut-off frequency of the second low-pass filter based on the pedal frequency value.
11. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
12. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Vehicle control method, control system and vehicle
CN122316172A
Control method, control system and vehicle for a vehicle
CN122316172B