A switching power supply control method, system and device

By using an extended state observer and a nonlinear feedback compensation mechanism, the problem of high-precision output voltage tracking of switching power supplies under complex operating conditions is solved, achieving fast dynamic response and high robustness control, and improving the overall control performance of the switching power supply.

CN123184433APending Publication Date: 2026-11-27XIAN SAIERCOM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611393026.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing switching power supply control methods struggle to achieve high-precision output voltage tracking and rapid dynamic response under complex operating conditions such as large input voltage fluctuations, sudden load changes, or component parameter drift due to aging and temperature variations. Furthermore, adaptive control is susceptible to measurement noise interference, sliding mode control causes switching losses and electromagnetic interference, and fuzzy control and neural network control lack versatility across different power supply specifications.

Method used

An extended state observer-based control method is adopted. By acquiring the nominal model and nominal parameter set of the switching power supply, and combining nonlinear feedback and disturbance compensation mechanisms, the system state and total disturbance are estimated in real time, thereby achieving accurate compensation for unknown disturbances and improving control performance.

Benefits of technology

It achieves high robustness and fast dynamic response of switching power supply under complex operating conditions, ensures high-precision control of output voltage, reduces the estimation burden of extended state observer, and improves the performance degradation limitations of traditional control methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123184433A_ABST
    Figure CN123184433A_ABST
Patent Text Reader

Abstract

The application discloses a switching power supply control method, system and device, relates to the power electronic technical field, and aims to solve the technical problems of insufficient state estimation accuracy, limited disturbance suppression capability and poor input voltage fluctuation adaptability of the switching power supply under complex working conditions, significantly accelerates the convergence speed of the extended state observer by stripping the nominal model from the total disturbance, realizes rapid suppression on the input voltage fluctuation by using the adaptive coefficient and the feedforward compensation, converts the nonlinear controlled object into an approximate linear coefficient by the first dynamic inverse compensation for the convenience of understanding, improves the disturbance compensation accuracy, adopts the enhanced nonlinear function and cooperates with the filtering processing to realize the consideration of the rapid response and the chattering suppression, and simultaneously has the perfect overvoltage, under-voltage and control quantity abnormal monitoring and protection mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power electronics technology, and in particular to a switching power supply control method, system and device. Background Technology

[0002] In the field of power electronics, switching power supplies, as the core device for realizing the conversion of electrical energy, directly determine the stability and response characteristics of the output voltage through their control performance. Traditional voltage-mode control relies on proportional-integral-derivative (PID) adjustments to generate a duty cycle signal based on the output voltage deviation. While current-mode control introduces a current inner loop to improve dynamic characteristics, both methods are based on fixed-parameter designs, making them difficult to adapt to complex operating conditions such as large fluctuations in input voltage, sudden load changes, or component parameter drift due to aging and temperature. When changes in the operating point of the switching power supply cause parameters such as inductance, capacitance, and load resistance to deviate from their design values, fixed-parameter control laws cannot reconcile the contradictory requirements of high precision for small signals and rapid response for large signals, resulting in increased steady-state error and sluggish dynamic response. Among existing improvement schemes, adaptive control attempts to identify parameters online, but the parameter convergence speed and system dynamic characteristics are mutually constrained, and it is susceptible to measurement noise interference. Sliding mode control, while robust, suffers from inherent chattering, leading to additional switching losses and electromagnetic interference in digital implementation. Fuzzy control and neural network control lack systematic design methods, and parameter tuning is highly dependent on experience, resulting in insufficient universality across different power supply specifications. In particular, while control methods based on the active disturbance rejection (ADRR) concept utilize extended state observers to estimate the total disturbance, they fail to effectively distinguish between the known nominal dynamics and residual disturbances of the controlled object. This forces the extended state observer to simultaneously handle both the nominal model dynamics and uncertain disturbances, limiting bandwidth design and hindering convergence speed improvement. Furthermore, it increases sensitivity to measurement noise under high-frequency sampling conditions. These shortcomings make it difficult for switching power supplies to achieve high-precision tracking of the ideal output voltage under input voltage variations and load disturbances. Therefore, a control mechanism capable of accurately establishing the nominal model, adaptively compensating for input voltage fluctuations, and rapidly estimating and eliminating the total disturbance is urgently needed. Summary of the Invention

[0003] In order to at least overcome the above-mentioned deficiencies in the prior art, the purpose of this application is to provide a switching power supply control method, system and device to solve the above problems.

[0004] In a first aspect, this application provides a switching power supply control method, including: Obtain the nominal model of the switching power supply and its corresponding set of nominal parameters; Based on the first input voltage, the actual output voltage, and the nominal parameter set, a state estimate is obtained using a preset extended state observer. Based on the state estimate and the first input voltage, a first control quantity is obtained; the first control quantity is used to characterize the control quantity without disturbance compensation. Based on the preset first output voltage, the first control quantity and its corresponding first control parameters, a second control quantity is obtained based on a preset compensation function; the second control quantity is used to characterize the final control quantity after disturbance compensation.

[0005] In one possible implementation, obtaining the nominal model of the switching power supply and the corresponding nominal parameter set includes: The switching power supply is configured to use a step signal with a known duty cycle as the second input voltage to obtain an output voltage step response curve as the second output voltage. Based on the second input voltage and the second output voltage, the nominal inductance, nominal capacitance, nominal load resistance, and nominal control gain are obtained to obtain a nominal model and a corresponding set of nominal parameters; the set of nominal parameters is configured to include at least one of the following: nominal inductance, nominal capacitance, nominal load resistance, and nominal control gain.

[0006] In one possible implementation, the step of obtaining the nominal model of the switching power supply and the corresponding nominal parameter set includes: Based on the step response curve of the second input voltage with a known duty cycle actually input to the switching power supply, the steady-state output voltage value, peak voltage value, and peak time are obtained by measuring the step response curve of the second output voltage actually output by the switching power supply; the second input voltage is configured as a known duty cycle multiplied by the nominal input voltage; Based on the steady-state output voltage value, peak voltage value, and peak time, the overshoot and peak time are obtained to obtain the damping ratio and undamped natural frequency; The nominal load resistance is obtained based on the steady-state output voltage and load current. The nominal inductance is obtained based on the nominal load resistance, damping ratio, and undamped natural frequency. The nominal capacitance is obtained based on the nominal inductance and the undamped natural frequency; The nominal control gain is obtained based on the nominal input voltage, nominal inductance, and nominal capacitance. Based on the nominal inductance, nominal capacitance, and nominal load resistance, the nominal model is obtained through a second-order transfer function; The nominal inductance, nominal capacitance, nominal load resistance, and nominal control gain are used as the nominal parameter set.

[0007] In one possible implementation, obtaining the state estimate based on the first input voltage, the actual output voltage, and the nominal parameter set, using a preset extended state observer, includes: In each control cycle, the current actual output voltage and the first input voltage are obtained, and the second control quantity and the state estimate quantity of the previous cycle are obtained. Based on the current actual output voltage and the first input voltage, as well as the second control quantity and the state estimate of the previous cycle, the state estimate of the current cycle is obtained by expanding the state observer. The state estimate is configured with at least a first state variable and a second state variable; The extended state observer is configured with a discrete recursive formula, which is configured as follows: Based on the preset first gain and control period of the extended state observer, intermediate variables are obtained; Based on the intermediate variable, the nominal parameter set, the nominal control gain, the second control quantity of the previous cycle, the state estimate of the previous cycle, the actual output voltage of the current cycle, and the actual output voltage of the previous cycle, the first state variable of the current cycle is obtained. The second state variable is obtained based on the preset second gain of the extended state observer, the first state variable of the current period, and the first state variable of the previous period.

[0008] Based on the first state variable of the current cycle, the estimated output voltage value is obtained; based on the second state variable of the current cycle, the estimated total disturbance value is obtained.

[0009] In one possible implementation, the first control quantity is obtained based on the state estimate and the first input voltage; the first control quantity is used to characterize the control quantity without disturbance compensation, including: The tracking error is obtained based on the first state variable and the first output voltage; Based on the second state variable and the second control quantity of the previous cycle, the differential of the estimation error is obtained; Based on the differential of the tracking error and the estimation error, a nonlinear feedback quantity is obtained through a preset nonlinear combination function; Based on the first input voltage and the nominal input voltage sampled in the current cycle, the input voltage adaptive coefficient is obtained; Based on the input voltage adaptive coefficient, the feedforward compensation term is obtained; The first control quantity is obtained based on the nonlinear feedback quantity, the input voltage adaptive coefficient, and the feedforward compensation term.

