An implementation method for automatically adjusting the compensation speed of a closed-loop control loop
Through real-time sampling and loop operation, the compensation speed of the digital power supply is automatically adjusted, and the problem of unstable output voltage of the digital power supply in extreme environments is solved, and the rapid recovery to normal working state is achieved to ensure system stability.
Patent Information
- Application Number
- CN202411001323.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-07-25
AI Technical Summary
In the prior art, when the digital power supply dynamically changes in the load under extreme environments, the compensation speed remains constant, resulting in overshoot or drop of the output voltage, affecting the stability of the system.
By comparing the real-time sampling value with the target value, it is fed back to the loop operation. The modulation method of fixed pulse width adjustment frequency is used to automatically adjust the loop compensation speed. The frequency value of the loop operation result determines the frequency and period of the PWM to achieve flexible adjustment of the compensation speed.
When the dynamic load of the digital power supply changes, it quickly returns to the normal operating voltage range to ensure system stability and reduce the recovery time of dynamic load response.
Smart Images

Figure CN119010595B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of control technology, and particularly to a method for realizing automatic adjustment of the compensation speed of a closed-loop control loop. Background Art
[0002] With the rapid development of society, power electronics technology has been widely applied in various fields. In certain specific application scenarios, such as large server rooms and laser cutting technology, high performance requirements are imposed on digital power supplies. In addition to achieving high efficiency, voltage regulation, and current regulation, a high dynamic response speed is also required to ensure the stability of the power supply to the overall system under different working environments.
[0003] The compensation speed of a conventional voltage / current loop is fixed, and its implementation method is as follows: By configuring a timer and allowing the timer to generate a periodic value update interrupt, and finally running the relevant functions of the voltage / current loop regularly in the interrupt service function. That is, each time the timer is updated, the voltage / current loop calculates the error value, performs loop calculation and loading, and outputs the required PWM drive. Since the voltage / current loop runs based on the timer, the compensation speed of the loop also depends on the periodic value of the timer. For example, when the timer is configured to 50KHz, i.e., 20us, the compensation speed of the loop is also fixed at 50KHz.
[0004] When the digital power supply is in a relatively extreme usage environment, such as output full-load to no-load switching, the output voltage will have a period of overshoot or drop outside the specification range and then return to the normal range. This is because when the load changes instantaneously, the original loop compensation result is no longer sufficient to maintain the stability of the current output voltage, and the latest loop compensation result that detects the current change is required to maintain the voltage stability. The time required during this period is the dynamic load response recovery time. To reduce the dynamic load response recovery time and increase the flexibility of loop compensation, a control method with automatically adjustable loop compensation speed needs to be adopted.
[0005] Therefore, it is necessary to provide a method for realizing automatic adjustment of the compensation speed of a closed-loop control loop to achieve automatic adjustment of the loop compensation speed, that is, the compensation speed changes with the real-time operation result of the loop to ensure the stability of the power supply. Summary of the Invention
[0006] The present invention discloses a method for realizing automatic adjustment of the compensation speed of a closed-loop control loop, belonging to the field of control technology and applicable to the closed-loop control of digital power supplies, which can effectively solve the technical problems involved in the background art.
[0007] To achieve the above object, the technical solution of the present invention is as follows:
[0008] A method for realizing automatic adjustment of the compensation speed of a closed-loop control loop includes the following steps:
[0009] S1. The sampling module samples information of the power control circuit, and transmits the sampling value to the controller MCU;
[0010] S2. The MCU performs loop operation according to the sampling value and the preset target value. The result of the loop operation is the frequency f. The MCU performs PWM control on the switching tube of the power control circuit according to the value of f;
[0011] S3. The MCU includes a timer Timer. The period value of Timer is T. When the counter of Timer accumulates to the period value, it triggers a Timer interrupt. When the CPU of the MCU responds to this interrupt, it performs a loop operation once;
[0012] S4. T = 1 / f. The MCU continuously updates the period value T of Timer according to the value of f obtained from the real-time loop operation result.
[0013] In the DC-DC power control module of the digital power supply, in order to make the output voltage / current reach the target value and maintain stability, the MCU needs to output PWM drive signals with different pulse widths and frequencies to control the on and off times of the power Mos tube. The pulse width and frequency of the PWM square wave output by the MCU are determined by the voltage / current loop operation result. When the digital power supply works under dynamic load changes or other extreme environments, the output voltage may have a period of overshoot or fall outside the specification range for a certain time, which poses a certain risk to the power supply and even the system. Compared with the compensation speed of the conventional constant closed-loop control, the automatic adjustment of the compensation speed of the closed-loop control in the present invention has the advantages of being faster and more flexible. When the above situation occurs, it can quickly return the power supply to the normal working voltage range, thereby ensuring the stability of the entire system.
[0014] As a preferred improvement of the present invention: The loop operation includes but is not limited to pi or 2p2z algorithms.
[0015] As a preferred improvement of the present invention: In step S3, when the period value T triggers the Timer interrupt, at this time, the MCU loads the result of the previous loop operation and simultaneously performs the loop operation.
[0016] As a preferred improvement of the present invention: The sampling module includes a voltage sampling circuit and a current sampling circuit.
[0017] As a preferred improvement of the present invention: The loop operation result f is set at 50 - 200KHz.
[0018] As a preferred improvement of the present invention: The power control module is a DC-DC circuit. The DC-DC circuit includes a port Vdc+ and a port Vdc-. The port Vdc+ is connected to the drain of MOS transistor Q1. The source of the MOS transistor Q1 is connected to the drain of MOS transistor Q2 and one end of a capacitor Cr. The other end of the capacitor Cr is connected to one end of an inductor Lr. The other end of the inductor Lr is connected to one end of an inductor Lm and pin 1 of a transformer T1. The port Vdc- is connected to the source of the MOS transistor Q2, the other end of the inductor Lm, and pin 2 of the transformer T1. Pin 6 of the transformer is connected to the positive terminal of a diode D1. The negative terminal of the diode D1 is connected to the negative terminal of a diode D2, one end of a capacitor Co, and one end of a resistor Ro. Pin 5 of the transformer T1 is connected to pin 4 of the transformer T1, the other end of the capacitor Co, and the other end of the resistor Ro. Pin 3 of the transformer T1 is connected to the positive terminal of the diode D2.
[0019] As a preferred improvement of the present invention: In the step S1, the sampling module samples the voltage across and the current through the resistor Ro, and the sampling values are transmitted to the controller MCU.
[0020] The beneficial effects of the present invention are as follows:
[0021] The real-time sampling values are compared with the target values to obtain an error value, which is then fed back into the loop operation. One result of the loop operation is used for PWM output, and the other is used to adjust the speed of loop compensation. Taking the modulation method of fixed pulse width and variable frequency as an example, the larger the frequency value output by the loop operation result, the smaller the period, and the faster the compensation speed; the smaller the frequency value output by the loop operation result, the larger the period, and the slower the compensation speed. In case of an accident, the power supply can quickly return to the normal operating voltage range, thus ensuring the stability of the entire system. Description of the Drawings
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings, where:
[0023] Figure 1 is the flowchart of the loop operation;
[0024] Figure 2 is the schematic diagram of fixed loop compensation speed;
[0025] Figure 3 is the schematic diagram of variable loop compensation speed;
[0026] Figure 4Schematic diagram of the power control circuit;
[0027] Figure 5 LLC gain curve graph. Specific implementation manners
[0028] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0029] It should be noted that all directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative position relationship and movement conditions between components in a specific posture (as shown in the drawings). If this specific posture changes, the directional indications will also change accordingly.
[0030] In addition, the descriptions such as "first" and "second" in the present invention are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.
[0031] In the present invention, unless otherwise clearly defined and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal connection of two components or the interaction relationship between two components, unless otherwise clearly limited. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0032] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention.
[0033] Please refer to Figure 4As shown in the figure, it is a schematic diagram of a DC / DC circuit. The power control module is a DC-DC circuit. The DC-DC circuit includes port Vdc+ and port Vdc-. The port Vdc+ is connected to the drain of MOS transistor Q1. The source of the MOS transistor Q1 is connected to the drain of MOS transistor Q2 and one end of capacitor Cr. The other end of the capacitor Cr is connected to one end of inductor Lr. The other end of the inductor Lr is connected to one end of inductor Lm and pin 1 of transformer T1. The port Vdc- is connected to the source of the MOS transistor Q2, the other end of the inductor Lm, and pin 2 of the transformer T1. Pin 6 of the transformer is connected to the positive end of diode D1. The negative end of the diode D1 is connected to the negative end of diode D2, one end of capacitor Co, and one end of resistor Ro. Pin 5 of the transformer T1 is connected to pin 4 of the transformer T1, the other end of the capacitor Co, and the other end of the resistor Ro. Pin 3 of the transformer T1 is connected to the positive end of the diode D2. Pin 1 and pin 2 of the transformer T1 share one coil, pin 3 and pin 4 share one coil, and pin 5 and pin 6 share one coil. The MCU samples the output voltage and output current of this circuit and controls the operation of the MOS transistor.
[0034] Please refer to Figure 2 As shown in the figure, the compensation speed of the traditional controller is as shown. The loop compensation speed is determined by the period value of the Timer, which is a fixed value, that is, the compensation speed remains unchanged. When encountering sudden situations, the power supply is likely to drop out of the normal working state and stay for a long time. Such as Figure 2 As shown in the figure, the fixed loop compensation speed is based on a 20us Timer. When the period value is updated to generate an interrupt, the previous loop output result is loaded and the current loop calculation starts. The loop calculation is completed within the next 20us. PWM is Pulse Width Modulation, the pulse width modulation technology. MCU is Micro Control Unit, the micro control unit. Timer refers to the timer, PI and 2P2Z are power loop compensation algorithms, LLC is a series-parallel resonant converter, and MosFet is a field effect transistor.
[0035] The present invention provides a method for realizing automatic adjustment of the closed-loop control loop compensation speed, including the following steps:
[0036] S1. The sampling module samples the information of the power control circuit, and the sampling value is transmitted to the controller MCU. The sampling module includes a voltage sampling circuit and a current sampling circuit;
[0037] S2. The MCU performs loop operation according to the sampling value and the preset target value. The result of the loop operation is the frequency f. The MCU performs PWM control on the switching tube of the power control circuit according to the value of f. The loop operation includes but is not limited to pi or 2p2z algorithms;
[0038] S3. The MCU includes a timer Timer with a period value of T. When the counter reaches the period value T, the MCU performs a loop operation once and loads the result of the previous loop operation.
[0039] S4. T = 1 / f, and the MCU continuously updates the period value T of the Timer according to the value of the real-time loop operation result f.
[0040] Please refer to Figure 3 As shown, the loop compensation speed of the present invention is variable and is determined by the loop operation result. The larger the frequency value output by the loop operation result, the smaller the period, and the faster the compensation speed; the smaller the frequency value output by the loop operation result, the larger the period, and the slower the compensation speed. As Figure 3 shown, the loop compensation speed is changed based on the period value of the HRTIM Master Timer, and the period value of the HRTIM Master Timer comes from the real-time loop output result. When an interrupt is generated due to the update of the period value, the result of the previous loop output is loaded and the current loop calculation is started. The loop calculation needs to be completed within the period value of the HRTIM Master Timer. The solution of the present invention realizes automatic adjustment of the loop compensation speed, that is, the compensation speed changes with the change of the real-time loop operation result.
[0041] Embodiment 1
[0042] 1. Implement the PWM drive underlying configuration according to the required DC-DC topology. Taking the G4 series chips of ST Company as an example, the HRTIM peripheral used to configure the PWM drive is composed of a Master Timer and Slave Timers A to F in total. Slave Timers A to F are used as the output of the PWM drive signal, and the power Mos tube is controlled to turn on and off by loading Compare 1 to 4, while the Master Timer is used as a timer function to run the relevant functions of the voltage / current loop.
[0043] 2. Open the period value update interrupt of the Master Timer in the configuration, and then write the relevant functions of the voltage / current loop in advance and run them in the interrupt service function of the Maser Timer. When the count value of the Master Timer overflows to generate a period value update interrupt, the data operation of the voltage / current loop (existing method) will be executed once in the interrupt service function.
[0044] 3. The relevant loop functions compare the real-time voltage / current sampling data with the preset target value to obtain an error value, and then feedback the error value to the pi or 2p2z loop for a series of calculations to obtain the loop operation result.
[0045] 4. In addition to acting on the PWM output pin of the single-chip microcomputer to output the desired pulse width or frequency to control the power MOS transistor, the loop operation result also assigns a period value to the Master Timer timer in the interrupt service function. The period value of MasterTimer changes with the real-time operation result of the loop, that is, the number of times of performing voltage / current loop data operations in the interrupt service function each time within the same time also changes, thereby realizing the automatic adjustment function of the loop compensation speed, as Figure 1 shown.
[0046] 5. Limit the minimum / maximum frequency of the PWM output in the loop function, such as 55KHz and 200KHz (for example: if it is less than 55KHz, the output is 55KHz). Referring to the LLC gain curve (as Figure 5 ), it can be known that when the resonant cavity works in the inductive region and is greater than the second resonant frequency, the smaller the frequency, the higher the gain value. When the power supply works in an environment with a large output load, the frequency value calculated by the loop is lower and the period value is larger. At this time, the loop compensation speed is the normal compensation speed. When the power supply works in an environment with a small output load, the frequency value calculated by the loop is higher and the period value is smaller. At this time, the loop compensation speed will be automatically increased.
[0047] When the power supply works in an environment with large-scale dynamic load changes, the advantages of the automatic adjustment of the loop compensation speed are as follows:
[0048] When in light load, the calculated frequency value is higher. A higher loop compensation speed can enable the loop to quickly respond and output a suitable PWM drive in time when the power supply is instantaneously switched to heavy load, so that the power supply can return to the normal working voltage faster, thereby reducing the dynamic load response recovery time.
[0049] When in heavy load, the calculated frequency value is lower. When the power supply is switched to light load, since the frequency value calculated by the loop is continuously increasing and the loop compensation speed also increases synchronously, the loop can also quickly respond and output a suitable PWM drive in time, so that the power supply can return to the normal working voltage faster, thereby reducing the dynamic load response recovery time.
[0050] Although the implementation of the present invention has been disclosed above, it is not limited to only the applications listed in the specification and the implementation. It can be fully applied to various fields suitable for the present invention. For those familiar with the field, additional modifications can be easily made. Therefore, without departing from the general concept defined by the claims and the equivalent scope, the present invention is not limited to the specific details and the examples shown and described here.
Claims
1. A method for realizing automatic adjustment of the compensation speed of a closed-loop control loop, characterized in that, It includes the following steps: S1. The sampling module samples the information of the power control circuit, and the sampling value is transmitted to the controller MCU; S2. The MCU performs loop operation according to the sampling value and the preset target value. The result of the loop operation is the frequency f. The MCU performs PWM control on the switching tube of the power control circuit according to the value of f; S3. The MCU contains a timer Timer. The period value of Timer is T. When the counter of Timer accumulates to the period value, it triggers a Timer interrupt. When the CPU of the MCU responds to this interrupt, it performs a loop operation once; S4. T = 1 / f. The MCU continuously updates the period value T of Timer according to the value of the real-time loop operation result f.
2. The implementation method for automatically adjusting the compensation speed of a closed-loop control loop according to claim 1, characterized in that: The loop operation includes but is not limited to pi or 2p2z algorithms.
3. The implementation method for automatically adjusting the speed by compensating a closed-loop control loop according to claim 1, wherein: In step S3, when the period value T triggers a Timer interrupt, at this time, the MCU loads the result of the previous loop operation and simultaneously performs a loop operation.
4. The implementation method for automatically adjusting the compensation speed of a closed-loop control loop according to claim 1, wherein: The sampling module includes a voltage sampling circuit and a current sampling circuit.
5. The implementation method for automatically adjusting the compensation speed of a closed-loop control loop according to claim 1, characterized in that: The loop operation result f is set at 50 - 200KHz.
6. The implementation method for automatically adjusting the compensation speed of a closed-loop control loop according to claim 1, characterized in that: The power control module is a DC-DC circuit. The DC-DC circuit includes a port Vdc+ and a port Vdc-. The port Vdc+ is connected to the drain of the MOS transistor Q1. The source of the MOS transistor Q1 is connected to the drain of the MOS transistor Q2 and one end of the capacitor Cr. The other end of the capacitor Cr is connected to one end of the inductor Lr. The other end of the inductor Lr is connected to one end of the inductor Lm and pin 1 of the transformer T1. The port Vdc- is connected to the source of the MOS transistor Q2, the other end of the inductor Lm, and pin 2 of the transformer T1; Pin 6 of the transformer is connected to the positive end of the diode D1. The negative end of the diode D1 is connected to the negative end of the diode D2, one end of the capacitor Co, and one end of the resistor Ro. Pin 5 of the transformer T1 is connected to pin 4 of the transformer T1, the other end of the capacitor Co, and the other end of the resistor Ro. Pin 3 of the transformer T1 is connected to the positive end of the diode D2.
7. The implementation method for automatically adjusting the compensation speed of a closed-loop control loop according to claim 6, characterized in that: In step S1, the sampling module samples the voltage across the resistor Ro and the current, and the sampling value is transmitted to the controller MCU.
Citation Information
Patent Citations
Enhancement of power conversion efficiency using dynamic load detecting and tracking
CN101785173A
Feedback loop compensation switching circuit and driving power supply
CN109496009A
DC-DC converter
US20230275509A1