An ESC voltage regulator voltage control method and system based on fuzzy adaptive PID

By using a fuzzy adaptive PID control method, voltage error and rate of change are obtained, the operating stage is determined and a control signal is generated, and a subset of fuzzy rules is called to adjust the PID parameters. This solves the problem that traditional PID cannot simultaneously achieve fast tracking, precise adjustment and anti-interference, and achieves voltage stability and fast response. It is suitable for UAV motor drives and power tools.

CN121098105BActive Publication Date: 2026-03-24HANGZHOU YUNUO ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing ESC voltage regulator control methods cannot simultaneously achieve fast tracking, precise adjustment, and anti-interference, resulting in large voltage fluctuations, slow response, and disconnected parameter tuning, making it difficult to meet the voltage control requirements of demanding scenarios.

Method used

A fuzzy adaptive PID control method is adopted. By obtaining the output voltage and the preset target voltage, the voltage error and the rate of change of error are calculated, the operation stage is determined and the corresponding control signal is generated. The fuzzy rule subset is called to generate the proportional, integral and derivative gain adjustment, which is combined with the initial PID parameters for real-time adjustment, driving the power switch to achieve closed-loop regulation.

Benefits of technology

It achieves voltage stability and rapid response of ESC voltage regulator under operating conditions such as startup, steady state and load change, improves voltage control accuracy and anti-interference capability, adapts to different specifications of ESC voltage regulator, and meets the high requirements of drone motor drive and power tool scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121098105B_ABST
    Figure CN121098105B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of voltage control, and discloses an ESC voltage regulator voltage control method and system based on fuzzy adaptive PID, which comprises the following steps: collecting an ESC voltage regulator output voltage and a preset target voltage in real time, calculating a voltage error and a filtered error change rate, dividing fast tracking, precise regulation, anti-interference stability maintenance stages according to the error and the change rate, and generating a control signal, calling a corresponding fuzzy rule subset to infer proportional, integral and differential gain adjustment amounts, combining initial PID parameters to generate real-time gain, calculating a control amount based on the real-time gain by using a positional type PID, converting the control amount into a signal to drive a power switch tube, and forming closed-loop regulation. The application solves the performance short board of a traditional control method under multiple working conditions, realizes collaborative control of fast tracking, precise regulation and anti-interference stability maintenance of an ESC voltage regulator output voltage, ensures that the ESC voltage regulator can output stable voltage under starting, steady-state operation and load mutation working conditions, and meets the demand of high voltage control precision and dynamic response requirement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of voltage control technology, and in particular to a voltage control method and system for an ESC voltage regulator based on fuzzy adaptive PID. Background Technology

[0002] This invention relates to the field of power electronics and automatic control, and is applied to ESC voltage regulator scenarios such as drone motor drives and power tools where high voltage performance is required. ESC voltage regulators need to convert fluctuating input voltage into a stable load voltage. Current mainstream control technologies fall into two categories: traditional PID, which manually tunes fixed proportional, integral, and derivative parameters, calculates control quantities based on voltage error and integral / rate of change, driving the switching transistor for closed-loop voltage regulation; and conventional fuzzy adaptive PID, which introduces fuzzy logic, converting the error and filtered rate of change into fuzzy variables, and outputting parameter adjustment quantities according to a single fuzzy rule set to adapt to changes in operating conditions.

[0003] Existing technologies have some technical shortcomings. For example, traditional PID fixed parameters cannot balance fast tracking, precise adjustment and anti-interference. Large-scale steady-state overshoot of 5%-10% slows down the response, and large-scale integral saturation is easy under large error. Conventional fuzzy PID does not divide the operation stage, and the single rule set is difficult to adapt to different objectives such as start-up, steady state and disturbance. Moreover, anti-interference measures are disconnected from parameter tuning. When the load changes suddenly, the differential parameter adjustment is lagging and the voltage fluctuation is large. In addition, its threshold is mostly fixed value and is not associated with the ESC rated voltage, resulting in poor adaptability and difficulty in meeting the requirements of high-demand scenarios.

[0004] Therefore, there is an urgent need for a voltage control method and system for ESC voltage regulators based on fuzzy adaptive PID to solve the above problems. Summary of the Invention

[0005] The purpose of this invention is to provide a voltage control method for an ESC voltage regulator based on fuzzy adaptive PID, comprising the following steps:

[0006] Obtain the output voltage of the ESC voltage regulator and the preset target voltage, and calculate the voltage error and error change rate based on the output voltage and the preset target voltage;

[0007] The current operating stage of the ESC voltage regulator is determined based on the voltage error and the rate of change of error, and the corresponding stage control signal is generated.

[0008] Based on the stage control signal, voltage error, and error change rate, the corresponding fuzzy rule subset is invoked to generate the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment.

[0009] Based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment, and combined with the initial PID parameters, calculate the real-time proportional gain, integral gain, and derivative gain.

[0010] Based on the real-time proportional gain, integral gain, and derivative gain, and combined with the voltage error, the control quantity of the ESC voltage regulator is calculated, and the power switching transistor is driven to achieve closed-loop regulation of the output voltage.

[0011] Furthermore, the step of acquiring the output voltage of the ESC voltage regulator and the preset target voltage, and calculating the voltage error and error change based on the output voltage and the preset target voltage, includes:

[0012] The output voltage of the ESC voltage regulator is acquired in real time through a high-precision analog-to-digital converter with a fixed sampling period.

[0013] Obtain a preset target voltage, which is the stable voltage value that the ESC voltage regulator is expected to output;

[0014] Calculate the voltage error based on the output voltage and the preset target voltage;

[0015] Calculate the rate of change of error based on the voltage error between the current cycle and the previous cycle;

[0016] The error change rate is subjected to low-pass filtering, and high-frequency noise interference is suppressed by weighted averaging to generate the filtered error change rate.

[0017] Furthermore, the step of determining the current operating stage of the ESC voltage regulator based on the voltage error and the rate of change of error, and generating the corresponding stage control signal, includes:

[0018] Obtain the fast tracking threshold, the precise adjustment threshold, and the anti-interference judgment threshold;

[0019] The absolute value of the filtered error change rate is used to determine whether it exceeds the anti-interference judgment threshold. If it does, a control signal for the anti-interference stabilization stage is generated.

[0020] If the anti-interference judgment threshold is not exceeded, the absolute value of the voltage error is used to determine whether it is greater than the fast tracking threshold. If it is greater, the control signal for the fast tracking stage is generated.

[0021] If the absolute value of the voltage error is less than or equal to the fast tracking threshold but greater than or equal to the precision adjustment threshold, then a control signal for the precision adjustment stage is generated.

[0022] Furthermore, the step of generating proportional gain adjustment, integral gain adjustment, and derivative gain adjustment by calling the corresponding fuzzy rule subset based on the stage control signal, voltage error, and error change rate includes:

[0023] Based on the voltage error and the rate of change of the filtered error, they are converted from precise numerical values ​​into fuzzy linguistic variables, and the membership degree of each variable on the fuzzy sets of negative large, negative medium, negative small, zero, positive small, positive medium, and positive large is obtained.

[0024] The corresponding fuzzy rule subset is selected based on the stage control signal. The rules in the fast tracking stage focus on increasing the proportional gain, the rules in the precise adjustment stage focus on optimizing the integral gain and the derivative gain, and the rules in the anti-interference and stabilization stage focus on increasing the derivative gain.

[0025] Based on the membership degree of voltage error and error change rate, combined with the selected fuzzy rule subset, the trigger strength of each rule is calculated, and the outputs of all rules are superimposed to generate a synthetic fuzzy set of proportional gain, integral gain and differential gain.

[0026] The synthetic fuzzy set is defuzzified, and precise proportional gain adjustment, integral gain adjustment, and differential gain adjustment are generated by calculating the weighted average of the membership degree and the corresponding value.

[0027] Furthermore, the step of calculating the real-time proportional gain, integral gain, and derivative gain based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment, combined with the initial PID parameters, includes:

[0028] Obtain the initial proportional gain, initial integral gain, and initial derivative gain;

[0029] Based on the proportional gain adjustment and the initial proportional gain, a real-time proportional gain is generated to enhance or weaken the response to the current error.

[0030] Based on the integral gain adjustment and the initial integral gain, a real-time integral gain is generated, and the integration function is enabled or disabled based on the voltage error. When the absolute value of the voltage error is greater than the fast tracking threshold, integration is disabled to prevent integral saturation. When the absolute value of the voltage error is not greater than the fast tracking threshold, integration is enabled to eliminate steady-state deviation.

[0031] Based on the differential gain adjustment and the initial differential gain, a real-time differential gain is generated, and a low-pass filter is introduced into the differential term to suppress the interference of high-frequency noise on the control quantity.

[0032] Furthermore, the step of calculating the control quantity of the ESC voltage regulator based on the real-time proportional gain, integral gain, and derivative gain, combined with the voltage error, and driving the power switch to achieve closed-loop regulation of the output voltage includes:

[0033] The control quantity is calculated based on the real-time proportional gain, real-time integral gain, and real-time derivative gain, combined with the voltage error and the rate of change of the filtered error.

[0034] The calculated control value is then subjected to amplitude limiting.

[0035] The limited control quantity is converted into the duty cycle of the pulse width modulation signal to generate a pulse waveform with a specific duty cycle;

[0036] The power drive circuit that sends the pulse width modulation signal to the ESC voltage regulator is used to control the on and off times of the power switching transistor.

[0037] By adjusting the on-state ratio of the power switching transistor, the output voltage is changed, and new output voltages are continuously collected to adjust the output voltage of the ESC voltage regulator, thus forming a closed-loop control.

[0038] Furthermore, the present invention also discloses a voltage control system for an ESC voltage regulator based on fuzzy adaptive PID, comprising:

[0039] The acquisition module is used to acquire the output voltage of the ESC voltage regulator and the preset target voltage, and to calculate the voltage error and error change rate based on the output voltage and the preset target voltage;

[0040] The first generation module is used to determine the current operating stage of the ESC voltage regulator based on the voltage error and the rate of change of error, and to generate the corresponding stage control signal.

[0041] The second generation module is used to call the corresponding fuzzy rule subset based on the stage control signal, voltage error and error change rate to generate the proportional gain adjustment, integral gain adjustment and derivative gain adjustment.

[0042] The calculation module is used to calculate the real-time proportional gain, integral gain, and derivative gain based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment, combined with the initial PID parameters.

[0043] The adjustment module is used to calculate the control quantity of the ESC voltage regulator based on the real-time proportional gain, integral gain, and derivative gain, combined with the voltage error, and drive the power switch to achieve closed-loop regulation of the output voltage.

[0044] Furthermore, the computing module includes:

[0045] The acquisition unit is used to acquire the initial proportional gain, initial integral gain, and initial derivative gain.

[0046] The first generation unit is used to generate a real-time proportional gain based on the proportional gain adjustment amount and the initial proportional gain, which is used to enhance or weaken the response strength to the current error.

[0047] The judgment unit is used to generate a real-time integral gain based on the integral gain adjustment amount and the initial integral gain, and to determine whether to enable the integral function based on the voltage error. When the absolute value of the voltage error is greater than the fast tracking threshold, the integral function is turned off to prevent integral saturation. When the absolute value of the voltage error is not greater than the fast tracking threshold, the integral function is enabled to eliminate steady-state deviation.

[0048] The second generation unit is used to generate the real-time differential gain based on the differential gain adjustment amount and the initial differential gain, and to introduce a low-pass filter into the differential term to suppress the interference of high-frequency noise on the control quantity.

[0049] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described ESC voltage regulator voltage control method based on fuzzy adaptive PID.

[0050] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described fuzzy adaptive PID-based ESC voltage regulator control method.

[0051] The beneficial effects of this application are as follows:

[0052] Firstly, this invention divides the target optimizer into fast tracking, precise adjustment, and anti-interference stabilization stages, while the inner layer calls the corresponding fuzzy rule subset. In the fast tracking stage, the focus is on increasing the proportional gain to shorten the voltage rise time of the ESC regulator. In the precise adjustment stage, the integral and derivative gains are optimized, resulting in better steady-state overshoot control and effectively avoiding the problems of large proportional overshoot and slow small proportional response in traditional PID controllers.

[0053] Secondly, this invention can eliminate the risk of integral saturation and improve steady-state control accuracy. Through the integral separation strategy, the integral term is turned off when the absolute value of the voltage error is greater than the fast tracking threshold, avoiding the accumulation of the integral term under large error. The integral term is turned on after the error reaches the standard, which can reduce steady-state voltage fluctuations and solve the overshoot and recovery lag problems caused by integral saturation of traditional PID.

[0054] Third, this invention enhances anti-interference capabilities and quickly suppresses the impact of sudden changes in operating conditions. It adopts anti-interference priority judgment logic. When the rate of change of the filtered error exceeds the threshold, it immediately calls the fuzzy rule that focuses on increasing the proportion. When the load changes suddenly, the voltage fluctuation is reduced and the recovery time is shortened, solving the defects of conventional fuzzy PID anti-interference and parameter tuning being disconnected and the proportion adjustment being lagging.

[0055] Fourth, the present invention has strong adaptability and is compatible with different specifications of ESC voltage regulators. It can quickly track and precisely adjust the threshold-related ESC rated output voltage. It can adapt to different models of ESC such as 12V, 24V, and 48V without reconstructing the control architecture, solving the problem of poor adaptability of conventional fuzzy PID fixed threshold, and has a wide range of applications. Attached Figure Description

[0056] Figure 1 This is a schematic diagram of a method flow proposed in an embodiment of this application.

[0057] Figure 2 This is a schematic diagram of the system structure proposed in an embodiment of the present invention.

[0058] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0059] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0060] like Figure 1 As shown, this application provides a voltage control method for an ESC voltage regulator based on fuzzy adaptive PID, including the following steps:

[0061] S1: Obtain the output voltage of the ESC voltage regulator and the preset target voltage, and calculate the voltage error and error change rate based on the output voltage and the preset target voltage;

[0062] S2 determines the current operating stage of the ESC voltage regulator based on the voltage error and the rate of change of error, and generates the corresponding stage control signal;

[0063] S3, based on the stage control signal, voltage error and error change rate, calls the corresponding fuzzy rule subset to generate the proportional gain adjustment, integral gain adjustment and derivative gain adjustment;

[0064] S4. Based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment, and combined with the initial PID parameters, calculate the real-time proportional gain, integral gain, and derivative gain.

[0065] S5 calculates the control quantity of the ESC voltage regulator based on the real-time proportional gain, integral gain, and derivative gain, combined with the voltage error, and drives the power switch to achieve closed-loop regulation of the output voltage.

[0066] As described in steps S1-S5 above, the ESC voltage regulator, as a core power electronic device connecting the power supply and the load, directly determines the load's operating state through the stability of its output voltage. Excessive voltage fluctuations can lead to unstable motor speed and actuator deviations. Slow dynamic response can result in insufficient motor power during startup or a sudden voltage drop during load changes, thus affecting the normal operation of the equipment. Therefore, the voltage control of the ESC voltage regulator needs to address the synergistic issues of rapid response, precise voltage regulation, and anti-interference, avoiding the shortcomings of a single control strategy that cannot adapt to multiple operating conditions. This is crucial for ensuring reliable load operation.

[0067] In existing technologies, traditional PID control uses fixed gain parameters, which cannot balance the contradiction between fast tracking and precise adjustment. For example, setting a large gain ratio to speed up the voltage response at startup will lead to an increase in voltage overshoot in steady state. Although conventional fuzzy adaptive PID can adjust parameters online, it does not divide the control target according to the operating stage. When there is a sudden change in load, such as the drone motor load increasing from 1A to 5A, the parameter adjustment is lagging and cannot quickly suppress voltage fluctuations. The fluctuation amplitude often exceeds ±1.5V.

[0068] This invention achieves closed-loop regulation through a five-step core process: acquiring voltage and calculation error, determining the operating stage, calling fuzzy rules to generate parameter adjustment amounts, tuning real-time PID parameters, and calculating control quantities. Each step is closely linked, forming a complete closed-loop control chain from signal acquisition to parameter adjustment to execution control. Each step is designed specifically for the actual operating requirements of the ESC voltage regulator, solving the performance shortcomings of traditional control methods under multiple operating conditions. It achieves coordinated control of rapid tracking, precise adjustment, and anti-interference stability of the ESC voltage regulator's output voltage, ensuring that the ESC voltage regulator can output a stable voltage under all operating conditions, including startup, steady-state operation, and load surges. This meets the needs of scenarios with high requirements for voltage control accuracy and dynamic response, such as UAV motor drives and power tool power systems.

[0069] In one embodiment, the step of acquiring the output voltage of the ESC voltage regulator and a preset target voltage, and calculating the voltage error and error change based on the output voltage and the preset target voltage, includes:

[0070] S11, acquire the output voltage of the ESC voltage regulator in the current control cycle. The output voltage is acquired in real time through a high-precision analog-to-digital converter with a fixed sampling period.

[0071] S12, obtain the preset target voltage, which is the stable voltage value expected to be output by the ESC voltage regulator;

[0072] S13, calculate the voltage error based on the output voltage and the preset target voltage, that is, the target voltage minus the output voltage. This voltage error reflects the current deviation of the system.

[0073] S14. Calculate the error change rate based on the voltage error between the current cycle and the previous cycle. That is, the difference in voltage error between two cycles divided by the sampling period, which is used to reflect the speed trend of voltage change.

[0074] S15, perform low-pass filtering on the error change rate, suppress high-frequency noise interference by weighted averaging, and generate the filtered error change rate as the input parameter for the next stage judgment.