[0010] In one possible implementation, based on the tracking error and the derivative of the estimation error, a nonlinear feedback quantity is obtained through a preset nonlinear combination function, including: The preset nonlinear combination function is configured with a first preset fal function and a second preset fal function; Based on the tracking error, a first nonlinear component is obtained through the first preset fal function; Based on the estimated value of the error derivative, the second nonlinear component is obtained through the second preset fal function; The first preset fal function is configured as a piecewise nonlinear function; When the absolute value of the tracking error is greater than the width of the first linear interval, it is considered a large error, and the first preset fal function is configured as a power function. Otherwise, for small errors, the first preset fal function is configured as a linear function superimposed with a hyperbolic tangent correction term; The second preset fal function is configured as a piecewise nonlinear function; When the absolute value of the differential error estimate is greater than the width of the second linear interval, it is considered a large error, and the second preset fal function is configured as a power function. Otherwise, for small errors, the second preset fal function is configured as a linear function superimposed with a hyperbolic tangent correction term; The width of the first linear interval and the width of the second linear interval are both configured with a preset fixed parameter to characterize the boundary threshold between the linear region and the nonlinear region; Based on the bandwidth of the extended state observer, the proportional gain and differential gain are obtained; The nonlinear feedback quantity is obtained based on the first nonlinear component, the second nonlinear component, the proportional gain, and the differential gain.

[0011] In one possible implementation, obtaining the second control quantity based on a preset compensation function, according to a preset first output voltage, the first control quantity, and its corresponding first control parameters, includes: The original control quantity is obtained based on the second state variable, the first control quantity, and the nominal control gain of the nominal model; Based on the original control quantity, the upper and lower limits are processed by the preset minimum and maximum duty cycles to obtain the limited control quantity; Based on the second control quantity of the previous cycle, the second control quantity of the current cycle is obtained by performing a first-order low-pass filter on the control quantity after limiting.

[0012] In one possible implementation, the step of obtaining the second control quantity based on a preset compensation function according to a preset first output voltage, the first control quantity and its corresponding first control parameters also includes an abnormal protection mechanism. Based on the second control quantity of the current cycle and the preset PWM cycle count value, the PWM comparison register value is obtained by multiplying the second control quantity by the PWM cycle count value and rounding it to the nearest integer. The PWM comparison register value is used to control the power switching transistor of the switching power supply to turn on and off. The anomaly protection mechanism is configured as follows: Based on the first state variable and the first output voltage, determine whether the first state variable is greater than the preset overvoltage protection multiple of the first output voltage; If so, the second control variable of the current cycle is set to the minimum duty cycle and PWM is turned off to obtain overvoltage protection action; Based on the first state variable and the first output voltage, determine whether the first state variable is less than the preset undervoltage protection multiple of the first output voltage and whether the duration exceeds the preset protection delay cycle number; If so, then PWM is turned off to enable undervoltage protection. Based on the original control quantity and the preset minimum duty cycle and maximum duty cycle, determine whether the original control quantity continuously exceeds the range formed by the minimum duty cycle minus the preset margin and the maximum duty cycle plus the preset margin. If so, switch the power supply configuration to open circuit and obtain abnormal control action.

[0013] Secondly, this application provides a switching power supply control system, including a nominal modeling unit, a state estimation unit, a feedback control unit, and a compensation output unit that are connected in sequence. The nominal modeling unit is configured to: acquire the nominal model of the switching power supply and the corresponding nominal parameter set; The state estimation unit is configured to obtain a state estimate based on a preset extended state observer, according to the first input voltage, the actual output voltage, and the nominal parameter set. The feedback control unit is configured to: obtain a first control quantity based on the state estimate and the first input voltage; the first control quantity is used to characterize the control quantity without disturbance compensation; The compensation output unit is configured to: obtain a second control quantity based on a preset compensation function according to a preset first output voltage, the first control quantity and its corresponding first control parameters; the second control quantity is used to characterize the final control quantity after disturbance compensation.

[0014] Thirdly, this application provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of a switching power supply control method.

[0015] In summary, the beneficial effects that this application can achieve are: By estimating the system state and total disturbance in real time based on an extended state observer, and combining nonlinear feedback and disturbance compensation mechanisms, disturbances caused by input voltage fluctuations, load abrupt changes, and parameter perturbations are effectively suppressed, achieving rapid stabilization and high-precision control of the output voltage. It has high robustness, fast dynamic response, and high-precision output voltage control capabilities. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the embodiments of this application and form part of this application, do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1 This is a schematic diagram of the method steps in an embodiment of this application; Figure 2 This is a schematic diagram of the system structure according to an embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0018] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0019] Example 1 Please refer to the following: Figure 1 , Figure 1 This is a schematic diagram of the steps of a switching power supply control method provided in an embodiment of this application. Further, a switching power supply control method may specifically include the contents described in steps S1-S4.

[0020] Step S1: Obtain the nominal model of the switching power supply and the corresponding nominal parameter set; Step S2: Obtain the first input voltage and the actual output voltage. Based on the first input voltage, the actual output voltage, and the nominal parameter set, obtain the state estimate using a preset extended state observer. Step S3: Based on the state estimate and the first input voltage, obtain the first control quantity and its corresponding first control parameters; the first control quantity is used to characterize the control quantity without disturbance compensation. Step S4: Based on the preset first output voltage, the first control quantity and its corresponding first control parameters, and the preset compensation function, obtain the second control quantity and its corresponding second control parameters; the second control quantity is used to characterize the final control quantity after disturbance compensation.

[0021] In the implementation of this application embodiment, the hierarchical processing strategy effectively improves the control performance of the switching power supply under complex operating conditions.

[0022] In step S1, the nominal model of the switching power supply and the corresponding nominal parameter set are obtained.

[0023] Among them, the nominal model of a switching power supply refers to a model that mathematically describes the dynamic characteristics of a switching power supply under ideal or typical operating conditions. The model is usually established through physical laws or identification methods and is used to characterize the expected behavior of the power supply under undisturbed conditions. The nominal parameter set refers to a set of key physical parameters corresponding to the nominal model of a switching power supply, such as inductance, capacitance, resistance, and control gain. These parameters collectively determine the specific numerical characteristics of the nominal model, providing a basic reference for controller design.

[0024] As one implementation method, the nominal values ​​of the main components can be directly obtained by consulting the design specifications or datasheets provided by the manufacturer for the switching power supply, and a simplified transfer function model can be constructed based on these nominal values ​​as the nominal model. For example, for a Buck converter, its average model in continuous conduction mode can be derived based on its topology and component nominal values; As another implementation method, a simple open-loop test can be performed on the switching power supply, for example, by applying a known fixed duty cycle under a fixed input voltage and measuring its steady-state output voltage and current. From this, the equivalent nominal load resistance and control gain can be derived, and combined with the theoretically calculated inductance and capacitance values, a nominal parameter set and a nominal model can be formed.

[0025] In step S2, the first input voltage and the actual output voltage are obtained. Based on the first input voltage, the actual output voltage, and the nominal parameter set, the state estimate is obtained using a preset extended state observer.

[0026] Among them, the extended state observer is a nonlinear extended state observer capable of estimating the internal state variables and total external disturbances of a switching power supply in real time. It reconstructs the state and all unknown disturbances that are difficult to measure directly by utilizing the input and output data of the switching power supply. State estimates are real-time estimates of the internal state variables (such as output voltage and output current) and the total disturbances (such as uncontrollable errors like parameter drift) of a switching power supply, output by an extended state observer. These estimates form the basis for the generation of subsequent control variables.

[0027] In each control cycle, the input and output voltages of the switching power supply are sampled to obtain the current initial input voltage and actual output voltage. These sampled values ​​are then input to a pre-defined extended state observer. The extended state observer is designed to use these real-time measurement data and a known set of nominal parameters to make real-time estimates of the internal state of the switching power supply and all unknown disturbances. Therefore, the state estimate output by the extended state observer includes a comprehensive assessment of the current operating condition, providing a basis for subsequent control decisions.

[0028] In step S3, the first control quantity and its corresponding first control parameters are obtained based on the state estimate and the first input voltage.

[0029] The first control quantity refers to the basic control signal generated based on state estimation and input voltage feedforward without considering total disturbance compensation. The control quantity is mainly used to achieve the initial adjustment of the nominal model so that the output voltage is close to the preset target. The second control quantity refers to the final control signal obtained after processing by the disturbance compensation function based on the first control quantity. It includes the suppression of the total disturbance estimated by the extended state observer, aiming to achieve high-precision voltage regulation and fast dynamic response of the actual switching power supply for the output voltage.

[0030] The first control quantity characterizes the control quantity without disturbance compensation. It extracts the estimated value of the output voltage from the state estimate and compares it with a preset first output voltage to generate an error signal. Simultaneously, a feedforward compensation term can be generated using the currently sampled first input voltage through a simple scaling factor to initially address changes in the input voltage. This error signal is then processed by a preset controller and superimposed with the feedforward compensation term to obtain the first control quantity. The first control quantity is mainly responsible for driving the output voltage of the switching power supply to near the target value, but it has not yet performed fine compensation for the total disturbance estimated by the extended state observer.

