A nonlinear pi control method and system based on error square threshold compensation

CN122815840APending Publication Date: 2026-09-25HUNAN ADVANCECHIP ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611309552.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

该类方法虽然在一定程度上改善了响应性能,但增益随误差仅呈线性增长,大误差时的加速效果不够显著,调节时间比较长;且未引入阈值设计,误差极小时仍存在参数摄动敏感性问题;同时,该结构为增益修正型,本质上改变了PI控制器的核心参数,影响了系统稳定性分析的统一框架

Benefits of technology

本申请通过获取电压调节器的参考电压和实际输出电压,并将参考电压和实际输出电压进行差值计算,得到误差信号;基于预设阈值,对误差信号进行非线性映射,得到目标误差信号;将目标误差信号输入至PI控制器,得到PI控制量;基于预设阈值和误差信号,计算前馈补偿量;将PI控制量和前馈补偿量相加,得到总控制量;对于不同的控制系统结构,采用不同方式输出总控制量,以实现非线性PI控制。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122815840A_ABST
    Figure CN122815840A_ABST
Patent Text Reader

Abstract

The application discloses a nonlinear PI control method and system based on error square threshold compensation, which comprises the following steps: obtaining a reference voltage and an actual output voltage of a voltage regulator, and calculating the difference between the reference voltage and the actual output voltage to obtain an error signal; performing nonlinear mapping on the error signal based on a preset threshold to obtain a target error signal; inputting the target error signal into a PI controller to obtain a PI control amount; calculating a feedforward compensation amount based on the preset threshold and the error signal; adding the PI control amount and the feedforward compensation amount to obtain a total control amount; and outputting the total control amount in different ways for different control system structures to realize nonlinear PI control. The application can improve the voltage response speed when a large load suddenly changes, effectively suppress the overshoot of the output voltage, shorten the adjustment time, and realize the same steady-state accuracy as a standard PI controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power electronic control technology, and in particular to a nonlinear PI control method and system based on error squared threshold compensation. Background Technology

[0002] Proportional-integral (PI) controllers are widely used in closed-loop control of various voltage regulators due to their simple structure, ease of implementation, and high steady-state accuracy. However, traditional PI controllers have the following inherent drawbacks, especially when the load changes rapidly over a wide range. First, there is an inherent contradiction between speed and overshoot; second, the differentiated requirements for large and small errors cannot be met simultaneously; and third, integral saturation exacerbates overshoot.

[0003] Existing technologies have proposed error absolute value-based nonlinear PI controllers, whose gain varies linearly with the absolute value of the error. While this approach improves response performance to some extent, the gain only increases linearly with the error, resulting in insufficient acceleration at large errors and long settling times. Furthermore, the lack of a threshold design means that parameter perturbation sensitivity remains even at extremely small errors. Additionally, this gain-corrected structure fundamentally alters the core parameters of the PI controller, impacting the unified framework for system stability analysis.

[0004] In summary, existing technologies suffer from problems such as an inability to balance response speed and overshoot during large load changes, and excessively long settling times. Summary of the Invention

[0005] This application aims to propose a nonlinear PI control method and system based on error squared threshold compensation, which can improve the voltage response speed under large load changes without changing the structure and parameters of the standard PI controller, while effectively suppressing the overshoot of the output voltage; it can shorten the settling time and achieve steady-state accuracy that is completely consistent with the standard PI controller.

[0006] In a first aspect, embodiments of this application provide a nonlinear PI control method based on error squared threshold compensation, the method comprising: The reference voltage and the actual output voltage of the voltage regulator are obtained, and the difference between the reference voltage and the actual output voltage is calculated to obtain the error signal. Based on a preset threshold, the error signal is nonlinearly mapped to obtain the target error signal; The target error signal is input to the PI controller to obtain the PI control quantity; Calculate the feedforward compensation amount based on the preset threshold and the error signal; The PI control quantity and the feedforward compensation quantity are added together to obtain the total control quantity; for different control system structures, the total control quantity is output in different ways to achieve nonlinear PI control.

[0007] In some implementations, the step of performing nonlinear mapping on the error signal based on a preset threshold to obtain a target error signal includes: The error signal is compared with the preset threshold, which includes a positive preset threshold and a negative preset threshold. If the error signal is greater than the positive preset threshold, the error signal is nonlinearly mapped using the first square law to obtain the target error signal; If the error signal is less than the negative preset threshold, the error signal is nonlinearly mapped using the second square law to obtain the target error signal; the second square law is a negative first square law. If the error signal is greater than or equal to the negative preset threshold and less than or equal to the positive preset threshold, then there is no need to perform nonlinear mapping on the error signal, and the error signal is used as the target error signal.

[0008] In some embodiments, the step of applying a first square law to the error signal nonlinearly to obtain the target error signal includes: The difference is obtained by subtracting the square of the preset threshold from the square of the error signal. The difference result is added to the preset threshold to obtain the target error signal.