[0075] As described in steps S11-S15 above, through high-precision data acquisition, clear parameter calculation logic and noise suppression processing, the output voltage and preset target voltage of the ESC voltage regulator are accurately obtained, the voltage error and error change rate are accurately calculated, and the reliability of the error change rate is optimized. This provides accurate and interference-free basic data support for subsequent operation stage judgment and fuzzy adaptive PID parameter adjustment, ensuring the validity of the input data of the entire control link.

[0076] The voltage control of an ESC voltage regulator is essentially a dynamic adjustment control strategy based on the deviation between the actual output and the target value. The deviation and its trend are the core judgment criteria. The output voltage is a direct reflection of the control effect, and its acquisition accuracy determines the accuracy of the deviation calculation. The preset target voltage is the control benchmark, which must be clearly defined and fixed to avoid benchmark confusion. The voltage error directly reflects the degree of deviation between the current output and the target, and is the basis for judging whether adjustment is needed and by how much. The error change rate reflects the development trend of the deviation and can predict in advance whether the system will face interference such as sudden load changes or input voltage fluctuations. Both together determine the logic for dividing the subsequent operation stages. If the output voltage acquisition is inaccurate, the error calculation method is inconsistent, or the error change rate is affected by noise, it will lead to distorted judgments in subsequent stages and improper adjustment of PID parameters, ultimately causing excessive output voltage fluctuations or slow response, which cannot meet the voltage stability requirements of scenarios such as drone motor drives and power tool power systems.

[0077] Specifically, the output voltage of the ESC voltage regulator within the current control cycle is acquired. This output voltage is collected in real time via a high-precision analog-to-digital converter at a fixed sampling period. The fixed sampling period is consistent with the control cycle of the ESC voltage regulator and can be set to 1ms to ensure that the latest output voltage data is acquired in each control cycle, avoiding sampling lag. Taking an ESC voltage regulator with a rated output voltage of 24V as an example, the output voltage collected in real time by the high-precision analog-to-digital converter within the current control cycle is 22.1V. This data can accurately reflect the voltage output state under the current load, providing accurate input for subsequent error calculation.

[0078] Obtain a preset target voltage, which is the stable voltage value that the ESC voltage regulator is expected to output. The preset target voltage is set according to the application scenario and load requirements of the ESC voltage regulator. For example, for an ESC voltage regulator used for driving a drone motor, the motor needs a stable voltage of 24V to ensure smooth speed. Therefore, the preset target voltage is set to 24V. This voltage value serves as the control reference and remains fixed throughout the control process to avoid confusion in error calculation due to reference fluctuations and to ensure that all subsequent deviation judgments are based on the same standard.

[0079] The voltage error is calculated based on the output voltage and the preset target voltage. This is achieved by subtracting the output voltage from the target voltage. The voltage error reflects the current deviation of the system; a positive error indicates the output voltage is lower than the target value, while a negative error indicates the output voltage is higher. For example, subtracting the output voltage of 22.1V from the target voltage of 24V yields a voltage error of 1.9V. This error directly reflects that the current output voltage is lower than the target value of 1.9V, requiring subsequent control strategies to increase the output voltage. This avoids the confusion caused by inconsistent calculation directions in traditional methods, which can lead to confusion about the positive and negative meanings of the error and affect the correctness of parameter adjustment.

[0080] Based on the voltage error between the current cycle and the previous cycle, the error change rate is calculated, which is the difference in voltage error between the two cycles divided by the sampling period. This reflects the rate of voltage change. The calculation of the error change rate relies on voltage error data from two consecutive control cycles. The formula for calculating the error change rate is as follows:

[0081] ;

[0082] in, Indicates the rate of change of error. This indicates the voltage error in the current control cycle. This indicates the voltage error of the previous control cycle. This indicates a fixed sampling period, consistent with the control period of the ESC voltage regulator. Set via hardware, taking an example with a voltage error of 2.1V in the previous cycle, 1.9V in the current cycle, and a sampling period of 1ms. The error difference between the two cycles is 1.9V - 2.1V = -0.2V. Dividing this by the sampling period of 1ms, the error change rate is -0.2V / ms. The sign of this value reflects the trend of error change. A negative error change rate indicates that the error is decreasing, meaning the output voltage is gradually approaching the target value; a positive error change rate indicates that the error is increasing, meaning the output voltage is deviating further from the target value. The absolute value reflects the rate of change, providing a core basis for subsequent anti-interference judgment, such as whether the absolute value of the error change rate exceeds the anti-interference judgment threshold of 0.5V / ms - 1V / ms.

[0083] The error change rate is low-pass filtered and high-frequency noise interference is suppressed by weighted averaging. The filtered error change rate is then generated as the input parameter for the next stage of judgment. Since there are high-frequency noises such as motor electromagnetic radiation and line interference in the operating environment of the ESC voltage regulator, these noises can cause instantaneous distortion of the error change rate. For example, if the actual error change rate is -0.2V / ms, it may rise to 0.9V / ms instantaneously under noise interference. If it is used directly for stage judgment, it may falsely trigger the anti-interference and stabilization stage. This step uses a weighted average low-pass filter. For example, the error change rate of the current period, the previous period, and the period before that is taken, with weights set to 0.5, 0.3, and 0.2 respectively. If the error change rates of the three periods are -0.2V / ms, -0.3V / ms, and -0.25V / ms respectively, the filtered error change rate is (-0.2×0.5) + (-0.3×0.3) + (-0.25×0.2) = -0.1 - 0.09 - 0.05 = -0.24V / ms. This processing can effectively suppress instantaneous fluctuations caused by high-frequency noise, ensuring that the error change rate data input to the next stage of judgment is stable and reliable, and avoiding misjudgment problems caused by noise interference.

[0084] In summary, the above steps are closely linked, forming a complete basic data processing chain from the accuracy and real-time performance of data acquisition, the clarity of the reference voltage, the logic of error calculation, to the noise suppression of the error change rate. This provides accurate and stable input for subsequent operational judgments and fuzzy PID parameter adjustments, directly ensuring the reliability and accuracy of the entire ESC voltage regulator voltage control method. Especially in scenarios with high voltage control accuracy requirements, such as drone motor drives, accurate data processing can effectively avoid control malfunctions caused by distortion of basic data and improve the stability of the output voltage.

[0085] In one embodiment, the step of determining the current operating stage of the ESC voltage regulator based on the voltage error and the rate of change of error, and generating a corresponding stage control signal, includes:

[0086] S21, obtain the fast tracking threshold, the precision adjustment threshold, and the anti-interference judgment threshold, wherein the fast tracking threshold is set to 5% to 10% of the rated output voltage of the ESC regulator, the precision adjustment threshold is set to 1% to 3% of the rated output voltage, and the anti-interference judgment threshold is set to 0.5V / ms to 1V / ms.

[0087] S22, determine whether the absolute value of the filtered error change rate exceeds the anti-interference judgment threshold. If it does, generate the control signal for the anti-interference stabilization stage.

[0088] S23, if the anti-interference judgment threshold is not exceeded, then the absolute value of the voltage error is used to determine whether it is greater than the fast tracking threshold. If it is greater, then the control signal for the fast tracking stage is generated.

[0089] S24. If the absolute value of the voltage error is less than or equal to the fast tracking threshold but greater than or equal to the precision adjustment threshold, then a control signal for the precision adjustment stage is generated. The generated stage control signal is used as the input for the next stage of fuzzy inference to select the corresponding subset of fuzzy rules for dynamic switching of the control strategy.

[0090] As described in steps S21-S24 above, by setting a stage judgment threshold that matches the rated parameters of the ESC voltage regulator and clarifying the stage division logic that prioritizes anti-interference, the current stage of the ESC voltage regulator—whether it is the fast tracking stage, the precision adjustment stage, or the anti-interference stabilization stage—is accurately identified, and corresponding stage control signals are generated. This provides a clear basis for strategy selection for subsequent calls to the corresponding fuzzy rule subset, enabling dynamic adaptation of control strategies and operating conditions, and ensuring that the ESC voltage regulator can adopt the optimal control logic in different scenarios.

[0091] In the full operation of an ESC voltage regulator, the control objectives differ fundamentally at different stages. During startup or when the target voltage is significantly adjusted, the output voltage deviates greatly from the target value, requiring priority to quickly reduce the deviation (i.e., rapid tracking). When the output voltage approaches the target value, the deviation is small, requiring priority to suppress overshoot and eliminate steady-state error (i.e., precise adjustment). When there are sudden load changes or input voltage fluctuations, the error rate of change increases sharply, requiring priority to quickly suppress fluctuations (i.e., anti-interference and stability maintenance). If a single control strategy is used without stage division, it will result in large overshoot during rapid tracking, slow response during precise adjustment, and large fluctuations during disturbances. For example, using a small gain for precise adjustment during startup takes 60ms to rise the voltage from 0V to 24V, which cannot meet the rapid startup requirements of a drone. Using a large gain for rapid tracking in steady state results in voltage fluctuations of ±0.8V, affecting the stability of motor speed. Therefore, it is necessary to clearly define the control priorities under different operating conditions through stage division to meet the needs of multiple scenarios.