[0031] In step S4, based on the preset first output voltage, the first control quantity and its corresponding first control parameters, and a preset compensation function, the second control quantity and its corresponding second control parameters are obtained.

[0032] The compensation function is a mathematical function used to transform the total disturbance information estimated by the extended state observer into a correction effect on the first control quantity. This function effectively offsets or weakens the impact of disturbances on the actual output of the switching power supply, thereby improving control performance.

[0033] The second control quantity characterizes the final control quantity after disturbance compensation. It can be extracted from the state estimate output by the extended state observer to obtain an estimate of the total disturbance. This total disturbance estimate is then processed through a preset compensation function, for example, by multiplying it by a negative proportionality coefficient to generate a disturbance compensation signal. This signal is then superimposed on the first control quantity obtained in step S3 to form the final second control quantity. Therefore, the second control quantity not only includes the adjustment effect on the nominal model but also effectively counteracts the effects of various internal and external disturbances, ensuring the stability and accuracy of the switching power supply output voltage.

[0034] This application achieves refined management of switching power supply control by introducing the collaborative operation of a nominal model and an extended state observer. The method effectively handles complex operating conditions such as input voltage fluctuations, load abrupt changes, and parameter drift, significantly improving the steady-state accuracy and dynamic response speed of the output voltage. By separating known dynamics from unknown disturbances, the estimation burden on the extended state observer is reduced, making its disturbance estimation more accurate. This overcomes the performance degradation limitations of traditional control methods in complex environments and improves upon the bandwidth limitations and noise sensitivity of the extended state observer in traditional active disturbance rejection control.

[0035] Example 2 Based on Example 1, please refer to the following: Figure 1 , Figure 1 This is a flowchart illustrating a switching power supply control method provided in an embodiment of this application. Further, a switching power supply control method may specifically include the following:

[0036] Step S1: Obtain the nominal model of the switching power supply and the corresponding nominal parameter set; Step S2: Obtain the first input voltage and the actual output voltage. Based on the first input voltage, the actual output voltage, and the nominal parameter set, obtain the state estimate using a preset extended state observer. Step S3: Based on the state estimate and the first input voltage, obtain the first control quantity and its corresponding first control parameters; the first control quantity is used to characterize the control quantity without disturbance compensation. Step S4: Based on the preset first output voltage, the first control quantity and its corresponding first control parameters, and the preset compensation function, obtain the second control quantity and its corresponding second control parameters; the second control quantity is used to characterize the final control quantity after disturbance compensation.

[0037] Step S1: Obtain the nominal model of the switching power supply and the corresponding nominal parameter set.

[0038] In one possible implementation, the switching power supply is configured to: obtain the output voltage step response curve as the second output voltage based on the input step signal with a known duty cycle as the second input voltage; Based on the second input voltage and the second output voltage, obtain the nominal inductance, nominal capacitance, nominal resistance, and nominal control gain; Based on the nominal inductance, nominal capacitance, nominal resistance, and nominal control gain, obtain the nominal model and the corresponding set of nominal parameters; The nominal parameter set configuration includes at least one of the following: nominal inductance, nominal capacitance, nominal resistance, and nominal control gain.

[0039] In one possible implementation, step S1 further includes obtaining a state-space model including the total disturbance based on the nominal control gain in the nominal parameter set, and designing a linearly extended state observer. Based on the nominal parameter set, obtain the linearly extended state observer.

[0040] In one possible implementation, based on obtaining the nominal model of the switching power supply and the corresponding nominal parameter set, including: Based on the step input voltage with a known duty cycle applied to the switching power supply, the steady-state output voltage value, peak voltage value, and peak time are obtained by measuring the step response curve of the actual output voltage of the switching power supply. The second input voltage is configured as the known duty cycle multiplied by the nominal input voltage. The steady-state output characterization is the complete waveform of the step response curve of the output voltage recorded at a sampling frequency not less than a predetermined multiple of the switching frequency from the moment the step is applied until it enters the steady state.

[0041] Based on the steady-state output voltage, peak voltage, and peak time, the overshoot and peak time are obtained, and the damping ratio and undamped natural frequency are obtained. The nominal resistance is obtained based on the steady-state output voltage and load current. The nominal inductance is obtained from the nominal resistance, damping ratio, and undamped natural frequency. The nominal capacitance is obtained based on the nominal inductance and the undamped natural frequency; The nominal control gain is obtained based on the nominal input voltage, nominal inductance, and nominal capacitance. Based on the nominal inductance, nominal capacitance, and nominal resistance, the nominal model is obtained through the second-order transfer function; The nominal inductance, nominal capacitance, nominal resistance, and nominal control gain are used as the nominal parameter set.

[0042] In the implementation of this application embodiment, the nominal model of the switching power supply is obtained through an open-loop step experiment, from which the nominal parameter set is obtained, and then the nominal parameter set is put into the extended state observer to facilitate the subsequent estimation of real-time state variables and the calculation of the first and second control quantities.

[0043] Open-loop step experiment data for the nominal model includes: First, disconnect the closed-loop control circuit of the switching power supply to make it work in an open-loop state. In this case, the power switching transistor is driven with a fixed duty cycle.

[0044] Then, a constant step signal with a known duty cycle is applied to the input terminal of the switching power supply as the second input voltage, wherein the duty cycle of the step signal is within a preset duty cycle range.

[0045] The amplitude of the second input voltage is determined by the reference voltage source and the known duty cycle. The analog-to-digital converter samples the voltage at a preset sampling frequency, which is generally no less than 10 times the switching frequency. The analog-to-digital converter records the complete waveform of the output voltage from the moment the step signal is applied until it enters the steady state, and obtains the steady-state value, peak voltage, and peak time. The sampling frequency set at this time determines the control cycle set by this switching power supply. The sampling cycle and the control cycle are consistent.

[0046] The overshoot and peak time are calculated based on the obtained steady-state value, peak voltage and peak time, and then the damping ratio and undamped natural frequency are calculated. When the overshoot is greater than the preset overshoot threshold, the damping ratio is calculated using a logarithmic formula. When the overshoot is less than or equal to the preset overshoot threshold, the preset damping ratio value is taken as critical damping. Calculate the nominal inductance and nominal capacitance based on the calculated damping ratio and undamped natural frequency; the nominal resistance is obtained by independently measuring the load current. The obtained parameters are substituted back into the nominal model for simulation verification. If the error exceeds the allowable range, iterative correction is performed.

[0047] The nominal parameter set includes nominal inductance, nominal capacitance, nominal resistance, and nominal control gain, where nominal control gain is the ratio of nominal input voltage to the product of nominal inductance and nominal capacitance.

[0048] Furthermore, after directly obtaining the nominal model, the actual output voltage at this time is first used as the first state variable, and the total disturbance is used as the second state variable. The second derivative of the real-time actual output voltage of the switching power supply is equal to the sum of the product of the total disturbance, the nominal control gain, and the current known duty cycle. The influence of uncertain factors such as input voltage fluctuations, load changes, and errors of the actual circuit itself that are not involved in the nominal model are all absorbed into the state variable of the total disturbance.

[0049] Then, the bandwidth parameterization method is used to obtain the extended state observer gain. The ratio of the extended state observer bandwidth to the control cycle is within a preset range, and the extended state observer gain is proportional to the square of the extended state observer bandwidth. The extended state observer is corrected using the difference between the real-time estimates of the state variables and the total disturbance using the measured output value and the known duty cycle. By incorporating known nominal information into the extended state observer, the total disturbance no longer includes the known components determined by the nominal inductance, capacitance, and resistance. Only uncertainties such as input voltage fluctuations and load changes need to be estimated, thus significantly reducing the estimation burden of the extended state observer and accelerating the convergence speed.

[0050] Furthermore, during the discretization process of the extended state observer, the continuous extended state observer is transformed into a discrete recursive formula so that the actual real-time execution of the PWM of the switching power supply can be controlled by digital signals.

[0051] The discrete recursive formula is configured with three calculation steps: calculation of intermediate variables, update of the first state variable, and update of the second state variable. The update formulas for the two state variables only use the values ​​of the current period and the previous period, which ensures the causality and real-time executability of the algorithm.

[0052] In the implementation of this application embodiment, the nominal model of the switching power supply is obtained without relying on closed-loop control. This model includes repeatable physical quantities such as the nominal values ​​of inductance, capacitance, and resistance. This allows the power supply to be separated from the total disturbance in subsequent control, reducing the burden on the extended state observer.

[0053] To make it easier to understand, the first input voltage, the first output voltage, the actual output voltage, the second input voltage, and the second output voltage will be explained separately: The first input voltage is denoted as This is the actual operating voltage applied to the input terminal of the switching power supply. In practice, it is an unstable, coarse voltage, which may come from, for example, a battery, rectifier bridge, or pre-amplifier power supply. The initial input voltage fluctuates with changes in the mains power, load, or pre-amplifier, making it one of the sources of disturbance that needs to be actively suppressed. For example, a rated input of 24V may actually vary between 18V and 32V. In subsequent steps of this embodiment... This represents the first input voltage in the k-th control cycle.

