Compensation method for total harmonic distortion of switching power supply current and related device
By obtaining sampled values in the switching power supply and calibrating the load using calibration parameters from a preset database, the problem of inaccurate THDI compensation values under midpoint sampling mode is solved, achieving accurate compensation under different load conditions and reducing harmonic current pollution to the circuit.
Patent Information
- Application Number
- CN202211688900.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-12-27
Smart Images

Figure CN115955082B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of electric power, and in particular to a switching power supply current total harmonic distortion THDI compensation method and related equipment. BACKGROUND
[0002] With the large popularity of data centers and power equipment, the wide application of nonlinear power equipment generates a large amount of distorted harmonic current, and the harm of power harmonics to the power grid is more and more obvious, causing power pollution.
[0003] For a switching power supply, reducing the current total harmonic distortion (THDI) is the most direct and effective means to reduce power pollution. THDI is defined as the ratio of the effective value of the total harmonic current to the effective value of the fundamental current. In order to reduce THDI, current sampling can be performed on the switching power supply, and a corresponding compensation value is determined according to the sampling value, so that the THDI meets the index requirements.
[0004] However, there is a deviation between the sampling value of current sampling and the actual value. For example, the midpoint sampling method samples the current in the discontinuous conduction mode (DCM), which will make the sampling value too large, resulting in that the THDI after compensation cannot meet the index requirements. SUMMARY
[0005] Embodiments of the present application provide a switching power supply current total harmonic distortion THDI compensation method for making the THDI after compensation meet the index requirements, thereby reducing the pollution caused by harmonic current to the circuit. Embodiments of the present application also provide a corresponding switching power supply and a computing device.
[0006] The first aspect of the present application provides a switching power supply current total harmonic distortion THDI compensation method, the method comprising: obtaining a first sampling value of the switching power supply; wherein the first sampling value is an output current value of the switching power supply, or an output current value and an output voltage value of the switching power supply; determining a first load of the switching power supply according to the first sampling value; determining a first calibration parameter based on the first load; calibrating the first sampling value using the first calibration parameter to obtain a second sampling value; determining a first compensation value according to the second sampling value; and compensating the switching power supply current total harmonic distortion THDI based on the first compensation value.
[0007] In the embodiments of the present application, the power factor correction (PFC) circuit in the switching power supply includes a boost circuit, and it should be understood that the PFC circuit can also include other types of conversion circuit topologies, and the embodiments of the present application do not limit this. The embodiments of the present application take the controller in the switching power supply as an example, which can be but is not limited to a digital signal processing (DSP) and a microcontroller unit (MCU).
[0008] In the embodiments of the present application, in the case of constant voltage output of the switching power supply, the first sampling value is the output current value of the switching power supply; for example, in the case of outputting 12V DC by the switching power supply, the output current of the switching power supply can be collected to determine the load of the switching power supply through the output current; in the case of variable voltage output of the switching power supply, the first sampling value includes the output current value and the output voltage value of the switching power supply.
[0009] In the present application, the first load can be understood as the current load (proportion) or the power load (proportion) of the switching power supply. For example, the rated output current of the switching power supply is 250A, and the first sampling value is 125A, the first load can be determined as 50%, which indicates that the current load of the current switching power supply is 50%. When the output voltage of the switching power supply is constant, for example, the rated output power of the switching power supply is 3000W, and the rated output voltage is constant 12V, the first sampling value is 25A, the first load is determined as 10%, which indicates that the output power of the current switching power supply is 300W, and the power load is 10%.
[0010] In the embodiments of the present application, after the controller determines the first load, a first calibration parameter corresponding to the first load can be determined based on the first load. After the first calibration parameter is obtained, the first sampling value can be calibrated based on the first calibration parameter to obtain a second sampling value. After the second sampling value is obtained, a first compensation value can be determined according to the second sampling value, and the first compensation value is used to compensate the total harmonic distortion of the current (THDI) of the switching power supply.
[0011] In the first aspect, the first sampling value of the circuit is obtained, the load of the circuit is determined according to the first sampling value, the calibration parameter is determined based on the load, the first sampling value is calibrated based on the calibration parameter to obtain a second sampling value, and the compensation value is determined according to the second sampling value, and the THDI of the circuit is compensated based on the compensation value. By calibrating the sampling value with the calibration parameter corresponding to the current load of the switching power supply, the compensation value of the THDI is calibrated, so that the compensated THDI meets the index requirements, thereby reducing the pollution caused by the harmonic current to the circuit.
[0012] In a possible implementation of the first aspect, the step of determining the first calibration parameter based on the first load comprises: determining a target load range corresponding to the first load based on the first load; and determining the first calibration parameter according to the target load range.
[0013] In this possible implementation, when the first calibration parameter is determined, the target load range corresponding to the first load can be determined based on the first load, each load range corresponds to a calibration parameter, and therefore the first calibration parameter can be determined according to the target load range, improving the realizability of the scheme.
[0014] In a possible implementation of the first aspect, before the step of determining the first calibration parameter based on the first load, the method further comprises: obtaining a preset database, the preset database comprising N load ranges and a calibration parameter corresponding to each load range; wherein N is a positive integer greater than or equal to 2; and the step of determining the first calibration parameter based on the first load comprises: determining a target load range from the N load ranges, wherein the first load is located in the target load range; determining the calibration parameter corresponding to the target load range; and taking the calibration parameter corresponding to the target load range as the first calibration parameter.
[0015] In this possible implementation, the N load ranges and the calibration parameter corresponding to each load range can be obtained in advance, and a preset database is established accordingly, and when calibration is performed, the first calibration parameter can be obtained by matching in the preset database, further improving the realizability of the scheme.
[0016] In a possible implementation of the first aspect, before the step of obtaining the preset database, the method further comprises: obtaining M sample values and M measurement values of the switching power supply under M loads; wherein M is a positive integer greater than or equal to 2; determining N load ranges based on the M loads, and determining N calibration parameters corresponding to the N load ranges based on the M sample values and the M measurement values.
[0017] In this possible implementation, when the preset database is established, the calibration parameters can be determined based on the sample values and the measurement values, specifically, the M sample values and the M measurement values under the M loads are obtained, the N load ranges are determined based on the M loads, and the N calibration parameters corresponding to the N load ranges are determined based on the M sample values and the M measurement values, further improving the realizability of the scheme.
[0018] In a possible implementation of the first aspect, the step of determining the N calibration parameters corresponding to the N load ranges based on the M sampling values and the M measurement values includes: determining the N calibration parameters corresponding to the N load ranges based on the M sampling values and the M measurement values, wherein the calibration parameter is a calibration parameter corresponding to k and / or b.
[0019] In this possible implementation, when determining the calibration parameter, a single-point calibration or a two-point calibration method can be used, and different calibration methods can be used for different loads to meet different user needs and further improve the realizability of the scheme.
[0020] In a possible implementation of the first aspect, before determining the first calibration parameter based on the first load, the method further includes: if the first load is less than a first threshold, determining the first calibration parameter based on the first load.
[0021] In this possible implementation, because the sampling value deviation is not large when the load is 20% or more, the influence on THDI is small, and the first sampling value can be calibrated based on the first load only when the first load is less than the first threshold. The first threshold can be 50% or 20%, and the user can set the first threshold according to the actual situation, thereby reducing the calculation amount and improving the compensation efficiency.
[0022] In a possible implementation of the first aspect, the method further includes: if the first load is greater than or equal to the first threshold, determining a second compensation value based on the first sampling value; and compensating the current total harmonic distortion THDI of the switching power supply by using the second compensation value.
[0023] In this possible implementation, because the sampling value deviation is not large when the load is 50% or more, the influence on THDI is small, and to reduce the calculation amount and improve the compensation efficiency, the second compensation value can be directly determined based on the first sampling value when the first load is greater than or equal to the first threshold, and the current total harmonic distortion THDI of the switching power supply is compensated by using the second compensation value. The first threshold can be 50% or 20%, and the user can set the first threshold according to the actual situation, thereby reducing the calculation amount and improving the compensation efficiency.
[0024] In a possible implementation of the first aspect, the step of determining the first compensation value according to the second sampling value includes: obtaining a first mapping table, the first mapping table including a mapping relationship between a sampling value and a compensation value; and determining the first compensation value corresponding to the second sampling value based on the first mapping table.
[0025] In the possible implementation manner, the sampling value and the compensation value have a mapping relationship, the controller needs to obtain a first mapping table, the first mapping table can be pre-established and includes the mapping relationship between the second sampling value and the compensation value, the controller can determine the first compensation value corresponding to the second sampling value based on the first mapping table, and the realizability of the scheme is improved.
[0026] The second aspect of the present application provides a switching power supply, which includes a module or unit for performing the method in the first aspect or any possible implementation manner of the first aspect, such as an obtaining unit, a first determining unit, a second determining unit, a calibration unit, a third determining unit, and a compensation unit.
[0027] The obtaining unit is configured to obtain a first sampling value of the switching power supply, wherein the first sampling value is an output current value of the switching power supply, or an output current value and an output voltage value of the switching power supply; the first determining unit is configured to determine a first load of the switching power supply according to the first sampling value; the second determining unit is configured to determine a first calibration parameter based on the first load; the calibration unit is configured to calibrate the first sampling value by using the first calibration parameter to obtain a second sampling value; the third determining unit is configured to determine a first compensation value according to the second sampling value; and the compensation unit is configured to compensate for a total harmonic distortion of the switching power supply current (THDI) based on the first compensation value.
[0028] In a possible implementation manner of the second aspect, the second determining unit is specifically configured to determine a target load range corresponding to the first load based on the first load, and determine the first calibration parameter according to the target load range.
[0029] In a possible implementation manner of the second aspect, the obtaining unit is further configured to obtain a preset database, and the preset database includes N load ranges and a calibration parameter corresponding to each load range; N is a positive integer greater than or equal to 2; the second determining unit is specifically configured to determine a target load range from the N load ranges, wherein the first load is located in the target load range; determine the calibration parameter corresponding to the target load range; and take the calibration parameter corresponding to the target load range as the first calibration parameter.
[0030] In a possible implementation manner of the second aspect, the obtaining unit is further configured to obtain M sampling values and M measurement values of the switching power supply under M loads, wherein M is a positive integer greater than or equal to 2; determine N load ranges based on the M loads, and determine N calibration parameters corresponding to the N load ranges based on the M sampling values and the M measurement values.
[0031] In a possible implementation of the second aspect, the sampling value and the measurement value satisfy a relationship of y=kx+b, where y is the measurement value and x is the sampling value; the N calibration parameters corresponding to the N load ranges are determined based on the M sampling values and the M measurement values, including: the N calibration parameters corresponding to the N load ranges are determined based on the M sampling values and the M measurement values, where the calibration parameter is a calibration parameter corresponding to k and / or b.
[0032] In a possible implementation of the second aspect, the second determination unit is specifically configured to determine the first calibration parameter based on the first load if the first load is less than the first threshold.
[0033] In a possible implementation of the second aspect, the third determination unit is further configured to determine a second compensation value based on the first sampling value if the first load is greater than or equal to the first threshold; and the compensation unit is further configured to compensate the total harmonic distortion of the current (THDI) of the switching power supply by using the second compensation value.
[0034] In a possible implementation of the second aspect, the third determination unit is specifically configured to obtain a first mapping table, where the first mapping table includes a mapping relationship between the sampling value and the compensation value; and determine the first compensation value corresponding to the second sampling value based on the first mapping table.
[0035] The third aspect of the present application provides a switching power supply, which includes a controller and a memory; the controller is electrically connected with the memory; the memory is used to store instructions, and the controller is used to run the instructions to execute the method of the first aspect or any possible implementation of the first aspect.
[0036] The fourth aspect of the present application provides a computing device, which includes the switching power supply of the third aspect and a load; the switching power supply is electrically connected with the load; and the switching power supply is used to supply power to the load.
[0037] The fifth aspect of the present application provides a computer readable storage medium storing one or more computer-executable instructions, when the computer-executable instructions are executed by a processor, the processor executes the method of the first aspect or any possible implementation of the first aspect.
[0038] The sixth aspect of the present application provides a computer program product storing one or more computer-executable instructions, when the computer-executable instructions are executed by a processor, the processor executes the method of the first aspect or any possible implementation of the first aspect.
[0039] The seventh aspect of the present application provides a chip system, which comprises at least one processor and an interface for receiving data and / or signals, and the at least one processor is configured to support the computer device to implement the functions involved in the first aspect or any possible implementation manner of the first aspect. In a possible design, the chip system can further comprise a memory for storing necessary program instructions and data of the computer device. The chip system can be composed of a chip, or can comprise the chip and other discrete devices.
[0040] In the embodiment of the present application, the first sampling value of the circuit is obtained, and the load of the circuit is determined according to the first sampling value. The calibration parameter is determined based on the load, and then the first sampling value is calibrated based on the calibration parameter to obtain the second sampling value. The compensation value is determined according to the second sampling value, and the THDI of the circuit is compensated based on the compensation value. By calibrating the sampling value with the calibration parameter corresponding to the current load of the switching power supply, the compensation value of the THDI is calibrated, so that the compensated THDI meets the index requirement, thereby reducing the influence of the harmonic current on the circuit. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 A schematic diagram of current sampling;
[0042] Figure 2 An embodiment schematic diagram of the switching power supply THDI compensation method provided by the embodiment of the present application;
[0043] Figure 3 A schematic diagram of the correspondence between the sampling value and the actual value provided by the embodiment of the present application;
[0044] Figure 4 An embodiment schematic diagram of determining the calibration parameter provided by the embodiment of the present application;
[0045] Figure 5 Another embodiment schematic diagram of determining the calibration parameter provided by the embodiment of the present application;
[0046] Figure 6 Another embodiment schematic diagram of determining the calibration parameter provided by the embodiment of the present application;
[0047] Figure 7 An embodiment schematic diagram of compensating the THDI provided by the embodiment of the present application;
[0048] Figure 8 Another embodiment schematic diagram of compensating the THDI provided by the embodiment of the present application;
[0049] Figure 9 An embodiment schematic diagram of the switching power supply provided by the embodiment of the present application;
[0050] Figure 10 Another embodiment of the switching power supply provided by the embodiments of the present application is shown in the figure.
[0051] Figure 11 An embodiment of the computing device provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0052] The embodiments of the present application are described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Those skilled in the art can know that the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems as technology develops and new scenarios appear.
[0053] The terms "first", "second", and the like in the specification of the present application, the claims, and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to the process, method, product, or device.
[0054] The word "exemplary" in the present specification means "serving as an example, an implementation, or an illustration". Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.
[0055] In addition, in order to better illustrate the present application, numerous specific details are given in the following detailed description. Those skilled in the art should understand that the present application can also be implemented without some specific details. In some examples, methods, means, elements, and circuits that are well known to those skilled in the art are not described in detail, in order to highlight the main ideas of the present application.
[0056] The embodiments of the present application provide a compensation method for switching power supply current total harmonic distortion THDI, for making the compensated THDI meet the index requirements, thereby reducing the pollution caused by harmonic current to the circuit. The embodiments of the present application also provide corresponding switching power supply and computing device, etc. The following are described in detail respectively.
[0057] The application scenarios related to the embodiments of the present application are exemplified as follows.
[0058] Computing devices (such as servers, computer equipment, and routers) are typically powered by switching power supplies. However, these power supplies generate harmonics, polluting the power grid. Specifically, harmonics reduce the efficiency of power generation, transmission, and utilization; cause electrical equipment (such as computer equipment) to overheat, vibrate, and generate noise; and cause insulation aging, shortening its lifespan, or even leading to malfunctions or burnout. Furthermore, harmonics cause significant interference in communication and electronic equipment (such as servers and routers). Therefore, reducing the harmonic content of computing devices has become a pressing issue.
[0059] In switching power supplies, reducing total harmonic current distortion (THDI) is the most direct and effective way to reduce current harmonics. THDI is defined as the ratio of the effective value of the total harmonic current to the effective value of the fundamental current. To reduce THDI, the current total harmonic content of the switching power supply can be directly read using a power analyzer or other instruments. The controller in the power factor correction (PFC) circuit of the switching power supply determines a compensation value based on this total harmonic content. This compensation value is defined as the compensation magnitude of the duty cycle of the pulse width modulation (PWM) signal in the switching power supply. The pulse width modulation (PWM) signal is used to control the operating state of the switch in the PFC circuit, such as controlling the switching on and off through the PWM signal. The duty cycle is the ratio of the on-time (Ton) to the entire cycle duration. That is, the controller of the PFC circuit adds this compensation value to the original duty cycle, thereby adjusting the magnitude of the duty cycle of the PWM signal so that the THDI meets the requirements.
[0060] However, the total harmonic distortion (THDI) of the switching power supply will vary under different loads. Therefore, it is necessary to determine a compensation value for each load condition of the switching power supply. In order to determine the load of the switching power supply, midpoint sampling is usually used. Midpoint sampling is based on the current value collected at the midpoint of the PWM cycle. The current sample value obtained after sampling is used to determine the current load.
[0061] like Figure 1 As shown, in the THDI compensation of the boost circuit topology of the switching power supply, the midpoint sampling method is used to determine the current load. However, the midpoint sampling method operates in discontinuous conduction mode (DCM), which will cause the obtained current sampling value to be too large. This will also make the load determined by the controller inaccurate, resulting in deviation of the compensation value. As a result, the compensated THDI cannot meet the index requirements, thus causing power pollution.
[0062] Based on this, this application provides a method for compensating the total harmonic distortion (THDI) of switching power supply current, in order to solve the problem that the THDI compensation value is deviated due to the inaccuracy of the load determined by current sampling, so that the compensated THDI cannot meet the index requirements, thereby reducing the pollution of the circuit caused by harmonic current.
[0063] The following describes the method for compensating the total harmonic distortion (THDI) of the switching power supply current provided in the embodiments of this application, in conjunction with the above application scenarios.
[0064] like Figure 2 As shown, one embodiment of the method for compensating the total harmonic distortion (THDI) of a switching power supply provided in this application includes:
[0065] 201. Obtain the first sample value of the switching power supply.
[0066] In this embodiment of the application, the PFC circuit in the switching power supply includes a boost circuit. It should be understood that the PFC circuit may also include other types of conversion circuit topologies, and this embodiment of the application does not limit this.
[0067] This application embodiment takes the execution of a controller in a switching power supply as an example. The controller can be, but is not limited to, digital signal processing (DSP) and micro controller unit (MCU).
[0068] When the switching power supply outputs a constant voltage, the first sampled value is the output current value of the switching power supply. For example, when the switching power supply outputs 12V DC, the load of the switching power supply can be determined by collecting the output current. When the switching power supply outputs a transformer, the first sampled value includes the output current value and the output voltage value of the switching power supply.
[0069] 202. Determine the first load of the switching power supply based on the first sampled value.
[0070] After acquiring the first sampled value, the controller can determine the first load of the switching power supply based on this value. The first load can be understood as either the current load (percentage) or the power load (percentage) of the switching power supply. For example, if the rated output current of the switching power supply is 250A and the first sampled value is 125A, the first load can be determined as 50%, meaning the current load of the switching power supply is 50%. Conversely, when the output voltage of the switching power supply is constant, for example, if the rated output power is 3000W and the rated output voltage is a constant 12V, and the first sampled value is 25A, the first load is determined as 10%, meaning the current output power of the switching power supply is 300W and the power load is 10%.
[0071] 203. Determine the first calibration parameters based on the first load of the switching power supply.
[0072] After the controller determines the first load, it can determine a first calibration parameter corresponding to the first load.
[0073] Specifically, before determining the first calibration parameter, the controller needs to obtain a preset database in advance. This preset database includes N load ranges and N calibration parameters corresponding to each load range. The process of establishing the preset database can be performed before step 201. The following is an exemplary description of the process of establishing the preset database:
[0074] When establishing the preset database, it is necessary to obtain M sampled values and M actual values of the switching power supply under M types of loads. Then, based on the M loads, N load ranges are determined, and based on the M sampled values and M actual values, N calibration parameters corresponding to the N load ranges are determined. Here, M and N are both positive integers greater than or equal to 2, and N is less than M.
[0075] For example, such as Figure 3 As shown, M is 2, and the M loads are 20% and 80% respectively. At 20% load, the sampled value is x1, and the actual value is y1. At 80% load, the sampled value is x2, and the actual value is y2. Therefore, x1 needs to be calibrated to x3 = y1, and x2 needs to be calibrated to x4 = y2. The sampled value can be obtained by the controller using the same method as in step 201, and the actual value is the accurate value obtained through instrument measurement. The correspondence between the sampled value and the actual value can be understood as a function of y = kx + b, where x is the sampled value and y is the actual value. The calibration parameters can be k and b, or calibration coefficients of k and b. That is, the calibration parameters can directly calibrate the first sampled value, or calibrate k and b to calibrate the first sampled value.
[0076] It should be noted that the first sampled value may have already been calibrated using a unified calibration parameter. For example, under 50% load, the sampled value and the actual value are obtained to determine a calibration parameter as a unified calibration parameter. Subsequent first sampled values, regardless of the load, will be multiplied by this calibration parameter. When the first sampled value has not been calibrated, the calibrated k and b can be directly used as N calibration parameters (second calibration parameters) in the preset database. When the first sampled value has already been calibrated using the old calibration parameters k and b, the calibration coefficients of k and b need to be used as the second calibration parameters. In this case, the second calibration parameters are used to calibrate the old calibration parameters k and b, thereby calibrating the first sampled value. There are also various ways to determine the calibration parameters, such as using M sampled values and M measured values to determine N calibration parameters corresponding to N load ranges based on single-point calibration or two-point calibration. These will be explained below.
[0077] I. Single-point K-value calibration
[0078] like Figure 4 As shown, the first sampled value has already passed K old Calibration, for example, calibrating the sampled values at 50% load, yields K. old Multiply the sampled values obtained under other loads by K old The first sampled value is then obtained, but due to the different deviations of the sampled values under different loads, there is still a deviation between the first sampled value and the actual value. The correspondence between the sampled value and the actual value is y = kx, b = 0. Taking the sampled value as the output current of the switching power supply as an example, I sample1 For sampled values, I corr1 For passing through K old The calibrated current, i.e., the first sampled value, is Figure 4 In the equation y1, it needs to be calibrated to y2 = x, I standard1 The actual current for calibration, i.e. Figure 4 x in the text.
[0079] The current curve from the first calibration:
[0080] I corr1 =K old *I sample1 (1)
[0081] Calibration curve for actual current:
[0082] I standard1 =K new *I sample1 (2)
[0083] Combining (1) and (2) yields a new K. new as follows:
[0084]
[0085] K new The reasonable range is limited by the upper and lower limits of k, which can be referenced from the limitations of specific calibration parameters.
[0086] in, For the obtained second calibration parameter, when using it, the first sampled value I corr1 Multiply by the second calibration parameter, or let K old Multiplying by the second calibration parameter yields K. new Then use K new By calibrating the sampled values, an accurate second sampled value can be obtained.
[0087] II. Single-point B-value calibration
[0088] As Figure 5 shown, the first sampling value is not calibrated, that is, the sampling value obtained by sampling is the first sampling value, the corresponding relationship between the sampling value and the actual value is y=x+b, that is, k=1, taking the output current of the switching power supply as an example, I sample1 is the sampling value obtained by sampling, that is, the first sampling value, Figure 5 y2 in the formula needs to be calibrated to y1=x, I standard1 is the calibrated actual current, that is Figure 5 x in the formula.
[0089] The calibration curve of the actual voltage is:
[0090] I standard1 =I sample1 +B (1)
[0091] At this time, the second calibration parameter is B, and the reasonable range of B is limited by the upper and lower limits of b. The upper and lower limits of b can refer to the specific calibration parameter limit. In use, the first sampling value I is added to the calibration parameter to obtain the accurate second sampling value.
[0092] Three, two-point calibration
[0093] As Figure 6 shown, the first sampling value has been calibrated by K old and B old , taking the sampling current calibration as an example: I sample1 , I sample2 is the sampling current, V corr1 , V corr2 is the current after the first calibration by K old and B old , that is, the first sampling value, respectively Figure 6 y1 and y2 in the formula, y1 needs to be calibrated to y1'=x1, y2'=x2, I standard1 , I standard2 is the calibrated target current, respectively Figure 6 x1 and x2 in the formula.
[0094] The current curve of the first calibration is:
[0095]
[0096] The calibration curve of the target current is:
[0097]
[0098] Combining (1) (2) can obtain new K new , B new as follows:
[0099]
[0100] Let
[0101]
[0102] Then (4) is simplified as follows:
[0103]
[0104] Where k and b are the second calibration parameters, K old , K new The reasonable range of k is limited by the upper and lower limits of k, B old , B new The reasonable range of b is limited by the upper and lower limits of b, and the specific upper and lower limits are limited by the specific calibration parameters. In use, the first sampling value V corr1 and V corr2 are multiplied or added with the second calibration parameter, or K old and B old are multiplied or added with the second calibration parameter to obtain K new and B new , and then K new and B new are used to calibrate the sampling value obtained by sampling, so that the accurate second sampling value can be obtained.
[0105] Based on the above method, the calibration parameters under a load can be determined, and M calibration parameters under M load ranges can be determined based on the same method, so that the establishment of the preset database is completed.
[0106] It should be understood that if a two-point calibration method is used, one load range can be determined based on two loads, and one calibration parameter can be determined based on the sampling values and true values of the two loads, if a single-point calibration method is used, one or two load ranges can be determined based on two loads, and two calibration parameters can be determined based on the sampling values and true values of the two loads, if one load range is determined, the average of the two calibration parameters is taken as the calibration parameter of the load range, and the division method of the load range and the calibration method are not limited by the embodiments of the application.
[0107] For example, M loads are 20% load, 50% load and 80% load, i.e. M=3, and the sampling values and actual values are also 3, the sampling value under 20% load is A1, the actual value is B1, the sampling value under 50% load is A2, the actual value is B2, and the sampling value under 80% load is A3, the actual value is B1.
[0108] After obtaining the M sampling values and M actual values under M loads, N load ranges and corresponding N calibration parameters can be determined based on the M loads, and there are many ways to determine the load range, which will be described below.
[0109] I. Two-point calibration
[0110] In this case, the load ranges can be determined as 20%-50%, 50%-80% respectively, the calibration parameter for 20%-50% is C1 determined based on the two-point calibration result of 20% load and 50% load, and the calibration parameter for 50%-80% is C2 determined based on the two-point calibration result of 50% load and 80% load. Thus, based on the sampling values and actual values of M=3 kinds of loads, N=2 load ranges and calibration parameters are determined.
[0111] Optionally, the calibration parameter for 0%-20% can be the calibration parameter obtained by single-point calibration based on 20% load, and the calibration parameter for 80%-100% can be the calibration parameter obtained by single-point calibration based on 80% load, thus, based on the sampling values and actual values of M=3 kinds of loads, N=4 load ranges and calibration parameters are determined.
[0112] II. Single-point calibration
[0113] (1) M kinds of loads are the midpoint of N load ranges
[0114] In this case, M is N, that is, the number of load ranges is equal to the number of loads taken, at this time, the load ranges can be determined as 0%-40%, 40%-60%, 60%-100% respectively, the calibration parameter for 0%-40% is the calibration parameter C1 determined based on single-point calibration of 20% load, the calibration parameter for 40%-60% is the calibration parameter C2 determined based on single-point calibration of 50% load, and the calibration parameter for 60%-100% is the calibration parameter C3 determined based on single-point calibration of 80% load.
[0115] Optionally, when the load is 40%, the calibration parameter can take C1, C2, or the average of C1 and C2, when the load is 60%, the calibration parameter can take C2, C3, or the average of C2 and C3, which can be determined by the user according to their own needs.
[0116] (2) M kinds of second loads are the boundary points of N load ranges
[0117] In this case, M is N+1, that is, the number of load ranges plus 1 is equal to the number of loads taken, at this time, the load ranges can be determined as 20%-50%, 50%-80% respectively, the calibration parameter for 20%-50% is the average C4 of the calibration parameter C1 determined based on single-point calibration of 20% load and the calibration parameter C2 determined based on single-point calibration of 50% load, and the calibration parameter for 50%-80% is the average C5 of C2 and the calibration parameter C3 determined based on single-point calibration of 80% load.
[0118] Optionally, when the load is 50%, the calibration parameter can be C3, or the average of C4 and C5, when the second load is less than 20%, the second calibration parameter can be C1, and when the second load is greater than 80%, the second calibration parameter can be C3.
[0119] It should be noted that there can be other ways to determine the load range, and there can be no relationship between the number of M and N, for example, 4 load ranges can be determined according to 2 loads, and the embodiments of the present application do not limit this. Regardless of the way the load range is determined, ultimately one calibration parameter can be determined for each load range, that is, N calibration parameters for N load ranges.
[0120] For example, the finally generated preset database includes the contents shown in Table 1. After obtaining the preset database, the target load range corresponding to the first load can be determined based on the first load, and the first calibration parameter can be determined according to the target load range. Specifically, the target load range is determined from the N load ranges of the preset database, the first load is located in the target load range, and the calibration parameter corresponding to the target load range is determined. The calibration parameter corresponding to the target load range is taken as the first calibration parameter.
[0121] Table 1
[0122] Load range 0%-10% 10%-20% 20%-50% 50%-100% Calibration parameter J1 J2 J3 J4
[0123] For example, N is 4, and when the first load is 5%, the corresponding first calibration parameter J1 can be determined.
[0124] 204, calibrate the first sampling value based on the first calibration parameter to obtain a second sampling value.
[0125] 205, determine a first compensation value according to the second sampling value.
[0126] 206, compensate for the THDI of the switching power supply based on the first compensation value.
[0127] After obtaining the first calibration parameter, the first sampling value can be calibrated based on the first calibration parameter to obtain a second sampling value. It should be noted that it is necessary to determine whether the first sampling value is a sampling value calibrated by a unified calibration parameter. When the first sampling value is an original sampling value, the first calibration parameter for the first sampling value that has not been calibrated is obtained from the preset database, and the first calibration parameter is directly multiplied or added to the first sampling value. When the first sampling value is an original sampling value and has been calibrated by a unified calibration parameter, the first calibration parameter for the first sampling value that has been calibrated is obtained from the preset database, and the first calibration parameter is multiplied or added to the first sampling value.
[0128] Or determine whether the first calibration parameter is a parameter for the calibrated first sampling value of the unified calibration parameter. If the first calibration parameter is a parameter for the calibrated first sampling value, and the first sampling value has been calibrated by the old calibration parameter, the first calibration parameter can be directly multiplied or added to the calibrated first sampling value. If the first calibration parameter is a parameter for the first sampling value that has not been calibrated, and the first sampling value has not been calibrated, the first calibration parameter can be directly multiplied or added to the first sampling value, and finally a second sampling value close to or equal to the actual value is obtained.
[0129] After obtaining the second sampling value, the first compensation value can be determined according to the second sampling value, and the first compensation value is used to compensate the total harmonic distortion of the current THDI of the switching power supply.
[0130] Specifically, the controller needs to obtain a first mapping table, and the first mapping table includes a mapping relationship between the second sampling value and the compensation value, as shown in Table 2, the controller can determine the first compensation value corresponding to the second sampling value based on the first mapping table.
[0131] Table 2
[0132] Second sample value C1 C2 C3 C4 Compensation value B1 B2 B3 B4
[0133] Specifically, when establishing the first mapping table and pre-obtaining the first compensation value, the current waveform or THDI of the switching power supply under the current load is read through the power analyzer or other instruments first, and then the controller obtains the THDI or current waveform, and can determine the first compensation value based on the THDI or current waveform. It should be understood that the first compensation value is a determined static value.
[0134] For example, when the second sampling value is C1, the controller can determine the compensation value as B1, and the controller controls the duty cycle based on the compensation value B1, thereby achieving compensation of the THDI of the switching power supply. For the second sampling value under other loads, compensation can be performed based on the same method.
[0135] For example, as shown in Figure 7 , the values of THDI under the THDI index requirement line are all meet the THDI index requirement, and only the first sampling values of two kinds of first loads can be taken to compensate the THDI of the switching power supply, for example, the first sampling values of the first load of 20% and 80% are taken, and the corresponding first calibration parameter, second sampling value and first compensation value are obtained for compensation, and from Figure 7 it can be seen that the THDI of the switching power supply under the load of 20% and 80% meets the index requirement.
[0136] Furthermore, although the THDI of the switching power supply meets the specifications at 20% and 80% load, other first loads still use the first compensation values determined at 20% and 80% load. For example, the first compensation value determined at 20% load is used for first loads below 50%, and the first compensation value determined at 80% load is used for first loads above 50%. Figure 7 It can also be seen that since the first current sampling value below 20% load is more prone to deviation, the THDI below 20% load still does not meet the THDI index requirements after compensation with the corresponding first compensation value. At this time, it is necessary to obtain as many first calibration parameters as possible below 20% load and obtain the corresponding first compensation value. That is, different first calibration parameters should be used as much as possible for different first loads.
[0137] For example, the load ranges in the preset database include 0%-5%, 5%-10%, 10%-15%, 15%-20%, 20%-40%, and 40%-100%, corresponding to six calibration parameters. In application, for loads below 20%, four first loads are taken as 2.5%, 7.5%, 12.5%, and 17.5%, with corresponding target load ranges of 0%-5%, 5%-10%, 10%-15%, and 15%-20%, and corresponding first compensation values (determined based on second sample values calibrated using the four first calibration parameters) as B5, B6, B7, and B8, respectively. For loads above 20%, two first loads are taken as 30% and 80%, with corresponding target load ranges of 20%-40% and 40%-100%, and corresponding target compensation values as B9 and B10, respectively.
[0138] like Figure 8 As shown, after compensating the THDI of the switching power supply under different loads based on six first compensation values, not only can the THDI corresponding to the six first loads meet the requirements, but for other loads, such as the first compensation value used when the first load is 6% (B6) or the target compensation value used when the first load is 19% (B8), instead of using the same first compensation value, the first compensation value is closer to the actual required compensation value because it uses calibration parameters within a smaller load range. This allows the THDI of the switching power supply to meet the requirements under different loads.
[0139] In the optimal scenario, a corresponding calibration parameter can be stored in the preset database for each possible load condition (e.g., 100 calibration parameters from 1% to 100%). This ensures that the first sampled value of the switching power supply, after being calibrated by different calibration parameters and compensated by the first compensation value, achieves the highest THDI compensation accuracy, thus meeting the THDI requirements.
[0140] Optionally, since the deviation of the sampled values when the load is above 50% is not large and the impact on THDI is small, in order to reduce the amount of calculation and improve the compensation efficiency, it can be set that when the first load is less than the first threshold, the first calibration parameter is determined based on the first load and the first sampled value is calibrated; when the first load is greater than or equal to the first threshold, the first mapping table is directly queried based on the first sampled value to determine the second compensation value, and the THDI of the switching power supply is compensated based on the second compensation value. The first threshold can be 50% or 20% of the load, and the user can set the first threshold according to the actual situation.
[0141] In this embodiment, a first sample value of the circuit is obtained, and the load of the circuit is determined based on the first sample value. Calibration parameters are then determined based on the load, and the first sample value is calibrated based on the calibration parameters to obtain a second sample value. A compensation value is then determined based on the second sample value, and the THDI of the circuit is compensated based on the compensation value. By calibrating the sample value using the calibration parameters corresponding to the current load of the switching power supply, it is equivalent to calibrating the compensation value of the THDI, ensuring that the compensated THDI meets the performance requirements, thereby reducing the pollution caused by harmonic currents to the circuit.
[0142] The above describes the method for compensating the total harmonic distortion (THDI) of switching power supply current provided in the embodiments of this application. The following describes the related equipment provided in the embodiments of this application with reference to the accompanying drawings.
[0143] like Figure 9 As shown, one embodiment of the switching power supply 900 provided in this application includes:
[0144] The acquisition unit 901 is used to acquire a first sample value of the switching power supply 900; wherein the first sample value is the output current value of the switching power supply 900, or the output current value and output voltage value of the switching power supply; the acquisition unit 901 can be used to execute step 201 in the above method embodiment.
[0145] The first determining unit 902 is used to determine the first load of the switching power supply 900 based on the first sampled value; the first determining unit 902 can be used to execute step 202 in the above method embodiment.
[0146] The second determining unit 903 is used to determine the first calibration parameter based on the first load; the second determining unit 903 can be used to perform step 203 in the above method embodiment.
[0147] The calibration unit 904 is used to calibrate the first sampled value using the first calibration parameters to obtain the second sampled value; the calibration unit 904 can be used to perform step 204 in the above method embodiment.
[0148] The third determining unit 905 is configured to determine a first compensation value according to the second sampling value, and the first compensation value is used to compensate for a current total harmonic distortion THDI of the switching power supply 900. The third determining unit 905 can be configured to perform step 205 in the method embodiments.
[0149] The compensation unit 906 is configured to compensate for the current total harmonic distortion THDI of the switching power supply 900 based on the first compensation value. The compensation unit 906 can be configured to perform step 206 in the method embodiments.
[0150] Optionally, the second determining unit 903 is specifically configured to determine a target load range corresponding to the first load based on the first load, and determine the first calibration parameter according to the target load range.
[0151] Optionally, the obtaining unit 901 is further configured to obtain a preset database, and the preset database includes N load ranges and a calibration parameter corresponding to each load range; N is a positive integer greater than or equal to 2; the second determining unit 903 is specifically configured to determine a target load range from the N load ranges, wherein the first load is located in the target load range; determine the calibration parameter corresponding to the target load range; and take the calibration parameter corresponding to the target load range as the first calibration parameter.
[0152] Optionally, the obtaining unit 901 is further configured to obtain M sampling values and M measurement values of the switching power supply under M loads; M is a positive integer greater than or equal to 2; determine N load ranges based on the M loads, and determine N calibration parameters corresponding to the N load ranges based on the M sampling values and the M measurement values.
[0153] Optionally, the obtaining unit 901 is specifically configured to determine the N calibration parameters corresponding to the N load ranges by using the M sampling values and the M measurement values according to single-point calibration or two-point calibration.
[0154] Optionally, the second determining unit 903 is specifically configured to determine the first calibration parameter based on the first load if the first load is less than a first threshold.
[0155] Optionally, the third determining unit 905 is further configured to determine a second compensation value based on the first sampling value if the first load is greater than or equal to the first threshold; and the compensation unit 906 is further configured to compensate for the current total harmonic distortion THDI of the switching power supply 900 by using the second compensation value.
[0156] Optionally, the third determining unit 905 is specifically configured to obtain a first mapping table, and the first mapping table includes a mapping relationship between a sampling value and a compensation value; and determine the first compensation value corresponding to the second sampling value based on the first mapping table.
[0157] The switching power supply 900 can be the switching power supply in the aforementioned method embodiment. The switching power supply 900 provided in this application embodiment can be understood by referring to the relevant content in the aforementioned embodiment of the method for compensating the total harmonic distortion (THDI) of the current of the switching power supply, and will not be repeated here.
[0158] Figure 10 The diagram shown illustrates a possible logic structure of a switching power supply 1000 provided in an embodiment of this application. The switching power supply 1000 includes a controller 1001, a communication interface 1002, a memory 1003, and a bus 1004. The controller 1001 can be, but is not limited to, a digital signal processing (DSP) or microcontroller unit (MCU). The controller 1001, communication interface 1002, and memory 1003 are interconnected via the bus 1004. In the embodiments of this application, the controller 1001 is used to control and manage the operation of the switching power supply 1000; for example, the controller 1001 is used to execute... Figure 2 Steps 201 to 206 and / or other processes used in the techniques described herein. Communication interface 1002 is used to support communication by the switching power supply 1000. Memory 1003 is used to store program code and data of the switching power supply 1000.
[0159] The controller 1001 can be a central controller unit, a general-purpose controller, a digital signal controller, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The controller can also be a combination that implements computing functions, such as a combination of one or more microcontrollers, a combination of a digital signal controller and a microcontroller, etc. The bus 1004 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0160] like Figure 11 As shown, this application embodiment provides a computing device 1100, which includes a switching power supply 1101 and a load 1102. The switching power supply 1101 can be... Figure 10The switch power supply shown in the figure, the switch power supply 1101 is connected with the load 1102, the load 1102 can be server, computer equipment and router and so on, the switch power supply 1101 is used for power supply for the load 1102.
[0161] In another embodiment of the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores computer execution instructions, when at least one processor of the device executes the computer execution instructions, the device executes the above Figures 2 to 8 The compensation method for the total harmonic distortion of the switch power supply current THDI described in some embodiments.
[0162] In another embodiment of the present application, a computer program product is also provided, and the computer program product includes computer execution instructions, and the computer execution instructions are stored in a computer readable storage medium; at least one processor of the device can read the computer execution instructions from the computer readable storage medium, and the at least one processor executes the computer execution instructions to make the device execute the above Figures 2 to 8 The compensation method for the total harmonic distortion of the switch power supply current THDI described in some embodiments.
[0163] In another embodiment of the present application, a chip system is also provided, and the chip system includes at least one processor and an interface, the interface is used for receiving data and / or signals, and the at least one processor is used for supporting the implementation of the above Figures 2 to 8 The compensation method for the total harmonic distortion of the switch power supply current THDI described in some embodiments. In a possible design, the chip system can also include a memory, and the memory is used for saving necessary program instructions and data of the computer device. The chip system can be composed of a chip, or can include the chip and other discrete devices.
[0164] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present application.
[0165] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the above-mentioned system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0166] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. The division of the units is merely a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0167] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0168] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can be a physically independent unit, or two or more units can be integrated into a unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0169] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, read-only memory), a random access memory (RAM, random access memory), a magnetic disk or an optical disk, and various program codes that can be stored in the medium.
Claims
1. A method of compensating for total harmonic distortion of current (THDI) in a switching power supply, characterized by, The method comprises: obtaining a first sampling value of the switching power supply; wherein the first sampling value is an output current value of the switching power supply, or an output current value and an output voltage value of the switching power supply; determining a first load of the switching power supply according to the first sampling value; determining a first calibration parameter based on the first load; calibrating the first sampling value by using the first calibration parameter to obtain a second sampling value; determining a first compensation value according to the second sampling value; compensating the current total harmonic distortion THDI of the switching power supply based on the first compensation value.
2. The method of claim 1, wherein, The method further comprises: determining a target load range corresponding to the first load based on the first load; determining the first calibration parameter according to the target load range.
3. The method according to claim 1 or 2, characterized in that, Before the step of determining the first calibration parameter based on the first load, the method further comprises: obtaining a preset database, wherein the preset database comprises N load ranges and a calibration parameter corresponding to each load range; wherein N is a positive integer greater than or equal to 2; The method further comprises: determining a target load range from the N load ranges, wherein the first load is located in the target load range; determining the calibration parameter corresponding to the target load range; and determining the calibration parameter corresponding to the target load range as the first calibration parameter.
4. The method of claim 3, wherein, Before the step of obtaining the preset database, the method further comprises: obtaining M sampling values and M measurement values of the switching power supply under M loads; wherein M is a positive integer greater than or equal to 2; determining N load ranges based on the M loads, and determining N calibration parameters corresponding to the N load ranges based on the M sampling values and the M measurement values.
5. The method of claim 4, wherein, The sampling value and the measurement value satisfy the relationship y=kx+b, wherein y is the measurement value and x is the sampling value; The method further comprises: determining N calibration parameters corresponding to the N load ranges based on the M sampling values and the M measurement values, wherein the calibration parameter is a calibration parameter corresponding to k and / or b.
6. The method of claim 1 or 2, wherein, Before the step of determining the first calibration parameter based on the first load, the method further comprises: if the first load is less than a first threshold, determining the first calibration parameter based on the first load.
7. The method of claim 6, wherein, The method further comprises: if the first load is greater than or equal to the first threshold, determining a second compensation value based on the first sampling value; and compensating the current total harmonic distortion THDI of the switching power supply by using the second compensation value.
8. The method of claim 1 or 2, wherein, The method further comprises: obtaining a first mapping table, wherein the first mapping table comprises a mapping relationship between a sampling value and a compensation value; and determining the first compensation value corresponding to the second sampling value based on the first mapping table.
9. A switching power supply, characterized by The switching power supply comprises a controller and a memory; the controller is electrically connected with the memory; the memory is used for storing instructions, and the controller is used for running the instructions to enable the switching power supply to perform the method according to any one of claims 1-8.
10. A computing device, comprising: The switching power supply and the load according to claim 9 are electrically connected; and the switching power supply is used for supplying power for the load.
Citation Information
Patent Citations
Current compensating circuit, current compensating method and operational amplifier
CN103973244A
Harmonic compensation method and device of PFC circuit and terminal device
CN112003462A