[0009] In some implementations, calculating the feedforward compensation amount based on the preset threshold and the error signal includes: The error signal is compared with the preset threshold, which includes a positive preset threshold and a negative preset threshold. If the error signal is greater than the positive preset threshold, the difference result is multiplied by the feedforward gain to obtain the feedforward compensation amount, wherein the difference result is the square of the error signal minus the square of the preset threshold. If the error signal is less than the negative preset threshold, the difference result is multiplied by the feedforward gain to obtain the multiplication result, and the negative value of the multiplication result is obtained to obtain the feedforward compensation amount; If the error signal is greater than or equal to the negative preset threshold and less than or equal to the positive preset threshold, then the feedforward compensation is zero.

[0010] In some implementations, the feedforward gain is determined by: When the error signal reaches its maximum value, the feedforward compensation amount is equal to the maximum current reference value allowed to be output by the PI controller; The feedforward gain is determined based on the maximum current reference value, the maximum error signal, and the preset threshold.

[0011] In some implementations, the preset threshold is determined by the following methods: The preset threshold is determined based on the voltage sampling noise level, steady-state accuracy requirements, expected magnitude of load mutation, and voltage level of the voltage regulator; the steady-state accuracy requirements are to control the absolute value of the error signal within the preset threshold range, and the expected magnitude of load mutation is the voltage change magnitude expected by the control system during load mutation.

[0012] In some implementations, the method of outputting the total control quantity in different ways for different control system architectures includes: When the control system is a single voltage loop structure, the total control quantity is input to the pulse width modulation unit as the duty cycle setpoint. When the control system is a dual closed-loop structure with an outer voltage loop and an inner current loop, the total control quantity is input to the inner current loop PI controller as a reference value for the inner current loop.

[0013] Secondly, embodiments of this application also provide a nonlinear PI control system based on error squared threshold compensation, the system comprising: The error signal calculation module is used to obtain the reference voltage and the actual output voltage of the voltage regulator, and calculate the difference between the reference voltage and the actual output voltage to obtain the error signal. The nonlinear mapping module is used to perform nonlinear mapping on the error signal based on a preset threshold to obtain the target error signal; The PI control quantity acquisition module is used to input the target error signal to the PI controller to obtain the PI control quantity; The feedforward compensation calculation module is used to calculate the feedforward compensation amount based on the preset threshold and the error signal; The total control quantity calculation module is used to add the PI control quantity and the feedforward compensation quantity to obtain the total control quantity; for different control system structures, the total control quantity is output in different ways to achieve nonlinear PI control.

[0014] Thirdly, embodiments of this application also provide an electronic device, including at least one processor and a memory for communicatively connecting to the at least one processor; the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a nonlinear PI control method based on error squared threshold compensation as described above.

[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to execute a nonlinear PI control method based on error squared threshold compensation as described above.

[0016] Compared with the prior art, this application has the following beneficial effects: This application obtains the reference voltage and actual output voltage of the voltage regulator, calculates the difference between the reference voltage and the actual output voltage to obtain an error signal; performs nonlinear mapping on the error signal based on a preset threshold to obtain a target error signal; inputs the target error signal to a PI controller to obtain a PI control quantity; calculates the feedforward compensation quantity based on the preset threshold and the error signal; adds the PI control quantity and the feedforward compensation quantity to obtain the total control quantity; and outputs the total control quantity in different ways for different control system structures to achieve nonlinear PI control.

[0017] Thus, by performing nonlinear mapping on the error signal through a preset threshold and calculating the feedforward compensation based on the preset threshold and the error signal, the total control quantity synthesized by the parallel superposition of two paths enhances the PI control effect without changing the proportional gain and integral gain parameters of the PI controller itself, without reducing the phase margin of the control system, without sacrificing small-signal stability, and avoiding the oscillation risk caused by the increase in linear gain. By adding the PI control quantity and the feedforward compensation quantity to obtain the total control quantity, and then outputting the total control quantity in different ways according to different control system structures, nonlinear PI control using the total control quantity can improve the voltage response speed under large load changes without changing the structure and parameters of the standard PI controller, while effectively suppressing the overshoot of the output voltage; it can shorten the settling time and adapt to different control system structures, achieving steady-state accuracy completely consistent with the standard PI controller. Attached Figure Description

[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart illustrating an embodiment of the nonlinear PI control method based on error squared threshold compensation provided in this application; Figure 2 This is a schematic diagram of the nonlinear PI control process in the preferred embodiment of the nonlinear PI control method based on error squared threshold compensation provided in this application; Figure 3 This is a schematic diagram of the error remapping enhancement principle in the best embodiment of the nonlinear PI control method based on error squared threshold compensation provided in this application; Figure 4 This is a schematic diagram of an embodiment of the nonlinear PI control system based on error squared threshold compensation provided in this application; Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application. Detailed Implementation

[0019] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0020] In the description of this application, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.

[0021] In the description of this application, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0022] In the description of this application, it should be noted that, unless otherwise explicitly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.

[0023] To address the issues in related technologies, such as the inability to balance response speed and overshoot during large load changes and excessively long settling time, this application proposes a nonlinear PI control method and system based on error squared threshold compensation.

[0024] Reference Figure 1This application provides a flowchart illustrating a nonlinear PI control method based on error squared threshold compensation. This method is applied to electronic devices, such as servers or mobile terminals. Figure 1 As shown, the nonlinear PI control method based on error squared threshold compensation may include the following steps: Step S101: Obtain the reference voltage and actual output voltage of the voltage regulator, and calculate the difference between the reference voltage and the actual output voltage to obtain the error signal.

