Current sampling calibration method, electronic equipment and storage medium

By monitoring and adaptively adjusting the correction coefficient of the current transformer, the problem of current asymmetry in the Totem PFC circuit was solved, and the total harmonic distortion and power factor performance of the power supply were improved.

CN120928262APending Publication Date: 2025-11-11HYNETEK SEMICON CO LTD

Patent Information

Application Number
CN202510952525.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

The sampling gain deviation of the dual current transformer in the totem power factor correction circuit causes the current to be unbalanced in the positive and negative half-cycles of the input voltage, resulting in total harmonic distortion and deterioration of the power factor index.

Method used

By monitoring the difference in filter values ​​between the positive and negative half-cycles of the input voltage, the correction coefficient is adaptively adjusted to eliminate sampling gain deviations between different transformers, thereby achieving dynamic correction of the current loop.

Benefits of technology

It simplifies the calibration process, saves labor costs, continuously monitors and dynamically adjusts calibration parameters, and improves the total harmonic distortion and power factor performance of the power supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120928262A_ABST
    Figure CN120928262A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a current sampling calibration method, electronic equipment and a storage medium. The method comprises the steps of obtaining circulating voltage output by a voltage loop, and judging whether a fluctuation value of the circulating voltage is smaller than a preset fluctuation threshold value or not; when the fluctuation value is smaller than a preset fluctuation threshold value, current loop output values in a preset number of power frequency periods are collected and subjected to filtering processing, and filtering values corresponding to the positive and negative half cycles of the input end are obtained; calculating a difference absolute value of the two filtering values, and judging whether the difference absolute value is greater than a preset calibration threshold; when the absolute value of the difference value is greater than a preset calibration threshold value, selecting one as a reference filtering value, and determining a correction coefficient according to the size relation of the two filtering values; and taking the reference filtering value and the adjustment filtering value processed by the correction coefficient as filtering values of corresponding half cycles according to the level of the polarity signal. By means of the mode, sampling gain deviation of the mutual inductor can be eliminated through self-correction, and performance indexes such as total harmonic distortion and power factors can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of current sampling calibration, and in particular to a current sampling calibration method, electronic device and storage medium. Background Technology

[0002] Due to its high efficiency, Totem PFC is increasingly widely used in the power supply field. Totem PFC uses dual current transformer (CT) sampling, which offers significant advantages in cost, reliability, and sampling rate compared to traditional Hall effect sampling. The topology of Totem PFC using dual CT sampling is shown in Figure 1.

[0003] During the positive half-cycle of the input voltage, the flow of the inductor excitation current and the flow of the CT1 sampling current are shown in Figure 2. At this time, the control switch S1 of Q1, SR1, and the CT1 sampling circuit is turned on, and the excitation current is sampled through CT1. During the negative half-cycle of the input voltage, the flow of the inductor excitation current and the flow of the CT2 sampling current are shown in Figure 3. At this time, the control switch S2 of Q2, SR2, and the CT2 sampling circuit is turned on, and the excitation current is sampled through CT2.

[0004] However, when using dual-CT sampling, the sampling gain of CT1 and CT2 will be biased. This will cause the actual control current of the Totem PFC to be asymmetrical in the positive and negative half-cycles of the input voltage, resulting in a deterioration of the total harmonic distortion (THD, TDH) and power factor (PF) values. Summary of the Invention

[0005] The current sampling calibration method provided in this application can solve at least some of the problems existing in the current sampling of the existing totem power factor correction circuit.

[0006] In a first aspect, this application provides a current sampling calibration method applied to a totem power factor correction circuit, comprising: acquiring the cyclic voltage output of the voltage loop, determining whether the fluctuation value of the cyclic voltage is less than a preset fluctuation threshold; when the fluctuation value of the cyclic voltage is less than the preset fluctuation threshold, acquiring the current loop output value within a preset number of power frequency cycles and performing filtering processing to obtain a first filtered value corresponding to the positive half-cycle of the input terminal and a second filtered value corresponding to the negative half-cycle of the input terminal; calculating the absolute value of the difference between the first filtered value and the second filtered value, and determining whether the absolute value of the difference is greater than a preset calibration threshold; when the absolute value of the difference is greater than the preset calibration threshold, selecting one of the first filtered value and the second filtered value as a reference filtered value and the other as an adjustment filtered value; determining a correction coefficient based on the magnitude relationship between the first filtered value and the second filtered value; adjusting the real-time average current value based on the level of the polarity signal and the correction coefficient; the real-time average current value is used for the control of the current loop.

[0007] Optionally, when the first filter value is used as the reference filter value and the second filter value is used as the adjustment filter value, determining the correction coefficient based on the relationship between the first filter value and the second filter value includes: when the first filter value is greater than the second filter value, subtracting a preset step size value from the current correction coefficient to obtain an updated correction coefficient; when the second filter value is greater than the first filter value, adding the preset step size value to the current correction coefficient to obtain an updated correction coefficient; and performing amplitude limiting processing on the updated correction coefficient to keep the correction coefficient between a preset upper limit value and a preset lower limit value.

[0008] Optionally, adjusting the real-time average current based on the level of the polarity signal and the correction coefficient includes: when the polarity signal is at the first level, using the real-time average current as the input current of the current loop; when the polarity signal is at the second level, using the result of multiplying the real-time average current by the correction coefficient as the input current of the current loop.

[0009] Optionally, when the second filter value is used as the reference filter value and the first filter value is used as the adjustment filter value, determining the correction coefficient based on the relationship between the first filter value and the second filter value includes: when the first filter value is greater than the second filter value, adding a preset step size to the current correction coefficient to obtain an updated correction coefficient; when the second filter value is greater than the first filter value, subtracting the preset step size from the current correction coefficient to obtain an updated correction coefficient; and performing amplitude limiting on the updated correction coefficient to keep the correction coefficient between a preset upper limit value and a preset lower limit value.

