Power supply voltage and current sampling and filtering method and system based on Kalman filtering
By constructing a state-space model in the switching power supply and using the Kalman filter algorithm to jointly estimate voltage and current, the problems of noise pollution and phase lag are solved, a high signal-to-noise ratio feedback signal is achieved, and the steady-state accuracy and dynamic response speed of the system are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-24
AI Technical Summary
In the digital control architecture of switching power supplies, the current and voltage sampling stages face noise pollution and phase lag issues, which lead to a decline in system performance. Existing filtering methods are difficult to improve both steady-state accuracy and dynamic response speed at the same time.
A state-space model based on the power supply main circuit topology is constructed, and the Kalman filter algorithm is used to perform joint optimal estimation of output voltage and inductor current, providing a feedback signal with high signal-to-noise ratio and low delay, and coordinating with a dual-loop control system.
It significantly improves the system's steady-state accuracy, dynamic response speed, and anti-interference capability, achieving a comprehensive improvement in power supply performance.
Smart Images

Figure CN121923441A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a digital control technology for switching power supplies (such as DC-DC converters, inverters, uninterruptible power supplies, etc.), and more particularly to a power supply voltage and current sampling filtering method and system based on Kalman filtering. Background Technology
[0002] Currently, in the digital control architecture of switching power supplies (such as DC-DC converters, inverters, and uninterruptible power supplies), the dual-loop control strategy, consisting of an outer loop for output voltage and an inner loop for inductor current, has become the industry standard. This architecture ensures the steady-state accuracy of the output through the voltage loop and improves the dynamic response speed and stability of the system through the current loop. In this control system, accurate and real-time sampling of the output voltage and inductor current is the foundation and prerequisite for achieving high-performance control.
[0003] However, in practical engineering applications, the current and voltage sampling process faces multiple severe challenges, and its signal quality directly determines the upper limit of the overall power supply performance. The specific impacts are as follows:
[0004] 1. The impact of sampling noise on control accuracy and stability
[0005] Noise sources: The high-speed switching action of power switching transistors (such as MOSFETs and IGBTs) generates extremely high dv / dt and di / dt, which are coupled through parasitic parameters (such as parasitic capacitance and parasitic inductance) and introduce considerable high-frequency switching noise and electromagnetic interference (EMI) into the current sampling signal (such as from the sampling resistor or Hall sensor) and the voltage sampling signal (from the voltage divider resistor network).
[0006] Impact on the current loop: A noise-contaminated current sampling signal used directly as feedback in the inner current loop will cause the current loop regulator (typically a high-bandwidth PI controller) to respond incorrectly to noise. This not only introduces high-frequency jitter into the output PWM duty cycle signal, leading to increased switching losses and decreased efficiency, but more seriously, it compresses the available bandwidth of the current loop. To prevent system oscillation due to high-frequency noise, designers are forced to reduce the gain and bandwidth of the current loop, sacrificing the system's fast response capability.
[0007] Impact on the voltage loop: Noise in the voltage sampling signal is directly mixed into the voltage error signal, causing the current reference command output by the voltage loop regulator to also contain noise components. This "unclean" command is passed to the current loop, which further aggravates the noise level of the system, forming a vicious cycle that increases the ripple of the output voltage and reduces steady-state accuracy.
[0008] 2. Phase lag problem caused by traditional filtering methods
[0009] To suppress the aforementioned sampling noise, traditional solutions involve adding an RC low-pass filter circuit in hardware or employing a digital low-pass filter (such as a moving average filter) in software. However, these filtering methods essentially sacrifice dynamic performance for steady-state accuracy.
[0010] For example, phase hysteresis: Low-pass filters introduce significant phase hysteresis near the cutoff frequency. When this hysteresis is introduced into the feedback loop, it reduces the system's phase margin.
[0011] Therefore, in order to ensure that the system has sufficient stability margin, the bandwidth of the controller (especially the voltage loop) must be limited to a low level. This directly leads to a slower response speed of the power supply when dealing with load transients (such as sudden changes in CPU load), larger overshoot and undershoot in the output voltage, longer recovery time, and deterioration of dynamic performance.
[0012] 3. Limitations of Independent Filtering Strategies
[0013] In existing technologies, voltage and current sampling signals are typically filtered independently and in isolation. This approach ignores the strong physical coupling between these two states. For example, in a Buck circuit, there is a clear differential and integral relationship between the inductor current and the output voltage. Independent filtering strategies cannot utilize this inherent physical correlation to "intelligently" distinguish between real-state changes and random noise, resulting in suboptimal filtering performance and difficulty in finding the optimal balance between noise suppression and maintaining dynamic performance.
[0014] Kalman filtering is an optimal recursive estimation algorithm based on a state-space model, theoretically capable of providing optimal estimates of state variables in noisy systems. It has been attempted for application in some sensor signal processing fields. However, in the specific scenario of dual-loop power supply control, a key challenge lies in constructing a system model that accurately describes the circuit's physical characteristics while facilitating real-time calculations by the digital controller.
[0015] In the existing technology, there is a lack of an effective scheme that can jointly and collaboratively estimate the two core and coupled physical states of output voltage and inductor current, so as to simultaneously resolve the contradiction between noise suppression and phase lag.
[0016] In view of this, the present invention is hereby proposed. Summary of the Invention
[0017] The purpose of this invention is to provide a power supply voltage and current sampling filtering method and system based on Kalman filtering to solve the above-mentioned technical problems existing in the prior art.
[0018] The objective of this invention is achieved through the following technical solution:
[0019] The power supply voltage and current sampling filtering method based on Kalman filtering of the present invention includes the following steps:
[0020] 1) Construct a state-space model based on the power supply main circuit topology, whose state variables include the power supply output voltage V_out, inductor current I_L, and output current I_o;
[0021] 2) Obtain the observed values corresponding to the state variables, including the ADC sampled values of the output voltage and the ADC sampled values of the inductor current;
[0022] 3) Based on the state-space model and the observed values, execute the Kalman filter algorithm to iteratively output the joint optimal estimate of the output voltage and the inductor current;
[0023] 4) The output voltage estimate in the joint optimal estimate is provided to the voltage outer loop controller as feedback, and the inductor current estimate is provided to the current inner loop controller as feedback.
[0024] The digital power control system of the present invention for implementing the above-described method includes a power main circuit, a voltage outer loop controller, a current inner loop controller, an output voltage sampling circuit, an inductor current sampling circuit, and an output current sampling circuit.
[0025] The system also includes a cooperative Kalman filter module, whose input is simultaneously connected to the ADC sampled values of the output voltage and inductor current, and the output current and sampled values. The joint optimal estimate of its output is connected to the feedback input of the voltage outer loop controller and the feedback input of the current inner loop controller, respectively.
[0026] Compared with the prior art, the power supply voltage and current sampling filtering method and system based on Kalman filtering provided by the present invention constructs a system model with output voltage and inductor current as state variables, and uses the Kalman filtering algorithm to perform joint optimal estimation of the sampled values of the two, thereby providing high signal-to-noise ratio and low delay voltage and current feedback signals for the dual-loop control system at one time, significantly improving the steady-state accuracy, dynamic response speed and anti-interference capability of the system. Attached Figure Description
[0027] Figure 1 The diagram below shows a system block diagram of a power supply voltage and current sampling and filtering method based on Kalman filtering, provided in an embodiment of the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them, and do not constitute a limitation on the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.
[0029] First, the following explanations are provided for the terms that may be used in this article:
[0030] The term "and / or" means that either or both can be achieved simultaneously. For example, X and / or Y means that it includes both "X" or "Y" as well as the three cases of "X and Y".
[0031] The terms "comprising," "including," "containing," "having," or other similar semantic descriptions should be interpreted as non-exclusive inclusion. For example, including a technical feature element (such as raw material, component, ingredient, carrier, dosage form, material, size, part, component, mechanism, device, step, process, method, reaction conditions, processing conditions, parameter, algorithm, signal, data, product or article of manufacture, etc.) should be interpreted as including not only the expressly listed technical feature element, but also other technical feature elements that are not expressly listed and are well-known in the art.
[0032] The contents not described in detail in the embodiments of this invention are prior art known to those skilled in the art. Where specific conditions are not specified in the embodiments of this invention, they shall be performed according to conventional conditions in the art or conditions recommended by the manufacturer. Where the manufacturers of the reagents or instruments used in the embodiments of this invention are not specified, they are all conventional products that can be purchased commercially.
[0033] The power supply voltage and current sampling filtering method based on Kalman filtering of the present invention includes the following steps:
[0034] 1) Construct a state-space model based on the power supply main circuit topology, whose state variables include the power supply output voltage V_out, inductor current I_L, and output current I_o;
[0035] 2) Obtain the observed values corresponding to the state variables, including the ADC sampled values of the output voltage and the ADC sampled values of the inductor current;
[0036] 3) Based on the state-space model and the observed values, execute the Kalman filter algorithm to iteratively output the joint optimal estimate of the output voltage and the inductor current;
[0037] 4) The output voltage estimate in the joint optimal estimate is provided to the voltage outer loop controller as feedback, and the inductor current estimate is provided to the current inner loop controller as feedback.
[0038] 1) State equation: X(k) = A * X(k-1) + B * U(k) + W(k), where X(k) = [ V_out(k); I_L(k); I_o(k) ], matrices A and B are obtained by discretizing the parameters and switching states of the main power supply circuit topology, U(k) includes the input voltage, and W(k) is the process noise;
[0039] 2) Observation equation: Z(k) = H * X(k) + V(k), where Z(k) = [ V_ADC(k); I_ADC(k) :IO_VDC(k)] is the observation vector, H is the observation matrix, and V(k) is the observation noise.
[0040] The power supply main circuit topology is a Buck, Boost, or Buck-Boost converter.
[0041] The steps of executing the Kalman filter algorithm are completed within each PWM switching cycle, and are synchronized with the power supply's dual-loop control cycle.
[0042] The digital power control system of the present invention for implementing the above-described method includes a power main circuit, a voltage outer loop controller, a current inner loop controller, an output voltage sampling circuit, an inductor current sampling circuit, and an output current sampling circuit.
[0043] The system also includes a cooperative Kalman filter module, whose input is simultaneously connected to the ADC sampled values of the output voltage and inductor current, and the output current and sampled values. The joint optimal estimate of its output is connected to the feedback input of the voltage outer loop controller and the feedback input of the current inner loop controller, respectively.
[0044] In summary, the power supply voltage and current sampling filtering method and system based on Kalman filtering in this invention improves the performance of voltage and current sampling by performing coordinated Kalman filtering on the power supply's output voltage and inductor current sampling values, thereby improving the performance of the voltage outer loop and the current inner loop. The sampling method, which can deeply integrate the power supply circuit model and simultaneously perform optimal estimation of the output voltage and inductor current, is of great and urgent significance for overcoming the current design bottlenecks of high-performance power supplies.
[0045] This method constructs a system model with output voltage and inductor current as state variables, and uses the Kalman filter algorithm to perform joint optimal estimation of the sampled values of the two, thereby providing high signal-to-noise ratio and low delay voltage and current feedback signals for the dual-loop control system at one time, significantly improving the steady-state accuracy, dynamic response speed and anti-interference capability of the system.
[0046] To more clearly demonstrate the technical solution and its effects provided by the present invention, the embodiments of the present invention will be described in detail below with reference to specific examples.
[0047] Example 1
[0048] like Figure 1 As shown:
[0049] A Kalman filtering method for output voltage and inductor current co-processing in dual-loop power supply control includes the following steps:
[0050] S1: Construct a state-space model based on circuit topology.
[0051] State variable selection: The output voltage V_out(k), inductor current I_L(k), and output current I_o(k) are used together as the system's state variables, forming a state vector X(k) = [V_out(k); I_L(k): I_o(k)]. This is the core of the invention, directly modeling the two key physical states of the power supply's main circuit.
[0052] State equation: X(k) = A * X(k-1) + B * U(k) + W(k).
[0053] A is the state transition matrix, whose elements are determined by the parameters (inductance L, capacitance C, load R) and switching states (duty cycle D) of the power supply main circuit topology (such as Buck, Boost, etc.), and can be obtained by discretizing the circuit model.
[0054] B * U(k) represents the control input, where U(k) may include the input voltage V_in(k). The B matrix is also determined by the circuit topology.
[0055] W(k) is the process noise, and its covariance matrix is Q, which is used to characterize the uncertainty of the model (such as parameter drift and load change).
[0056] Observation equation: Z(k) = H * X(k) + V(k).
[0057] Z(k) is the observation vector, containing two elements: 1. The output voltage sample value V_ADC(k) obtained through actual sampling by the ADC. 2. The inductor current sample value I_ADC(k) obtained through actual sampling by the ADC. That is, Z(k) = [ V_ADC(k); I_ADC(k); I_o(k)].
[0058] H is the observation matrix. Since we directly observe these two states, H is usually the identity matrix.
[0059] V(k) is the observation noise, with a covariance matrix of R, which characterizes the noise level of the two ADC sampling channels.
[0060] S2: System initialization.
[0061] Initialize the state vector estimate X(0) and its error covariance matrix P(0).
[0062] S3: Real-time Kalman filter iteration.
[0063] For each control cycle k:
[0064] a. State prediction:
[0065] X(k|k-1) = A * X(k-1|k-1) + B * U(k)
[0066] P(k|k-1) = A * P(k-1|k-1) * A^T + Q
[0067] b. Measurement Update:
[0068] Obtain the current observation vector Z(k) = [V_ADC(k); I_ADC(k); Io_ADC(k)].
[0069] Calculate the Kalman gain: K(k) = P(k|k-1) * H^T * (H * P(k|k-1) * H^T + R)^-1
[0070] Update the posterior state estimate: X(k|k) = X(k|k-1) + K(k) * (Z(k) - H * X(k|k-1))
[0071] Updated posterior error covariance: P(k|k) = (I - K(k) * H) * P(k|k-1)
[0072] S4: Output the optimal estimate of the double loop.
[0073] From the updated state vector X(k|k):
[0074] V_out(k|k) is extracted as the optimal voltage feedback value after filtering and sent to the voltage loop controller.
[0075] I_L(k|k) is extracted as the optimal current feedback value after filtering and sent to the current loop controller.
[0076] The present invention also provides a digital power supply control system for implementing the above method, including a power topology, voltage and current sampling circuits, an ADC, and a digital controller. The digital controller is configured to execute the above-described cooperative Kalman filtering algorithm and provide the optimal estimates to the voltage loop and the current loop, respectively.
[0077] The following is a detailed explanation using a digitally controlled Buck converter as an example.
[0078] Hardware platform:
[0079] Power topology: Buck circuit (inductor L, output capacitor C, load R).
[0080] Controllers: FPGA, DSP, STM32, etc., with controller chips equipped with ADCs.
[0081] sampling:
[0082] 1) The output voltage V_out is conditioned by a voltage divider resistor network and then sent to the ADC1 channel of the MCU.
[0083] 2) The inductor current I_L is conditioned by the sampling resistor and the differential amplifier and then sent to the ADC2 channel of the MCU.
[0084] Software implementation (core):
[0085] Model building (based on Buck circuit):
[0086] State vector: X = [ V_out; I_L ]
[0087] Discretization of state equations: The continuous state-space model of the Buck circuit is as follows:
[0088] d / dt [ V_out] = [ -1 / (R*C) 1 / C ] [ V_out ] + [ 0 ] [ V_in ]
[0089] d / dt [ I_L] = [ -1 / L 0 ] [ I_L ] + [ 1 / L ] * (D * V_in)
[0090] The continuous model described above is discretized using the first-order Euler method or the bilinear transformation method, yielding the discrete state matrix A_d and the input matrix B_d. The discretization process is a well-known technique in this field.
[0091] Observation equation: H = [1, 0; 0, 1] (identity matrix)
[0092] Observation vector: Z = [V_ADC; I_ADC : Io_ADC]
[0093] Parameter initialization and tuning:
[0094] X(0) = [V_ref; 0] (Assuming the initial output voltage is the reference voltage and the current is 0)
[0095] P(0) = eye(2)
[0096] Process noise covariance Q: This is a key tuning parameter.
[0097] Q = [q_v, 0; 0, q_i]
[0098] The initial value can be set to Q = diag([0.01, 0.1]). q_i is usually larger than q_v because the current dynamics are faster and the model uncertainty is higher.
[0099] In actual debugging, Q can be gradually increased until the system can quickly track load transient changes without oscillation.
[0100] The observation noise covariance R can be estimated by measuring the variance of the ADC sampled values under steady-state conditions.
[0101] R = [r_v, 0; 0, r_i]
[0102] For example, under input short-circuit conditions, the initial values of r_v and r_i can be obtained by measuring the variance of the voltage and current ADC readings.
[0103] Real-time operation process:
[0104] ADC interrupt service routine (synchronized with PWM frequency):
[0105] Read the voltage ADC value V_ADC(k), the current ADC value I_ADC(k), and the output current Io_ADC.
[0106] The observation vector Z(k) is formed.
[0107] Obtain the current duty cycle D(k) from the controller register, which is used to calculate matrix A and input U(k) = V_in(k) (if V_in is sampled) or use a fixed value.
[0108] Perform the five-step formula for Kalman filtering (prediction and update).
[0109] Extract the optimal voltage estimate V_out_optimal and the optimal current estimate I_L_optimal from X(k|k).
[0110] Voltage loop calculation: Using V_out_optimal as feedback, it is compared with the voltage reference V_ref, and the current loop reference instruction I_ref is output through PID calculation.
[0111] Current loop calculation: Using I_L_optimal as feedback, it is compared with I_ref, and a new PWM duty cycle D(k+1) is generated through PID calculation.
[0112] After implementing this invention, the voltage and current signals "seen" by the control system are optimally processed, highly pure signals that track the actual state in real time. This enables the PID controller to make more accurate and faster decisions. Ultimately, this results in a significant reduction in steady-state ripple of the output voltage, smaller voltage undershoot / overshoot during load step changes, shorter recovery time, and a comprehensive improvement in overall system stability and performance.
[0113] The beneficial effects of this invention are as follows:
[0114] Physical model-driven for more accurate estimation: The state equation is constructed based on circuit theory, which gives the prediction steps of Kalman filtering a clear physical meaning and the estimation results are closer to the real state.
[0115] Collaborative noise reduction and overall optimization: By leveraging the physical coupling between voltage and current states (represented in matrix A), the algorithm can "intelligently" distinguish between genuine state changes and noise. For example, a sudden change that appears in current sampling but is not reflected in voltage sampling is more likely to be identified as noise and suppressed.
[0116] Achieving a perfect balance between dynamic and steady-state states: While effectively filtering out high-frequency switching noise, the model incorporates the dynamic characteristics of the system, and its tracking speed for real-state changes is much faster than that of traditional low-pass filters, greatly reducing phase lag and allowing the design of control systems with higher bandwidth.
[0117] Enhanced robustness to model uncertainties: By utilizing the process noise covariance Q, the system can adaptively handle unmodeled dynamics such as load changes and component parameter drift.
[0118] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims. The information disclosed in the background section is intended only to enhance the understanding of the overall background technology of the present invention and should not be construed as an admission or implication in any way that such information constitutes prior art known to those skilled in the art.
Claims
1. A power supply voltage and current sampling and filtering method based on Kalman filtering, characterized in that, Including the following steps: 1) Construct a state-space model based on the power supply main circuit topology, whose state variables include the power supply output voltage V_out, inductor current I_L, and output current I_o; 2) Obtain the observed values corresponding to the state variables, including the ADC sampled values of the output voltage and the ADC sampled values of the inductor current; 3) Based on the state-space model and the observed values, execute the Kalman filter algorithm to iteratively output the joint optimal estimate of the output voltage and the inductor current; 4) The output voltage estimate in the joint optimal estimate is provided to the voltage outer loop controller as feedback, and the inductor current estimate is provided to the current inner loop controller as feedback.
2. The method according to claim 1, characterized in that, The state-space model is as follows: 1) State equation: X(k) = A * X(k-1) + B * U(k) + W(k), where X(k) = [ V_out(k); I_L(k) : I_o(k)], matrices A and B are obtained by discretizing the parameters and switching states of the main power supply circuit topology, U(k) includes the input voltage, and W(k) is the process noise; 2) Observation equation: Z(k) = H * X(k) + V(k), where Z(k) = [ V_ADC(k); I_ADC(k) :Io_ADC] is the observation vector, H is the observation matrix, and V(k) is the observation noise.
3. The method according to claim 2, characterized in that, The power supply main circuit topology is a Buck, Boost, or Buck-Boost converter.
4. The method according to claim 3, characterized in that, The steps of executing the Kalman filter algorithm are completed within each PWM switching cycle, and are synchronized with the power supply's dual-loop control cycle.
5. A digital power supply control system for implementing the method of any one of claims 1-4, comprising a power main circuit, a voltage outer loop controller, a current inner loop controller, an output voltage sampling circuit, an inductor current sampling circuit, and an output current sampling circuit, characterized in that: The system also includes a cooperative Kalman filter module, whose input is simultaneously connected to the ADC sampled values of the output voltage and inductor current, and the output current and sampled values. The joint optimal estimate of its output is connected to the feedback input of the voltage outer loop controller and the feedback input of the current inner loop controller, respectively.