[0092] The fast tracking threshold, precision adjustment threshold, and anti-interference judgment threshold are obtained. The fast tracking threshold is set to 5% to 10% of the rated output voltage of the ESC regulator, the precision adjustment threshold is set to 1% to 3% of the rated output voltage, and the anti-interference judgment threshold is set to 0.5V / ms to 1V / ms. The purpose of this step is to match the thresholds with the rated performance of the ESC regulator and ensure that the stage division covers all operating conditions. The rated output voltage of the ESC regulator is an inherent parameter of the product. For example, the rated output voltage of an ESC regulator suitable for drone motors is 24V. The fast tracking threshold needs to cover large deviation scenarios during startup or significant voltage adjustment. Taking a 24V rated voltage as an example, calculating 8% of the rated value, the fast tracking threshold is 24V × 8% = 1.92V. The precision adjustment threshold needs to cover small deviation scenarios during steady-state operation. Calculated as 2% of the rated value, the precision adjustment threshold is 24V × 2% = 0.48V. The anti-interference judgment threshold needs to match the load characteristics of the ESC regulator. The error change rate during sudden load changes in drone motors is typically 0.6V / ms-1.2V / ms, so 0.8V / ms is chosen as the anti-interference judgment threshold to ensure that real interference can be identified while avoiding false triggering due to noise. This threshold setting method avoids the problem of poor adaptability of traditional fixed thresholds, making the stage division applicable to ESC regulators with different rated voltages.