[0010] Optionally, adjusting the real-time average current based on the level of the polarity signal and the correction coefficient includes: when the polarity signal is at the first level, multiplying the real-time average current by the correction coefficient to obtain the result is used as the input current of the current loop; when the polarity signal is at the second level, using the real-time average current as the input current of the current loop.

[0011] Optionally, determining whether the fluctuation value of the cyclic voltage is less than a preset fluctuation threshold includes: acquiring multiple cyclic voltages within a preset time period; calculating the difference between the maximum and minimum values ​​among the multiple cyclic voltages as the fluctuation value; comparing the fluctuation value with the preset fluctuation threshold; determining that the fluctuation value of the cyclic voltage is less than the preset fluctuation threshold when the fluctuation value is less than the preset fluctuation threshold and persists for a preset time period; determining that the fluctuation value of the cyclic voltage is not less than the preset fluctuation threshold when the fluctuation value is greater than or equal to the preset fluctuation threshold, and returning to the step of acquiring multiple cyclic voltages within the preset time period.

[0012] Optionally, within each power frequency cycle, the acquisition of the current loop output value includes: acquiring the current loop output value for a preset number of switching cycles in two sampling intervals with a fixed phase angle; wherein the fixed phase angle is 180 degrees, and the two sampling intervals are located at the midpoint of the positive half-cycle and the midpoint of the negative half-cycle, respectively. The filtering process includes: calculating the average value of the current loop output value in each sampling interval, and performing a weighted average process with the corresponding filtered value of the previous power frequency cycle.

[0013] Optionally, the polarity signal is obtained by detecting the positive or negative sign of the input voltage: when the input voltage is within the positive half-cycle, the polarity signal is the first level; when the input voltage is within the negative half-cycle, the polarity signal is the second level; wherein, the first level is a high level and the second level is a low level.

[0014] In a second aspect, this application provides an electronic device, comprising: at least one processor; at least one network interface communicatively connected to a corresponding processor; and a memory communicatively connected to the at least one processor; wherein the network interface is used to establish a communication connection between the processor and other external devices; and the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the current sampling calibration method as described in the first aspect.

[0015] Thirdly, this application provides a non-volatile computer storage medium storing computer-executable instructions that are executed by one or more processors, causing the one or more processors to perform the current sampling calibration method as described in the first aspect.

[0016] The beneficial effects of this invention are as follows: Unlike existing technologies, this invention eliminates sampling gain deviations between different current transformers by monitoring the difference in filter values ​​corresponding to the positive and negative half-cycles of the input voltage and adaptively adjusting the correction coefficient. Compared to traditional manual calibration methods, the self-calibration scheme provided by this invention not only simplifies the calibration process and saves labor costs, but also continuously monitors and dynamically adjusts the correction parameters, effectively improving the total harmonic distortion and power factor of the power supply, and solving the problem of input current asymmetry during the positive and negative half-cycles of the input voltage. Attached Figure Description

[0017] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0018] Figure 1 This is a diagram of the totem PFC topology structure using dual CT sampling; Figure 2 The diagram shows the flow of the PFC inductor excitation current and the CT1 sampling current during the positive half-cycle of the input voltage. Figure 3 The diagram shows the flow of the PFC inductor excitation current and the CT2 sampling current during the negative half-cycle of the input voltage. Figure 4 This is a schematic diagram of a current-type PFC control. Figure 5 This is a flowchart illustrating a current sampling calibration method provided by an embodiment of the present invention; Figure 6 This shows the average value of the current loop output calculated during the positive and negative half-cycles of the input voltage within one power frequency cycle; Figure 7 This shows m power frequency cycles; Figure 8 It is an application Figure 5 The diagram shows the current-type PFC control principle of the current sampling calibration method. Figure 9 It is an application Figure 5 Another current-type PFC control schematic diagram of the current sampling calibration method shown; Figure 10 The relationship between polarity signal and input voltage is shown; Figure 11 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Detailed Implementation

[0019] To facilitate understanding of this application, a more detailed description is provided below with reference to the accompanying drawings and specific embodiments. It should be noted that when an element is described as being "fixed to" another element, it can be directly on the other element, or one or more intermediate elements may exist between them. When an element is described as being "connected" to another element, it can be directly connected to the other element, or one or more intermediate elements may exist between them. The terms "upper," "lower," "inner," "outer," "bottom," etc., used in this specification indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0020] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.

[0021] Furthermore, the technical features involved in the different embodiments of this application described below can be combined with each other as long as they do not conflict with each other.

[0022] The technical solutions in this application will be described below with reference to the accompanying drawings.

[0023] The control principle of current-type PFC is as follows: Figure 4 As shown, the output voltage Vout is obtained by sampling and subtracting from the output voltage reference value Vref. This difference is then passed through a PI regulator to obtain the output V of the voltage loop. loop_out Voltage loop output V loop_out Multiply by the input voltage V AC Then divide by the peak input voltage V AC_peak The square of I gives the real-time AC current reference value. ref_ac The CS signal flowing through the sampling resistor Rcs is used to obtain the real-time average current I through the current sampling and conditioning module. avg The AC current reference value I ref_ac With real-time average current I avgThe difference is calculated, and the result is passed through a PI loop to obtain the current loop output I. loop_out Add feedforward k(Vout-V) AC The final duty cycle (Duty) is obtained by calculating Vout / Vout, which is used to control the excitation current.

[0024] However, in this scheme, the input voltage V AC During the positive and negative half-cycles, the inductor current is sampled through current transformers CT1 and CT2, respectively. Due to the deviation in the gain of current transformers CT1 and CT2, an asymmetry in the current occurs during the positive and negative half-cycles of the input voltage in actual control.