[0025] In this step, the sampling frequency is... For output voltage Analog-to-digital conversion sampling is performed. After sampling, the digital controller reads the conversion result of the analog-to-digital converter (ADC), and obtains the final value after calibration. Actual output voltage value at time The actual output voltage is compared with the reference voltage. The error signal is obtained by subtraction. ,in For discrete time indexes.

[0026] The above calibration conversion can be performed using techniques known to those skilled in the art, such as analog-to-digital conversion of the output voltage at a sampling frequency, where the CPU samples the digital value of the output voltage and converts it into the actual voltage value. This embodiment does not provide a specific description or limitation of this method.

[0027] Step S102: Based on a preset threshold, perform nonlinear mapping on the error signal to obtain the target error signal.

[0028] In this step, the error signal is compared with preset thresholds, including positive and negative preset thresholds. If the error signal is greater than the positive preset threshold, the error signal is nonlinearly mapped using the first square law to obtain the target error signal. If the error signal is less than the negative preset threshold, the error signal is nonlinearly mapped using the second square law to obtain the target error signal. The second square law is the negative of the first square law. If the error signal is greater than or equal to the negative preset threshold and less than or equal to the positive preset threshold, no nonlinear mapping is required, and the error signal is used as the target error signal.

[0029] The above-mentioned nonlinear mapping of the error signal using the first square law yields the target error signal, including: Subtract the square of the preset threshold from the square of the error signal to obtain the difference result; add the difference result to the preset threshold to obtain the target error signal.

[0030] Specifically, such as Figure 2As shown, the target error signal is obtained by nonlinearly mapping the error signal based on a preset threshold, including: ; in, Indicates the target error signal. Indicates the error signal. This indicates a preset threshold.

[0031] When the error signal is within the preset threshold range ( When ), the mapped error signal The signal received by the PI controller is consistent with the original error, and the control system degenerates into standard PI control. When the error signal exceeds a preset threshold, the error signal is transformed into a square form. The relationship between the enhanced error signal (i.e., after error remapping) and the original error signal (i.e., before error remapping) is as follows: Figure 3 As shown. Then, the target error signal obtained by calculating using the first square law or the second square law is... The signal is fed into the PI controller, which simultaneously enhances the proportional and integral actions of the PI controller.

[0032] Step S103: Input the target error signal to the PI controller to obtain the PI control quantity.

[0033] In this step, this embodiment uses an incremental PI algorithm (i.e., a velocity-type PI algorithm), whose output is the increment of the control quantity rather than the absolute quantity, which facilitates disturbance-free switching and resistance to integral saturation. Specifically: ; in, express The PI control value at any given time. The sampling period is for The output value of the PI control at any given time. Indicates proportional gain. express Error value after time mapping for Error value after time mapping This represents the integral gain. The physical meaning of this incremental algorithm is: at the current time... The PI control value is equal to the value at the previous moment. The PI control quantity is added to the change in the proportional term (reflecting the trend of error change) and the local value of the integral term (reflecting the cumulative amount of error).

[0034] Step S104: Calculate the feedforward compensation amount based on the preset threshold and error signal.

[0035] In this step, the error signal is compared with a preset threshold, which includes a positive preset threshold and a negative preset threshold. If the error signal is greater than the positive preset threshold, the difference result is multiplied by the feedforward gain to obtain the feedforward compensation amount, where the difference result is the square of the error signal minus the square of the preset threshold. If the error signal is less than the negative preset threshold, the difference result is multiplied by the feedforward gain to obtain the multiplication result, and the negative value of the multiplication result is taken to obtain the feedforward compensation amount. If the error signal is greater than or equal to the negative preset threshold and less than or equal to the positive preset threshold, the feedforward compensation amount is zero.

[0036] Specifically, based on a preset threshold and an error signal, the feedforward compensation amount is calculated, including: ; in, This indicates the amount of feedforward compensation. Indicates feedforward gain. Indicates the error signal. This indicates a preset threshold.