[0054] The first output voltage is denoted as The first output voltage is the ideal output voltage of the switching power supply, which is the target voltage directly set by the user according to the actual engineering requirements. The first output voltage is a fixed expected value and is the reference that the control method ultimately tracks. For example, if the power supply needs to output 12V in actual engineering, then the first output voltage is 12V.

[0055] Actual output voltage This refers to the actual, instantaneous output voltage value obtained by sampling through an analog-to-digital converter during the real-time operation of a switching power supply. 'k' represents the actual output voltage at the kth control cycle and also at the kth sampling time. The actual output voltage is the most important feedback signal, used to compare it with the ideal value, i.e., the first output voltage. The comparison generates an error that drives a preset compensation function. It also requires state observations, which are input into an extended state observer to obtain state estimates.

[0056] Second input voltage In the open-loop step test, a known and stable test voltage is artificially applied to the switching power supply, which is directly generated by a reference voltage source and passed through a fixed duty cycle. The voltage is generated and then applied to the input of the switching power supply. This second input voltage is only used to obtain the nominal model, not the input voltage during normal operation; the value of the second input voltage is known, stable, and undergoes a step change. , It is the nominal input voltage produced by the reference voltage source.

[0057] The second output voltage is denoted as The second output voltage corresponds to the transient voltage curve of the switching power supply output under the step excitation of the second input voltage. It is used to obtain the nominal model parameters from the response waveform. For example, in the case of a fully open-loop switching power supply, a 12V step is applied as the second input voltage, and the entire process of the output voltage rising from 0V and stabilizing at 6V is recorded. This is the second output voltage. 6V is the ideal output voltage of the switching power supply.

[0058] In the open-loop state of the switching power supply, the second input voltage, which is actually a step signal, is input. The corresponding output voltage response curve, i.e., the second output voltage, is recorded. By analyzing the overshoot, peak time, and steady-state value of this second output voltage, the nominal parameter set of the switching power supply's nominal model is calculated. Then calculate the nominal control gain. ; Because the nominal model is used to extract the errors of the switching power supply's own hardware directly from the total disturbance, the subsequent extended state observer only needs to estimate other disturbances, thereby speeding up convergence and improving estimation accuracy.

[0059] Step S11: Obtain the nominal model of the switching power supply.

[0060] The closed-loop control of the switching power supply under test is disconnected, making it operate in open-loop mode, and the rated input voltage is preset, that is, a nominal input voltage value is set. Then, a known and stable reference voltage source is selected as the provider of the second input voltage to provide this rated input voltage; Apply a known duty cycle to the input of the switching power supply The step signal is used as the second input voltage. The amplitude of the second input voltage is determined by the reference voltage source of the nominal input voltage and the preset known duty cycle, and can be expressed as: ; in, It is the second input voltage, which is the actual voltage value input to the switching power supply; It is a pre-set, fixed, known duty cycle. In actual engineering, this known duty cycle used to obtain the nominal model should not be too small or too large, and is usually between 0.3 and 0.7.

[0061] Starting from the moment the second input voltage of the step signal is applied, continuously record the waveform of the actual output voltage changing with time. This waveform serves as the step response curve of the second output voltage, which is the second output voltage. ; Then, until the step response curve of the second output voltage reaches a steady state, the steady-state value is denoted as... Peak voltage is denoted as The time when the peak occurs, i.e., the peak time, is denoted as . .

[0062] When conducting a ring step test, the load should be kept constant, or the rated load can be used directly. To improve the identification robustness, multiple step tests can be conducted, such as introducing an inductor or capacitor into the rated load to obtain positive and negative steps, and then taking the average.

[0063] In this embodiment, the nominal inductance, nominal capacitance, and nominal resistance of the nominal model are calculated based on the data from the open-loop step experiment.

[0064] This embodiment takes a Buck-type switching power supply as an example. In continuous conduction mode, it describes the process from the reference voltage source and a known duty cycle to the output voltage. The transfer function can be approximated by second-order coefficients. Using the second-order transfer function, the nominal model can be expressed as: ; in, It is the second control variable, i.e., the known duty cycle. Laplace transform, The step response curve of the second output voltage The Laplace transform of; It is the nominal input voltage; the nominal model ignores the errors in the objective circuit of the switching power supply itself and the parasitic parameters at higher frequencies, but it is perfectly adequate to characterize the nominal dynamics.

[0065] Then, for the Buck converter, the DC gain is theoretically equal to the known duty cycle of the step signal, i.e., the DC gain. Equal to a known duty cycle, it can be expressed as: However, the actual measured value may deviate slightly, so the actual measured value should be used directly.

[0066] Steady-state value of the second output voltage and peak voltage The overshoot σ can be expressed as: ; However, if there is no overshoot σ at this time, that is, σ is less than or equal to 0, then the damping ratio is set according to the critical damping setting, i.e. ; The damping ratio can be obtained from this. and natural frequency ; when hour, , ; when hour, , ; in, , It is the rise time, the time it takes for the second output voltage to rise from 0 to its steady-state value. Within the time frame, two thresholds are set, and the time from the first threshold voltage to the second threshold voltage is called the rise time. Measure the load current at this time. Then the nominal resistance , can be represented as: ; At the same time, the nominal inductance is obtained. and nominal capacitance , , .

[0067] At this point, transforming the nominal model from the form of a second-order transfer function to the form of a continuous-time differential equation, that is, from the frequency domain to the time domain, can be expressed as follows: ; Then calculate the nominal inductance at this time nominal capacitance nominal resistance Substitute back into the nominal model and compare the simulated step response curve obtained from the nominal model with the measured curve of the actual output voltage y. If the error is large, for example, a threshold can be set to indicate a large error, and then the damping ratio can be adjusted. and undamped natural frequency .

[0068] At this point, based on the nominal inductance and nominal capacitance Obtain the nominal control gain , can be represented as: , to characterize the influence coefficient of the final reference voltage source on the second derivative of the output voltage.

[0069] According to the nominal inductance nominal capacitance Nominal control gain nominal resistance As a set of nominal parameters, it can be represented as .

[0070] Step S12: Obtain the state equation of the switching power supply.

[0071] Preset first output voltage The ideal value, and the first input voltage It is a changing, unstable, coarse current, so regardless of the first input voltage Regardless of changes in load, the actual output voltage must be kept constant. satisfy: .

[0072] Taking a Buck-type switching power supply as an example, the second-order differential equation of the second output voltage can be expressed as: The nominal parameter set of the nominal model at this time The nominal inductance in nominal capacitance nominal resistance As the initial values ​​for the state equation.

[0073] Furthermore, the second-order differential equation for the output voltage can also be expressed as... ;in, Let f denote the total disturbance of the switching power supply. Then, since a known nominal model has been constructed in advance, the disturbance of the switching power supply itself is extracted from the total disturbance. It is based on the nominal model, so By converting the switching power supply's own hardware into nominal inductors, capacitors, and resistors, the inherent disturbances of the switching power supply are eliminated, leaving only uncertainties such as input voltage fluctuations and load changes. d is the second control variable of the final output PWM at this point. In a perfectly ideal situation, the switching power supply has no total disturbance f and can directly control the nominal gain. d can be obtained; At this point, we have two state variables. Let the first state variable be denoted as... Then define the first state variable as The value of the output voltage is represented by ; the second state variable is denoted as Then define it as , to characterize the value of the total disturbance.

[0074] At this point, the state equation for this switching power supply can be expressed as: .

[0075] Step S13: Obtain the preset extended state observer.

[0076] Based on the actual measured output voltage y and the duty cycle d at that time, estimate the state variables. and The value of can be represented as: ; in, It is the first state variable The estimated value, It is the first state variable The estimated value; and The gain of the extended state observer can be preset directly and adjusted to ensure that the observation error converges quickly.

[0077] Using the bandwidth parameterization method, let the bandwidth of the extended state observer be... ,but Because of the bandwidth of the extended state observer This determines the convergence speed of the extended state observer, theoretically The larger the value, the faster the estimation, but too large a value will amplify the measurement noise.

[0078] Extended State Observer Bandwidth It can also be set according to the control cycle of the switching power supply, where the control cycle is expressed as... , The switching frequency is an inherent hardware parameter of the switching power supply.

[0079] Since the actual control of the switching power supply output is achieved by controlling the PWM within the switching power supply through the duty cycle, digital signals are required. Therefore, the data observed by the extended state observer is converted into discrete digital signals. In this embodiment, the control quantity for each control cycle is obtained using a discrete recursive formula. In this embodiment, k is denoted as the kth control cycle, and the second control quantity at this time in the kth control cycle is denoted as... ; At this point, when k=0, it represents the start of the first control cycle after the switching power supply is powered on or reset. In this embodiment, there are no historical control values ​​before the first control cycle k=0. If k=0, then the previous cycle is k=-1. Therefore, an initial duty cycle is set, denoted as . Because the reference voltage source used in calculating the nominal model is employed, the initial duty cycle d[ 1], i.e., nominal duty cycle; k=0 corresponds to time t=0, and each subsequent period corresponds to... For example, assuming the switching frequency is... ,but If k=0 corresponds to the first control cycle, the corresponding time is t=[0, 10μs); if k=0 corresponds to the first control cycle, the corresponding time is t=[10μs, 20μs).