[0025] To address this problem, this invention provides a current sampling calibration method, the flowchart of which is shown below. Figure 5 As shown, the current sampling calibration method specifically includes the following steps: Step S100: Obtain the cyclic voltage output by the voltage loop and determine whether the fluctuation value of the cyclic voltage is less than the preset fluctuation threshold.

[0026] The judgment process specifically includes: collecting multiple cyclic voltage values ​​within a preset time period; calculating the difference between the maximum and minimum values ​​among the collected cyclic voltage values, and using this difference as the fluctuation value; comparing the obtained fluctuation value with a preset fluctuation threshold. When the fluctuation value is less than the preset fluctuation threshold and persists for a preset time period, it is determined that the fluctuation value of the cyclic voltage is less than the preset fluctuation threshold, and step S200 is executed. If the fluctuation value is greater than or equal to the preset fluctuation threshold, the operation of acquiring the cyclic voltage is re-executed.

[0027] Step S200: Collect the current loop output value within a preset number of power frequency cycles and perform filtering processing to obtain the first filtered value corresponding to the positive half-cycle of the input terminal and the second filtered value corresponding to the negative half-cycle of the input terminal.

[0028] Once the fluctuation value of the cyclic voltage is determined to be less than a preset fluctuation threshold, the current loop output value is collected within a preset number of power frequency cycles. Within each power frequency cycle, the sampling process is performed as follows: the current loop output value is collected for a preset number of switching cycles in two sampling intervals 180 degrees apart, located at the midpoint of the positive half-cycle and the midpoint of the negative half-cycle, respectively. The average value of the current loop output value within each sampling interval is calculated, and this average value is then weighted and averaged with the corresponding filtered value of the previous power frequency cycle to obtain the first filtered value corresponding to the positive half-cycle of the input and the second filtered value corresponding to the negative half-cycle of the input.

[0029] Step S300: Calculate the absolute value of the difference between the first filter value and the second filter value, and determine whether the absolute value of the difference is greater than the preset calibration threshold.

[0030] Calculate the absolute value of the difference between the first filter value and the second filter value, and determine whether the absolute value of the difference is greater than a preset calibration threshold. If the absolute value of the difference is greater than the preset calibration threshold, proceed to step S400.

[0031] Step S400: Select one of the first filter value and the second filter value as the reference filter value, and the other as the adjustment filter value.

[0032] Choose one of the first filter value and the second filter value as the baseline filter value, and the other as the adjustment filter value. For example, you can choose the first filter value as the baseline filter value and the second filter value as the adjustment filter value.

[0033] Given that the input voltage V AC During the positive and negative half-cycles, the inductor current is sampled through current transformers CT1 and CT2, respectively. Therefore, the first filter value corresponds to current transformer CT1, and the second filter value corresponds to current transformer CT2. Selecting the first filter value as the reference filter value and the second filter value as the adjustment filter value aims to correct the sampling gain of current transformer CT2; that is, the correction coefficient is applied to current transformer CT2. Similarly, selecting the second filter value as the reference filter value and the first filter value as the adjustment filter value aims to correct the sampling gain of current transformer CT1; that is, the correction coefficient is applied to current transformer CT1.

[0034] Step S500: Determine the correction coefficient based on the relationship between the first filter value and the second filter value.

[0035] The correction coefficient is determined based on the relationship between the first and second filter values. When the first filter value is used as the reference filter value, if the first filter value is greater than the second filter value, the current correction coefficient is subtracted by a preset step size; if the second filter value is greater than the first filter value, the current correction coefficient is added to the preset step size. Subsequently, the updated correction coefficient is subjected to amplitude limiting to keep it between a preset upper limit and a preset lower limit.

[0036] Step S600: Adjust the real-time average current value according to the level of the polarity signal and the correction coefficient.

[0037] The polarity signal is obtained by detecting the sign of the input voltage: when the input voltage is positive, the polarity signal is high; when the input voltage is negative, the polarity signal is low.

[0038] When the first filter value is used as the reference filter value and the second filter value is used as the adjustment filter value, i.e., when the gain of the current transformer CT2 is corrected, if the polarity signal is high, the surface is in the positive half-cycle of the input voltage. The real-time average current value collected by the current transformer CT1 does not need to be adjusted and can be directly used as the input current of the current loop. If the polarity signal is low, the surface is in the negative half-cycle of the input voltage. The real-time average current value collected by the current transformer CT2 needs to be multiplied by the correction coefficient before being used as the input current of the current loop to ensure that the input current is symmetrical in the positive and negative half-cycles of the input voltage.

[0039] In some embodiments, step S100 specifically includes the following steps: Step S110: Obtain multiple cyclic voltages within a preset time period.

[0040] In practice, the preset time period can be set to 10 to 100 switching cycles. Obtaining the cyclic voltage through multiple samplings can more accurately reflect the actual state of the voltage loop output. A shorter preset time period may result in insufficient sampling data, failing to accurately reflect voltage fluctuations; while an excessively long preset time period will prolong the calibration process's response time. Therefore, the selection of the preset time period requires a trade-off between sampling accuracy and response speed.

[0041] The reason for choosing multiple switching cycles as the preset time period is due to the characteristics of the voltage loop output and the sampling requirements. In the totem power factor correction circuit, the switching cycle is the most basic operating unit, and its frequency is usually in the range of tens to hundreds of kilohertz. Sampling of a single switching cycle may be affected by transient interference or noise, causing the sampling results to not accurately reflect the actual state of the voltage loop output. By sampling across multiple switching cycles, the influence of random noise can be effectively reduced, and the reliability of the sampled data can be improved.