[0037] When the error signal is within the threshold range ( When ), feedforward compensation amount This path is completely closed, producing no additional effect; the control system output is entirely determined by the PI controller. When the error exceeds the threshold ( When the feedforward compensation amount follows the law of the square of the error, the amount of feedforward compensation is equal to the amount of feedforward compensation. It generates an output whose sign is consistent with the direction of the error signal.

[0038] Because the square-law feedforward compensation path bypasses the integral stage of the PI controller and does not rely on time accumulation, but instead directly generates the compensation amount based on the instantaneous amplitude of the error, once the error signal exceeds the preset threshold, the compensation amount is immediately generated and superimposed on the output according to the square law, providing a strong transient correction effect without delay. In the initial stage when the error signal exceeds the preset threshold, the error signal value is relatively large, and the square term... The compensation amount is rapidly increased, forming a strong instantaneous correction pulse that directly drives the output voltage back to the reference value, giving the PI controller more response time; as the error gradually decreases and approaches the preset threshold... The compensation amount decays rapidly at a quadratic function rate. When the error signal falls back to within the preset threshold, the compensation amount returns to zero. The PI controller leverages its advantage of zero steady-state error to complete the final precise adjustment, taking into account both dynamic response speed and steady-state accuracy.

[0039] The aforementioned feedforward gain is determined in the following ways: When the error signal reaches its maximum value, the feedforward compensation is equal to the maximum current reference value allowed to be output by the PI controller; the feedforward gain is determined based on the maximum current reference value, the maximum error signal, and the preset threshold.

[0040] The aforementioned preset threshold is determined in the following ways, including: Based on the voltage sampling noise level, steady-state accuracy requirements, expected magnitude of load mutation, and voltage level of the voltage regulator, a preset threshold is determined. The steady-state accuracy requirement is that the absolute value of the control error signal is within the preset threshold range, and the expected magnitude of load mutation is the voltage change expected by the control system during load mutation.

[0041] Step S105: Add the PI control quantity and the feedforward compensation quantity to obtain the total control quantity; for different control system structures, output the total control quantity in different ways to achieve nonlinear PI control.

[0042] In this step, the PI control quantity and the feedforward compensation quantity are added together to obtain the total control quantity. When the control system has a single voltage loop structure, the total control quantity is used as the duty cycle setpoint and input to the pulse width modulation unit; when the control system has a dual closed-loop structure with an outer voltage loop and an inner current loop, the total control quantity is used as the reference value for the inner current loop and input to the inner current loop PI controller.

[0043] Specifically, when the error signal is within a preset threshold range ( When this happens, the error signal mapping path degenerates into... The output of the feedforward compensation path is zero. At this time, the total control quantity This means the control system is completely equivalent to standard PI control. Under this condition, the output voltage is close to the reference value, and only fine-tuning by the PI controller is needed to meet the steady-state accuracy requirements. The nonlinear element does not intervene, avoiding unnecessary interference of nonlinear effects on steady-state performance.

[0044] When the error signal exceeds the preset threshold ( When the error signal mapping path and the feedforward compensation path are activated simultaneously, the total control quantity consists of two parts: one part comes from the PI controller driven by the error square law mapping, whose proportional and integral terms are significantly enhanced due to the square amplification of the input signal; the other part comes from the direct feedforward compensation quantity, which generates an additional correction quantity based on the instantaneous error amplitude and does not depend on integral accumulation. The two parts are calculated independently and simultaneously superimposed to produce a synergistic enhancement effect of "1+1>2". This utilizes the integral action of the PI controller to ensure convergence without steady-state error, and the instantaneous response characteristics of the feedforward compensation to compensate for the response lag of the integral component.

[0045] To facilitate understanding by those skilled in the art, a set of preferred embodiments is provided below: Traditional PI controllers have the following inherent drawbacks, especially when the load changes rapidly over a wide range. First, there is an inherent contradiction between speed and overshoot. According to classical control theory, to improve the system's response speed to load changes, the proportional gain and integral gain need to be increased. However, this reduces the system's phase margin, leading to a large overshoot in the output voltage, and even causing oscillations. Conversely, to suppress overshoot, the gain needs to be reduced, which slows down the response speed. This contradiction cannot be fundamentally resolved within the traditional linear PI framework.

[0046] Secondly, the different requirements for large and small errors cannot be simultaneously met. When a sudden load change occurs, the output voltage deviates significantly from the reference value, and the controller should apply the largest possible correction to quickly pull the voltage back up; when the voltage approaches the reference value, the controller should adjust smoothly to avoid overshoot. Traditional PI controllers have a fixed gain, which cannot simultaneously meet the requirements for strong correction under large errors and gentle adjustment under small errors.

[0047] Third, integral saturation exacerbates overshoot. During sudden large load changes, the error remains large, causing the integral term to accumulate rapidly and easily enter integral saturation. When the error crosses zero, the integral term still retains a large value, causing the voltage to exceed the reference value and continue moving in the opposite direction, resulting in significant overshoot and a longer settling time.

[0048] To address the technical problems of traditional PI controllers, such as the inability to balance response speed and overshoot during large load changes and excessively long settling times, the technical solution of this embodiment includes the following: 1. Digital implementation methods.

[0049] The typical implementation of this embodiment is digital control, accomplished through a digital signal processor (DSP), field-programmable gate array (FPGA), or microcontroller (MCU). Digital control offers advantages such as flexible parameter adjustment, ease of implementing complex algorithms, and immunity to temperature drift, making it the preferred solution for implementing the nonlinear control strategy of this embodiment.

[0050] The aforementioned temperature drift refers to the phenomenon that the parameters or output values ​​of electronic components or measuring equipment deviate when the ambient temperature changes.

[0051] This embodiment uses a digital signal processor (DSP) as an example, and the specific steps are as follows: Step 1: System initialization.

[0052] After the control program starts, system initialization operations are performed first, including setting the DSP clock frequency and system main frequency; configuring the sampling trigger mode and sampling channel of the analog-to-digital converter module; initializing the carrier frequency and dead time of the pulse width modulation (PWM) module; and setting the initial parameters of the PI controller. , ; Set the nonlinear parameters introduced in this embodiment and Clear the historical values ​​of all registers and control variables. After system initialization is complete, wait for the interrupt trigger signal and enter the main control loop.

[0053] Step 2: Voltage sampling and error calculation.

[0054] With sampling frequency For output voltage Analog-to-digital conversion (ADC) sampling is performed. Voltage sampling typically uses a resistor divider network with an isolated operational amplifier to condition the high-voltage signal to the input range of the ADC. An ADC resolution of at least 12 bits is recommended to ensure sufficient sampling accuracy. After sampling, the digital controller reads the ADC conversion result and, through calibration and conversion, obtains the actual output voltage value. , and reference voltage The error signal is obtained by subtraction. ,in For discrete time indexes.

[0055] Step 3: Error mapping.

[0056] According to the error signal Determine its location within the specified interval, and calculate the mapped error signal (i.e., the target error signal). The specific judgment logic for this step is as follows: If This indicates that the actual output voltage is lower than the reference voltage value and the deviation has exceeded the preset threshold. Within this range, the positive error signal is nonlinearly mapped according to the first square law, i.e. .like This indicates that the actual output voltage is higher than the voltage reference value and the deviation has exceeded the negative preset threshold. Within this range, the negative error signal is nonlinearly mapped according to the second square law and its sign is restored, i.e. .like This indicates that the actual output voltage deviation is within the preset threshold range, and therefore no nonlinear mapping is required. .

[0057] The above mapping relationship ensures that the mapping function is continuous at the preset threshold switching point, when hour, ;when hour, The mapped error signal There are no jumps or abrupt changes at the threshold switching point, avoiding step changes in the control quantity at the preset threshold boundary.

[0058] Step 4: Calculate the PI control quantity.

[0059] The mapped error signal obtained in step three The signal is fed into a standard PI controller. This embodiment uses an incremental PI algorithm (i.e., a velocity-type PI algorithm), whose output is the increment of the control quantity rather than its absolute value, facilitating disturbance-free switching and resistance to integral saturation. ; in, The sampling period is for The output value of the PI control at any given time. for The error value after time mapping. The physical meaning of this incremental algorithm is: the error value after time mapping at the current time. The control quantity is equal to the previous moment. The control quantity is added to the change in the proportional term (reflecting the trend of error change) and the local value of the integral term (reflecting the cumulative amount of error).

[0060] It should be noted that this embodiment does not limit the specific digital implementation method of the PI controller; the positional PI algorithm is also applicable. The expression for the positional PI algorithm is: ; Both implementation methods can work normally, and the choice can be made according to actual needs in engineering. This embodiment does not impose any specific restrictions on this.

[0061] Step 5: Calculate the feedforward compensation amount.

[0062] This step is performed in parallel with steps three and four. Based on the original error value... Calculate feedforward compensation Its judgment logic is consistent with the interval division in step three: like This indicates that the actual output voltage is lower than the voltage reference value and the deviation exceeds the preset threshold. In this case, the feedforward compensation is positive. ; like This indicates that the actual output voltage is higher than the voltage reference value and the deviation exceeds the preset threshold. In this case, the feedforward compensation is negative. ; like This indicates that the actual output voltage deviation is within the preset threshold range, at which point the feedforward compensation path is closed. The feedforward path does not produce any additional effect.

[0063] The aforementioned feedforward compensation amount also remains continuous at the preset threshold switching point, that is, when hour, ;when hour, Therefore, the feedforward compensation path has no abrupt changes at the preset threshold boundary, and the change in the control quantity is smooth.

[0064] Step Six: Synthesis of Total Control Quantity.

[0065] The PI control value calculated in step four The feedforward compensation amount calculated in step five The data are fed into the addition unit for superposition to obtain the total control quantity. for: ; This additive synthesis operation is implemented in the digital controller once per sampling cycle. Depending on the error range, the total control quantity exhibits three operating modes: when... When the error mapping degenerates into Feedforward compensation ,at this time The control system is completely equivalent to standard PI control, with no nonlinear element involved and steady-state performance unaffected. When At that time, error mapping amplifies the error to This allows it to produce stronger proportional and integral actions in the PI controller; simultaneously, feedforward compensation... When superimposed on the output, the two components work in the same direction and together, significantly enhancing the overall control quantity. When, the error after mapping is (Absolute value increases), feedforward compensation is Both are in the same direction and together apply reverse correction, pulling the output voltage back to the reference value.

[0066] Through the above superposition and synthesis method, the standard PI control unit and the feedforward compensation unit remain independent of each other, and their calculations do not affect each other. They contribute their respective correction components and are finally combined into a complete control signal output. This can significantly improve the voltage response speed under large load changes without changing the structure and parameters of the standard PI controller, while effectively suppressing the overshoot of the output voltage.

[0067] Step 7: Control output.

[0068] Total control quantity Depending on the control system structure, the output is as follows: If the control system is a single voltage loop structure, the PI parameter is relatively small, and the total control quantity is... This is the given value for the duty cycle. At this point, [the duty cycle will be...] The signal is directly fed into the PWM modulation unit, compared with the carrier wave, and a switching drive pulse with a corresponding duty cycle is generated. After being amplified by the drive circuit, the pulse controls the on and off of the switching transistor in the power conversion main circuit, thereby achieving closed-loop regulation of the output voltage.

[0069] If the control system has a dual closed-loop structure with an outer voltage loop and an inner current loop, the PI parameter of the outer voltage loop is relatively large, and the total control quantity is... As a reference value for the inner current loop The data is then fed into the current inner-loop PI controller to participate in the next stage of calculation. The current inner-loop PI controller, according to... The deviation from the actual current is used to calculate the duty cycle setpoint, which is then sent to the PWM modulation unit to generate drive pulses. In this structure, the output of the outer voltage loop is not the final duty cycle command, but the current setpoint; the final control accuracy is guaranteed by the inner current loop.

[0070] Step 8: Execute repeatedly.

[0071] After completing all the calculations in steps two through seven, wait for the interrupt trigger signal of the next sampling cycle, and repeat steps two through seven to achieve real-time closed-loop control.

[0072] 2. Working process in the double closed-loop structure.

[0073] This embodiment uses a dual closed-loop control structure with an outer voltage loop and an inner current loop as an example to illustrate the complete working process of this embodiment in a dual closed-loop system.

[0074] The dual-loop control system consists of a voltage outer loop and a current inner loop connected in series: the voltage outer loop takes the output voltage error as input and the output current setpoint as a reference for the current inner loop; the current inner loop takes the current error as input and outputs a duty cycle control quantity to drive the power switch. In this structure, the PI parameter of the voltage outer loop is usually large to obtain a fast voltage response.

[0075] When this embodiment is applied to the voltage outer loop, its workflow consists of the following 5 steps. First, the voltage sampling circuit acquires the output voltage, and after ADC conversion, the voltage error is calculated. Secondly, the error mapping unit... Perform a nonlinear mapping to obtain The signal is then fed into the outer loop PI controller to obtain... Meanwhile, the feedforward compensation unit calculates the original error. Calculate compensation amount Next, the voltage outer loop PI controller outputs... and By superimposing these values, the reference value for the inner current loop is obtained, i.e. Then, the current inner loop controller... For reference, the duty cycle setpoint is calculated by comparing it with the actual sampled current value. Finally, the PWM modulation unit converts the duty cycle setpoint into a switching drive pulse.

[0076] In the above process, when a sudden load change causes the voltage error to exceed the threshold, the output of the outer voltage loop is controlled by the PI control quantity. In addition, feedforward compensation is added. This makes the reference value of the inner current loop... When the voltage increases (or decreases) instantaneously, the inner current loop immediately responds to the change and quickly adjusts the duty cycle. Compared to the traditional dual-loop structure where the outer voltage loop output relies solely on the slow accumulation of the PI controller to improve the current reference value, the feedforward compensation path in this embodiment enables the current reference value to be improved immediately after an error occurs. The response of the inner current loop is triggered in advance, significantly reducing the drop in output voltage and greatly shortening the recovery time.

[0077] 3. Feedforward gain tuning.

[0078] Suppose the control system requires that: when the error signal reaches its maximum value... At that time, feedforward compensation amount It just reaches the maximum allowable current reference value of the PI controller output. Taking the positive error direction as an example ( At this point, the feedforward compensation is: ; Let it equal to ,Right now: ; The feedforward gain tuning formula is obtained as follows: ; In actual debugging, the response waveform can be fine-tuned according to the load change. If the output voltage recovery rate is insufficient, increase the value appropriately. If slight oscillations occur in the output, reduce the output size appropriately. .

[0079] The physical meaning of this tuning formula is clear. and The size of the effective range of error is determined. , The two factors determine the upper limit of the compensation capacity and the slope. The value of . The larger the value, the wider the allowable error range of the control system. The following is required The smaller the value, the better; conversely, if the goal is to achieve the maximum correction within a small error range, then the value needs to be increased. value.

[0080] In actual debugging, the response waveform of the load change can be used to... Fine-tuning: If the output voltage drops too much or the recovery speed is insufficient when the load changes abruptly, it indicates that the feedforward compensation is insufficient and should be increased appropriately. If the output voltage exhibits a spike or significant overshoot at the moment of compensation, it indicates that the feedforward compensation strength is too high and should be appropriately reduced. .generally The adjustment range is between 0.5 and 2.0 times the theoretical calculated value, depending on the non-ideal characteristics of the control system and the actual response performance.

[0081] 4. Principles for selecting preset thresholds.

[0082] Preset threshold This is a key design parameter in this embodiment, which determines the activation threshold of the nonlinear compensation path. Its selection should take into account the following factors: First, voltage sampling noise level. Noise is inevitably introduced into any voltage sampling process, including ADC quantization noise, switching ripple, and circuit noise. The preset threshold should be greater than the peak noise of the voltage sampling channel to avoid frequent malfunctions of the nonlinear compensation unit caused by sampling noise. If the preset threshold is too small, the noise will cause the control quantity to repeatedly jump within a small error range, affecting steady-state performance. In engineering, it is generally required that the preset threshold be at least 2 to 3 times the peak noise.

[0083] Second, steady-state accuracy requirements. Preset threshold. The error range for shutting down the nonlinear compensation path is determined. Within this range, the PI controller is a standard PI controller, and its steady-state accuracy is guaranteed by the standard PI controller and is not affected by nonlinear compensation.

[0084] Third, the expected magnitude of load surges. If the control system expects a small voltage drop during load surges, a smaller value can be selected. This value allows nonlinear compensation to intervene earlier, enhancing the response capability to minor load disturbances; if the load change amplitude is large, a relatively large value can be selected. The value is set so that nonlinear compensation is only activated after the voltage drops to a certain level, avoiding frequent operation that is prone to occur within a small error range.

[0085] Fourth, the voltage level of the converter. This applies to converters with different output voltage levels (including DC-DC converters, which are a type of voltage regulator). The absolute value should be scaled accordingly. Generally, Use 1% to 10% of the nominal output voltage. For applications requiring high precision (such as server power supplies and communication power supplies). Take the smaller value; for cost-sensitive and noisy applications (such as home appliance power supplies). Take the larger value.

[0086] In general, a preset threshold is used. Can be taken as .in, This represents the error value corresponding to the maximum output when the feedforward compensation reaches its maximum. This empirical range can balance steady-state noise suppression and dynamic response requirements in most application scenarios.

[0087] 5. The parameters of the feedforward compensation path and the error mapping path are tuned independently.

[0088] In this embodiment, the mapping effect on the PI controller in the error mapping path is determined by a preset threshold. Determined independently, not dependent on feedforward gain Feedforward gain The change does not affect the mapping error received by the PI controller. It only affects the feedforward compensation amount directly superimposed on the output. Conversely, a preset threshold is used. It acts on both paths simultaneously, but its influence on the two paths differs: for the error mapping path, This determines the piecewise inflection points of the mapping function; for feedforward compensation paths, This determines the zero point for the compensation amount.

[0089] The engineering significance of this parameter independence lies in: the parameters of the PI controller , First, tune the system using conventional methods for small-signal operating conditions to ensure steady-state accuracy and anti-interference capability; then adjust the nonlinear parameters separately. and This improves the dynamic response to large signals without interference between the two. Engineers can gradually introduce nonlinear compensation and optimize its effect without retuning the existing PI parameters, significantly reducing the complexity and workload of debugging.

[0090] In practical engineering applications, parameter tuning should be performed in the following order: The first step is to disconnect the nonlinear compensation path, or set... To make the nonlinear path inactive within the normal operating range by setting a larger value Adjusted using conventional methods and This ensures that the system meets performance requirements under steady-state and small-disturbance conditions.

[0091] The second step is to set the threshold according to the preset threshold selection principle. .

[0092] The third step is to calculate the feedforward gain using the formula in the feedforward gain tuning. The theoretical initial value.

[0093] Fourth, apply a typical load change (such as a 50% load step) and observe the output voltage response waveform, then fine-tune accordingly. The value is adjusted until the dynamic performance reaches its optimal level. The optimization goals are typically to minimize voltage sag and settling time.

[0094] This embodiment does not impose any special restrictions on the implementation platform of the digital controller; it can be implemented using a DSP, STM32 series MCU, or FPGA. A voltage sampling accuracy better than 1% is recommended, and the sampling delay should be less than 10% of the switching cycle to ensure effective control. The power conversion main circuit can be any topology DC-DC converter or DC-AC inverter; this embodiment is not dependent on a specific main circuit topology.

[0095] Reference Figure 4 This application also provides a nonlinear PI control system based on error squared threshold compensation, the system comprising: The error signal calculation module 100 is used to obtain the reference voltage and the actual output voltage of the voltage regulator, and calculate the difference between the reference voltage and the actual output voltage to obtain the error signal. The nonlinear mapping module 200 is used to perform nonlinear mapping on the error signal based on a preset threshold to obtain the target error signal; The PI control quantity acquisition module 300 is used to input the target error signal to the PI controller to obtain the PI control quantity; The feedforward compensation calculation module 400 is used to calculate the feedforward compensation amount based on a preset threshold and an error signal. The total control quantity calculation module 500 is used to add the PI control quantity and the feedforward compensation quantity to obtain the total control quantity; for different control system structures, different methods are used to output the total control quantity to achieve nonlinear PI control.

[0096] It should be noted that since the nonlinear PI control system based on error square threshold compensation in this embodiment is based on the same inventive concept as the nonlinear PI control method based on error square threshold compensation described above, the corresponding content in the method embodiment is also applicable to this system embodiment, and will not be described in detail here.

[0097] Reference Figure 5 This application also provides an electronic device, which includes: At least one memory; At least one processor; At least one program; The program is stored in memory, and the processor executes at least one program to implement the nonlinear PI control method based on error squared threshold compensation described above in this application.

[0098] This electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.

[0099] The electronic devices according to embodiments of this application will now be described in detail.

[0100] The processor 1600 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 1700 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1700 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1700 and is called and executed by the processor 1600 to execute the nonlinear PI control method based on error squared threshold compensation of the embodiments of this application.

[0101] The input / output interface 1800 is used to implement information input and output. The communication interface 1900 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 2000 transmits information between various components of the device (e.g., processor 1600, memory 1700, input / output interface 1800, and communication interface 1900); The processor 1600, memory 1700, input / output interface 1800 and communication interface 1900 are connected to each other within the device via bus 2000.

[0102] This application embodiment also provides a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-described nonlinear PI control method based on error squared threshold compensation.

[0103] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0104] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0105] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0106] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0107] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0108] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0109] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0110] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

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

