Power supply control method, power supply and computer program product
By utilizing the feedback time relationship between the current loop and voltage loop control modules in power supply control and selecting the control module with smaller feedback time for switching, the problem of uneven voltage and current waveforms is solved, and smooth switching of voltage and current is achieved.
Patent Information
- Application Number
- CN202510851143.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-24
AI Technical Summary
During the power switching process, the voltage and current waveforms are prone to become non-smooth, resulting in overshoot and inflection points.
Based on the feedback time relationship between the current loop control module and the voltage loop control module, the control module with the smaller feedback time is selected for control to avoid uneven voltage and current waveforms.
A smooth transition of voltage and current switching is achieved, avoiding overshoot and inflection points.
Smart Images

Figure CN120415079B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power supply technology, and in particular to a power supply control method, a power supply, and a computer program product. Background Art
[0002] Some power supplies need to control the source output value and limit the output value during output. For example, a source meter can be used as both a source for output and a meter for measurement. When the source output of the source meter is a voltage output, the current output is limited. Conversely, when the source output is a current output, the voltage output is limited.
[0003] The voltage and current control schemes for power supplies are typically based on PID (Proportional-Integral-Derivative) feedback control, for example, voltage control based on voltage PID and current control based on current PID. However, when switching between voltage and current based on voltage PID and current PID, the voltage and current waveforms are prone to unevenness, resulting in overshoot and inflection points. New technical solutions are needed to address this issue. Summary of the Invention
[0004] The main technical problem solved by this application is that voltage switching and current switching are not smooth.
[0005] According to a first aspect, an embodiment provides a power supply control method, wherein the power supply controls current output based on a current loop control module and controls voltage output based on a voltage loop control module, the control method comprising:
[0006] Obtaining a currently configured target output value and target limit value; wherein, when the target output value is a voltage output value, the target limit value is a current limit value; when the target output value is a current output value, the target limit value is a voltage limit value;
[0007] Obtaining a voltage value and a current value measured by the current circuit, and determining whether a source working mode is satisfied based on the voltage value and the current value measured by the current circuit;
[0008] If the voltage value measured by the current circuit and the current value measured by the current circuit meet the source working mode, then based on the target output value, the target limit value, the voltage value measured by the current circuit and the current value measured by the current circuit, determine the feedback time relationship between the current loop control module and the voltage loop control module; wherein the feedback time of the current loop control module is used to characterize the time for the current controlled by the current loop control module to rise to the current limit value or the current output value, and the feedback time of the voltage loop control module is used to characterize the time for the voltage controlled by the voltage loop control module to rise to the voltage limit value or the voltage output value;
[0009] If the feedback time of the current loop control module is less than the feedback time of the voltage loop control module, controlling the current loop control module to reach the current limit value or the current output value among the target output value and the target limit value;
[0010] If the feedback time of the current loop control module is greater than the feedback time of the voltage loop control module, the voltage loop control module is controlled to achieve the voltage limit value or the voltage output value among the target output value and the target limit value.
[0011] In some embodiments, determining the feedback time relationship between the current loop control module and the voltage loop control module includes:
[0012] Calculating an equivalent resistance value based on the target output value and the target limit value;
[0013] Determining whether the voltage value and the current value measured by the current circuit are stably output, and if so, calculating the resistance value of the current circuit based on the voltage value and the current value measured by the current circuit;
[0014] If the equivalent resistance value is greater than the current circuit resistance value, the feedback time of the current loop control module is greater than the feedback time of the voltage loop control module;
[0015] If the equivalent resistance value is smaller than the current circuit resistance value, the feedback time of the current loop control module is smaller than the feedback time of the voltage loop control module.
[0016] In some embodiments, determining whether the voltage value and the current value measured by the current circuit are output stably includes:
[0017] Acquire a first ratio between the voltage value measured by the current circuit and a voltage limit value or a voltage output value among the target output value and the target limit value;
[0018] Acquire a second ratio between the current value measured by the current circuit and the current limit value or the current output value among the target output value and the target limit value;
[0019] If the first ratio satisfies a first preset range and the second ratio satisfies a second preset range, the voltage value and the current value measured by the current circuit are output stably.
[0020] In some embodiments, the first preset range is a first preset ratio greater than zero to a second preset ratio less than one; and / or, the second preset range is a third preset ratio greater than zero to a fourth preset ratio less than one.
[0021] In some embodiments, the determining whether the source operation mode is satisfied based on the voltage value and the current value measured by the current circuit includes:
[0022] Determining whether the current value measured by the current circuit is greater than zero, and determining whether the voltage value measured by the current circuit is greater than zero;
[0023] If the current value measured by the current circuit is greater than zero, and the voltage value measured by the current circuit is greater than zero, then the source working mode is satisfied;
[0024] or,
[0025] If the current value measured by the current circuit is less than zero, and the voltage value measured by the current circuit is less than zero, then the source working mode is satisfied;
[0026] or,
[0027] A ratio between the current value measured by the current circuit and the voltage value measured by the current circuit is obtained. If the ratio is a positive value, the source working mode is satisfied.
[0028] In some embodiments, the current loop control module includes a current increment calculation module and a first integration module; the current increment calculation module calculates the corresponding current output increment based on the target current value and the current value measured by the current circuit using a preset feedback algorithm; the first integration module is used to perform an integration operation on the current output increment, and the result of the integration operation is used to control the current output;
[0029] and / or,
[0030] The voltage loop control module includes a voltage increment calculation module and a second integration module; the voltage increment calculation module calculates the corresponding voltage output increment based on the target voltage value and the voltage value measured by the current circuit using a preset feedback algorithm, and the second integration module is used to perform an integration operation on the voltage output increment, and the result of the integration operation is used to control the voltage output.
[0031] In some embodiments, the first integration module and the second integration module are a common integration module, and the power supply further selects the common integration module to perform an integration operation on the current output increment or the voltage output increment based on a selection module, and the control method further includes:
[0032] When the current output is controlled based on the current loop control module, the selection module is controlled to select the common integration module to perform an integration operation on the current output increment;
[0033] When the voltage output is controlled based on the voltage loop control module, the selection module is controlled to select the common integration module to perform an integration operation on the voltage output increment.
[0034] In some embodiments, if the feedback time of the current loop control module is less than the feedback time of the voltage loop control module, the control method further includes:
[0035] If the voltage loop control module is currently controlling the target output value and the target limit value to reach the voltage limit value or the voltage output value, and the voltage value currently measured by the circuit is less than the voltage limit value or the voltage output value, the voltage loop control module switches to the current loop control module;
[0036] or,
[0037] If the feedback time of the current loop control module is greater than the feedback time of the voltage loop control module, the control method further includes:
[0038] If the current loop control module is currently controlling the current limit value or current output value among the target output value and the target limit value, and the current value measured by the current circuit is less than the current limit value or current output value, the current loop control module switches to the voltage loop control module.
[0039] According to a second aspect, an embodiment provides a power supply control method, wherein the power supply controls current output based on a current loop control module and controls voltage output based on a voltage loop control module, the control method comprising:
[0040] Obtaining a currently configured target output value and target limit value; wherein, when the target output value is a voltage output value, the target limit value is a current limit value; when the target output value is a current output value, the target limit value is a voltage limit value;
[0041] Obtaining a voltage value and a current value measured by the current circuit, and determining whether a source working mode is satisfied based on the voltage value and the current value measured by the current circuit;
[0042] If the voltage value measured by the current circuit and the current value measured by the current circuit meet the source operation mode, determining a control module corresponding to when the target output value or the target limit value is reached based on the target output value, the target limit value, the voltage value measured by the current circuit and the current value measured by the current circuit;
[0043] If the corresponding control module is controlled by the current loop control module, then achieving the current limit value or the current output value among the target output value and the target limit value based on the control of the current loop control module;
[0044] If the corresponding control module is controlled by the voltage loop control module, the voltage limit value or the voltage output value among the target output value and the target limit value is achieved based on the control of the voltage loop control module.
[0045] In some embodiments, the control module corresponding to the determination of reaching the target output value or reaching the target limit value includes:
[0046] Calculating an equivalent resistance value based on the target output value and the target limit value;
[0047] Determining whether the voltage value and the current value measured by the current circuit are stably output, and if so, calculating the resistance value of the current circuit based on the voltage value and the current value measured by the current circuit;
[0048] If the equivalent resistance value is greater than the current circuit resistance value, the corresponding control module is controlled by the voltage loop control module;
[0049] If the equivalent resistance value is smaller than the current circuit resistance value, the corresponding control module is controlled by the current loop control module.
[0050] According to a third aspect, an embodiment provides a power supply, comprising:
[0051] Source output module, used for voltage output and current output;
[0052] A current measurement module is used to measure the current of the load;
[0053] A voltage measurement module is used to measure the voltage of the load;
[0054] A processor is configured to implement the method described in the first aspect or the second aspect when executing a computer program and / or instructions.
[0055] According to a fourth aspect, an embodiment provides a computer program product, comprising a computer program and / or instructions, which implement the method described in the first aspect or the second aspect when executed by a processor.
[0056] According to the power supply control method, power supply, and computer program product of the above-mentioned embodiment, the voltage value and current value measured by the current circuit are first obtained. If they meet the source working mode, the feedback time relationship between the current loop control module and the voltage loop control module is determined based on the target output value, the target limit value, the voltage value and the current value measured by the current circuit. When the feedback time of the current loop control module is less than the feedback time of the voltage loop control module, the output of the power supply will reach the corresponding current value more quickly. At this time, the current loop control module is used to control the current limit value or current output value between the target output value and the target limit value to avoid voltage overshoot. Conversely, the output of the power supply will reach the corresponding voltage value more quickly. At this time, the voltage loop control module is used to control the voltage limit value or voltage output value between the target output value and the target limit value to avoid current overshoot. Since the power supply output can be switched to the control module with the shorter feedback time to control the power supply output, voltage switching and current switching can be performed smoothly, thereby avoiding overshoot and inflection points. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a schematic structural diagram of a power supply according to an embodiment;
[0058] Figure 2 is a schematic structural diagram of a power supply according to another embodiment;
[0059] Figure 3 1 is a schematic structural diagram of a source output module according to an embodiment;
[0060] Figure 4 This is a schematic structural diagram of a voltage measurement module according to an embodiment;
[0061] Figure 5 Schematic diagram of the feedback control structure of an embodiment;
[0062] Figure 6 A schematic flow chart of a power control method according to an embodiment;
[0063] Figure 7 Schematic diagram of current range and voltage range of an embodiment. DETAILED DESCRIPTION
[0064] The present application is further described in detail below by means of specific embodiments in conjunction with the accompanying drawings. Similar elements in different embodiments are numbered with associated similar elements. In the following embodiments, many detailed descriptions are provided to enable the present application to be better understood. However, those skilled in the art will readily appreciate that some of the features may be omitted in different circumstances, or may be replaced by other elements, materials, or methods. In some cases, some operations related to the present application are not shown or described in the specification. This is to avoid the core portion of the present application being overwhelmed by excessive descriptions. For those skilled in the art, it is not necessary to describe these related operations in detail, and the related operations can be fully understood based on the description in the specification and the general technical knowledge in the art.
[0065] In addition, the features, operations, or characteristics described in the specification may be combined in any appropriate manner to form various embodiments. Furthermore, the steps or actions in the method description may be reordered or adjusted in a manner readily apparent to those skilled in the art. Therefore, the various sequences in the specification and drawings are provided solely for the purpose of clearly describing a particular embodiment and are not intended to be mandatory, unless otherwise specified.
[0066] Component numbers used herein, such as "first" and "second," are used solely to distinguish the components being described and do not convey any sequential or technical meaning. References to "connection" and "coupling" in this application, unless otherwise specified, include both direct and indirect connections (couplings).
[0067] Some embodiments provide a power supply capable of controlling source output and limiting output. For example, the power supply may be a source meter that can output voltage and current as a source and measure voltage and current as a meter, thereby enabling control of source output and limiting output respectively. Figure 1 The power supply includes a source output module 10, a current measurement module 20, a voltage measurement module 30 and a processor 40, which are described in detail below.
[0068] The source output module 10 is used for voltage output and current output.
[0069] In some embodiments, the source output module 10 can be in a voltage source mode or a current source mode under the control of a processor, wherein the voltage source mode can output a constant voltage or a current limited in the voltage source mode. The current source mode can output a constant current or a voltage limited in the current source mode.
[0070] Please refer to Figure 2In some embodiments, the source output module 10 includes a DAC (digital-to-analog converter) and an op amp module. The DAC is used to convert a digital signal (codeword) representing a voltage or current value into an analog signal output, thereby achieving an analog voltage output or analog current output of the corresponding amplitude. The op amp module is used to amplify or reduce the analog voltage output or analog current output and then output it as the output of the source output module 10 to meet output requirements.
[0071] Please refer to Figure 3 In some embodiments, the operational amplifier module includes an operational amplifier and multiple resistor groups (e.g., resistor Ri1, resistor Ri2, resistor Ri3, and resistor Ri4). Each resistor group may include one or more resistors. Different resistor groups can enable the operational amplifier to have different amplification factors or reduction factors. Therefore, different resistor groups can be selected to adjust the output of the amplifier, so that different resistor groups can correspond to different output ranges of the operational amplifier. By adjusting the operational amplifier to connect to different resistor groups, the corresponding output range can be adjusted.
[0072] The current measurement module 20 is used to measure the current of the load.
[0073] Please refer to Figure 2 In some embodiments, the current measurement module 20 includes a sampling resistor group, an operational amplifier, and an ADC (analog-to-digital converter). The sampling resistor group includes multiple sampling resistors (resistor R1, resistor R2, ..., resistor Rn), which are connected in series with the load to collect the load current. Specifically, the amplifier obtains the voltage across each sampling resistor, amplifies it, and outputs it to the analog-to-digital converter. The analog-to-digital converter converts the voltage into a digital form and outputs it to the processor. The processor calculates the current value measured by the corresponding sampling resistor based on the voltage value. Different sampling resistors have different resistance values, so different current measurement ranges can be selected by connecting different sampling resistors.
[0074] The voltage measurement module 30 is used to measure the voltage of the load.
[0075] Please refer to Figure 2 In some embodiments, the voltage measurement module 30 includes an op amp module and an ADC (analog-to-digital converter). The op amp module's input is connected to the load's input, i.e., the op amp module's input is bypass-connected to the source meter's output. The op amp module amplifies or reduces the voltage at its input and outputs it to the ADC. The ADC converts the voltage to digital and outputs it to the processor, which calculates the corresponding voltage value.
[0076] Please refer to Figure 4In some embodiments, the operational amplifier module includes an operational amplifier and multiple resistor groups (e.g., resistor Rv1, resistor Rv2, resistor Rv3, and resistor Rv4). Each resistor group may include one or more resistors. Different resistor groups can enable the operational amplifier to have different amplification factors or reduction factors. Therefore, selecting different resistor groups can correspond to different output ranges of the operational amplifier, so that the corresponding voltage measurement range can be adjusted by adjusting the operational amplifier to connect to different resistor groups.
[0077] The processor 40 is used to control the source output module 10, the current measurement module 20, and the voltage measurement module 30, for example, controlling the configuration mode and output range of the source output module 10 to meet output requirements. Configuration modes include voltage source mode and current source mode. For example, configuring the current configuration mode to voltage source mode, as well as the voltage output value, current limit value (including positive current limit value and negative current limit value), and current measurement range in voltage source mode, can be configured. For example, configuring the current configuration mode to current source mode, as well as the current output value, voltage limit value (including positive voltage limit value and negative voltage limit value), and voltage measurement range in current source mode can be configured. The processor 40 can also control the current measurement range of the current measurement module 20 to meet current measurement accuracy requirements, and control the voltage measurement range of the voltage measurement module 30 to meet voltage measurement accuracy requirements. In some embodiments, the processor can be implemented based on a device with processing capabilities, such as an FPGA, a CPU, or a single-chip microcomputer.
[0078] In some embodiments, in both voltage source mode and current source mode, the processor 40 can control the output of the source output module 10 based on the current loop control module and the voltage loop control module, wherein the current loop control module is used to control the output current of the source output module 10 to meet the demand, and the voltage loop control module is used to control the output voltage of the source output module 10 to meet the demand, such as setting the target output current of the current loop control module. At this time, the current loop control module controls the output of the source output module 10 based on the target output current, and obtains the current output current based on the current measurement module 20. The current loop control module calculates the difference between the current output current and the target output current, and then adjusts the output of the source output module 10 based on the difference, so that the output of the source output module 10 reaches the target output current through feedback control. For example, when the output current is greater than the target output current, the output current is reduced to the target output current based on the calculation of the difference by the current loop control module. On the contrary, when the output current is less than the target output current, the output current is increased to the target output current. At this time, the current loop control module plays a controlling role. Among them, the voltage loop control module controls the output voltage and can refer to the current loop control module to control the output current, which will not be repeated here.
[0079] Please refer to Figure 5In some embodiments, the current loop control module includes a current increment calculation module 50 and a first integration module; the current increment calculation module 50 calculates the corresponding current output increment based on the target current value and the current value measured by the current circuit by a preset feedback algorithm, and the first integration module is used to perform an integration operation on the current output increment, and the result of the integration operation is used to control the current output.
[0080] In some embodiments, the voltage loop control module includes a voltage increment calculation module 60 and a second integration module; the voltage increment calculation module 60 calculates the corresponding voltage output increment based on the target voltage value and the voltage value measured by the current circuit by a preset feedback algorithm, and the second integration module is used to perform an integration operation on the voltage output increment, and the result of the integration operation is used to control the voltage output. Among them, the source output module 10 adjusts the current output based on the result of the current output increment integration operation, or adjusts the voltage output based on the result of the voltage output increment integration operation. Among them, the preset feedback algorithm adopted by the voltage increment calculation module 60 and the current increment calculation module 50 can be a PID feedback algorithm, and the specific implementation process of the feedback control algorithm will not be repeated here, and it can also be other existing feedback control algorithms. Among them, the integration module integrates the increment, so the feedback algorithm adopted by the voltage loop control module as a whole can also be called an incremental PID feedback algorithm.
[0081] In some embodiments, the preset feedback algorithm is the following formula:
[0082] Δu(k)=Kp[e(k)−e(k−1)]+Kie(k)+Kd[e(k)−2e(k−1)+e(k−2)];
[0083] Among them, Δu(k) is the voltage output increment or current output increment; e(k) is the error of K at the current moment, that is, the difference between the target output value and the current output value; Kp is the proportional coefficient, which determines the impact of the current error on the control quantity; Ki is the integral coefficient, which determines the impact of the error accumulation on the control quantity; Kd is the differential coefficient, which determines the impact of the error change rate on the control quantity.
[0084] The integral module performs the integral operation of the incremental PID, namely:
[0085] u(k)=u(k-1)+ Δu(k).
[0086] Among them, u(k) is the integration result of K at the current moment.
[0087] Please refer to Figure 5In some embodiments, the first integration module and the second integration module are a shared integration module 80. That is, the voltage loop control module and the current loop control module share a common integration module. In this case, the processor 40 further selects the shared integration module 80 based on the selection module 70 to perform an integration operation on the current output increment or the voltage output increment. That is, the selection module 70 is configured to select whether to integrate Δu(k) corresponding to the current output increment or Δu(k) corresponding to the voltage output increment.
[0088] For example, when the voltage loop control module is active, the control selection module 70 selects the shared integration module 80 to perform an integration operation on the voltage output increment output by the voltage increment calculation module 60. When the voltage loop control module switches to the current loop control module, the control selection module 70 selects the shared integration module 80 to continue performing an integration operation on the current output increment output by the current increment calculation module 50. In this embodiment, because the voltage loop control module and the current loop control module share a common integration module, desaturation is not required when switching between the voltage loop control module and the current loop control module, thereby avoiding desaturation issues and achieving faster power supply output response and stability.
[0089] In some embodiments, the above-mentioned current loop control module and voltage loop control module can be implemented based on software, for example, the processor 40 executes computer programs and / or instructions to implement the corresponding control functions of the selection module, current loop control module and voltage loop control module.
[0090] In some embodiments, both the current loop control module and the voltage loop control module can be implemented in hardware. In this case, the power supply further includes the selection module, the current loop control module, and the voltage loop control module. In some embodiments, the current loop control module and the voltage loop control module can also be implemented in hardware plus software.
[0091] The above is some description of the power supply. The following is a detailed description of the power supply control method. Some embodiments provide a power supply control method that can be applied to the above power supply. Figure 6 , the power control method may include the following steps:
[0092] Step 100: Obtain the target output value and target limit value of the current configuration.
[0093] In some embodiments, when the target output value is a voltage output value, the target limit value is a current limit value, which corresponds to the voltage source mode; when the target output value is a current output value, the target limit value is a voltage limit value, which corresponds to the current source mode.
[0094] In some embodiments, the power supply can obtain the target output value and target limit value configured by the user based on the corresponding control panel, for example, based on a touch screen, buttons, knobs, etc., or it can obtain the target output value and target limit value sent by the user based on wired communication and wireless communication.
[0095] Step 110: Obtain the voltage value and the current value measured by the current circuit, and determine whether the source working mode is satisfied.
[0096] The source working mode refers to the working mode in which the power supply acts as a source. In some embodiments, specifically when judging whether the source working mode is satisfied based on the voltage value measured by the current circuit and the current value measured by the current circuit, it can be judged whether the current value measured by the current circuit is greater than zero, and whether the voltage value measured by the current circuit is greater than zero. If the current value measured by the current circuit is greater than zero, and the voltage value measured by the current circuit is greater than zero, then the power supply satisfies the source working mode, and at this time the power supply outputs voltage and current to the load. Alternatively, if the current value measured by the current circuit is less than zero, and the voltage value measured by the current circuit is less than zero, then the power supply also satisfies the source working mode, and at this time the power supply is input with voltage and current by the load. In some embodiments, it is also possible to directly obtain the ratio between the current value measured by the current circuit and the voltage value measured by the current circuit. If the ratio is a positive value, then the power supply satisfies the source working mode.
[0097] Step 120: If satisfied, determine the feedback time relationship between the current loop control module and the voltage loop control module.
[0098] In some embodiments, the target output value and the target limit value represent desired output values, while the voltage value and the current current value measured by the circuit represent actual output values achieved. When the desired output value and the actual output value are inconsistent, the power supply continues to increase its output to achieve at least one of the target output value and the target limit value. The power supply may continue to increase its output by controlling the current loop control module or by controlling the voltage loop control module.
[0099] Since both the current loop control module and the voltage loop control module can perform control, the prior art generally does not deliberately select one of them for control, but allows the current loop control module and the voltage loop control module to compete freely.
[0100] In this regard, the inventors discovered that when the power supply continues to increase its output and reaches at least one of the target output value and the target limit value, the voltage waveform and the current waveform are prone to being non-smooth, resulting in overshoot and inflection points. Furthermore, the inventors discovered that when the power supply continues to increase its output and reaches at least one of the target output value and the target limit value, the feedback time of the current loop control module and the feedback time of the voltage loop control module are different. Specifically, when control is performed based on a control module with a shorter feedback time, the voltage waveform and the current waveform are less likely to be non-smooth, thereby avoiding overshoot and inflection points. Conversely, when control is performed based on a control module with a longer feedback time, the voltage waveform and the current waveform are prone to being non-smooth, resulting in overshoot and inflection points.
[0101] In summary, when the power supply continues to increase its output, the present application will determine the feedback time relationship between the current loop control module and the voltage loop control module, and select the control module with a smaller feedback time for control, so as to avoid overshoot and inflection points.
[0102] Furthermore, the inventors have discovered that as the power supply continues to increase its output and reaches at least one of a target output value and a target limit value, if the current control module is consistent with the control module corresponding to the time when the target output value or target limit value was reached, the voltage and current waveforms are less likely to be uneven, thereby avoiding overshoot and inflection points. Conversely, if the current control module is inconsistent with the control module corresponding to the time when the target output value or target limit value was reached, the voltage and current waveforms are more likely to be uneven, resulting in overshoot and inflection points.
[0103] In summary, in the process of the power supply continuing to increase its output, the present application can also determine the control module corresponding to when the target output value or the target limit value is reached, and select the control module for control to avoid overshoot and inflection point.
[0104] In some embodiments, the feedback timing relationship between the current loop control module and the voltage loop control module can be determined based on the target output value, the target limit value, the current circuit measured voltage value, and the current circuit measured current value. Specifically, the feedback timing relationship between the current loop control module and the voltage loop control module can be determined based on the relationship between the target output value and the target limit value and the current circuit measured voltage value and the current circuit measured current value.
[0105] In some embodiments, when determining the feedback time relationship between the current loop control module and the voltage loop control module, an equivalent resistance value is first calculated based on the target output value and the target limit value, that is, based on the voltage value in the target output value and the target limit value divided by the current value. Then, it is determined whether the voltage value and the current value measured by the current circuit are output stably. If they are output stably, the current circuit resistance value is calculated based on the voltage value and the current value measured by the current circuit. If the equivalent resistance value is greater than the current circuit resistance value, the feedback time of the current loop control module is greater than the feedback time of the voltage loop control module; if the equivalent resistance value is less than the current circuit resistance value, the feedback time of the current loop control module is less than the feedback time of the voltage loop control module.
[0106] In some embodiments, the control module corresponding to when the target output value or the target limit value is reached can be determined based on the target output value, the target limit value, the voltage value currently measured by the circuit, and the current value currently measured by the circuit. That is, the control module corresponding to when the target output value or the target limit value is reached can be determined based on the relationship between the target output value and the target limit value and the voltage value currently measured by the circuit and the current value currently measured by the circuit.
[0107] In some embodiments, when determining the control module corresponding to reaching a target output value or a target limit value, an equivalent resistance value is first calculated based on the target output value and the target limit value. Then, a determination is made as to whether the current circuit voltage and current values are output stably. If so, the current circuit resistance value is calculated based on the current circuit voltage and current values. If the equivalent resistance value is greater than the current circuit resistance value, the corresponding control module is controlled by the voltage loop control module; if the equivalent resistance value is less than the current circuit resistance value, the corresponding control module is controlled by the current loop control module.
[0108] In the above embodiment, a predicted resistance value may be calculated based on the target output value and the target limit value, and then compared with the actual resistance value of the current circuit. If the predicted resistance value is greater than the actual resistance value of the current circuit, it can be determined that the feedback time of the voltage loop control module is short. Otherwise, it can be determined that the feedback time of the current loop control module is short. Alternatively, it can be determined that the corresponding control module is reached when the target output value or the target limit value is reached.
[0109] In the above embodiment, if the voltage value and the current value measured by the current circuit are unstable, the voltage value and the current value measured by the current circuit cannot relatively truly reflect the current circuit resistance value. Therefore, it is necessary to first determine whether the output is stable, and calculate the current circuit resistance value when the output is stable, so that the voltage value and the current value measured by the current circuit can relatively truly reflect the current circuit resistance value.
[0110] In some embodiments, when determining whether the voltage value and current value currently measured by the circuit are stably output, a first ratio between the voltage value currently measured by the circuit and the voltage limit value or the voltage output value among the target output value and the target limit value is first obtained, and a second ratio between the current value currently measured by the circuit and the current limit value or the current output value among the target output value and the target limit value is obtained. If the first ratio satisfies a first preset range and the second ratio satisfies a second preset range, then the voltage value and current value currently measured by the circuit are stably output. In this embodiment, whether the output is stable can be determined based on whether the voltage value and current value currently measured by the circuit are within the preset range of the target output value and the target limit value.
[0111] Please refer to Figure 7 In some embodiments, the first preset range is a first preset ratio greater than zero to a second preset ratio less than one. In some embodiments, the second preset range is a third preset ratio greater than zero to a fourth preset ratio less than one. In this embodiment, the first preset range and the second preset range are both between 0 and 1, and the first preset ratio and the third preset ratio are both different from 0 by a preset value, and the second preset ratio and the fourth preset ratio are both different from 1 by a preset value. The purpose is to avoid switching the control module near the boundary between the target output value and the target limit value. If the control module is switched near the boundary, it will cause the voltage waveform and current waveform of the power supply to overshoot. Please refer to Figure 7 The voltage limit value or voltage output value in the target output value and the target limit value corresponds to D, the voltage value corresponding to the first preset ratio corresponding to D is C, and the voltage value corresponding to the second preset ratio corresponding to D is D. The current limit value or current output value in the target output value and the target limit value corresponds to A, the current value corresponding to the third preset ratio corresponding to A is a, and the voltage value corresponding to the fourth preset ratio is b. For example, the first preset ratio and the third preset ratio are 1%, and the second preset ratio and the fourth preset ratio are both 99%.
[0112] Step 130: Control to reach the target output value or target limit value.
[0113] In some embodiments, if the corresponding control module is controlled by a current loop control module, the current limit value or current output value among the target output value and the target limit value is achieved based on the current loop control module control; if the corresponding control module is controlled by a voltage loop control module, the voltage limit value or voltage output value among the target output value and the target limit value is achieved based on the voltage loop control module control.
[0114] In some embodiments, if the feedback time of the current loop control module is shorter than the feedback time of the voltage loop control module, the current loop control module is used to control the current limit value or current output value, whichever is greater, between the target output value and the target limit value. In this case, because the feedback time of the current loop control module is shorter, the current output of the power supply can smoothly reach the current limit value or current output value, and the voltage output will not exceed the voltage limit value or voltage output value.
[0115] In some embodiments, when control based on the current loop control module is required, if the voltage loop control module is currently controlling to reach the voltage limit value or voltage output value among the target output value and the target limit value, and the voltage value measured by the current circuit is less than the voltage limit value or voltage output value, the voltage loop control module switches to the current loop control module.
[0116] In some embodiments, if the feedback time of the current loop control module is longer than the feedback time of the voltage loop control module, the voltage loop control module is used to control the target output value and the target limit value to the voltage limit value or the voltage output value. In this case, because the feedback time of the voltage loop control module is shorter, the voltage output of the power supply can smoothly reach the voltage limit value or the voltage output value, and the current output does not exceed the current limit value or the current output value.
[0117] In some embodiments, when control based on the voltage loop control module is required, if the current loop control module is currently controlling to reach the current limit value or current output value among the target output value and the target limit value, and the current value measured by the current circuit is less than the current limit value or current output value, the current loop control module switches to the voltage loop control module.
[0118] In the above embodiment, based on the real-time changes of the voltage value measured by the current circuit and the current value measured by the current circuit, the control module can be switched once or multiple times until the target output value or the target limit value is reached, or the voltage value measured by the current circuit and the current value measured by the current circuit do not meet the requirements for stable output.
[0119] Some embodiments provide a computer-readable storage medium having a program stored thereon. The program can be executed by a processor to implement the above-mentioned power control method.
[0120] Some embodiments provide a computer program product, including a computer program and / or instructions, which implement the above-mentioned power control method when the computer program and / or instructions are executed by a processor.
[0121] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer program. When all or part of the functions in the above embodiments are implemented by computer program, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above functions can be implemented. In addition, when all or part of the functions in the above embodiments are implemented by computer program, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and saved in the memory of the local device by downloading or copying, or the system of the local device is updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be implemented.
[0122] The above specific examples are used to illustrate the present application, which is only used to help understand the present application and is not intended to limit the present application. For those skilled in the art of the present application, based on the concept of the present application, they can also make some simple deductions, modifications or substitutions.
Claims
1. A power supply control method, characterized in that: The power supply controls current output based on a current loop control module and controls voltage output based on a voltage loop control module. The control method includes: Obtaining a currently configured target output value and target limit value; wherein, when the target output value is a voltage output value, the target limit value is a current limit value; when the target output value is a current output value, the target limit value is a voltage limit value; Obtaining a voltage value and a current value measured by the current circuit, and determining whether a source working mode is satisfied based on the voltage value and the current value measured by the current circuit; If the voltage value measured by the current circuit and the current value measured by the current circuit meet the source working mode, then based on the target output value, the target limit value, the voltage value measured by the current circuit and the current value measured by the current circuit, determine the feedback time relationship between the current loop control module and the voltage loop control module; wherein the feedback time of the current loop control module is used to characterize the time for the current controlled by the current loop control module to rise to the current limit value or the current output value, and the feedback time of the voltage loop control module is used to characterize the time for the voltage controlled by the voltage loop control module to rise to the voltage limit value or the voltage output value; If the feedback time of the current loop control module is less than the feedback time of the voltage loop control module, controlling the current loop control module to reach the current limit value or the current output value among the target output value and the target limit value; If the feedback time of the current loop control module is greater than the feedback time of the voltage loop control module, the voltage loop control module is controlled to achieve the voltage limit value or the voltage output value among the target output value and the target limit value.
2. The power control method according to claim 1, wherein: Determining the feedback time relationship between the current loop control module and the voltage loop control module includes: Calculating an equivalent resistance value based on the target output value and the target limit value; Determining whether the voltage value and the current value measured by the current circuit are stably output, and if so, calculating the resistance value of the current circuit based on the voltage value and the current value measured by the current circuit; If the equivalent resistance value is greater than the current circuit resistance value, the feedback time of the current loop control module is greater than the feedback time of the voltage loop control module; If the equivalent resistance value is smaller than the current circuit resistance value, the feedback time of the current loop control module is smaller than the feedback time of the voltage loop control module.
3. The power control method according to claim 2, wherein: The determining whether the voltage value and the current value measured by the current circuit are output stably includes: Acquire a first ratio between the voltage value measured by the current circuit and a voltage limit value or a voltage output value among the target output value and the target limit value; Acquire a second ratio between the current value measured by the current circuit and the current limit value or the current output value among the target output value and the target limit value; If the first ratio satisfies a first preset range and the second ratio satisfies a second preset range, the voltage value and the current value measured by the current circuit are output stably.
4. The power control method according to claim 3, wherein: The first preset range is a first preset ratio greater than zero to a second preset ratio less than one; and / or the second preset range is a third preset ratio greater than zero to a fourth preset ratio less than one.
5. The power control method according to claim 1, wherein: The determining whether the source operation mode is satisfied based on the voltage value and the current value measured by the current circuit includes: Determining whether the current value measured by the current circuit is greater than zero, and determining whether the voltage value measured by the current circuit is greater than zero; If the current value measured by the current circuit is greater than zero, and the voltage value measured by the current circuit is greater than zero, then the source working mode is satisfied; or, If the current value measured by the current circuit is less than zero, and the voltage value measured by the current circuit is less than zero, then the source working mode is satisfied; or, A ratio between the current value measured by the current circuit and the voltage value measured by the current circuit is obtained. If the ratio is a positive value, the source working mode is satisfied.
6. The power control method according to claim 1, wherein: The current loop control module includes a current increment calculation module and a first integration module; the current increment calculation module calculates the corresponding current output increment based on the target current value and the current value measured by the current circuit using a preset feedback algorithm; the first integration module is used to perform an integration operation on the current output increment, and the result of the integration operation is used to control the current output; and / or, The voltage loop control module includes a voltage increment calculation module and a second integration module; the voltage increment calculation module calculates the corresponding voltage output increment based on the target voltage value and the voltage value measured by the current circuit using a preset feedback algorithm, and the second integration module is used to perform an integration operation on the voltage output increment, and the result of the integration operation is used to control the voltage output.
7. The power control method according to claim 6, wherein: The first integration module and the second integration module are shared common integration modules, and the power supply further selects the shared integration module based on the selection module to perform an integration operation on the current output increment or the voltage output increment. The control method further includes: When the current output is controlled based on the current loop control module, the selection module is controlled to select the common integration module to perform an integration operation on the current output increment; When the voltage output is controlled based on the voltage loop control module, the selection module is controlled to select the common integration module to perform an integration operation on the voltage output increment.
8. The power control method according to claim 1 or 7, wherein: If the feedback time of the current loop control module is less than the feedback time of the voltage loop control module, the control method further includes: If the voltage loop control module is currently controlling the target output value and the target limit value to reach the voltage limit value or the voltage output value, and the voltage value currently measured by the circuit is less than the voltage limit value or the voltage output value, the voltage loop control module switches to the current loop control module; or, If the feedback time of the current loop control module is greater than the feedback time of the voltage loop control module, the control method further includes: If the current loop control module is currently controlling the current limit value or current output value among the target output value and the target limit value, and the current value measured by the current circuit is less than the current limit value or current output value, the current loop control module switches to the voltage loop control module.
9. A power supply control method, characterized in that: The power supply controls current output based on a current loop control module and controls voltage output based on a voltage loop control module. The control method includes: Obtaining a currently configured target output value and target limit value; wherein, when the target output value is a voltage output value, the target limit value is a current limit value; when the target output value is a current output value, the target limit value is a voltage limit value; Obtaining a voltage value and a current value measured by the current circuit, and determining whether a source working mode is satisfied based on the voltage value and the current value measured by the current circuit; If the voltage value measured by the current circuit and the current value measured by the current circuit meet the source operation mode, determining a control module corresponding to when the target output value or the target limit value is reached based on the target output value, the target limit value, the voltage value measured by the current circuit and the current value measured by the current circuit; If the corresponding control module is controlled by the current loop control module, then achieving the current limit value or the current output value among the target output value and the target limit value based on the control of the current loop control module; If the corresponding control module is controlled by the voltage loop control module, the voltage limit value or the voltage output value among the target output value and the target limit value is achieved based on the control of the voltage loop control module.
10. The power control method according to claim 9, wherein: The control module corresponding to the determination of reaching the target output value or reaching the target limit value includes: Calculating an equivalent resistance value based on the target output value and the target limit value; Determining whether the voltage value and the current value measured by the current circuit are stably output, and if so, calculating the resistance value of the current circuit based on the voltage value and the current value measured by the current circuit; If the equivalent resistance value is greater than the current circuit resistance value, the corresponding control module is controlled by the voltage loop control module; If the equivalent resistance value is smaller than the current circuit resistance value, the corresponding control module is controlled by the current loop control module.
11. A power supply, characterized in that: include: Source output module, used for voltage output and current output; A current measurement module is used to measure the current of the load; A voltage measurement module is used to measure the voltage of the load; A processor, configured to implement the method according to any one of claims 1 to 10 when executing a computer program and / or instructions.
12. A computer program product comprising a computer program and / or instructions, characterized in that When the computer program and / or instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Source meter output control device, source meter and source meter output control method
CN120143925A
Control circuit of switching mode power supply and control method thereof
US20230034190A1