[0042] Step S120: Calculate the difference between the maximum and minimum values ​​among multiple cyclic voltages, and use it as the fluctuation value.

[0043] The fluctuation value is obtained by subtracting the minimum value from the maximum value of multiple cyclic voltages collected within a preset time period. The difference between the maximum and minimum values ​​is used to characterize the degree of fluctuation, effectively reflecting the stability of the cyclic voltage. When the voltage loop output is stable, the difference between the maximum and minimum values ​​is small; when the output is unstable, the difference will increase significantly. By observing the change in this difference, it can be determined whether the system is in a stable state.

[0044] Step S130: Compare the fluctuation value with the preset fluctuation threshold.

[0045] The preset fluctuation threshold represents the maximum allowable fluctuation range of the system. Its setting needs to comprehensively consider the normal operating characteristics of the system and the calibration accuracy requirements. If the fluctuation threshold is set too low, the system may have difficulty entering the calibration state; if it is set too high, the calibration process may begin before the system is fully stable. Through experimental testing and experience accumulation, a suitable preset fluctuation threshold can be determined to ensure the accuracy of the calibration without unduly restricting the calibration conditions.

[0046] The use of fluctuation value as the judgment criterion is based on the following considerations: First, the fluctuation value directly reflects the stability of the voltage loop output. When the system is in a stable state, the fluctuation of the voltage loop output is small, indicating that the system has reached a stable operating state, and sampling calibration is most appropriate at this time. Second, obtaining the fluctuation value by calculating the difference between the maximum and minimum values ​​is simple to implement, requires little computation, and is beneficial for implementation in practical circuits. Finally, the fluctuation value has a clear physical meaning, making it easy for engineers to set appropriate preset fluctuation thresholds according to actual application requirements.

[0047] Step S140: When the fluctuation value is less than the preset fluctuation threshold and continues for a preset time period, determine that the fluctuation value of the circulating voltage is less than the preset fluctuation threshold.

[0048] When the detected fluctuation value is less than the preset fluctuation threshold, it will not be immediately determined that the calibration conditions are met. Instead, it will continue to monitor whether the state can be maintained for a preset time period. If it can be maintained for the preset time period, it is confirmed that the voltage loop output has reached a stable state. Then the program will enter step S200 to start collecting the current loop output value within the power frequency cycle.

[0049] The requirement for a duration is introduced because the voltage loop output is affected by various factors during operation, including load changes, switching noise, and external interference. These factors may cause the voltage loop output to experience a brief period of stability, but this does not mean that the circuit has reached a truly stable operating state. By requiring the fluctuation value to remain below a threshold for a preset time period, this temporary stability can be effectively identified and eliminated.

[0050] Step S150: When the fluctuation value is greater than or equal to the preset fluctuation threshold, determine that the fluctuation value of the circulating voltage is not less than the preset fluctuation threshold.

[0051] When a fluctuation value is detected that is greater than or equal to a preset fluctuation threshold, it indicates that the voltage loop output has not yet reached a stable state. At this time, the program will return to step S110 and restart acquiring the cyclic voltage value. The cyclic detection mechanism ensures that subsequent sampling and calibration steps will only be executed when the voltage loop output is truly stable.

[0052] In some embodiments, step S200 specifically includes the following steps: Step S210: Collect the current loop output value for a preset number of switching cycles in two sampling intervals with a fixed phase angle difference.

[0053] Within each power frequency cycle, two sampling intervals with a 180-degree phase difference are selected, located at the midpoints of the positive and negative half-cycles, respectively. The 180-degree phase difference is chosen to ensure the symmetry of the sampling points, making the sampling of the positive and negative half-cycles comparable. The midpoints are chosen to avoid the zero-crossing and peak points of the current waveform, where sampling may be significantly affected by interference. Current loop output values ​​for a preset number of switching cycles are collected within each sampling interval; multi-point sampling improves data reliability.

[0054] Step S220: Calculate the average value of the current loop output value in each sampling interval, and perform weighted averaging with the corresponding filtered value of the previous power frequency cycle.

[0055] The calculation of the filter value is divided into two stages: The first stage is to calculate the average value of the current loop output value within the sampling interval, eliminating the influence of random noise through arithmetic averaging. The second stage is to perform a weighted average of the currently calculated average value and the corresponding filter value from the previous power frequency cycle. The purpose of introducing weighted averaging is to achieve a smooth data transition and avoid abrupt changes in the filter value.

[0056] Weighted averaging is a process that calculates a weighted average by combining the average value of the current sampling interval with the filtered value corresponding to the previous power frequency cycle, according to preset weights. The specific calculation formula is as follows: The filter value for the current power frequency cycle = α × the average value of the current sampling interval + (1-α) × the filter value of the previous power frequency cycle Here, α is the weighting coefficient, ranging from 0 to 1. The choice of α value has a significant impact on the filtering effect: When the α value is large (close to 1), the weight of the current sampled data is large, the filter value is more sensitive to real-time changes, and the response speed is faster, but it may introduce more fluctuations.

[0057] When the α value is small (close to 0), the weight of historical data is greater, the filtered value is more stable, but the response to real-time changes will be slower.

[0058] In practical applications, the α value is typically chosen between 0.2 and 0.5, a range that strikes a good balance between response speed and stability. The optimal α value needs to be determined based on the specific application requirements. For example, if the circuit operating environment is relatively stable, a smaller α value can be chosen to achieve a smoother filtering effect; if a rapid response to load changes is required, a larger α value can be selected.