[0112] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0113] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0114] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application.

Claims

1. A nonlinear PI control method based on error squared threshold compensation, characterized in that, The method includes: The reference voltage and the actual output voltage of the voltage regulator are obtained, and the difference between the reference voltage and the actual output voltage is calculated to obtain the error signal. Based on a preset threshold, the error signal is nonlinearly mapped to obtain the target error signal; The target error signal is input to the PI controller to obtain the PI control quantity; Calculate the feedforward compensation amount based on the preset threshold and the error signal; The PI control quantity and the feedforward compensation quantity are added together to obtain the total control quantity; for different control system structures, the total control quantity is output in different ways to achieve nonlinear PI control.

2. The nonlinear PI control method based on error squared threshold compensation according to claim 1, characterized in that, The step of performing nonlinear mapping on the error signal based on a preset threshold to obtain the target error signal includes: The error signal is compared with the preset threshold, which includes a positive preset threshold and a negative preset threshold. If the error signal is greater than the positive preset threshold, the error signal is nonlinearly mapped using the first square law to obtain the target error signal; If the error signal is less than the negative preset threshold, the error signal is nonlinearly mapped using the second square law to obtain the target error signal; the second square law is a negative first square law. If the error signal is greater than or equal to the negative preset threshold and less than or equal to the positive preset threshold, then there is no need to perform nonlinear mapping on the error signal, and the error signal is used as the target error signal.

