An output voltage calibration method, a power supply device, and a storage medium
Patent Information
- Application Number
- CN202610913189.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-09-29
AI Technical Summary
[0006]本发明的目的是提供一种输出电压校准方法、供电设备以及存储介质,以解决因设备个体差异引起的输出电压精度偏低、批量生产中一致性差的问题
[0016]本发明提供的输出电压校准方法,是在接收到受电设备的供电请求时,基于供电请求指示的请求电压,通过第一电压对应关系,确定第一理论输出电压,再基于第一理论输出电压,通过第二电压对应关系,确定第一设定电压,并将第一设定电压写入环路寄存器中,以使供电设备输出与请求电压匹配的电压。本发明通过第一电压对应关系和第二电压对应关系,对受电设备请求的请求电压进行两次映射,确定与请求电压相匹配的第一设定电压写入环路寄存器中,从而有效补偿供电设备个体差异所引起的输出电压偏差,在不增加硬件成本的前提下,既实现了供电设备个体的输出电压高精度校准,又保证了批量生产中输出电压的一致性,进而降低了生产成本。
Smart Images

Figure CN122844403A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power supply equipment technology, and in particular to an output voltage calibration method, power supply equipment, and storage medium. Background Technology
[0002] In the mass production of power supply equipment (such as chargers), problems such as large output voltage deviations and substandard accuracy often occur, directly affecting product compliance, safety, and user experience. The main causes of charger output voltage deviations include: the precision tolerance and temperature drift of key components (such as feedback resistors and reference voltage sources), poor dynamic response due to improper feedback loop compensation, and voltage overshoot or undershoot caused by mismatch in instruction timing between the fast charging protocol chip and the power PWM controller.
[0003] To address the aforementioned issues, existing technologies primarily improve upon these aspects in the following ways: First, by refining component selection and circuit design, such as using high-precision, low-temperature-drift resistors and reference sources, optimizing PCB layout to reduce noise interference, and introducing linear compensation circuits; second, by optimizing loop compensation and protocol control, ensuring sufficient phase and gain margins through loop Bode plot adjustments to guarantee stable multi-level output voltages, and employing synchronous rectification technology to reduce losses; and third, by strengthening production process control, enhancing incoming material inspection and batch management, and introducing statistical process control to monitor key parameters in real time.
[0004] However, the above solutions all fall under the categories of "prevention" or "open-loop compensation," and cannot effectively eliminate the impact of individual hardware deviations of each power supply device (such as feedback resistor accuracy, ADC reference deviation, PCB parasitic parameters, etc.) on output voltage accuracy. Furthermore, even with the use of high-precision components, inconsistency issues still exist during mass production, and costs are high.
[0005] Therefore, there is an urgent need for a method that can calibrate the output voltage for each individual power supply device to ensure the accuracy and consistency of the output voltage in mass production without increasing hardware costs. Summary of the Invention
[0006] The purpose of this invention is to provide an output voltage calibration method, a power supply device, and a storage medium to solve the problems of low output voltage accuracy and poor consistency in mass production caused by individual device differences. To achieve the above objective, this invention is implemented through the following technical solution: In a first aspect, the present invention provides an output voltage calibration method, applied to power supply equipment, comprising: When a power supply request is received from a powered device, a first theoretical output voltage is determined based on the requested voltage indicated by the power supply request and through a pre-built first voltage correspondence relationship. The first voltage correspondence relationship is the correspondence between the actual output voltage of the power supply device and the theoretical output voltage of the power supply device when the set voltage of the loop register of the power supply device is the same. Based on the first theoretical output voltage, the first set voltage is determined by a second voltage correspondence between the theoretical output voltage and the set voltage, which is pre-constructed; The first set voltage is written into the loop register so that the power supply device outputs a voltage that matches the requested voltage.
[0007] In one possible implementation, before determining the first theoretical output voltage based on the requested voltage indicated by the power supply request using a pre-established first voltage correspondence, the method further includes: Based on a plurality of pre-set second theoretical output voltages, the second set voltage corresponding to each second theoretical output voltage is determined by the second voltage correspondence relationship; For each of the second set voltages, the second set voltage is written into the loop register, and the second actual output voltage corresponding to the second set voltage output by the power supply device is collected; The first voltage correspondence is constructed based on multiple theoretical output voltages and multiple actual output voltages.
[0008] In one possible implementation, when the first voltage correspondence is a first fitting function, the step of constructing the first voltage correspondence based on multiple second theoretical output voltages and multiple second actual output voltages includes: Based on multiple theoretical output voltages and multiple actual output voltages, at least one second fitting function is determined using at least one fitting algorithm. The first fitting function is determined based on at least one of the second fitting functions.
[0009] In one possible implementation, determining the first fitting function based on at least one second fitting function includes: Determine the determination coefficients for each of the second fitting functions; The second fitting function with the largest coefficient of determination is selected as the first fitting function.
[0010] In one possible implementation, the fitting algorithm is any one of linear fitting, quadratic curve fitting, and higher-order curve fitting.
[0011] In one possible implementation, the step of acquiring the second actual output voltage corresponding to the second set voltage output by the power supply equipment includes: The actual output voltage of the power supply equipment is sampled multiple times to obtain multiple voltage sample values corresponding to the second set voltage. The multiple voltage sample values are filtered to obtain the second actual output voltage corresponding to the second set voltage.
[0012] In one possible implementation, filtering the plurality of voltage sample values to obtain the second actual output voltage corresponding to the second set voltage includes: The average value of the voltage sample values other than the target voltage sample value among the multiple voltage sample values is taken as the second actual output voltage corresponding to the second set voltage. The target voltage sample value includes at least one of the following voltage sample values: The first m voltage sample values arranged from largest to smallest among the multiple voltage sample values, where m is an integer greater than or equal to 1; The last n voltage sample values arranged from largest to smallest among the multiple voltage sample values, where n is an integer greater than or equal to 1; Voltage sample values within a preset voltage range.
[0013] In one possible implementation, when the second voltage correspondence is a second fitting function, the third fitting function is: Vin = K1 * Vset + B1, where Vin is the theoretical output voltage, Vset is the set voltage, and K1 and B1 are known constants determined by the hardware circuit parameters of the power supply device.
[0014] In a second aspect, the present invention provides a power supply device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the output voltage calibration method as described in any one of the first aspects above.
[0015] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the output voltage calibration method described in any one of the first aspects above.
[0016] The output voltage calibration method provided by this invention, upon receiving a power supply request from a powered device, determines a first theoretical output voltage based on the requested voltage indicated by the power supply request through a first voltage correspondence relationship. Then, based on the first theoretical output voltage, it determines a first set voltage through a second voltage correspondence relationship and writes the first set voltage into a loop register, so that the power supply device outputs a voltage matching the requested voltage. This invention performs two mappings on the requested voltage from the powered device through the first and second voltage correspondence relationships, determining a first set voltage matching the requested voltage and writing it into the loop register. This effectively compensates for output voltage deviations caused by individual differences in power supply devices. Without increasing hardware costs, it achieves high-precision output voltage calibration for individual power supply devices while ensuring output voltage consistency in mass production, thereby reducing production costs. Attached Figure Description
[0017] Figure 1 This is a flowchart of an output voltage calibration method provided in an embodiment of the present invention; Figure 2 This is a flowchart of another output voltage calibration method provided in an embodiment of the present invention; Figure 3 It is based on Figure 2 A flowchart of step 106 is shown; Figure 4 It is based on Figure 2 A flowchart of step 105 is shown; Figure 5 This is a block diagram of a power supply device provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] This embodiment provides an output voltage calibration method, power supply equipment, and storage medium, which are applied to power supply equipment such as chargers and adapters. It aims to solve the problems of low output voltage accuracy and poor consistency in mass production caused by individual differences such as component deviations, PCB parasitic parameters, and ADC reference deviations.
[0020] Figure 1This is a flowchart of an output voltage calibration method provided in an embodiment of the present invention. (See attached document.) Figure 1 The method includes: Step 101: When a power supply request is received from the powered device, the first theoretical output voltage is determined based on the requested voltage indicated by the power supply request and through a pre-built first voltage correspondence.
[0021] The first voltage correspondence is the correspondence between the actual output voltage of the power supply equipment and the theoretical output voltage of the power supply equipment when the set voltage of the loop register of the power supply equipment is the same.
[0022] Step 102: Based on the first theoretical output voltage, determine the first set voltage by using the second voltage correspondence between the pre-constructed theoretical output voltage and the set voltage.
[0023] Step 103: Write the first set voltage into the loop register so that the power supply device outputs a voltage that matches the requested voltage.
[0024] Specifically, the power supply device includes a voltage output loop and a protocol chip. The voltage output loop includes a loop register that stores a set voltage, Vset. After Vset is written to the loop register, the voltage output loop outputs a voltage based on Vset. The protocol chip has a built-in ADC (Analog-to-digital converter) that can acquire the actual output voltage of the power supply device. Each Vset value corresponds to a theoretical output voltage, i.e., the theoretical output voltage Vin. The second voltage correspondence between the theoretical output voltage Vin and the set voltage Vset is determined by the hardware circuit parameters of the power supply device.
[0025] Due to individual differences in power supply equipment, there will be a deviation between the actual output voltage of the power supply equipment and the requested voltage of the powered equipment. In order to calibrate this output voltage deviation, a first voltage correspondence between the actual output voltage and the theoretical output voltage can be pre-established under the condition of Vset. The process of establishing the first voltage correspondence can be regarded as the self-calibration stage of the power supply equipment, which is performed at the initial stage of power supply equipment power-on.
[0026] When a powered device (such as a mobile phone or tablet) is plugged into a power supply device and communicates via a fast charging protocol (such as PD or QC), the powered device sends a power request to the power supply device, and the power supply device enters the calibration and operation phase. The requested voltage indicated by the power request is the actual output voltage of the power supply device that the powered device expects. Therefore, the requested voltage can be substituted into a first voltage correspondence to calculate the first theoretical output voltage corresponding to the requested voltage. Then, based on the first theoretical output voltage, a first set voltage after calibration can be calculated through a second voltage correspondence, and the first set voltage is written into the loop register, with a delay to wait for the voltage to stabilize. At this time, the actual output voltage of the power supply device will be highly matched with the requested voltage.
[0027] During the power supply process, if the powered device changes the requested voltage (e.g., switching from 9V to 5V or 12V), the above steps can be repeated to readjust the first set voltage in order to calibrate the actual output voltage of the power supply device in real time.
[0028] The first voltage correspondence can be in the form of a fitting function, a table, etc., and the present invention does not limit it.
[0029] It is worth noting that this solution is not limited to single-port power supply devices (such as single-port chargers), but also applies to dual-port or multi-port charging and power supply devices (such as dual-port or multi-port chargers). Each power supply port performs self-calibration independently without affecting each other.
[0030] By adopting the above technical solution, the requested voltage of the powered device is mapped twice through the first voltage correspondence and the second voltage correspondence. The first set voltage that matches the requested voltage is then written into the loop register, thereby effectively compensating for the output voltage deviation caused by individual differences of the power supply equipment. Without increasing hardware costs, this achieves high-precision calibration of the output voltage of individual power supply equipment and ensures the consistency of output voltage in mass production, thereby reducing production costs.
[0031] See Figure 2 Before step 101, the method further includes the following steps: Step 104: Based on a plurality of pre-set second theoretical output voltages, determine the second set voltage corresponding to each second theoretical output voltage through the second voltage correspondence relationship.
[0032] Specifically, during the initial power-on process, power-on initialization is performed first. Then, within a preset voltage output range, multiple second theoretical output voltages are traversed and set as voltage characteristic points. For example, six second theoretical output voltages are set: 5V, 9V, 12V, 15V, 20V, and 28V. Then, each second theoretical output voltage is substituted into the second voltage correspondence relationship to calculate the second set voltage corresponding to each second theoretical output voltage.
[0033] In one possible implementation, the second voltage correspondence is a third fitting function, which can be: Vin = K1 * Vset + B1, where Vin is the theoretical output voltage, Vset is the set voltage, and K1 and B1 are known constants determined by the hardware circuit parameters of the power supply equipment (such as feedback voltage divider resistors, reference voltage sources, etc.).
[0034] Step 105: For each second set voltage, write the second set voltage into the loop register and collect the second actual output voltage corresponding to the second set voltage output by the power supply device.
[0035] Step 106: Based on multiple second theoretical output voltages and multiple second actual output voltages, construct the first voltage correspondence.
[0036] Specifically, each calculated second set voltage is written into the loop register in sequence. After writing each second set voltage, a delay is made for a period of time (e.g., 10ms-50ms) to wait for the output voltage of the voltage output loop to stabilize. Then, the output voltage of the voltage output loop is sampled by the ADC built into the protocol chip to obtain the second actual output voltage corresponding to each second set voltage.
[0037] Then, each second theoretical output voltage and its corresponding second actual output voltage are used as a data pair {Vin} i Vadc i}, where Vin i For the i-th second theoretical output voltage, Vadc i Let be the i-th second actual output voltage. Then, based on these data pairs, a first voltage correspondence describing the mapping relationship between the theoretical output voltage and the actual output voltage is constructed using a fitting algorithm or by building a table. At this point, the self-calibration phase is complete. This phase is performed only each time the power supply device is powered on, or only upon the first power-on / receiving of a calibration command.
[0038] By adopting the above technical solution, multiple voltage characteristic points are traversed during the self-calibration stage, and data pairs between the actual output voltage and the theoretical output voltage are collected, providing a data foundation for constructing an accurate first voltage correspondence and ensuring calibration accuracy.
[0039] Optionally, see Figure 3 If the first voltage correspondence is the first fitted function, step 106 can be achieved through the following steps: Step 1061: Based on multiple second theoretical output voltages and multiple second actual output voltages, determine at least one second fitting function using at least one fitting algorithm.
[0040] Step 1062: Determine the first fitting function based on at least one second fitting function.
[0041] Specifically, the fitting algorithm can be any of the following: linear fitting, quadratic curve fitting, and higher-order curve fitting. Linear fitting is suitable for most charger products, requiring little computation and offering sufficient accuracy. Quadratic curve fitting is suitable for scenarios with significant nonlinear errors, offering higher accuracy but requiring slightly more computation. Higher-order curve fitting is suitable for scenarios with extreme accuracy requirements.
[0042] In this embodiment, the process of the first fitting function is explained using two algorithms: linear fitting and quadratic curve fitting. First, based on multiple data pairs consisting of each second theoretical output voltage and its corresponding second actual output voltage, a linear fitting equation is constructed through a single linear fitting process. The slope K2 and intercept B2 in the linear fitting equation are solved using the least squares method. Simultaneously, based on multiple data pairs consisting of each second theoretical output voltage and its corresponding second actual output voltage, a quadratic fitting equation is constructed through quadratic curve fitting. The coefficients a, b, and c in the quadratic fitting equation are solved using the Gaussian elimination method.
[0043] Then, determine the coefficient of determination R for each second fitting function. 2 The second fitting function with the largest coefficient of determination is selected as the first fitting function.
[0044] Specifically, the coefficient of determination R for each fitting function can be calculated using the following formula. 2 : ; ; ; in, For the sum of squared residuals, For the total sum of squares, The second fitting function is based on Vin. i Calculated Vadc i The predicted value, It is all Vadc iThe average value, where n is the number of data pairs.
[0045] R 2 The closer the coefficient of determination is to 1, the higher the fitting priority. Therefore, the coefficient of determination R can be chosen. 2 The largest fitting function is used as the first fitting function (i.e., the first voltage correspondence). This fitting function reflects the impact of hardware deviations (such as feedback resistor accuracy, ADC reference deviation, PCB parasitic parameters, etc.) on the output voltage of each prototype.
[0046] By employing the above technical solution, discrete data pairs are transformed into continuous fitting functions through a fitting algorithm, achieving accurate calibration under any requested voltage and avoiding interpolation errors between discrete points. Furthermore, multiple fitting algorithms are provided for selection, and the fitting priority of different algorithms is evaluated using the coefficient of determination R² to select the optimal fitting function as the first fitting function, thereby further improving calibration accuracy and better adapting to power supply equipment with different hardware characteristics.
[0047] Optionally, see Figure 4 Step 105 can be achieved through the following steps: Step 1051: Sample the actual output voltage of the power supply equipment multiple times to obtain multiple voltage sample values corresponding to the second set voltage.
[0048] Step 1052: Filter the multiple voltage sample values to obtain the second actual output voltage corresponding to the second set voltage.
[0049] Specifically, in order to improve the accuracy of the first voltage correspondence, after writing each second set voltage, the output voltage of the voltage output loop can be sampled multiple times by the ADC built into the protocol chip to obtain multiple voltage sample values corresponding to each second set voltage. Then, the multiple voltage sample values corresponding to each second set voltage are filtered to obtain the second actual output voltage corresponding to each second set voltage.
[0050] In one possible implementation, step 1052 can be achieved in the following way: The average value of the voltage samples other than the target voltage sample value among the multiple voltage samples is taken as the second actual output voltage corresponding to the second set voltage.
[0051] The target voltage sample value includes at least one of the following voltage sample values: The first m voltage sample values arranged from largest to smallest among multiple voltage sample values, where m is an integer greater than or equal to 1; The last n voltage sample values arranged from largest to smallest among multiple voltage sample values, where n is an integer greater than or equal to 1; Voltage sample values that are outside the preset voltage range.
[0052] Specifically, a sampling buffer upper limit can be set, and a random delay time can be set before each sampling to distribute the sampling points across different time points of the switching cycle wave, thus avoiding periodic harmonic interference. After writing a certain second set voltage to the loop register, the ADC built into the protocol chip will sample the output voltage of the voltage output loop multiple times. During the sampling process, multiple voltage sample values can be stored in the buffer. After the sampling count reaches the buffer upper limit, the voltage sample values in the buffer are sorted from largest to smallest or smallest to largest. Then, at least one of the following voltage sample values is deleted: the largest m voltage sample values, the smallest n voltage sample values, and voltage sample values outside the preset voltage range, to eliminate occasional noise interference. Finally, the average value of the remaining voltage sample values is calculated as the second actual output voltage corresponding to the second set voltage.
[0053] In other embodiments, the sampled values in the buffer can also be filtered using median filtering, moving average filtering, Kalman filtering, etc., to obtain an accurate second actual output voltage.
[0054] By employing the above technical solution, through multiple sampling and filtering processes, random noise and periodic interference are effectively eliminated, improving sampling accuracy and providing a reliable data foundation for calibration. Furthermore, an extreme value removal averaging filtering method is used to remove outlier sampled values and then average them, further improving sampling accuracy and avoiding the influence of occasional noise on the calibration results. Simultaneously, a preset voltage range can eliminate obviously abnormal sampled values, enhancing anti-interference capabilities.
[0055] See Figure 5 This disclosure also provides a power supply device 200, including a memory 201 and a processor 202. The memory 201 stores a computer program, and the processor 202 executes the computer program to implement the output voltage calibration method shown in any of the foregoing embodiments.
[0056] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the output voltage calibration method shown in any of the foregoing embodiments. The storage medium can be any form, such as ROM, RAM, EEPROM, flash memory, or hard disk.
[0057] The foregoing description illustrates and describes preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept by means of the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. An output voltage calibration method, characterized in that, Applied to power supply equipment, including: When a power supply request is received from a powered device, a first theoretical output voltage is determined based on the requested voltage indicated by the power supply request and through a pre-built first voltage correspondence relationship. The first voltage correspondence relationship is the correspondence between the actual output voltage of the power supply device and the theoretical output voltage of the power supply device when the set voltage of the loop register of the power supply device is the same. Based on the first theoretical output voltage, the first set voltage is determined by a second voltage correspondence between the theoretical output voltage and the set voltage, which is pre-constructed; The first set voltage is written into the loop register so that the power supply device outputs a voltage that matches the requested voltage.
2. The output voltage calibration method according to claim 1, characterized in that, Before determining the first theoretical output voltage based on the requested voltage indicated by the power supply request using a pre-established first voltage correspondence, the method further includes: Based on a plurality of pre-set second theoretical output voltages, the second set voltage corresponding to each second theoretical output voltage is determined by the second voltage correspondence relationship; For each of the second set voltages, the second set voltage is written into the loop register, and the second actual output voltage corresponding to the second set voltage output by the power supply device is collected; The first voltage correspondence is constructed based on multiple theoretical output voltages and multiple actual output voltages.
3. The output voltage calibration method according to claim 2, characterized in that, When the first voltage correspondence is a first fitting function, the step of constructing the first voltage correspondence based on multiple second theoretical output voltages and multiple second actual output voltages includes: Based on multiple theoretical output voltages and multiple actual output voltages, at least one second fitting function is determined using at least one fitting algorithm. The first fitting function is determined based on at least one of the second fitting functions.
4. The output voltage calibration method according to claim 3, characterized in that, Determining the first fitting function based on at least one of the second fitting functions includes: Determine the determination coefficients for each of the second fitting functions; The second fitting function with the largest coefficient of determination is selected as the first fitting function.
5. An output voltage calibration method according to claim 3 or 4, characterized in that, The fitting algorithm can be any one of linear fitting, quadratic curve fitting, and higher-order curve fitting.
6. The output voltage calibration method according to claim 2, characterized in that, The acquisition of the second actual output voltage corresponding to the second set voltage output by the power supply equipment includes: The actual output voltage of the power supply equipment is sampled multiple times to obtain multiple voltage sample values corresponding to the second set voltage. The multiple voltage sample values are filtered to obtain the second actual output voltage corresponding to the second set voltage.
7. The output voltage calibration method according to claim 6, characterized in that, The step of filtering the multiple voltage sample values to obtain the second actual output voltage corresponding to the second set voltage includes: The average value of the voltage sample values other than the target voltage sample value among the multiple voltage sample values is taken as the second actual output voltage corresponding to the second set voltage. The target voltage sample value includes at least one of the following voltage sample values: The first m voltage sample values arranged from largest to smallest among the multiple voltage sample values, where m is an integer greater than or equal to 1; The last n voltage sample values arranged from largest to smallest among the multiple voltage sample values, where n is an integer greater than or equal to 1; Voltage sample values that are outside the preset voltage range.
8. The output voltage calibration method according to claim 1, characterized in that, When the second voltage correspondence is the third fitting function, the third fitting function is: Vin = K1 * Vset + B1, where Vin is the theoretical output voltage, Vset is the set voltage, and K1 and B1 are known constants determined by the hardware circuit parameters of the power supply device.
9. A power supply device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the output voltage calibration method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the output voltage calibration method according to any one of claims 1 to 8.