[0059] As shown in Figure 6, firstly, during the positive half-cycle of the input voltage, at phase point t... a At this point, record the time interval for the next n switching cycles, i.e., time t. a to t b Inside, I loop_out The average value. Recorded as I. loop_out_avg_pos Then at phase point t during the negative half-cycle. c Similarly, the time t is recorded over n switching cycles. c to t d Inside, I loop_out The average value. Recorded as I. loop_out_avg_neg Among them, t c =t a +180°, t b -t a = t d -t c .

[0060] like Figure 7 As shown, the above operation is repeated over m power frequency cycles, and I is calculated respectively. loop_out_avg_pos and I loop_out_avg_neg Then, the first filter value I is obtained. loop_out_filter_pos Second filter value I loop_out_filter_neg .

[0061] In some embodiments, a first filter value is used as a reference filter value, and a second filter value is used as an adjustment filter value. Step S500 specifically includes the following steps: Before the calibration process begins, the calibration coefficients need to be initialized. The initial value of the calibration coefficients is set to 1 because it is assumed that the sampling gains of the two current transformers are the same in the initial state, and no calibration compensation is required. When a system reset signal is detected, the calibration coefficients will also be reset to the initial value of 1.

[0062] The initialization process is designed based on the following considerations: First, setting the initial value to 1 facilitates subsequent calibration adjustments, as a calibration coefficient of 1 indicates that no gain compensation is applied to the sampled values. Second, resetting the calibration from 1 after each reset avoids using historical calibration values ​​that may not be suitable for the current operating state. These methods ensure that calibration begins from a defined reference point each time the system starts.

[0063] Subsequent adjustments to the correction coefficients will be made based on this initial value, according to the relationship between the first and second filter values, by increasing or decreasing the preset step size.

[0064] Step S511: When the first filter value is greater than the second filter value, subtract the preset step size value from the current correction coefficient to obtain the updated correction coefficient.

[0065] When the first filter value is greater than the second filter value, it indicates that under the same current, the gain of current transformer CT2 is greater than the gain of current transformer CT1. That is, for the same current, the sampled value in the positive half-cycle is smaller than the sampled value in the negative half-cycle. By reducing the correction coefficient KCT2, the sampled current in the negative half-cycle can be reduced, thereby increasing the second filter value, until the first and second filter values ​​for both the positive and negative half-cycles tend to be consistent. The adjustment amount of the correction coefficient is determined by a preset step size, which requires a trade-off between adjustment speed and stability. A larger step size speeds up the correction process but may cause circuit oscillation; a smaller step size provides a smoother correction process but requires a longer adjustment time.

[0066] Step S512: When the second filter value is greater than the first filter value, add the preset step size value to the current correction coefficient to obtain the updated correction coefficient.

[0067] When the second filter value is greater than the first filter value, it indicates that the sampled value of the negative half-cycle is less than that of the positive half-cycle under the same current, and the correction coefficient needs to be increased to improve the sampled value of the negative half-cycle. The purpose of increasing the correction coefficient is to improve the compensation degree of the sampled value of the negative half-cycle, so that it matches the sampled value of the positive half-cycle. Similarly, the adjustment of the correction coefficient is also carried out using a preset step size value to ensure the controllability of the correction process.

[0068] Step S513: Perform amplitude limiting on the updated correction coefficients to keep them between the preset upper limit and the preset lower limit.

[0069] By setting preset upper and lower limits, the range of correction coefficient values ​​is limited, preventing abnormal sampling values ​​due to over-correction. The setting of the upper and lower limits needs to consider the actual characteristic differences of the current transformer; typically, an appropriate limiting range can be determined through experimental testing. Limiting ensures the effectiveness of the correction while preventing the correction coefficient from deviating from a reasonable range.

[0070] Specifically, a preset calibration threshold I is set. loop_threshold When the first filter value I loop_out_filter_pos With the second filter value I loop_out_filter_neg The absolute value of the difference is greater than the preset calibration threshold I. loop_threshold When this happens, proceed with step S511 or step S512 as follows: If the first filter value I loop_out_filter_pos - Second filter value I loop_out_filter_neg Preset calibration threshold I loop_threshold This means that the physical sampling gain of current transformer CT2 is greater than that of current transformer CT1. In other words, for the same inductor current, the value sampled by current transformer CT2 will be greater than the value sampled by current transformer CT1. Therefore, the correction coefficient k needs to be adjusted. CT2This is to eliminate the physical gain deviation between current transformers CT1 and CT2. Therefore, every m power frequency cycles, when the first filter value I... loop_out_filter_pos - Second filter value I loop_out_filter_neg Preset calibration threshold I loop_threshold Then perform a correction coefficient k once. CT2 = k CT2 - k step Operation, k step This is a preset step size value. At the same time, it ensures the preset lower limit value k. min <Correction coefficient k CT2 <Preset upper limit value k max until the first filter value I loop_out_filter_pos - Second filter value I loop_out_filter_neg <Preset calibration threshold I loop_threshold .

[0071] If the second filter value I loop_out_filter_neg - First filter value I loop_out_filter_pos Preset calibration threshold I loop_threshold This means that the physical sampling gain of current transformer CT2 is less than that of current transformer CT1. In other words, for the same inductor current, the value sampled by current transformer CT2 will be less than the value sampled by current transformer CT1. Therefore, every m power frequency cycles, when the second filter value I... loop_out_filter_neg - First filter value I loop_out_filter_pos Preset calibration threshold I loop_threshold Then perform a correction coefficient k once. CT2 = k CT2 + k step Calculation. Simultaneously, ensure the preset lower limit value k. min <Correction coefficient k CT2 <Preset upper limit value k max Until the second filter value I loop_out_filter_neg - First filter value I loop_out_filter_pos <Preset calibration threshold I loop_threshold .

[0072] In some embodiments, the first filter value is used as the reference filter value, and the second filter value is used as the adjustment filter value. Step S600 specifically includes the following steps: Step S611: When the polarity signal is at the first level, the real-time average current is used as the input current of the current loop.