3. The nonlinear PI control method based on error squared threshold compensation according to claim 2, characterized in that, The step of applying a first-square law to the error signal nonlinearly to obtain the target error signal includes: The difference is obtained by subtracting the square of the preset threshold from the square of the error signal. The difference result is added to the preset threshold to obtain the target error signal.

4. The nonlinear PI control method based on error squared threshold compensation according to claim 1, characterized in that, The step of calculating the feedforward compensation amount based on the preset threshold and the error signal includes: The error signal is compared with the preset threshold, which includes a positive preset threshold and a negative preset threshold. If the error signal is greater than the positive preset threshold, the difference result is multiplied by the feedforward gain to obtain the feedforward compensation amount, wherein the difference result is the square of the error signal minus the square of the preset threshold. If the error signal is less than the negative preset threshold, the difference result is multiplied by the feedforward gain to obtain the multiplication result, and the negative value of the multiplication result is obtained to obtain the feedforward compensation amount; If the error signal is greater than or equal to the negative preset threshold and less than or equal to the positive preset threshold, then the feedforward compensation is zero.

5. The nonlinear PI control method based on error squared threshold compensation according to claim 4, characterized in that, The feedforward gain is determined in the following ways: When the error signal reaches its maximum value, the feedforward compensation amount is equal to the maximum current reference value allowed to be output by the PI controller; The feedforward gain is determined based on the maximum current reference value, the maximum error signal, and the preset threshold.