[0080] Step S2: Obtain the first input voltage and the actual output voltage. Based on the first input voltage, the actual output voltage, and the nominal parameter set, obtain the state estimate using a preset extended state observer.

[0081] In one possible implementation, in each control cycle, the current actual output voltage and the first input voltage are obtained, and the second control quantity and the state estimate quantity of the previous cycle are obtained. Based on the current actual output voltage and the first input voltage, as well as the second control quantity and the state estimate of the previous cycle, the state estimate of the current cycle is obtained by expanding the state observer. The state estimator must be configured with at least a first state variable and a second state variable; The extended state observer is configured with a discrete recursive formula, which is configured as follows: The intermediate variables are obtained based on the first gain and control period preset by the extended state observer; Based on the intermediate variables, the nominal parameter set, the second control quantity of the previous cycle, the state estimate of the previous cycle, the actual output voltage of the current cycle, and the actual output voltage of the previous cycle, the first state variable of the current cycle is obtained. The second state variable is obtained based on the preset second gain of the extended state observer, the first state variable of the current period, and the first state variable of the previous period. Based on the first state variable of the current cycle, the estimated output voltage value is obtained; based on the second state variable of the current cycle, the estimated total disturbance value is obtained.

[0082] When implementing the embodiments of this application, the nominal parameter set is obtained according to step S1, and the state estimate can be calculated in real time in each control cycle using a preset extended state observer.

[0083] Each control cycle, i.e., each PWM cycle, involves recursively calculating two state estimates for the current cycle based on the real-time sampled output voltage and the control quantity of the previous cycle. The first state variable is used to characterize the estimated output voltage value, and the second state variable is used to characterize the estimated value of the total disturbance experienced by the switching power supply.

[0084] At the beginning of each control cycle, the actual output voltage is sampled via an analog-to-digital converter. The sampling time is selected outside the switching noise peak, and the sampling frequency is equal to the control frequency, i.e., once per switching cycle. Simultaneously, the first input voltage is sampled as input data for subsequent control and feedforward compensation. The second control quantity calculated in the previous cycle and the state estimate value of the previous cycle are obtained, providing the necessary historical data for the recursive calculation of the extended state observer.

[0085] First, the intermediate variables related to the product of the extended state observer gain and the control cycle are calculated. Then, the state estimate of the previous cycle, the control quantity of the previous cycle, and the sampled values ​​of the current and previous cycles are substituted into the preset discrete recursive formula. The first state variable is updated first, and then the second state variable is updated. The update formulas for both state variables only use the measured values ​​of the current cycle and the previous cycle and do not depend on future information. After the current cycle state estimate is calculated, the old historical value stored in the memory is overwritten to prepare for the recursive calculation of the next cycle.

[0086] The first state variable is passed to step S3 to calculate the tracking error, and the second state variable is passed to both steps S3 and S4 to be used for indirect estimation of error derivative and disturbance compensation calculation, respectively. This ensures real-time updating and effective utilization of state information within each control cycle.

[0087] The control period in the recursive formula must be strictly consistent with the actual PWM switching period. Sampling and calculation can be triggered by a timer interrupt at a fixed frequency. During the initial startup of the extended state observer, since the initial disturbance estimate is zero, the extended state observer requires several cycles to complete the convergence process.

[0088] In the implementation of this application embodiment, however, because the control time of the switching power supply in actual engineering is the control PWM, which requires a digital signal, the continuous extended state observer is transformed into a discrete recursive formula. A Laplace transform is performed on the extended state observer equation, and then the frequency domain 's' of the Laplace transform is replaced with the time domain, which can be expressed as: ,in It is a control cycle. , It is the switching frequency, an inherent parameter of the switching power supply hardware design. It is converted to the time domain and then inversely transformed to obtain the difference equation.

[0089] Taking the k-th control cycle as an example, the continuous extended state observer equation is transformed into a discrete recursive formula.

[0090] Get the control quantity from the previous cycle Actual output voltage in the current cycle Actual output voltage of the previous cycle Previous period estimate ; Then preset the control cycle. Preset extended state observer gain Obtain the nominal control gain from the nominal model. ; When k is set to 0, it marks the start of the first control cycle after the switching power supply is powered on or has just been reset. Initialization is complete at this point, and the system is ready to execute the first sampling and control operation. The sampled output voltage is then obtained. Then set And the initial estimated perturbation at this time .

[0091] Using the discrete recursive formula, first update the first state variable. Then update the second state variable. It can be represented as: ; ; Where A and B are intermediate parameters, , .

[0092] Then, in each subsequent control cycle, the state estimate is calculated in real time, and the updated first state variable can be obtained. Then use what you just got Compared to the previous cycle Update the second state variable .

[0093] After completing the extended state observer recursion, the state estimate for the current period is... and The value is saved to memory, overwriting the old one. and This will be used for the next cycle, but at the same time, the current... and Passed to subsequent step S3, Used to calculate the current, Used to estimate the differential of the error ,at the same time It is also used in the calculation of disturbance compensation in step S4.

[0094] Step S3: Based on the state estimate and the first input voltage, obtain the first control quantity and its corresponding first control parameters; the first control quantity is used to characterize the control quantity without disturbance compensation.

[0095] In one possible implementation, the tracking error is obtained based on the first state variable and the first output voltage; Based on the second state variable and the second control quantity of the previous cycle, the differential of the estimation error is obtained; Based on the differentials of tracking error and estimation error, the nonlinear feedback quantity is obtained through a preset nonlinear combination function; Based on the first input voltage and the nominal input voltage sampled in the current cycle, the input voltage adaptive coefficient is obtained; The feedforward compensation term is obtained based on the input voltage adaptive coefficient; The first control quantity is obtained based on the nonlinear feedback quantity and the feedforward compensation term.

[0096] In one possible implementation, the nonlinear feedback quantity is obtained by using a preset nonlinear combination function based on the differentials of the tracking error and the estimation error, including: The preset nonlinear combination function is configured with a first preset fal function and a second preset fal function; Based on the tracking error, the first nonlinear component is obtained through the first preset fal function; Based on the estimated value of the error derivative, the second nonlinear component is obtained through the second preset fal function; The first preset fal function is configured as a piecewise nonlinear function; When the absolute value of the tracking error is greater than the width of the first linear interval, it is considered a large error, and the first preset fal function is configured as a power function. Otherwise, it is a small error, and the first preset fal function is configured as a linear function superimposed with a hyperbolic tangent correction term; The second preset fal function is configured as a piecewise nonlinear function; When the absolute value of the differential error estimate is greater than the width of the second linear interval, it is considered a large error, and the second preset fal function is configured as a power function. Otherwise, it is a small error, and the second preset fal function is configured as a linear function superimposed with a hyperbolic tangent correction term; The width of the first linear interval and the width of the second linear interval are both configured with a preset fixed parameter to characterize the boundary threshold between the linear region and the nonlinear region; Based on the bandwidth of the extended state observer, the proportional gain and differential gain are obtained; The nonlinear feedback quantity is obtained based on the first nonlinear component, the second nonlinear component, the proportional gain, and the differential gain.

[0097] In the implementation of this application embodiment, based on the state estimate and the currently sampled first input voltage, a first control quantity without disturbance compensation and its corresponding first control parameter are calculated through a preset nonlinear combination function. This first control quantity reflects the tracking requirement for the ideal output voltage and the active adjustment capability for changes in the input voltage. It will be further compensated with the total disturbance estimate in step S4.

[0098] The tracking error is the difference between the first output voltage and the first state variable. Since the control quantity at the current moment has not yet been calculated, the estimated value of the error derivative is approximated by the control quantity of the previous cycle. When the sampling frequency is high enough, i.e. the control period is much smaller than the dynamic time constant, it has sufficient engineering accuracy. The indirect estimation method based on the extended state observer has a filtering effect compared with direct differential calculation.

[0099] The nonlinear combination function adopts a piecewise nonlinear function form. In the small error interval, a linear function is superimposed with a hyperbolic tangent correction term, while in the large error interval, a power function form is used. The nonlinear parameters are set to preset values. The enhanced nonlinear function, based on the traditional piecewise function, then superimposes a small nonlinear term in the small signal region to effectively suppress chatter. In the parameter configuration, the first nonlinear exponent is set to 0.5 to produce a square root-type nonlinear effect on the error, and the second nonlinear exponent is set to 0.25 to produce a stronger nonlinear effect on the error derivative. The linear interval width is set to 0.01, normalized relative to the target output voltage.