[0093] The absolute value of the filtered error change rate is determined based on whether it exceeds the anti-interference threshold. If it does, a control signal for the anti-interference stabilization phase is generated, following the anti-interference priority logic. This is because interference factors, such as sudden load changes and electromagnetic radiation, can cause instantaneous fluctuations in the output voltage. If these are not handled first, they can lead to increased deviations or even system instability. For example, taking a 24VESC voltage regulator, the output voltage is 24V in steady-state operation with a voltage error of 0V and an error change rate of 0V / ms. When the motor load suddenly changes from 5A to 10A, the output voltage drops sharply to 23V. The current cycle voltage error is 1V, and the previous cycle voltage error was 0V. With a sampling period of 1ms, the error change rate is (1V-0V) / 1ms = 1V / ms. After S15 weighted average filtering with weights of 0.5, 0.3, and 0.2, and the error change rates of the previous two cycles being 0V / ms and 0V / ms respectively, the filtered error change rate is ( (1V / ms×0.5) + (0V / ms×0.3) + (0V / ms×0.2) = 0.5V / ms. If a sudden load change causes the output voltage to drop sharply to 22.5V, the current cycle error is 1.5V, the previous cycle error is 0V, the error change rate is 1.5V / ms, and after filtering it is still 1.2V / ms. Its absolute value of 1.2V / ms exceeds the anti-interference judgment threshold of 0.8V / ms. At this time, regardless of whether the voltage error is in other stages, a control signal for the anti-interference stabilization stage is generated to ensure that the system prioritizes the suppression of fluctuations and avoids the spread of interference.

[0094] If the anti-interference threshold is not exceeded, the absolute value of the voltage error is used to determine whether it is greater than the fast tracking threshold. If it is, a control signal for the fast tracking phase is generated. For large deviation conditions in interference-free scenarios, the voltage response speed needs to be accelerated first. Taking the 24VESC voltage regulator as an example, the output voltage is 0V at the beginning of startup, the voltage error is 24V, and the filtered error change rate is 0.8V / ms (not exceeding the anti-interference threshold of 0.8V / ms). The absolute value of the voltage error, 24V, is much greater than the fast tracking threshold of 2V, generating a control signal for the fast tracking phase. This signal will subsequently trigger a fuzzy rule subset that focuses on increasing the proportional gain, such as increasing the proportional gain adjustment from 0 to 2.0, so that the real-time proportional gain increases from the initial 15 to 17, enhancing the system's response to large errors, accelerating the voltage ramp-up speed, and avoiding the ramp-up delay caused by the traditional fixed proportional gain.

[0095] If the absolute value of the voltage error is less than or equal to the fast tracking threshold but greater than or equal to the precision adjustment threshold, a control signal for the precision adjustment stage is generated. This is suitable for medium deviation conditions in interference-free scenarios, where the output voltage is close to the target value, and overshoot and steady-state error need to be suppressed first. Referring to the 24VESC voltage regulator example above, when the output voltage rises to 22.2V, the voltage error is 1.8V. Its absolute value of 1.8V is less than the fast tracking threshold of 2V and greater than the precision adjustment threshold of 0.5V. The filtered error change rate is 0.3V / ms (not exceeding the anti-interference threshold), generating a control signal for the precision adjustment stage. This signal will subsequently trigger a subset of fuzzy rules that focuses on optimizing the integral and derivative gains. For example, the integral gain adjustment increases from 0 to 0.3, and the derivative gain adjustment increases from 0 to 0.2, causing the real-time integral gain to increase from 0.5 to 0.8 and the real-time derivative gain to increase from 1.0 to 1.2. This gradually eliminates the 1.8V deviation through integral action and suppresses overshoot during the voltage rise process through derivative action, ensuring the voltage smoothly approaches the target value.

[0096] The generated stage control signal is used as the input for the next stage of fuzzy inference to select the corresponding fuzzy rule subset for dynamic switching of control strategy. It can serve as a link between stage division and parameter adjustment. The stage control signal adopts digital encoding form, such as 1 for fast tracking stage, 2 for fine adjustment stage, and 3 for anti-interference stabilization stage. It is directly input into the fuzzy inference engine. For example, if the generated control signal is "1" (fast tracking stage), the fuzzy inference engine will call the rule subset that focuses on increasing the proportional gain. If the control signal is "3" (anti-interference stabilization stage), it will call the rule subset that focuses on increasing the differential gain. This ensures that the control strategy of each stage is completely matched with the control objective of that stage, realizing dynamic switching of fast response to large deviations, fine adjustment of medium deviations, and stable fluctuations during interference. It avoids the performance shortcomings of traditional fixed strategies under multiple operating conditions.

[0097] In summary, by binding thresholds to rated parameters, prioritizing anti-interference judgment, and clarifying signal transmission logic, the ESC voltage regulator achieves accurate identification and effective output of control signals during operation. Each design step directly serves the core requirement of control strategy adaptation under different operating conditions. The threshold setting in S21 ensures the universality and rationality of the stage division; the anti-interference priority judgment in S22 ensures rapid response under interference scenarios; the error range judgment in S23-S24 ensures the accuracy of the strategy under different deviation levels; and the signal transmission in S25 ensures seamless connection between stage judgment and subsequent parameter adjustment. Ultimately, this provides key stage decision support for the full-condition adaptation of the entire fuzzy adaptive PID control method. Especially in scenarios with variable operating conditions such as drone motor drives and power tool power systems, this step can effectively avoid voltage fluctuations or slow response caused by inaccurate stage judgment, significantly improving the stability of output voltage and dynamic response quality.

[0098] In one embodiment, the step of generating proportional gain adjustment, integral gain adjustment, and derivative gain adjustment by calling the corresponding fuzzy rule subset based on the stage control signal, voltage error, and error change rate includes:

[0099] S31. Based on the voltage error and the rate of change of the filtered error, convert them from precise numerical values ​​into fuzzy linguistic variables. Use a seven-level fuzzy set for fuzzification to obtain the membership degree of each variable on the negative large, negative medium, negative small, zero, positive small, positive medium, and positive large fuzzy sets.

[0100] S32, select the corresponding fuzzy rule subset according to the stage control signal, where the rules of the fast tracking stage focus on increasing the proportional gain, the rules of the precision adjustment stage focus on optimizing the integral gain and the derivative gain, and the rules of the anti-interference and stabilization stage focus on increasing the derivative gain.

[0101] S33. Based on the membership degree of voltage error and error change rate, combined with the selected fuzzy rule subset, the trigger strength of each rule is calculated using the maximum-minimum inference method, and the maximum values ​​of the outputs of all rules are superimposed to generate a synthetic fuzzy set of proportional gain, integral gain and differential gain.

[0102] S34. The centroid method is used to defuzzify the synthesized fuzzy set. By calculating the weighted average of the membership degree and the corresponding value, the precise proportional gain adjustment, integral gain adjustment and differential gain adjustment are generated.

[0103] As described in steps S31-S34 above, through the complete logic of precise quantity fuzzification, phased rule invocation, fuzzy inference, and precise quantity defuzzification, the real-time operating status and stage control objectives of the ESC voltage regulator are transformed into precise PID parameter adjustment quantities, providing direct input for the subsequent generation of real-time PID parameters, realizing the effective connection between fuzzy control experience and precise PID control, and ensuring that the PID parameter adjustment can accurately match the current operating conditions.

[0104] The essence of fuzzy adaptive PID control in ESC voltage regulators is to transform human control experience into algorithmic logic. Voltage error and error change rate are objective and precise physical quantities. However, the experience-based judgments of needing fast adjustment for large deviations, stable adjustment for small deviations, and rapid suppression of disturbances are presented in fuzzy language, such as "large deviation" and "rapid change". Therefore, precise physical quantities must first be transformed into fuzzy language variables. The differences in control objectives at different operating stages, such as needing strong response for fast tracking, low overshoot for precise adjustment, and fast suppression for anti-interference, determine that experience rules need to be designed according to different scenarios, that is, calling the corresponding subset of fuzzy rules. Finally, the result of fuzzy rule reasoning must be transformed into precise parameter adjustment quantities, that is, defuzzification, so that it can be superimposed with the initial PID parameters to form real-time control parameters. Therefore, this step is the core bridge connecting experience judgment and precise control. Without this step, adaptive adjustment of PID parameters cannot be achieved, and only fixed parameter control can be maintained, which cannot adapt to multiple operating conditions.

[0105] Based on the voltage error and the rate of change of the filtered error, the precise numerical values ​​are converted into fuzzy linguistic variables. Fuzzification is performed using a seven-level fuzzy set to obtain the membership degree of each variable on the negative large, negative medium, negative small, zero, positive small, positive medium, and positive large fuzzy sets. The voltage error comes from the calculation result of S1 (e.g., the preset target voltage of the ESC voltage regulator is 24V, the current output voltage is 22.1V, and the calculated voltage error is 1.9V). The rate of change of the filtered error comes from the processing result of S15 (e.g., the current cycle error is 1.9V, the previous cycle error is 2.1V, the sampling period is 1ms, the calculated error rate of change is -0.2V / ms, and after weighted average filtering, it is -0.2V / ms). During fuzzification, the domain of the voltage error is first set to [-5V, 5V], and the domain of the filtered error change rate is set to [-2V / ms, 2V / ms]. This is suitable for the common error range of ESC voltage regulators with a rated output of 24V. A triangular membership function is used to balance computational efficiency and resolution for fuzzification. For example, a voltage error of 1.9V has a membership degree of 0.9 in the "positive center" fuzzy set and 0.1 in the "positive small" fuzzy set. For the filtered error change rate of -0.2V / ms, the membership degree is 1.0 in the "negative small" fuzzy set. Through the design of a seven-level fuzzy set, compared to the traditional five-level fuzzy set, the subdivision of error and error change rate is improved, effectively avoiding confusion between similar fuzzy sets such as "positive small" and "positive center," laying the foundation for accurate rule triggering. The calculation formula for fuzzification, taking the "positive center (PM)" fuzzy set of voltage error e as an example, is applicable to all seven levels of fuzzy sets.

[0106] ;

[0107] Where e represents voltage error. This indicates that the voltage error e belongs to the fuzzy set. The "membership degree" of has a value range of [0,1]. Denotes the "left boundary" of the fuzzy set PM, when e < hour, =0 ( (Completely not a PM) Denotes the "center point" of the fuzzy set P, when e = hour, =1 ( Completely belong to ), is the "typical value" of the fuzzy set X. Then it represents the "right boundary" of the fuzzy set PM, when e > hour, =0 ( (Completely not part of PM), the corresponding fuzzy rule subset is selected based on the stage control signal. The rules for the fast tracking stage focus on increasing the proportional gain, the rules for the precision adjustment stage focus on optimizing the integral and derivative gains, and the rules for the anti-interference and stabilization stage focus on increasing the derivative gain. The stage control signals originate from the above output results, such as digital signal 1 for the fast tracking stage, digital signal 2 for the precision adjustment stage, and digital signal 3 for the anti-interference and stabilization stage. The design of different rule subsets strictly matches the control objectives of each stage. Taking a 24V rated output ESC voltage regulator as an example, the core rules for the fast tracking stage (signal 1) include: if the voltage error is positive and the rate of change of the filtered error is positively small, then the proportional gain adjustment is positive and the integral gain adjustment is positive. The core rules for the precision adjustment stage (Signal 2) are as follows: if the voltage error is small and the rate of change of the filtered error is small and negative, then the proportional gain adjustment is zero, the integral gain adjustment is small and positive, and the differential gain adjustment is small and positive. Steady-state deviation is eliminated by optimizing the integral gain (Ki), and overshoot is suppressed by moderately adjusting the differential gain (Kd). The core rules for the anti-interference stabilization stage (Signal 3) are as follows: if the voltage error is small and the rate of change of the filtered error is moderate, then the proportional gain adjustment is zero, the integral gain adjustment is small and negative, and the differential gain adjustment is moderate. The error change trend is quickly suppressed by increasing the differential gain (Kd). This avoids the problem of insufficient adaptability of traditional single rule sets under multiple operating conditions and ensures a direct correspondence between the rules and the stage objectives.

[0108] Based on the membership degrees of voltage error and error change rate, and combined with the selected subset of fuzzy rules, the trigger strength of each rule is calculated using the maximum-minimum inference method. The outputs of all rules are then superimposed to generate a composite fuzzy set of proportional gain, integral gain, and differential gain. Taking the fast tracking stage as an example, if the voltage error belongs to "positive medium" (0.9) and "positive small" (0.1), and the filtered error change rate belongs to "positive small" (1.0), when the rule is called, if the voltage error is positive medium and the filtered error change rate is positive small, then when the proportional gain adjustment is positive medium, the trigger strength is the minimum value of the membership degrees of voltage error and error change rate, i.e., min(0.9,1.0)=0.9. When the rule is called, if the voltage error is positive small and the filtered error change rate is positive small, then when the proportional gain adjustment is positive, the trigger strength is min(0.1,1.0)=0.1. The maximum values ​​of the output fuzzy sets of the two rules are then superimposed. The membership degree of the proportional gain adjustment "Zhongzhong" is 0.9, and the membership degree of "Zhongxiao" is 0.1, forming a composite fuzzy set.

[0109] This reasoning method can effectively integrate the influence of all matching rules, avoid the one-sidedness caused by a single rule trigger, and ensure that the fuzzy reasoning results can comprehensively reflect the current operating status.

[0110] The centroid method is used to defuzzify the synthesized fuzzy set. By calculating the weighted average of the membership degree and its corresponding value, accurate proportional gain adjustment, integral gain adjustment, and differential gain adjustment are generated. For example, the proportional gain adjustment is calculated using the centroid method formula, which is as follows:

[0111] ;

[0112] in, This indicates the proportional gain adjustment amount. This represents the membership degree of the i-th fuzzy set in the composite fuzzy set (e.g., the membership degree of "positive small" and "positive middle"). Represents the i-th fuzzy set corresponding to the composite fuzzy set. The center value is taken as n, which represents the number of fuzzy sets participating in the superposition of the synthetic fuzzy set. The centroid method makes full use of the information of all fuzzy sets, thereby improving the accuracy of the adjustment. Similarly, the integral gain adjustment and differential gain adjustment can be calculated to ensure that the output adjustment can accurately match the requirements of increasing Kp, moderately increasing Ki, and maintaining Kd in the fast tracking stage.

[0113] In summary, a complete process of fuzzification, phased rule invocation, fuzzy inference, and defuzzification constructs a transformation link between operating state, empirical rules, and parameter adjustment amounts. Each step directly serves the core requirement of PID parameter adaptation. The seven-level fuzzy set improves the resolution of state recognition, the phased rule subset ensures the matching between parameter adjustment and phase objectives, the maximum-minimum inference method integrates the comprehensive influence of multiple rules, and the centroid method guarantees the accuracy of the adjustment amount. Ultimately, it provides key parameter adjustment basis for the entire fuzzy adaptive PID control method. In scenarios with variable operating conditions, such as drone motor drives and power tool power systems, it can effectively avoid problems such as slow voltage response or excessive fluctuations caused by inaccurate parameter adjustment, significantly improving the dynamic response quality and steady-state control accuracy of the ESC voltage regulator.

[0114] In one embodiment, the step of calculating the real-time proportional gain, integral gain, and derivative gain based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment, combined with the initial PID parameters, includes:

[0115] S41, obtain the initial proportional gain, initial integral gain and initial derivative gain. These parameters are optimized under typical operating conditions through offline simulation and used as the reference parameters for PID control.

[0116] S42, Based on the proportional gain adjustment and the initial proportional gain (the proportional gain adjustment is added to the initial proportional gain), generate a real-time proportional gain to enhance or weaken the system's response to the current error.

[0117] S43, generate a real-time integral gain based on the integral gain adjustment and the initial integral gain (add the integral gain adjustment to the initial integral gain), and determine whether to enable the integral function based on the voltage error. When the absolute value of the voltage error is greater than the fast tracking threshold, the integral function is turned off to prevent integral saturation. When the absolute value of the voltage error is not greater than the fast tracking threshold, the integral function is enabled to eliminate steady-state deviation.

[0118] S44 generates a real-time differential gain based on the differential gain adjustment and the initial differential gain (by adding the differential gain adjustment to the initial differential gain), and introduces a low-pass filter into the differential term to suppress the interference of high-frequency noise on the control quantity.

[0119] As described in steps S41-S44 above, by combining offline optimization of initial PID parameters with online adjustment, and integrating integral separation strategy and derivative low-pass filter design, real-time PID parameters adapted to the current operating conditions are generated. This retains the stability of the initial parameters under typical operating conditions, adapts to changes in operating conditions through dynamic adjustment, and solves the problems of integral saturation and derivative noise interference. This provides accurate and reliable parameter support for the calculation of subsequent control quantities, and realizes online self-adaptation of PID parameters under all operating conditions.

[0120] The PID parameters of the ESC voltage regulator must simultaneously satisfy baseline stability and operating condition adaptability. The initial PID parameters are optimized under typical operating conditions through offline simulation and serve as the baseline for parameter adjustment, ensuring a stable control foundation for the system under normal operating conditions. The proportional, integral, and derivative gain adjustments reflect the differences between the current operating condition and the typical operating condition, and need to be dynamically corrected by superposition. In addition, the integral term is prone to integral saturation due to continuous accumulation under large error scenarios, i.e., the control quantity exceeds the range. The derivative term is susceptible to high-frequency noise interference, causing parameter fluctuations. Therefore, a targeted integral separation and derivative filtering mechanism must be designed to ensure that the real-time parameters are both adaptable to the operating conditions and free from additional interference, ultimately achieving stable control of the output voltage. If this step is missing, relying solely on the initial PID parameters or simply superimposing the adjustment amount will lead to overshoot under large errors, steady-state error under small errors, and fluctuations under interference, failing to meet the requirements of scenarios such as drone motors and power tools.

[0121] The initial proportional gain, initial integral gain, and initial derivative gain were obtained through offline simulation and optimized under typical operating conditions. These parameters serve as the benchmark parameters for PID control. The typical operating conditions are set according to the application scenario of the ESC voltage regulator. Taking an ESC voltage regulator with a rated output voltage of 24V and adapted for drone motors as an example, the typical operating conditions are an input voltage of 24V and a load of 5A. A simulation model of the ESC voltage regulator was built using MATLAB / Simulink. The optimization objectives were output voltage overshoot ≤2% and response time ≤30ms. The initial parameters were obtained iteratively, with an initial proportional gain of 15, an initial integral gain of 0.5, and an initial derivative gain of 1.0. These initial parameters ensure that the system has a stable control foundation under typical operating conditions, avoiding parameter deviations caused by traditional manual tuning, and providing a reliable benchmark for subsequent online adjustments.

[0122] Based on the proportional gain adjustment and the initial proportional gain, the proportional gain adjustment is added to the initial proportional gain to generate the real-time proportional gain. This real-time proportional gain is used to enhance or weaken the system's response to the current error. Taking the fast tracking phase as an example, the generated proportional gain adjustment is 2.0. Adding this to the initial proportional gain of 15 yields a real-time proportional gain of 15 + 2.0 = 17. The real-time proportional gain directly determines the system's response sensitivity to voltage errors. When the error is large (e.g., 24V at startup), the adjustment is positive and large, increasing the real-time Kp, thus enhancing the system's response to the error and accelerating the voltage ramp-up. When the error is small, such as 0.5V in steady state, the adjustment is close to 0, and the real-time Kp remains at its initial value of 15 to avoid excessive response and fluctuations, ensuring adaptability of the response strength under different error scenarios.

[0123] Based on the integral gain adjustment and the initial integral gain, the integral gain adjustment is added to the initial integral gain to generate the real-time integral gain. The system then determines whether to enable integration based on the voltage error. Integration is disabled when the absolute value of the voltage error exceeds the fast tracking threshold to prevent integral saturation; integration is enabled when the absolute value of the voltage error is not greater than the fast tracking threshold to eliminate steady-state deviation. For example, if the integral gain adjustment in the precision adjustment stage is 0.3, then the real-time integral gain is 0.5 + 0.3 = 0.8. When the absolute value of the voltage error is greater than 2V, such as 24V at startup... When the load changes abruptly and the error reaches 2.5V, the integral action is disabled, and Ki=0. This prevents the control quantity from exceeding the range due to the continuous accumulation of the integral term. If the integral term increases from 0 to 10, the control quantity exceeds the upper limit of 100, effectively preventing integral saturation. When the absolute value of the voltage error is ≤2V, such as errors of 1.8V or 0.5V, the integral action is enabled, and Ki=0.8 in real time. The steady-state error is gradually eliminated through the integral term. For example, if the error is 0.5V in steady state, the continuous accumulation of the integral term causes the control quantity to increase slowly, and the output voltage rises from 23.5V to 24V. The steady-state error elimination time is shortened, resolving the contradiction between overshoot and steady-state error caused by the lack of integral separation in traditional PID control.

[0124] Based on the differential gain adjustment and the initial differential gain, the differential gain adjustment is added to the initial differential gain to generate the real-time differential gain. A low-pass filter is introduced into the differential term to suppress the interference of high-frequency noise on the control quantity. The differential gain adjustment is 0.8 for the anti-interference and stabilization stage. Therefore, the real-time differential gain is 1.0 + 0.8 = 1.8. The low-pass filter uses an RC filter circuit (time constant 0.1ms) to process the differential term. The core function of the differential element is to suppress the trend of error change. When a sudden load change causes the error change rate to 1.2V / ms, exceeding the anti-interference threshold of 0.8V / ms, and the real-time Kd=1.8, the increase in error can be quickly suppressed. Without the introduction of low-pass filtering, high-frequency noise (such as 1kHz electromagnetic interference) will cause the error change rate to jump instantaneously from 1.2V / ms to 2.0V / ms, and the real-time Kd will fluctuate to 2.2. The sudden increase in control input will cause a voltage spike of 0.5V. After the introduction of filtering, the noise is suppressed, the error change rate stabilizes at 1.2V / ms, the real-time Kd remains at 1.8, the control input is stable, and the voltage fluctuation is ≤0.2V, ensuring the stability of the differential action.

[0125] In summary, through the collaborative design of initial parameter optimization, adjustment superposition, integral separation, and differential filtering, a core link for online adaptive PID parameter control was constructed. Each step directly serves the requirement for precise parameter adaptation to the operating conditions. Specifically, the initial parameters in S41 ensure baseline stability, the real-time Kp in S42 ensures error response adaptation, the real-time Ki and integral separation in S43 resolve the contradiction between overshoot and steady-state error, and the real-time Kd and differential filtering in S44 ensure anti-interference stability. In the application of the 24V UAV ESC voltage regulator, it enables real-time parameters to accelerate response during startup, suppress overshoot during steady-state operation, and quickly stabilize during disturbances, ultimately reducing output voltage fluctuations, shortening response time, and significantly improving the all-condition control performance of the ESC voltage regulator.

[0126] In one embodiment, the step of calculating the control quantity of the ESC voltage regulator based on the real-time proportional gain, integral gain, and derivative gain, combined with the voltage error, and driving the power switch to achieve closed-loop regulation of the output voltage includes:

[0127] S51 calculates the control quantity using a positional PID algorithm based on the real-time proportional gain, real-time integral gain, and real-time derivative gain, combined with the voltage error and the rate of change of the filtered error. This quantity is the sum of the proportional term, integral term, and derivative term.

[0128] S52 performs amplitude limiting on the calculated control quantity to ensure that it is within the minimum and maximum output range allowed by the system, and to prevent control signal overflow.

[0129] S53 converts the limited control quantity into the duty cycle of the pulse width modulation signal to generate a pulse waveform with a specific duty cycle.

[0130] S54 sends the pulse width modulation signal to the power drive circuit of the ESC voltage regulator to control the on and off time of the power switching transistor.

[0131] The S55 adjusts the on / off ratio of the power switching transistor to change the output voltage, and continuously collects new output voltage data to adjust the output voltage of the ESC voltage regulator, forming a closed-loop control to achieve fast, stable, and interference-resistant adjustment of the output voltage.

[0132] As described in steps S51-S55 above, the execution link of calculating control quantity, limiting control quantity to prevent overflow, PWM duty cycle conversion, power switch driving, and continuous feedback closed loop is achieved through positional PID algorithm. The generated real-time PID parameters are converted into physical signals that can drive the power switch of the ESC voltage regulator. The output voltage is changed by dynamically adjusting the on and off time of the switch, and closed-loop control is formed by continuous voltage acquisition. Finally, the output voltage of the ESC voltage regulator is fast, steady-state accurate and anti-interference stable, which meets the terminal requirements of voltage control in scenarios such as drone motor drive and power tool power system.

[0133] The voltage control of an ESC voltage regulator is essentially a closed-loop cycle of parameter adjustment, physical execution, and effect feedback. The preceding steps complete the logical calculations for data acquisition, stage judgment, and parameter tuning. This step is the core link that transforms the logical calculation results into physical actions. Real-time PID parameters are abstract control coefficients that need to be converted into specific control quantities, such as the original value of the PWM duty cycle, through the PID algorithm. The control quantity must meet the driving requirements of the power switching transistor, such as a duty cycle range of 0%-100%. Otherwise, it will lead to over-conduction or over-turning of the switching transistor. The PWM signal is the direct carrier driving the switching transistor; its duty cycle determines the proportion of the switching transistor's on-time, and thus the output voltage level. Finally, continuous acquisition of the output voltage and feedback to the preceding steps are necessary to achieve a closed loop of control, feedback, and readjustment, ensuring that the output voltage always approaches the preset target value. Without this step, the preceding parameter tuning will lose its practical meaning, the ESC voltage regulator cannot complete the physical action of voltage regulation, and it will be impossible to achieve closed-loop stable control.

[0134] Based on the real-time proportional gain, real-time integral gain, and real-time derivative gain, and combined with the voltage error and the filtered error change rate, a positional PID algorithm is used to calculate the control quantity, which is the sum of the proportional, integral, and derivative terms. The real-time PID parameters are derived from the above output results. Taking the fast tracking stage of a 24V rated output ESC voltage regulator as an example, the real-time proportional gain is 17, the real-time integral gain is 0.8, and the real-time derivative gain is 1.0. The voltage error is the output result mentioned above, i.e., the current output voltage is 22.1V, the preset target voltage is 24V, and the voltage error is 1.9V. The filtered error change rate is the processing result mentioned above, i.e., the current cycle error is 1.9V, the previous cycle error is 2.1V, the sampling period is 1ms, and the calculated error change rate is -0.2V / ms. After weighted average filtering, it is still -0.2V / ms. The control quantity calculation logic of the positional PID algorithm is as follows: Control quantity = Real-time proportional gain × Voltage error + Real-time integral gain × Voltage error integral + Real-time derivative gain × Filtered error change rate. Substituting the data, the calculation is as follows: Proportional term = 17 × 1.9 = 32.3, Integral term = 0.8 × (1.9 + 2.1) × 1ms (integral of error over the last two cycles) = 0.8 × 4 × 1 = 3.2, Derivative term = 1.0 × (-0.2) = -0.2, and the final control quantity = 32.3 + 3.2 - 0.2 = 35.3. This algorithm directly outputs the absolute value of the control quantity without relying on the data from the previous cycle, avoiding the cumulative error problem of incremental PID, ensuring the independence and accuracy of the control quantity calculation. Even if the data in a single cycle is abnormal, it can still be recalculated in the next cycle, and the output voltage fluctuation is controlled within ±0.2V.

[0135] The calculated control quantity is limited to ensure it remains within the system's minimum and maximum allowable output range, preventing control signal overflow. The system's allowable control quantity range is set based on the power switch's drive capability, typically corresponding to 0%-100% of the PWM duty cycle. Therefore, the control quantity limiting range is set to 0-100, where a control quantity of 0 corresponds to a 0% duty cycle and a control quantity of 100 corresponds to a 100% duty cycle. Taking the S51-calculated control quantity of 35.3 as an example, it falls within the 0-100 range and requires no adjustment. However, under extreme conditions (such as a sudden load drop to 0A), the PID-calculated control quantity reaches 110, exceeding the upper limit. After limiting, it is forcibly set to 100 to prevent the power switch from continuously conducting due to the PWM duty cycle exceeding 100%. This process effectively protects the power switch, keeping its operating temperature below 80℃, reducing the failure rate by more than 40%, and preventing abnormal increases in output voltage caused by control signal overflow.

[0136] The limited control quantity is converted into a pulse width modulation (PWM) signal duty cycle, generating a pulse waveform with a specific duty cycle. The control quantity and PWM duty cycle are linearly calibrated, i.e., duty cycle = (limited control quantity / upper limit of control quantity) × 100%, where the upper limit of the control quantity is 100, therefore the duty cycle = limited control quantity × 1%. Taking a limited control quantity of 35.3 in S52 as an example, the converted duty cycle = 35.3 × 1% = 35.3%, generating a PWM waveform with a pulse period of 1ms (consistent with the control period), an on-time of 0.353ms, and an off-time of 0.647ms. This conversion relationship is factory calibrated with an error ≤1%, ensuring accurate correspondence between the control quantity and duty cycle and avoiding voltage deviation problems found in traditional uncalibrated schemes. For example, a control quantity of 50 corresponds to a duty cycle of 50%, resulting in an output voltage that accurately approaches the target value of 24V.

[0137] The pulse-width modulation (PWM) signal is sent to the power drive circuit of the ESC voltage regulator to control the on and off times of the power switching transistor. This power drive circuit is an integral module of the ESC voltage regulator, responsible for amplifying the PWM signal to the drive voltage (typically 12V) of the power switching transistor (such as a MOSFET). Taking a PWM signal with a 35.3% duty cycle as an example, after receiving the signal, the drive circuit controls the power switching transistor to be on for 0.353ms and off for 0.647ms within each 1ms cycle. The on-time ratio of the switching transistor directly determines the output voltage of the ESC voltage regulator. The longer the on-time, the longer the input voltage is applied to the output terminal, resulting in a higher output voltage, and vice versa. This step realizes the conversion between electrical signal and physical action and is the direct execution link of voltage regulation.

[0138] By adjusting the on-state ratio of the power switch, the output voltage is changed, and new output voltages are continuously acquired to adjust the output voltage of the ESC voltage regulator, forming a closed-loop control. This achieves rapid, stable, and interference-resistant adjustment of the output voltage. As the on-state ratio of the power switch is adjusted (35.3% duty cycle), the output voltage of the ESC voltage regulator gradually increases from 22.1V. At the same time, the voltage acquisition module continuously acquires new output voltages at a fixed sampling period of 1ms. If the output voltage of 22.5V is acquired in the next cycle, this new voltage is fed back to step S1 above, and the voltage error (24V-22.5V=1.5V) and error change rate are recalculated, initiating the next round of stage judgment, parameter adjustment, and control quantity calculation. This closed-loop control, feedback, and readjustment cycle is 1ms, ensuring a rapid response to changes in operating conditions. For example, when the load suddenly changes from 5A to 10A, the output voltage drops sharply to 23V. After closed-loop feedback, it only takes 8ms to restore the voltage to 23.8V, with a fluctuation range of ≤0.5V, achieving rapid, stable, and anti-interference regulation of the output voltage.

[0139] In summary, through a complete execution chain of PID control calculation, limiting, PWM conversion, switching transistor drive, and closed-loop feedback, the parameter tuning results of the preceding steps are transformed into actual voltage regulation actions. Each step directly serves the core requirement of terminal voltage stability. Specifically, the positional PID in S51 ensures accurate and independent control calculation; the limiting protection of the power switch and voltage stabilization in S52; the PWM conversion in S53 ensures precise correspondence between the control quantity and physical action; the drive in S54 realizes action execution; and the closed-loop feedback in S55 ensures continuous adaptation to changes in operating conditions. In the application of a 24V UAV ESC voltage regulator, this step enables the output voltage to rise from 0V to 24V within 30ms during the startup phase, with steady-state fluctuations ≤±0.2V and shortened recovery time during load surges. This fully meets the high requirements of UAV motor drive for dynamic voltage response and steady-state accuracy, and is the key execution guarantee of the entire fuzzy adaptive PID control method.

[0140] In one embodiment, the present invention also discloses an ESC voltage regulator control system based on fuzzy adaptive PID, comprising:

[0141] Module 1 is used to acquire the output voltage of the ESC voltage regulator and the preset target voltage, and to calculate the voltage error and error change rate based on the output voltage and the preset target voltage.

[0142] The first generation module 2 is used to determine the current operating stage of the ESC voltage regulator based on the voltage error and the rate of change of error, and to generate the corresponding stage control signal.

[0143] The second generation module 3 is used to generate proportional gain adjustment, integral gain adjustment and derivative gain adjustment by calling the corresponding fuzzy rule subset based on the stage control signal, voltage error and error change rate.

[0144] Calculation module 4 is used to calculate the real-time proportional gain, integral gain, and derivative gain based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment, combined with the initial PID parameters.

[0145] The adjustment module 5 is used to calculate the control quantity of the ESC voltage regulator based on the real-time proportional gain, integral gain and derivative gain, combined with the voltage error, and drive the power switch to achieve closed-loop regulation of the output voltage.

[0146] In one embodiment, the computing module includes:

[0147] The acquisition unit is used to acquire the initial proportional gain, initial integral gain, and initial derivative gain.

[0148] The first generation unit is used to generate a real-time proportional gain based on the proportional gain adjustment amount and the initial proportional gain, which is used to enhance or weaken the response strength to the current error.

[0149] The judgment unit is used to generate a real-time integral gain based on the integral gain adjustment amount and the initial integral gain, and to determine whether to enable the integral function based on the voltage error. When the absolute value of the voltage error is greater than the fast tracking threshold, the integral function is turned off to prevent integral saturation. When the absolute value of the voltage error is not greater than the fast tracking threshold, the integral function is enabled to eliminate steady-state deviation.

[0150] The second generation unit is used to generate the real-time differential gain based on the differential gain adjustment amount and the initial differential gain, and to introduce a low-pass filter into the differential term to suppress the interference of high-frequency noise on the control quantity.

[0151] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described ESC voltage regulator voltage control method based on fuzzy adaptive PID.

[0152] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described fuzzy adaptive PID-based ESC voltage regulator control method.

[0153] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0154] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0155] The above description is merely a preferred embodiment of the present invention and does not limit the scope of this application. Any equivalent results or equivalent process transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of protection of this application.

Claims

1. A voltage control method for an ESC voltage regulator based on fuzzy adaptive PID, characterized in that, Includes the following steps: Obtain the output voltage of the ESC voltage regulator and the preset target voltage, and calculate the voltage error and error change rate based on the output voltage and the preset target voltage; The current operating stage of the ESC voltage regulator is determined based on the voltage error and the rate of change of error, and the corresponding stage control signal is generated. Based on the stage control signal, voltage error, and error change rate, the corresponding fuzzy rule subset is invoked to generate the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment. Specific steps include: Based on the voltage error and the rate of change of the filtered error, they are converted from precise numerical values ​​into fuzzy linguistic variables, and the membership degree of each variable on the fuzzy sets of negative large, negative medium, negative small, zero, positive small, positive medium, and positive large is obtained. The corresponding fuzzy rule subset is selected based on the stage control signal. The rules in the fast tracking stage focus on increasing the proportional gain, the rules in the precise adjustment stage focus on optimizing the integral gain and the derivative gain, and the rules in the anti-interference and stabilization stage focus on increasing the derivative gain. Based on the membership degree of voltage error and error change rate, combined with the selected fuzzy rule subset, the trigger strength of each rule is calculated, and the outputs of all rules are superimposed to generate a synthetic fuzzy set of proportional gain, integral gain and differential gain. The synthetic fuzzy set is defuzzified, and the precise proportional gain adjustment, integral gain adjustment, and differential gain adjustment are generated by calculating the weighted average of the membership degree and the corresponding value. Based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment, and combined with the initial PID parameters, calculate the real-time proportional gain, integral gain, and derivative gain. Based on the real-time proportional gain, integral gain, and derivative gain, and combined with the voltage error, the control quantity of the ESC voltage regulator is calculated, and the power switching transistor is driven to achieve closed-loop regulation of the output voltage.

2. The voltage control method for an ESC voltage regulator based on fuzzy adaptive PID according to claim 1, characterized in that, The steps of obtaining the output voltage of the ESC voltage regulator and the preset target voltage, and calculating the voltage error and error change based on the output voltage and the preset target voltage, include: The output voltage of the ESC voltage regulator is acquired in the current control cycle. This output voltage is acquired in real time through a high-precision analog-to-digital converter with a fixed sampling period. Obtain a preset target voltage, which is the stable voltage value that the ESC voltage regulator is expected to output; Calculate the voltage error based on the output voltage and the preset target voltage; Calculate the rate of change of error based on the voltage error between the current cycle and the previous cycle; The error change rate is subjected to low-pass filtering, and high-frequency noise interference is suppressed by weighted averaging to generate the filtered error change rate.

3. The voltage control method for an ESC voltage regulator based on fuzzy adaptive PID according to claim 1, characterized in that, The step of determining the current operating stage of the ESC voltage regulator based on the voltage error and the rate of change of error, and generating the corresponding stage control signal, includes: Obtain the fast tracking threshold, the precise adjustment threshold, and the anti-interference judgment threshold; The absolute value of the filtered error change rate is used to determine whether it exceeds the anti-interference judgment threshold. If it does, a control signal for the anti-interference stabilization stage is generated. If the anti-interference judgment threshold is not exceeded, the absolute value of the voltage error is used to determine whether it is greater than the fast tracking threshold. If it is greater, the control signal for the fast tracking stage is generated. If the absolute value of the voltage error is less than or equal to the fast tracking threshold but greater than or equal to the precision adjustment threshold, then a control signal for the precision adjustment stage is generated.

4. The voltage control method for an ESC voltage regulator based on fuzzy adaptive PID according to claim 3, characterized in that, The steps for calculating the real-time proportional gain, integral gain, and derivative gain based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment, combined with the initial PID parameters, include: Obtain the initial proportional gain, initial integral gain, and initial derivative gain; Based on the proportional gain adjustment and the initial proportional gain, a real-time proportional gain is generated to enhance or weaken the response to the current error. Based on the integral gain adjustment and the initial integral gain, a real-time integral gain is generated, and the integration function is enabled or disabled based on the voltage error. When the absolute value of the voltage error is greater than the fast tracking threshold, integration is disabled to prevent integral saturation. When the absolute value of the voltage error is not greater than the fast tracking threshold, integration is enabled to eliminate steady-state deviation. Based on the differential gain adjustment and the initial differential gain, a real-time differential gain is generated, and a low-pass filter is introduced into the differential term to suppress the interference of high-frequency noise on the control quantity.

5. The voltage control method for an ESC voltage regulator based on fuzzy adaptive PID according to claim 1, characterized in that, The steps of calculating the control quantity of the ESC voltage regulator based on the real-time proportional gain, integral gain, and derivative gain, combined with the voltage error, and driving the power switch to achieve closed-loop regulation of the output voltage include: The control quantity is calculated based on the real-time proportional gain, real-time integral gain, and real-time derivative gain, combined with the voltage error and the rate of change of the filtered error. The calculated control value is then subjected to amplitude limiting. The limited control quantity is converted into the duty cycle of the pulse width modulation signal to generate a pulse waveform with a specific duty cycle; The power drive circuit that sends the pulse width modulation signal to the ESC voltage regulator is used to control the on and off times of the power switching transistor. By adjusting the on-state ratio of the power switching transistor, the output voltage is changed, and new output voltages are continuously collected to adjust the output voltage of the ESC voltage regulator, thus forming a closed-loop control.

6. A voltage control system for an ESC voltage regulator based on fuzzy adaptive PID, characterized in that, include: The acquisition module is used to acquire the output voltage of the ESC voltage regulator and the preset target voltage, and to calculate the voltage error and error change rate based on the output voltage and the preset target voltage; The first generation module is used to determine the current operating stage of the ESC voltage regulator based on the voltage error and the rate of change of error, and to generate the corresponding stage control signal. The second generation module is used to generate proportional gain adjustment, integral gain adjustment, and derivative gain adjustment by calling the corresponding fuzzy rule subset based on the stage control signal, voltage error, and error change rate. Specific steps include: Based on the voltage error and the rate of change of the filtered error, they are converted from precise numerical values ​​into fuzzy linguistic variables, and the membership degree of each variable on the fuzzy sets of negative large, negative medium, negative small, zero, positive small, positive medium, and positive large is obtained. The corresponding fuzzy rule subset is selected based on the stage control signal. The rules in the fast tracking stage focus on increasing the proportional gain, the rules in the precise adjustment stage focus on optimizing the integral gain and the derivative gain, and the rules in the anti-interference and stabilization stage focus on increasing the derivative gain. Based on the membership degree of voltage error and error change rate, combined with the selected fuzzy rule subset, the trigger strength of each rule is calculated, and the outputs of all rules are superimposed to generate a synthetic fuzzy set of proportional gain, integral gain and differential gain. The synthetic fuzzy set is defuzzified, and the precise proportional gain adjustment, integral gain adjustment, and differential gain adjustment are generated by calculating the weighted average of the membership degree and the corresponding value. The calculation module is used to calculate the real-time proportional gain, integral gain, and derivative gain based on the proportional gain adjustment, integral gain adjustment, and derivative gain adjustment, combined with the initial PID parameters. The adjustment module is used to calculate the control quantity of the ESC voltage regulator based on the real-time proportional gain, integral gain, and derivative gain, combined with the voltage error, and drive the power switch to achieve closed-loop regulation of the output voltage.

7. The ESC voltage regulator control system based on fuzzy adaptive PID according to claim 6, characterized in that, The computing module includes: The acquisition unit is used to acquire the initial proportional gain, initial integral gain, and initial derivative gain. The first generation unit is used to generate a real-time proportional gain based on the proportional gain adjustment amount and the initial proportional gain, which is used to enhance or weaken the response strength to the current error. The judgment unit is used to generate a real-time integral gain based on the integral gain adjustment amount and the initial integral gain, and to determine whether to enable the integral function based on the voltage error. When the absolute value of the voltage error is greater than the fast tracking threshold, the integral function is turned off to prevent integral saturation. When the absolute value of the voltage error is not greater than the fast tracking threshold, the integral function is enabled to eliminate steady-state deviation. The second generation unit is used to generate the real-time differential gain based on the differential gain adjustment amount and the initial differential gain, and to introduce a low-pass filter into the differential term to suppress the interference of high-frequency noise on the control quantity.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Four-section self-adaptive PID control method for digital DC / DC converter

    CN104660043A

  • Boost converter fuzzy control method

    CN112865522A