6. The nonlinear PI control method based on error squared threshold compensation according to claim 1, characterized in that, The preset threshold is determined by the following methods: The preset threshold is determined based on the voltage sampling noise level, steady-state accuracy requirements, expected magnitude of load mutation, and voltage level of the voltage regulator; the steady-state accuracy requirements are to control the absolute value of the error signal within the preset threshold range, and the expected magnitude of load mutation is the voltage change magnitude expected by the control system during load mutation.

7. The nonlinear PI control method based on error squared threshold compensation according to claim 1, characterized in that, The method of outputting the total control quantity in different ways for different control system structures includes: When the control system is a single voltage loop structure, the total control quantity is input to the pulse width modulation unit as the duty cycle setpoint. When the control system is a dual closed-loop structure with an outer voltage loop and an inner current loop, the total control quantity is input to the inner current loop PI controller as a reference value for the inner current loop.

8. A nonlinear PI control system based on error squared threshold compensation, characterized in that, The system includes: The error signal calculation module is used to obtain the reference voltage and the actual output voltage of the voltage regulator, and calculate the difference between the reference voltage and the actual output voltage to obtain the error signal. The nonlinear mapping module is used to perform nonlinear mapping on the error signal based on a preset threshold to obtain the target error signal; The PI control quantity acquisition module is used to input the target error signal to the PI controller to obtain the PI control quantity; The feedforward compensation calculation module is used to calculate the feedforward compensation amount based on the preset threshold and the error signal; The total control quantity calculation module is used to add the PI control quantity and the feedforward compensation quantity to obtain the total control quantity; for different control system structures, the total control quantity is output in different ways to achieve nonlinear PI control.

9. An electronic device, characterized in that, It includes at least one processor and a memory for communicatively connecting to the at least one processor; the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform the nonlinear PI control method based on error squared threshold compensation as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the nonlinear PI control method based on error squared threshold compensation as described in any one of claims 1 to 7.