[0073] When the polarity signal is at the first level, the real-time average current value collected by the current transformer is directly used as the input current of the current loop, and compared with the AC current reference value I. ref_ac The difference is calculated, and the result is passed through a PI loop to obtain the current loop output I. loop_out .

[0074] Step S612: When the polarity signal is at the second level, the result obtained by multiplying the real-time average current by the correction coefficient is used as the input current of the current loop.

[0075] When the polarity signal is at the second level, gain correction needs to be performed on the current transformer. The average real-time current value collected by the current transformer needs to be multiplied by the correction factor, and the result is used as the input current of the current loop, which is then compared with the AC current reference value I. ref_ac The difference is calculated, and the result is passed through a PI loop to obtain the current loop output I. loop_out .

[0076] It should be noted that the first and second voltage levels are signal levels obtained by detecting the positive and negative states of the input voltage. The polarity signal is related to the input voltage V. AC Relationship such as Figure 10 As shown. Specifically: The first level is high, corresponding to a positive input voltage. When the input voltage is in the positive half-cycle, the polarity signal will be high. In this state, there is no need to perform gain correction on the current transformer CT1; the real-time average current value acquired by the current transformer CT1 is directly used as the input current of the current loop, along with the AC current reference value I. ref_ac The difference is calculated, and the result is passed through a PI loop to obtain the current loop output I. loop_out .

[0077] The second level is low, corresponding to a negative input voltage. When the input voltage is in the negative half-cycle, the polarity signal will be low. At this time, gain correction needs to be performed on the current transformer CT2. The real-time average current value collected by the current transformer CT2 needs to be multiplied by the correction coefficient, and the result is used as the input current of the current loop, and compared with the AC current reference value I. ref_ac The difference is calculated, and the result is passed through a PI loop to obtain the current loop output I. loop_out .

[0078] Specifically, the correction coefficient k for the gain of the current transformer CT2 is obtained. CT2 Subsequently, during loop operation, the sampling gain needs to be switched according to the polarity of the input voltage. The control principle is as follows: Figure 8 As shown: When the input voltage is in the positive half-cycle, the polarity signal is high, and the output of the current sampling and conditioning module is directly used for current loop control; when the input voltage is in the negative half-cycle, the polarity signal is low, and the output of the current sampling and conditioning module needs to be multiplied by the correction coefficient k. CT2 Then it is used for the control of the current loop.

[0079] In other embodiments, the second filter value is used as the reference filter value, and the first filter value is used as the adjustment filter value. Step S500 specifically includes the following steps: Before the calibration process begins, the calibration coefficients need to be initialized. The initial value of the calibration coefficients is set to 1 because it is assumed that the sampling gains of the two current transformers are the same in the initial state, and no calibration compensation is required. When a system reset signal is detected, the calibration coefficients will also be reset to the initial value of 1.

[0080] Subsequent adjustments to the correction coefficients will be made based on this initial value, according to the relationship between the first and second filter values, by increasing or decreasing the preset step size.

[0081] Step S521: When the first filter value is greater than the second filter value, add the preset step size value to the current correction coefficient to obtain the updated correction coefficient.

[0082] When the first filter value is greater than the second filter value, it indicates that under the same current, the gain of current transformer CT2 is greater than the gain of current transformer CT1. That is, for the same current, the sampled value during the positive half-cycle is less than the sampled value during the negative half-cycle. This can be corrected by increasing the correction coefficient K. CT1 Increasing the sampled current during the positive half-cycle will decrease the first filter value, thus bringing the first and second filter values ​​for both the positive and negative half-cycles closer together. The adjustment amount of the correction coefficient is determined by a preset step size, which requires a trade-off between adjustment speed and stability. A larger step size speeds up the correction process but may cause circuit oscillation; a smaller step size provides a smoother correction process but requires a longer adjustment time.

[0083] Step S522: When the second filter value is greater than the first filter value, subtract the preset step size value from the current correction coefficient to obtain the updated correction coefficient.

[0084] When the second filter value is greater than the first filter value, it indicates that the sampled value of the negative half-cycle is less than that of the positive half-cycle under the same current, and the correction coefficient K needs to be reduced. CT1 The sampling value of the positive half-cycle is reduced to increase the first filter value, thereby aligning the first and second filter values ​​of both the positive and negative half-cycles. The purpose of reducing the correction coefficient is to decrease the compensation level of the positive half-cycle sampling value, making it match the sampling value of the negative half-cycle. Similarly, the adjustment of the correction coefficient also uses a preset step size to ensure the controllability of the correction process.

[0085] Step S523: Perform amplitude limiting on the updated correction coefficients to keep them between the preset upper limit and the preset lower limit.

[0086] By setting preset upper and lower limits, the range of correction coefficient values ​​is limited, preventing abnormal sampling values ​​due to over-correction. The setting of the upper and lower limits needs to consider the actual characteristic differences of the current transformer; typically, an appropriate limiting range can be determined through experimental testing. Limiting ensures the effectiveness of the correction while preventing the correction coefficient from deviating from a reasonable range.