[0100] The input voltage adaptive coefficient is calculated based on the relative deviation between the current input voltage and the nominal input voltage. The input voltage adaptive coefficient is taken from the middle value within the preset range. Then, the input voltage adaptive coefficient is multiplied by the nonlinear combination function to adjust the overall control amplitude. When the input voltage is equal to the nominal value, the adaptive coefficient is equal to the reference value. When the input voltage deviates from the nominal value, the input voltage adaptive coefficient changes smoothly around the reference value.

[0101] The feedforward control quantity is calculated based on the relative deviation of the input voltage. The feedforward strength coefficient is taken from a preset range, and the intermediate value within that range can be directly used. The feedforward compensation term is added directly, resulting in the fastest response speed and complete independence from error information. The feedforward compensation and adaptive coefficient work together; the feedforward term is responsible for a rapid response to changes in the input voltage, while the adaptive coefficient is responsible for ensuring the stability of the closed loop.

[0102] The input voltage adaptive coefficient is multiplied by the nonlinear error feedback combination function, and then added to the feedforward compensation term to obtain the first control quantity without disturbance compensation. The first control quantity, along with its corresponding first control parameters, is passed to step S4 for subsequent disturbance compensation calculation. The first control parameters include adjustable constants such as nonlinear function parameters, gain coefficients, adaptive parameters, and feedforward strength coefficients.

[0103] In the implementation of this application's embodiments, the real-time state estimate of the current sampling period is utilized. and And sample the first input voltage of the current control cycle. Based on a preset nonlinear combination function, the first control quantity without disturbance compensation is calculated. And its corresponding first control parameter. This control quantity reflects the need to track the ideal output voltage and the ability to actively adjust to external changes, and will further compensate for the total disturbance in step S4.

[0104] Obtain the tracking error and its rate of change of the output voltage at the current moment, which are used to calculate the nonlinear feedback quantity.

[0105] The first output voltage is directly set according to actual engineering requirements. Tracking error can be expressed as: Tracking error represents the deviation between the current estimated output voltage and the ideal value. A positive error indicates that the output voltage is too low and the duty cycle needs to be increased; a negative error indicates that the output voltage is too high and the duty cycle needs to be decreased.

[0106] Then, according to the state equation You can get Since the control quantity has not yet been calculated at the current moment, the control quantity from the previous cycle will be used. The differential of the estimation error can be expressed as: The estimated error differential represents the trend of error change. If it is negative, it means that the error is decreasing, which means that the output voltage is approaching the ideal value. If it is positive, it means that the error is increasing, and the control effect needs to be strengthened.

[0107] The differentials of tracking error and estimation error are calculated using a designed nonlinear combination function, which results in higher gain for small errors and avoids saturation for large errors, thereby improving steady-state performance and response speed. At the same time, a small nonlinear term is added in the small signal region to suppress chatter.

[0108] The preset nonlinear combination function is configured with a first preset fal function and a second preset fal function. However, in this embodiment, the first preset fal function and the second preset fal function are different from the traditional fal function. In this embodiment, a nonlinear term is superimposed to further suppress steady-state error and micro-flutter.

[0109] The traditional fal function can be represented as: ,in, It is a preset exponent, usually , is the width of the linear interval, and x is the independent variable; In this embodiment, x in the fal function refers to the error of the current period of the nonlinear mapping to be performed, that is: if in the first preset fal function In this context, x represents the tracking error. In the second preset fal function In this context, x is the differential of the estimation error. The default fal function can be expressed as: Where ε is the preset flutter suppression intensity, It is the slope coefficient of the tanh function. The first preset fal function , recorded as The value can be set to 0.5 to calculate the tracking error. The second preset fal function , recorded as The value can be 0.25 to obtain the differential of the estimation error.

[0110] At this point, the preset nonlinear combination function can be expressed as: ; in, It is proportional gain. It is the differential gain, an element of the first control parameter, and then the desired closed-loop bandwidth is set. , , It is the known bandwidth of the extended state observer, then .

[0111] When the first input voltage is input Deviation from nominal input voltage At this point, the duty cycle of the switching power supply will significantly affect the output voltage. Therefore, this embodiment introduces a preset adaptive coefficient to adjust the overall voltage regulation amplitude of the control circuit of the switching power supply in real time, to compensate for this gain change and thus maintain consistency.

[0112] The first input voltage obtained from the current sampling and nominal input voltage Obtain adaptive coefficients , can be represented as: ,in It is an adaptive intensity coefficient, with a value ranging from 0.2 to 0.5. The larger the value, the more drastic the adaptive adjustment becomes, and then... The function smooths out the changes in coefficients, avoiding abrupt changes, for example: When the first input voltage equal to nominal input voltage hour, ; When the first input voltage Greater than the nominal input voltage hour, ; When the first input voltage Less than the nominal input voltage hour, .

[0113] In this embodiment, the adaptive coefficient is obtained. Alternatively, a piecewise function can be used, which can be represented as: . To accelerate the response to changes in the input voltage, since the adaptive coefficient adjusts the closed-loop gain, a feedforward term is added to directly generate an additional control quantity based on the input voltage deviation. This feedforward term cancels out input voltage disturbances with almost no delay and is called the feedforward compensation term. , can be represented as: ,in, It is the feedforward intensity coefficient, with a value ranging from 0.1 to 0.3. This represents the absolute deviation of the input voltage, divided by The relative deviation is obtained; in the switching power supply, taking the Buck converter used in this embodiment as an example, its duty cycle is... When the input voltage increases, the steady-state duty cycle needs to decrease, and the feedforward compensation term generates a negative value; when the input voltage decreases, the feedforward compensation term generates a positive value, which can significantly reduce transient voltage drops or overshoot.

[0114] At this point, the adaptive coefficient It is a combination of preset nonlinear functions Multiplication is primarily for feedback gain, which affects dynamic response speed. Then, a feedforward compensation term is added. This provides an open-loop compensation, which has a fast response and is error-independent. The two complement each other: the feedforward compensation term has a fast response, and the adaptive coefficient ensures closed-loop stability. This yields the final first control variable, which can be expressed as... ,at this time It is a dimensionless control variable, and then when the error is large... Dominant, driving the output to quickly track the ideal value; when the error is small, the nonlinear function provides high gain to eliminate steady-state error, with feedforward compensation term. It directly responds to input voltage deviations, accelerates disturbance suppression, and is unaffected by errors.

[0115] At this point, the first control parameter includes at least one of the following: a nonlinear combination function. Preset parameters , , ε The calculated gain coefficient includes the proportional gain. Differential gain Preset adaptive intensity coefficient and preset feedforward strength coefficient .

[0116] Step S4: Based on the preset first output voltage, the first control quantity and its corresponding first control parameters, and the preset compensation function, obtain the second control quantity and its corresponding second control parameters; the second control quantity is used to characterize the final control quantity after disturbance compensation.

[0117] In one possible implementation, the original control quantity is obtained based on the second state variable, the first control quantity, and the nominal control gain of the nominal model; The minimum and maximum duty cycles are preset based on the actual minimum and maximum duty cycles of the switching power supply. The upper and lower limits of the original control quantity are then applied to obtain the limited control quantity. Based on the second control quantity of the previous cycle, the second control quantity of the current cycle is obtained by performing a first-order low-pass filter on the control quantity after amplitude limiting.

[0118] In one possible implementation, a second control quantity is obtained based on a preset compensation function according to a preset first output voltage, a first control quantity and its corresponding first control parameters, and an abnormal protection mechanism is also included. Based on the second control quantity of the current cycle and the preset PWM cycle count value, the PWM comparison register value is obtained by multiplying the second control quantity by the PWM cycle count value and rounding it to the nearest integer. The PWM comparison register value is used to control the power switching transistor of the switching power supply to turn on and off. The anomaly protection mechanism is configured as follows: Based on the first state variable and the first output voltage, determine whether the first state variable is greater than the preset overvoltage protection multiple of the first output voltage; If so, the second control variable of the current cycle is set to the minimum duty cycle and PWM is turned off to obtain overvoltage protection action; Based on the first state variable and the first output voltage, determine whether the first state variable is less than the preset undervoltage protection multiple of the first output voltage and whether the duration exceeds the preset protection delay cycle number; If so, then PWM is turned off to enable undervoltage protection. Based on the original control quantity and the preset minimum duty cycle and maximum duty cycle, determine whether the original control quantity continuously exceeds the range formed by the minimum duty cycle minus the preset margin and the maximum duty cycle plus the preset margin. If so, switch the power supply configuration to open circuit and obtain abnormal control action.

[0119] In the implementation of this application embodiment, disturbance compensation is performed to obtain the final control quantity and output execution. Based on the state estimate, the first control quantity, and the nominal control gain in the nominal parameter set, the original control quantity is calculated through a preset compensation function. After amplitude limiting and filtering, the final duty cycle command is obtained, which is then mapped as a PWM signal to drive the power switch to achieve precise control of the output voltage. At the same time, this step also includes a preset abnormal protection mechanism to ensure safe operation.