[0087] Specifically, a preset calibration threshold I is set. loop_threshold When the first filter value I loop_out_filter_pos With the second filter value I loop_out_filter_neg The absolute value of the difference is greater than the preset calibration threshold I. loop_threshold When this happens, proceed with step S521 or step S522 as follows: If the first filter value I loop_out_filter_pos - Second filter value I loop_out_filter_neg Preset calibration threshold I loop_threshold This means that the physical sampling gain of current transformer CT2 is greater than that of current transformer CT1. In other words, for the same inductor current, the value sampled by current transformer CT2 will be greater than the value sampled by current transformer CT1. Therefore, the correction coefficient k needs to be adjusted. CT1 This is to eliminate the physical gain deviation between current transformers CT1 and CT2. Therefore, every m power frequency cycles, when the first filter value I... loop_out_filter_pos - Second filter value I loop_out_filter_neg Preset calibration threshold I loop_threshold Then perform a correction coefficient k once. CT1 = k CT1 + k step Operation, k step This is a preset step size value. At the same time, it ensures the preset lower limit value k. min <Correction coefficient k CT2 <Preset upper limit value k max until the first filter value I loop_out_filter_pos - Second filter value I loop_out_filter_neg <Preset calibration threshold I loop_threshold .

[0088] If the second filter value I loop_out_filter_neg - First filter value I loop_out_filter_pos Preset calibration threshold I loop_threshold This means that the physical sampling gain of current transformer CT2 is less than that of current transformer CT1. In other words, for the same inductor current, the value sampled by current transformer CT2 will be less than the value sampled by current transformer CT1. Therefore, every m power frequency cycles, when the second filter value I... loop_out_filter_neg - First filter value I loop_out_filter_pos Preset calibration threshold I loop_thresholdThen perform a correction coefficient k once. CT1 = k CT1 - k step Calculation. Simultaneously, ensure the preset lower limit value k. min <Correction coefficient k CT1 <Preset upper limit value k max Until the second filter value I loop_out_filter_neg - First filter value I loop_out_filter_pos <Preset calibration threshold I loop_threshold .

[0089] In some embodiments, the first filter value is used as the reference filter value, and the second filter value is used as the adjustment filter value. Step S600 specifically includes the following steps: Step S621: When the polarity signal is at the first level, the result obtained by multiplying the real-time average current by the correction coefficient is used as the input current of the current loop.

[0090] When the polarity signal is at the first level, gain correction needs to be performed on the current transformer. The real-time average current value collected by the current transformer needs to be multiplied by the correction factor, and the result is used as the input current of the current loop, which is then compared with the AC current reference value I. ref_ac The difference is calculated, and the result is passed through a PI loop to obtain the current loop output I. loop_out .

[0091] Step S622: When the polarity signal is at the second level, the real-time average current is used as the input current of the current loop.

[0092] When the polarity signal is at the second level, the real-time average current value collected by the current transformer is directly used as the input current of the current loop, and compared with the AC current reference value I. ref_ac The difference is calculated, and the result is passed through a PI loop to obtain the current loop output I. loop_out .

[0093] It should be noted that the first and second voltage levels are signal levels obtained by detecting the positive and negative states of the input voltage, and the polarity signal is related to the input voltage V. AC Relationship such as Figure 10 As shown. Specifically: The first level is high, corresponding to a positive input voltage. When the input voltage is in the positive half-cycle, the polarity signal will be high. In this state, gain correction needs to be performed on the current transformer CT1. The real-time average current value collected by the current transformer CT1 needs to be multiplied by the correction coefficient, and the result is used as the input current of the current loop, along with the AC current reference value I. ref_ac The difference is calculated, and the result is passed through a PI loop to obtain the current loop output I. loop_out .

[0094] The second level is low, corresponding to a negative input voltage. When the input voltage is in the negative half-cycle, the polarity signal will be low. At this time, there is no need to perform gain correction on the current transformer CT2; the real-time average current collected by the current transformer CT2 is directly used as the input current of the current loop, along with the AC current reference value I. ref_ac The difference is calculated, and the result is passed through a PI loop to obtain the current loop output I. loop_out .

[0095] Specifically, the correction coefficient k for the gain of the current transformer CT1 is obtained. CT1 Subsequently, during loop operation, the sampling gain needs to be switched according to the polarity of the input voltage. The control principle is as follows: Figure 9 As shown: When the input voltage is in the positive half-cycle, the polarity signal is high, and the output of the current sampling and conditioning module needs to be multiplied by the correction coefficient k. CT2 Then it is used for the control of the current loop; when the input voltage is in the negative half cycle, the polarity signal is low level, and the output of the current sampling and conditioning module is directly used for the control of the current loop.

[0096] Unlike existing technologies, this invention eliminates sampling gain deviations between different current transformers by monitoring the difference in filter values ​​corresponding to the positive and negative half-cycles of the input voltage and adaptively adjusting the correction coefficient. Compared to traditional manual calibration methods, the self-calibration scheme provided by this invention not only simplifies the calibration process and saves labor costs, but also continuously monitors and dynamically adjusts the correction parameters, effectively improving the total harmonic distortion and power factor of the power supply, and solving the problem of input current asymmetry during the positive and negative half-cycles of the input voltage.

[0097] The present invention also provides an electronic device based on the above-described current sampling calibration method, the schematic diagram of which is shown below. Figure 11 As shown, the electronic device 20 includes: One or more processors 210, network interface 220, and memory 230, Figure 11 The example consists of a processor 210, a network interface 220, and a memory 230.

[0098] The network interface 220 is communicatively connected to the corresponding processor 210, and the processor 210 and the memory 220 can be connected via a bus or other means. Figure 11 Taking the example of a connection between China and Israel via a bus.

[0099] Network interface 220 is used to establish communication connections between processor 210 and other external devices, including the following types: RJ-45 interface, SC fiber optic interface, AUI interface, FDDI interface and Console interface.

[0100] The memory 230, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 210 executes various functional applications and data processing of the electronic device by running the non-volatile software programs, instructions, and units stored in the memory 230, thereby implementing the current sampling calibration method of the above-described method embodiment.

[0101] The memory 230 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 230 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 230 may optionally include memory remotely located relative to the processor 210, and these remote memories can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0102] The one or more units are stored in the memory 230. When executed by one or more processors 210, they perform the current sampling calibration method in any of the above method embodiments, for example, the method described above. Figure 5 The method steps S100 to S600.