[0120] Subtracting the second state variable from the first control variable and then dividing by the nominal control gain yields the compensated original control variable. The compensation function uses the total disturbance estimated in real time by the extended state observer to dynamically inversely compensate the control variable, transforming the inherently nonlinear and time-varying controlled object into a linear one. Then, the integrator is directly used for control. The second derivative of the actual output voltage after the estimated disturbance is compensated is approximately equal to the first control variable, thus utilizing the integrator's characteristics to facilitate subsequent control design.

[0121] In the implementation of this application's embodiments, based on the first control quantity Estimate total disturbance Nominal control gain The original control quantity is obtained through a preset compensation function, which can be expressed as: , Because the second-order differential equation of the output voltage can also be expressed as f is the total disturbance of the switching power supply, and the total disturbance estimated by the extended state observer. And then, because it can also be expressed as There will be At this point, an integrator can be used.

[0122] Then, set the second control parameter. To allow for dead time and avoid top pipe straight-through, set the minimum duty cycle. and maximum duty cycle The control quantity after obtaining the amplitude limit can be expressed as: ; Then, to suppress drastic changes in the duty cycle, especially in the early stages of convergence of the extended state observer or when sampling noise is high, a first-order filter is added. Based on the second control quantity of the previous cycle, the second control quantity at this time... This can be expressed as, η is the filter coefficient, which is preset directly. hour, The second control quantity in this control cycle This represents the duty cycle instruction actually output to the PWM module.

[0123] The second control quantity It is converted into a compare register value that the PWM module can recognize and then used to drive the power switch.

[0124] Furthermore, it is equipped with an abnormal protection mechanism that, under fault conditions, including overvoltage, undervoltage, and abnormal control quantities, quickly cuts off the output or switches to a safe mode to protect the switching power supply and the load.

[0125] All protection logic is executed synchronously in each control cycle. Protection is stored in a global flag and has a higher priority than normal control.

[0126] When estimating the output voltage , If the threshold value is preset, then overvoltage is detected and overvoltage protection is implemented. Immediately transfer the second control quantity Set the voltage to zero, disable the PWM output, set the overvoltage protection flag, record the fault, and then wait for manual reset or for the voltage to drop naturally to a safe range and for the reset signal to be valid before enabling the PWM again.

[0127] When estimating the output voltage And the duration exceeds a preset number of on / off cycles (10 cycles recommended) to avoid accidental triggering during startup. It is a preset threshold. If so, it is determined to be undervoltage, and undervoltage protection is implemented; Similarly, disable the PWM output, Set to zero, disable PWM output, set undervoltage protection flag, record fault, and then perform a soft restart.

[0128] When the original control quantity If the control cycle exceeds the safety extension range for three consecutive control cycles, the safety extension range is set according to the minimum and maximum duty cycles set by the second control parameter, and a margin is also set, for example... If this situation occurs, it indicates that the compensated control quantity is seriously out of range. This may be due to divergence of the extended state observer, sensor failure, or serious parameter mismatch. Therefore, the control quantity is judged to be abnormal. At this time, the switching power supply is switched to open circuit configuration, and an alarm signal is issued and the fault code is recorded. However, the PWM is not immediately turned off in order to maintain the output. If the abnormality persists for 10 consecutive cycles, the PWM is turned off and locked.

[0129] Once all protections are triggered, the system remains in a safe state unless the recovery conditions are met and a manual reset signal is received. The recovery conditions are configured as follows: Overvoltage protection and / or undervoltage protection, estimated output voltage Restore to according to If the control quantity is abnormal within the preset safety range, the system will manually reset or power on again, and start executing step S2 again.

[0130] Steps S1, S2, S3, and S4 constitute the complete switching power supply control method of this application. The method obtains the nominal parameter set from experiments on the nominal model, designs an extended state observer embedded with nominal information to quickly estimate residual disturbances, calculates the first control quantity through an adaptive nonlinear error feedback law, and finally generates the second control quantity and drives the PWM after disturbance compensation and amplitude limiting filtering. Simultaneously, a multi-level anomaly protection mechanism is embedded. The entire method has clear logic, rigorous naming, and consistency; the output data of each step is effectively used by subsequent steps, and the data flow path is completely closed.

[0131] To further illustrate the specific application scenarios of this application, a specific application example of a Buck-type switching power supply is provided below. Assume that the rated input voltage of this switching power supply is 24V, the rated output voltage is 12V, the rated load resistance is 10Ω, the switching frequency is 100kHz, and the control cycle is 10μs.

[0132] In step S1, an open-loop step experiment is performed to obtain the nominal model. The step duty cycle is set to 0.5. From the step response curve, the nominal inductance is obtained as 47μH and the nominal capacitance as 470μF. The nominal control gain is calculated to be approximately... According to the tuning rule that the bandwidth of the extended state observer is 0.25 times the reciprocal of the control period, the bandwidth of the extended state observer is set to 25000 rad / s, and the gain β1 of the extended state observer is set to 50000, and β2 is set to... .

[0133] In step S2, at the start of each 10μs control cycle, the output voltage and input voltage are sampled, the duty cycle and state estimate of the previous cycle are read, and these are substituted into the discrete recursive formula to calculate the two state variables of the current cycle. Assume that at a certain moment, the sampled output voltage is 11.9V, the input voltage is 22V, the duty cycle of the previous cycle is 0.5, and the state variables of the previous cycle are... 12.0V The value is 80000, and the current value is obtained through recursive calculation. Approximately 11.92V Approximately 95,000.

[0134] In step S3, the tracking error e is calculated to be 0.08V, and the estimated error derivative is approximately -350,000V / s. The enhanced nonlinear function fal is calculated using an enhanced nonlinear function, combined with the gain coefficient. Pick , Taking 5000, the nonlinear combined function value is calculated. The adaptive coefficient is approximately 0.975 based on the input voltage deviation, the feedforward compensation term is approximately -0.0167, and the synthesized first control quantity is approximately... .

[0135] In step S4, the first control quantity is subtracted from the second state variable and then divided by the nominal control gain to obtain the original control quantity 0.143. After limiting and filtering, the final duty cycle instruction 0.214 is obtained. After being mapped to the PWM comparator register value, the switching transistor is driven to turn on, so that the output voltage converges to the 12V target value.

[0136] Example 3 This is the third embodiment of this application. Based on embodiments 1 and 2, please refer to the following references. Figure 2 , Figure 2 The present application provides a schematic diagram of a switching power supply control system structure. Further, a switching power supply control coefficient may specifically include a sequential electrical connection nominal modeling unit, a state estimation unit, a feedback control unit, and a compensation output unit. The nominal modeling unit is configured to: acquire the nominal model of the switching power supply and the corresponding nominal parameter set; The state estimation unit is configured to obtain a state estimate based on a preset extended state observer, according to the first input voltage, the actual output voltage, and the nominal parameter set. The feedback control unit is configured to obtain a first control quantity based on a state estimate and a first input voltage; the first control quantity is used to characterize the control quantity without disturbance compensation. The compensation output unit is configured to: obtain a second control quantity based on a preset compensation function according to a preset first output voltage, a first control quantity and its corresponding first control parameters; the second control quantity is used to characterize the final control quantity after disturbance compensation.

[0137] In the implementation of this application, the nominal modeling unit and the state estimation unit work together using a nominal parameter set as a link, thereby effectively distinguishing the known nominal dynamics and unknown disturbances of the system. Since the extended state observer can separate the nominal dynamics using the nominal parameter set, the estimation burden of the extended state observer is significantly reduced, the estimation accuracy of the total disturbance is improved, and the sensitivity to measurement noise is reduced.

[0138] Furthermore, the basic control signal generated by the feedback control unit, combined with the disturbance compensation mechanism of the compensation output unit, enables the system to achieve high-precision tracking of the ideal output voltage under input voltage changes and load disturbances, effectively balancing dynamic response speed and steady-state accuracy.

[0139] In practice, the nominal modeling unit obtains the nominal model based on the typical operating conditions of the switching power supply. For example, it determines the nominal values ​​of inductance, capacitance and load resistance through theoretical calculation or parameter identification to form a nominal parameter set.

[0140] The state estimation unit receives sampled data of the first input voltage and the actual output voltage in each control cycle, and runs the extended state observer in combination with the nominal parameter set to output the state estimate in real time.

[0141] The feedback control unit uses the state estimate and the first input voltage to generate a first control quantity, which serves as an uncompensated reference signal and mainly reflects the nominal dynamic adjustment requirements of the system.

[0142] The compensation output unit then uses a compensation function to correct the first control quantity based on the preset first output voltage and the first control quantity, and generates a second control quantity to offset the influence of the total disturbance.