[0103] The aforementioned electronic device can execute the current sampling calibration method provided in the embodiments of the present invention, and has the corresponding program modules and beneficial effects for executing the method. Technical details not described in detail in the electronic device embodiments can be found in the current sampling calibration method provided in the embodiments of the present invention.

[0104] This invention also provides a non-volatile computer-readable storage medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The non-volatile computer-readable storage medium carries one or more programs, which, when executed, implement the power allocation method of this disclosure.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of this application as described above. For the sake of brevity, they are not provided in detail; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A current sampling calibration method, applied to a totem power factor correction circuit, characterized in that, include: Obtain the cyclic voltage output by the voltage loop and determine whether the fluctuation value of the cyclic voltage is less than a preset fluctuation threshold. When the fluctuation value of the cyclic voltage is less than the preset fluctuation threshold, the current loop output value within a preset number of power frequency cycles is collected and filtered to obtain the first filtered value corresponding to the positive half-cycle of the input terminal and the second filtered value corresponding to the negative half-cycle of the input terminal. Calculate the absolute value of the difference between the first filter value and the second filter value, and determine whether the absolute value of the difference is greater than a preset calibration threshold; When the absolute value of the difference is greater than the preset calibration threshold, one of the first filter value and the second filter value is selected as the reference filter value, and the other is selected as the adjustment filter value. The correction coefficient is determined based on the relationship between the first filter value and the second filter value; The real-time average current is adjusted according to the level of the polarity signal and the correction coefficient; the real-time average current is used for the control of the current loop.

2. The method according to claim 1, characterized in that, When the first filter value is used as the reference filter value and the second filter value is used as the adjustment filter value, determining the correction coefficient based on the relationship between the first filter value and the second filter value includes: When the first filter value is greater than the second filter value, the current correction coefficient is subtracted by the preset step size value to obtain the updated correction coefficient; When the second filter value is greater than the first filter value, the current correction coefficient is added to the preset step size value to obtain the updated correction coefficient; The updated correction coefficients are subjected to amplitude limiting processing to keep them between a preset upper limit value and a preset lower limit value.

3. The method according to claim 2, characterized in that, The adjustment of the real-time average current based on the level of the polarity signal and the correction coefficient includes: When the polarity signal is at the first level, the real-time average current is used as the input current of the current loop; When the polarity signal is at the second level, the result obtained by multiplying the real-time average current by the correction coefficient is used as the input current of the current loop.

4. The method according to claim 1, characterized in that, When the second filter value is used as the reference filter value and the first filter value is used as the adjustment filter value, determining the correction coefficient based on the relationship between the first filter value and the second filter value includes: When the first filter value is greater than the second filter value, the current correction coefficient is added to a preset step size value to obtain the updated correction coefficient; When the second filter value is greater than the first filter value, the current correction coefficient is subtracted from the preset step size value to obtain the updated correction coefficient; The updated correction coefficients are subjected to amplitude limiting processing to keep them between a preset upper limit value and a preset lower limit value.

5. The method according to claim 4, characterized in that, The adjustment of the real-time average current based on the level of the polarity signal and the correction coefficient includes: When the polarity signal is at the first level, the result obtained by multiplying the real-time average current by the correction coefficient is used as the input current of the current loop; When the polarity signal is at the second level, the real-time average current is used as the input current of the current loop.

6. The method according to claim 1, characterized in that, The step of determining whether the fluctuation value of the cyclic voltage is less than a preset fluctuation threshold includes: Obtain multiple cyclic voltages within a preset time period; Calculate the difference between the maximum and minimum values ​​among the multiple cyclic voltages, and use this difference as the fluctuation value; Compare the fluctuation value with the preset fluctuation threshold; When the fluctuation value is less than the preset fluctuation threshold and continues for a preset period of time, it is determined that the fluctuation value of the circulating voltage is less than the preset fluctuation threshold. When the fluctuation value is greater than or equal to the preset fluctuation threshold, it is determined that the fluctuation value of the cyclic voltage is not less than the preset fluctuation threshold, and the process returns to the step of obtaining multiple cyclic voltages within a preset time period.

7. The method according to claim 1, characterized in that, Within each power frequency cycle, the output value of the current loop includes: The current loop output value is collected for a preset number of switching cycles in two sampling intervals with a fixed phase angle; wherein the fixed phase angle is 180 degrees, and the two sampling intervals are located at the midpoint of the positive half-cycle and the midpoint of the negative half-cycle, respectively. The filtering process includes: calculating the average value of the current loop output value in each sampling interval, and performing a weighted average of the average value and the corresponding filtered value of the previous power frequency cycle.

8. The method according to any one of claims 1-8, characterized in that, The polarity signal is obtained by detecting the positive or negative sign of the input voltage: When the input voltage is within the positive half-cycle, the polarity signal is at the first level; When the input voltage is within the negative half-cycle, the polarity signal is the second level; Wherein, the first level is a high level and the second level is a low level.

9. An electronic device, characterized in that, include: At least one processor; At least one network interface, which is communicatively connected to a corresponding processor; as well as, A memory communicatively connected to the at least one processor; wherein, The network interface is used to establish communication connections between the processor and other external devices; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the current sampling calibration method as described in any one of claims 1-8.

10. A non-volatile computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions that are executed by one or more processors, causing the one or more processors to perform the current sampling calibration method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Current sampling system and method for calculating offset voltage of operational amplifier

    CN102053195A

  • Current detection control method of power factor correction circuit

    CN112803749A

Cited By

  • Adaptive filtering and outputting method and device for sampling current and battery management system

    CN121679364A