[0143] Through the above technical solutions, the switching power supply control system can accurately establish a nominal model, adaptively compensate for input voltage fluctuations, and quickly estimate and eliminate total disturbances, thereby ensuring the stability and accuracy of the output voltage under complex operating conditions. This solves the problem of balancing dynamic response and steady-state accuracy in existing technologies. Example 4 The fourth embodiment of this application differs from the previous embodiments in that: Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0144] 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. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, or may be electrical, mechanical, or other forms of connection.

[0145] The units described as separate components may or may not be physically separate. As will be apparent to those skilled in the art, the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0146] 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.

[0147] 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 several instructions to cause a computer device (which may be a personal computer, server, or grid 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 program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0148] The above-described specific embodiments further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above description is only a specific embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A switching power supply control method, characterized in that, Used in the control circuits of switching power supplies, including: Obtain the nominal model of the switching power supply and its corresponding set of nominal parameters; Based on the first input voltage, the actual output voltage, and the nominal parameter set, a state estimate is obtained using a preset extended state observer. Based on the state estimate and the first input voltage, a first control quantity is obtained; the first control quantity is used to characterize the control quantity without disturbance compensation. Based on the preset first output voltage, the first control quantity and its corresponding first control parameters, a second control quantity is obtained based on a preset compensation function; the second control quantity is used to characterize the final control quantity after disturbance compensation.

2. The switching power supply control method according to claim 1, characterized in that, The acquisition of the nominal model of the switching power supply and the corresponding nominal parameter set includes: The switching power supply is configured to use a step signal with a known duty cycle as the second input voltage to obtain an output voltage step response curve as the second output voltage. Based on the second input voltage and the second output voltage, the nominal inductance, nominal capacitance, nominal load resistance, and nominal control gain are obtained to obtain a nominal model and a corresponding set of nominal parameters; the set of nominal parameters is configured to include at least one of the following: nominal inductance, nominal capacitance, nominal load resistance, and nominal control gain.

3. The switching power supply control method according to claim 2, characterized in that, The step of obtaining the nominal model of the switching power supply and the corresponding nominal parameter set includes: Based on the step response curve of the second input voltage with a known duty cycle actually input to the switching power supply, the steady-state output voltage value, peak voltage value, and peak time are obtained by measuring the step response curve of the second output voltage actually output by the switching power supply; the second input voltage is configured as a known duty cycle multiplied by the nominal input voltage; Based on the steady-state output voltage value, peak voltage value, and peak time, the overshoot and peak time are obtained to obtain the damping ratio and undamped natural frequency; The nominal load resistance is obtained based on the steady-state output voltage and load current. The nominal inductance is obtained based on the nominal load resistance, damping ratio, and undamped natural frequency. The nominal capacitance is obtained based on the nominal inductance and the undamped natural frequency; The nominal control gain is obtained based on the nominal input voltage, nominal inductance, and nominal capacitance. Based on the nominal inductance, nominal capacitance, and nominal load resistance, the nominal model is obtained through a second-order transfer function; The nominal inductance, nominal capacitance, nominal load resistance, and nominal control gain are used as the nominal parameter set.

4. The switching power supply control method according to claim 1, characterized in that, The step of obtaining a state estimate based on a preset extended state observer, using the first input voltage, the actual output voltage, and the nominal parameter set, includes: In each control cycle, the current actual output voltage and the first input voltage are obtained, and the second control quantity and the state estimate quantity of the previous cycle are obtained. Based on the current actual output voltage and the first input voltage, as well as the second control quantity and the state estimate of the previous cycle, the state estimate of the current cycle is obtained by expanding the state observer. The state estimate is configured with at least a first state variable and a second state variable; The extended state observer is configured with a discrete recursive formula, which is configured as follows: Based on the preset first gain and control period of the extended state observer, intermediate variables are obtained; Based on the intermediate variable, the nominal parameter set, the nominal control gain, the second control quantity of the previous cycle, the state estimate of the previous cycle, the actual output voltage of the current cycle, and the actual output voltage of the previous cycle, the first state variable of the current cycle is obtained. The second state variable is obtained based on the preset second gain of the extended state observer, the first state variable of the current period, and the first state variable of the previous period. Based on the first state variable of the current cycle, the estimated output voltage value is obtained; based on the second state variable of the current cycle, the estimated total disturbance value is obtained.

5. The switching power supply control method according to claim 4, characterized in that, The first control quantity is obtained based on the state estimate and the first input voltage; The first control quantity is used to characterize the control quantity without disturbance compensation, including: The tracking error is obtained based on the first state variable and the first output voltage; Based on the second state variable and the second control quantity of the previous cycle, the differential of the estimation error is obtained; Based on the differential of the tracking error and the estimation error, a nonlinear feedback quantity is obtained through a preset nonlinear combination function; Based on the first input voltage and the nominal input voltage sampled in the current cycle, the input voltage adaptive coefficient is obtained; Based on the input voltage adaptive coefficient, the feedforward compensation term is obtained; The first control quantity is obtained based on the nonlinear feedback quantity, the input voltage adaptive coefficient, and the feedforward compensation term.

6. The switching power supply control method according to claim 5, characterized in that, Based on the differentials of the tracking error and the estimation error, a nonlinear feedback quantity is obtained through a preset nonlinear combination function, including: The preset nonlinear combination function is configured with a first preset fal function and a second preset fal function; Based on the tracking error, a first nonlinear component is obtained through the first preset fal function; Based on the estimated value of the error derivative, the second nonlinear component is obtained through the second preset fal function; The first preset fal function is configured as a piecewise nonlinear function; When the absolute value of the tracking error is greater than the width of the first linear interval, it is considered a large error, and the first preset fal function is configured as a power function. Otherwise, for small errors, the first preset fal function is configured as a linear function superimposed with a hyperbolic tangent correction term; The second preset fal function is configured as a piecewise nonlinear function; When the absolute value of the differential error estimate is greater than the width of the second linear interval, it is considered a large error, and the second preset fal function is configured as a power function. Otherwise, for small errors, the second preset fal function is configured as a linear function superimposed with a hyperbolic tangent correction term; The width of the first linear interval and the width of the second linear interval are both configured with a preset fixed parameter to characterize the boundary threshold between the linear region and the nonlinear region; Based on the bandwidth of the extended state observer, obtain the proportional gain and the differential gain; The nonlinear feedback quantity is obtained based on the first nonlinear component, the second nonlinear component, the proportional gain, and the differential gain.

7. The switching power supply control method according to claim 5, characterized in that, The step of obtaining the second control quantity based on a preset compensation function, according to a preset first output voltage, the first control quantity, and its corresponding first control parameters, includes: The original control quantity is obtained based on the second state variable, the first control quantity, and the nominal control gain of the nominal model; Based on the original control quantity, the upper and lower limits are processed by the preset minimum and maximum duty cycles to obtain the limited control quantity; Based on the second control quantity of the previous cycle, the second control quantity of the current cycle is obtained by performing a first-order low-pass filter on the control quantity after limiting.

8. A switching power supply control method according to claim 7, characterized in that, The method of obtaining the second control quantity based on a preset compensation function according to a preset first output voltage, the first control quantity and its corresponding first control parameters also includes an abnormal protection mechanism. Based on the second control quantity of the current cycle and the preset PWM cycle count value, the PWM comparison register value is obtained by multiplying the second control quantity by the PWM cycle count value and rounding it to the nearest integer. The PWM comparison register value is used to control the power switching transistor of the switching power supply to turn on and off. The anomaly protection mechanism is configured as follows: Based on the first state variable and the first output voltage, determine whether the first state variable is greater than the preset overvoltage protection multiple of the first output voltage; If so, the second control variable of the current cycle is set to the minimum duty cycle and PWM is turned off to obtain overvoltage protection action; Based on the first state variable and the first output voltage, determine whether the first state variable is less than the preset undervoltage protection multiple of the first output voltage and whether the duration exceeds the preset protection delay cycle number; If so, then PWM is turned off to enable undervoltage protection. Based on the original control quantity and the preset minimum duty cycle and maximum duty cycle, determine whether the original control quantity continuously exceeds the range formed by the minimum duty cycle minus the preset margin and the maximum duty cycle plus the preset margin. If so, switch the power supply configuration to open circuit and obtain abnormal control action.

9. A switching power supply control system, characterized in that, It includes a nominal modeling unit, a state estimation unit, a feedback control unit, and a compensation output unit, all connected in sequence. The nominal modeling unit is configured to: acquire the nominal model of the switching power supply and the corresponding nominal parameter set; The state estimation unit is configured to obtain a state estimate based on a preset extended state observer, according to the first input voltage, the actual output voltage, and the nominal parameter set. The feedback control unit is configured to obtain a first control quantity based on the state estimate and the first input voltage; The first control quantity is used to characterize the control quantity without disturbance compensation; The compensation output unit is configured to: obtain a second control quantity based on a preset compensation function according to a preset first output voltage, the first control quantity and its corresponding first control parameters; The second control quantity is used to characterize the final control quantity after disturbance compensation.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.