Circuit control method, terminal and storage medium
By determining the first switching frequency and configuration amount of the switch tube in the circuit control and adjusting the interrupt control frequency, the problem of system instability during PFM control is solved, and the stability of the switch tube working frequency and the reliability of the system are realized.
Patent Information
- Application Number
- CN202210192947.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-02-28
AI Technical Summary
During PFM control, the system has poor stability and large output voltage ripple.
By determining the first switching frequency and configuration amount of the switch tube, adjusting the interrupt control frequency to adjust it to the first switching frequency in the next switching cycle, ensuring that the time interval between the configuration time and the effective time is stable and controllable.
It improves the certainty of the time when the switch tube operating frequency is configured to take effect and enhances the stability of the system.
Smart Images

Figure CN114583924B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of circuit control technology, and in particular to a circuit control method, a terminal, and a storage medium. Background Art
[0002] Common circuit control methods include pulse width modulation (PWM) and pulse frequency modulation (PFM). For PWM control, a fixed frequency interrupt is generally used to control the circuit. The PWM signal is determined in the interrupt and loaded at a fixed time.
[0003] However, if the PFM signal is used to control the circuit, the output voltage ripple will be large and the system stability will be poor. Summary of the Invention
[0004] Embodiments of the present invention provide a target circuit control method, a terminal, and a storage medium to solve the problem of system instability during PFM control.
[0005] In a first aspect, an embodiment of the present invention provides a circuit control method, including:
[0006] Determining a first switching frequency of the switching tube, wherein the first switching frequency is a switching frequency required for the switching tube to operate;
[0007] Determine a first configuration value, where the first configuration value is a configuration value of the PFM corresponding to the first switching frequency;
[0008] In the current interrupt control cycle, the first configuration value is configured in the first PFM generation unit of the controller to control the switch tube to operate at the first switching frequency in the next switching cycle;
[0009] The frequency of the interrupt control is adjusted so that the frequency of the interrupt control is adjusted to the first switching frequency in the next switching cycle.
[0010] In a possible implementation, determining the first switching frequency of the switch includes:
[0011] Sampling the circuit at a specified phase of a first interrupt control cycle to obtain sampled data; the first interrupt control cycle is the current interrupt control cycle or the interrupt control cycle before the current interrupt control cycle;
[0012] A first switching frequency is calculated using the control loop and the sampled data.
[0013] In a possible implementation, configuring a first configuration value in a first PFM generation unit of a controller during a current interrupt control cycle includes:
[0014] In the current interrupt control cycle, after obtaining the first configuration value, the first configuration value is configured in the first PFM generation unit of the controller;
[0015] Alternatively, at a specified time in the current interrupt control cycle, the first configuration value is configured in the first PFM generation unit of the controller.
[0016] In a possible implementation, before determining the first switching frequency of the switch tube, the method further includes:
[0017] Calculating the interruption occupancy rate of the first interruption control period; wherein the interruption occupancy rate is a ratio of the calculation duration to the interruption control period; wherein the calculation duration is the total duration required to calculate the first switching frequency and the first configuration value of the switch tube;
[0018] If the interruption occupancy rate of the first interruption control period is greater than a preset threshold, the calculation work of the first switching frequency and the first configuration quantity of the switch tube is distributed to be completed in multiple interruption control periods.
[0019] In a possible implementation, the calculation of the first switching frequency and the first configuration value of the switch tube is distributed to multiple interrupt control cycles, including:
[0020] Calculate the ratio of the interrupt occupancy rate of the first interrupt control period to the preset threshold, and round up the ratio to obtain N;
[0021] The calculation of the first switching frequency and the first configuration value of the switch tube is not performed in N-1 interruption control periods after the first interruption period.
[0022] In a possible implementation, after determining the first switching frequency of the switch tube, the method further includes:
[0023] The loop parameters of the control loop are adjusted so that the loop parameters correspond to the first switching frequency in the next switching cycle.
[0024] In a possible implementation, adjusting the frequency of interrupt control includes:
[0025] configuring the first configuration amount in the second PFM generating unit of the controller;
[0026] Alternatively, the parameters of the timer are adjusted according to the first switching frequency.
[0027] In a possible implementation, the first PFM generating unit is a PWM generator.
[0028] In a second aspect, an embodiment of the present invention provides a terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the first aspect or any possible implementation method of the first aspect are implemented.
[0029] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the first aspect or any possible implementation method of the first aspect.
[0030] An embodiment of the present invention provides a circuit control method, terminal, and storage medium, the method comprising: determining a first switching frequency of a switch tube, wherein the first switching frequency is the switching frequency required for the switch tube to operate; determining a first configuration quantity, wherein the first configuration quantity is the configuration quantity of the PFM corresponding to the first switching frequency; configuring the first configuration quantity in a first PFM generating unit of a controller within a current interrupt control cycle to control the switch tube to operate at the first switching frequency after the start of the next switching cycle; and adjusting the frequency of the interrupt control so that the frequency of the interrupt control is adjusted to the first switching frequency after the start of the next switching cycle. When adjusting the operating frequency of the switch tube, the present invention also adjusts the frequency of the interrupt control so that the frequency of the interrupt control is consistent with the operating frequency of the switch tube, thereby making the time interval between the configuration moment and the effective moment of the first switching frequency in the switch tube stable and controllable, improving the certainty of the configuration effective moment of the operating frequency of the switch tube, and thus improving the stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0032] Figure 1 This is a schematic diagram of a control waveform of the prior art provided by an embodiment of the present invention;
[0033] Figure 2 is a flow chart of an implementation method of a circuit control method provided by an embodiment of the present invention;
[0034] Figure 3 1 is a schematic diagram of control waveforms of a circuit control method provided by an embodiment of the present invention;
[0035] Figure 4 is a schematic structural diagram of a control device for a circuit provided by an embodiment of the present invention;
[0036] Figure 5 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
[0038] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below with reference to the accompanying drawings.
[0039] Figure 1 Schematic diagram of control waveforms of the prior art provided by an embodiment of the present invention. The circuits used in the present invention include a switch and a controller, such as a switching power supply circuit, a rectifier circuit, an inverter circuit, a DC buck-boost circuit, etc. The controller uses an interrupt mechanism to adjust the switching frequency. Each time an interrupt is triggered, the switching frequency is updated to adjust the operating frequency of the switch. In the prior art, interrupt control is typically performed using a PWM signal. A new switching frequency is assigned to the switching frequency carrier at a fixed position in each PWM cycle. The new switching frequency takes effect at the end of the current cycle and the beginning of the next cycle of the switching frequency carrier. If a PWM signal is used for interrupt control and a PFM signal is used for switching frequency control, the switching frequency is variable and difficult to determine relative to the interrupt control frequency. Therefore, the position of the new switching frequency assigned to the switching frequency carrier during a PWM cycle is also uncertain within the switching frequency carrier cycle; it may be at the beginning or end of the cycle. The new switching frequency always takes effect in the next cycle. Therefore, the time interval between the configuration of the switching frequency and its effective time is uncertain, ranging from [0, T 开关周期 ], where T 开关周期 Indicates the switching period. Especially when the switching period changes, the time interval between the configuration moment and the effective moment of the switching frequency becomes more uncertain. Figure 1 As shown, the interrupt control carrier is used to control the interrupt control frequency, and the switching frequency carrier is used to control the switching frequency of the switch tube. The solid line represents the configuration time, and the dotted line represents the effective time. Figure 1 It can be seen that the position of the configuration moment in each interrupt control carrier cycle is fixed, and when the frequency of the switching frequency carrier changes in real time, the time interval between the configuration moment and the effective moment is uncertain and fluctuates greatly.
[0040] See also Figure 2, which shows a flow chart of an implementation of a circuit control method provided by an embodiment of the present invention, and is described in detail as follows:
[0041] Step 201 : determining a first switching frequency of a switching tube, wherein the first switching frequency is a switching frequency required for the switching tube to operate.
[0042] In this embodiment, the switching frequency required for the switch tube to operate may be determined once every one or more interruption control cycles.
[0043] Step 202: Determine a first configuration value, where the first configuration value is a PFM configuration value corresponding to a first switching frequency.
[0044] In this embodiment, the configuration amount is used to configure the PFM generating unit. After the configuration takes effect, the pulse signal generated by the PFM generating unit will be adjusted to the first switching frequency.
[0045] Step 203 : In the current interrupt control cycle, a first configuration variable is configured in the first PFM generating unit of the controller to control the switch tube to operate at the first switching frequency in the next switching cycle.
[0046] In this embodiment, the time for configuring the first configuration value is the current interrupt control cycle, which is also reflected in the current switching cycle on the switching frequency carrier. The time for the first configuration value to take effect is the time when the current switching cycle ends and the next switching cycle begins.
[0047] Step 204 : adjusting the frequency of the interrupt control so that the frequency of the interrupt control is adjusted to the first switching frequency in the next switching cycle.
[0048] In this embodiment, before the interrupt control frequency is adjusted, the interrupt control frequency may be the same as or different from the switching frequency. The interrupt control frequency is also adjusted to the first switching frequency at the start of the next switching cycle. At this point, the interrupt control signal waveform and the switching transistor signal waveform have the same frequency, period, and phase. The position corresponding to the moment of the next configuration of the first configuration value on the interrupt control signal waveform and the position corresponding to the switching transistor signal waveform are the same. Therefore, when the switching transistor frequency is next configured, the time interval between the configuration moment and the configuration effective moment is fixed.
[0049] Figure 3 is a schematic diagram of the control waveform of the circuit after using the circuit control method provided by the embodiment of the present invention, Figure 3 It can be seen that the interrupt control carrier and the switching frequency carrier always maintain the same frequency and the same phase. Each configuration moment is in the same position in the two carriers, and each effective moment is also in the same position in the two carriers. Therefore, for the interrupt control carrier, the time interval between the configuration moment and the effective moment is fixed and predictable. Specifically, in Figure 3 For each specific switching cycle, the time interval between the configuration moment and the effective moment of the switching frequency can be expressed as a definite relationship, that is, Δt = T 开关周期 -T 计算时长 , where Δt represents the time interval between the configuration time and the effective time of the switching frequency, T 计算时长 represents the duration of executing steps 201 and 202 of the above method in each switching cycle. It can be seen that although the result of the relationship will still change for different switching cycles, the subtraction of the calculation time, which usually accounts for the majority of each switching cycle, not only reduces the time interval to a very small degree, but also allows the use of this determined relationship to predict the time interval, thereby making the time interval between the configuration moment and the effective moment of the switching frequency in the switch tube stable and controllable, improving the certainty of the effective moment of the configuration of the switching tube operating frequency, and thus improving the stability of the system.
[0050] In some embodiments, determining the first switching frequency of the switch includes:
[0051] Sampling the circuit at a specified phase of a first interrupt control cycle to obtain sampled data; the first interrupt control cycle is the current interrupt control cycle or the interrupt control cycle before the current interrupt control cycle;
[0052] A first switching frequency is calculated using the control loop and the sampled data.
[0053] In this embodiment, the first switching frequency is typically calculated by the control loop based on the operating parameters of the circuit. If the interrupt control period is long, circuit sampling and calculation of the first switching frequency can be completed within the current interrupt control period. If the interrupt control period is short, sampling and calculation can be performed in the period before the current interrupt control period, reserving sufficient time for calculation, and configuration can be performed during the current interrupt control period.
[0054] In some embodiments, configuring a first configuration value in a first PFM generating unit of a controller during a current interrupt control cycle includes:
[0055] In the current interrupt control cycle, after obtaining the first configuration value, the first configuration value is configured in the first PFM generation unit of the controller;
[0056] Alternatively, at a specified time in the current interrupt control cycle, the first configuration value is configured in the first PFM generation unit of the controller.
[0057] In this embodiment, the methods for configuring the first configuration quantity in the first PFM generating unit include immediate configuration and non-immediate configuration. For immediate configuration, the first configuration quantity is configured in the first PFM generating unit immediately after obtaining the first configuration quantity, without any waiting; for non-immediate configuration, after obtaining the first configuration quantity, the configuration is not performed until a specified time within the current interrupt control cycle. The total time required for the controller to perform sampling, calculate the first switching frequency, and calculate the first configuration quantity is called the calculation execution time. The controller's calculation execution time is fixed, so whether it is immediate configuration or non-immediate configuration, the configuration time in this embodiment is controllable.
[0058] In some embodiments, before determining the first switching frequency of the switch, the method further includes:
[0059] Calculating the interruption occupancy rate of the first interruption control period; wherein the interruption occupancy rate is a ratio of the calculation duration to the interruption control period; wherein the calculation duration is the total duration required to calculate the first switching frequency and the first configuration value of the switch tube;
[0060] If the interruption occupancy rate of the first interruption control period is greater than a preset threshold, the calculation work of the first switching frequency and the first configuration quantity of the switch tube is distributed to be completed in multiple interruption control periods.
[0061] In this embodiment, the interrupt occupancy rate represents the ratio of the duration of a task executed within an interrupt control cycle to the duration of the cycle. If the interrupt occupancy rate corresponding to the computation execution duration exceeds a preset threshold, the execution of other tasks within the interrupt control cycle may be affected. Because the interrupt control cycle varies with the switching cycle and may become very short, if the interrupt control cycle is shorter than the computation execution duration, or the interrupt occupancy rate is too high, the computation execution task cannot be completed within a single interrupt control cycle. The computation execution task needs to be divided and distributed across multiple interrupt control cycles for execution.
[0062] In some embodiments, the calculation of the first switching frequency and the first configuration value of the switch tube is distributed to multiple interrupt control cycles, including:
[0063] Calculate the ratio of the interrupt occupancy rate of the first interrupt control period to the preset threshold, and round up the ratio to obtain N;
[0064] The calculation of the first switching frequency and the first configuration value of the switch tube is not performed in N-1 interruption control periods after the first interruption period.
[0065] In this embodiment, when the interrupt occupancy rate of the first interrupt control cycle is N times the preset threshold, N interrupt control cycles are required to complete the calculation of the first switching frequency and the first configuration quantity of the switch tube, that is, after the first interrupt control cycle, N-1 interrupt control cycles are required to complete the calculation. Before the calculation work is completed, the controller does not need to start the next calculation work.
[0066] In some embodiments, after determining the first switching frequency of the switch, the method further includes:
[0067] The loop parameters of the control loop are adjusted so that the loop parameters correspond to the first switching frequency in the next switching cycle.
[0068] In this embodiment, interrupt control is typically used in conjunction with loop control to control the circuit. Loop control often utilizes digital filters and controllers, such as PI controllers and lagging, to implement loop control. The functionality of these devices is affected by the interrupt control frequency. When the interrupt control frequency is updated in real time, loop parameters must be updated based on the new interrupt control frequency to ensure that the digital filters and controllers in the loop maintain consistent characteristics (e.g., frequency response).
[0069] In some embodiments, adjusting the frequency of interrupt control includes:
[0070] configuring the first configuration amount in the second PFM generating unit of the controller;
[0071] Alternatively, the parameters of the timer are adjusted according to the first switching frequency.
[0072] In this embodiment, the device for implementing interrupt control may be a PFM generating unit, or a timer or an interrupter.
[0073] In some embodiments, the first PFM generating unit is a PWM generator.
[0074] In this embodiment, the PFM generating unit is used to generate a pulse waveform to perform PFM control on the switch. Currently, the controller generally includes a PWM generator that can convert the PFM configuration value into the PWM configuration value to achieve PFM control on the switch.
[0075] An embodiment of the present invention provides a circuit control method, terminal, and storage medium, the method comprising: determining a first switching frequency of a switch tube, wherein the first switching frequency is the switching frequency required for the switch tube to operate; determining a first configuration quantity, wherein the first configuration quantity is the configuration quantity of the PFM corresponding to the first switching frequency; configuring the first configuration quantity in a first PFM generating unit of a controller within a current interrupt control cycle to control the switch tube to operate at the first switching frequency after the start of the next switching cycle; and adjusting the frequency of the interrupt control so that the frequency of the interrupt control is adjusted to the first switching frequency after the start of the next switching cycle. When adjusting the operating frequency of the switch tube, the present invention also adjusts the frequency of the interrupt control so that the frequency of the interrupt control is consistent with the operating frequency of the switch tube, thereby making the time interval between the configuration moment and the effective moment of the first switching frequency in the switch tube stable and controllable, improving the certainty of the configuration effective moment of the operating frequency of the switch tube, and thus improving the stability of the system.
[0076] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0077] The following are device embodiments of the present invention. For details not fully described therein, reference may be made to the corresponding method embodiments described above.
[0078] Figure 4 A schematic diagram of the structure of a control device for a circuit provided by an embodiment of the present invention is shown. For ease of explanation, only the portion related to the embodiment of the present invention is shown, which is described in detail as follows:
[0079] like Figure 4 As shown, the control device 4 of the circuit includes:
[0080] The frequency determination module 41 determines a first switching frequency of the switch tube, wherein the first switching frequency is the switching frequency required for the switch tube to operate;
[0081] The configuration determination module 42 determines a first configuration value, where the first configuration value is a PFM configuration value corresponding to the first switching frequency;
[0082] The switch configuration module 43 configures a first configuration value in the first PFM generation unit of the controller in the current interrupt control cycle to control the switch tube to operate at the first switching frequency in the next switching cycle;
[0083] The interruption adjustment module 44 adjusts the frequency of the interruption control so that the frequency of the interruption control is adjusted to the first switching frequency in the next switching cycle.
[0084] In some embodiments, the frequency determination module is specifically configured to:
[0085] Sampling the circuit at a specified phase of a first interrupt control cycle to obtain sampled data; the first interrupt control cycle is the current interrupt control cycle or the interrupt control cycle before the current interrupt control cycle;
[0086] A first switching frequency is calculated using the control loop and the sampled data.
[0087] In some embodiments, the switch configuration module is specifically configured to:
[0088] In the current interrupt control cycle, after obtaining the first configuration value, the first configuration value is configured in the first PFM generation unit of the controller;
[0089] Alternatively, at a specified time in the current interrupt control cycle, the first configuration value is configured in the first PFM generation unit of the controller.
[0090] In some embodiments, the frequency determination module is further configured to:
[0091] Before determining the first switching frequency of the switch tube, calculating the interruption occupancy rate of the first interruption control period; wherein the interruption occupancy rate is a ratio of the calculation duration to the interruption control period; wherein the calculation duration is the total duration required to calculate the first switching frequency of the switch tube and the first configuration value;
[0092] If the interruption occupancy rate of the first interruption control period is greater than a preset threshold, the calculation work of the first switching frequency and the first configuration quantity of the switch tube is distributed to be completed in multiple interruption control periods.
[0093] In some embodiments, the frequency determination module is specifically configured to:
[0094] Calculate the ratio of the interrupt occupancy rate of the first interrupt control period to the preset threshold, and round up the ratio to obtain N;
[0095] The calculation of the first switching frequency and the first configuration value of the switch tube is not performed in N-1 interruption control periods after the first interruption period.
[0096] In some embodiments, the interrupt adjustment module is further configured to:
[0097] After determining the first switching frequency of the switch tube, the loop parameters of the control loop are adjusted so that the loop parameters correspond to the first switching frequency in the next switching cycle.
[0098] In some embodiments, the interrupt adjustment module is specifically configured to:
[0099] configuring the first configuration amount in the second PFM generating unit of the controller;
[0100] Alternatively, the parameters of the timer are adjusted according to the first switching frequency.
[0101] In some embodiments, the first PFM generating unit is a PWM generator.
[0102] An embodiment of the present invention provides a circuit control device, comprising: a frequency determination module, which determines a first switching frequency of a switch tube, wherein the first switching frequency is the switching frequency required for the switch tube to operate; a configuration determination module, which determines a first configuration quantity, wherein the first configuration quantity is a configuration quantity of the PFM corresponding to the first switching frequency; a switch configuration module, which configures the first configuration quantity in a first PFM generation unit of a controller during a current interrupt control cycle to control the switch tube to operate at the first switching frequency during the next switching cycle; and an interrupt adjustment module, which adjusts the frequency of the interrupt control so that the frequency of the interrupt control is adjusted to the first switching frequency during the next switching cycle. When adjusting the operating frequency of the switch tube, the present invention also adjusts the frequency of the interrupt control so that the frequency of the interrupt control is consistent with the operating frequency of the switch tube, thereby making the time interval between the configuration moment and the effective moment of the first switching frequency in the switch tube stable and controllable, improving the certainty of the configuration effective moment of the operating frequency of the switch tube, and thus improving the stability of the system.
[0103] Figure 5 Schematic diagram of a terminal provided by an embodiment of the present invention. Figure 5 As shown, the terminal 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps of the control method embodiments of the circuit described above are implemented. Alternatively, when the processor 50 executes the computer program 52, the functions of the modules / units in the device embodiments described above are implemented.
[0104] Exemplarily, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the terminal 5.
[0105] The terminal 5 can be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal 5 can include, but is not limited to, a processor 50 and a memory 51. It can be understood by those skilled in the art that Figure 5 It is only an example of terminal 5 and does not constitute a limitation on terminal 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0106] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0107] The memory 51 can be an internal storage unit of the terminal 5, such as a hard disk or memory of the terminal 5. The memory 51 can also be an external storage device of the terminal 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 5. Furthermore, the memory 51 can also include both an internal storage unit of the terminal 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the terminal. The memory 51 can also be used to temporarily store data that has been output or is about to be output.
[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0109] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0110] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0111] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, and can be electrical, mechanical, or other forms.
[0112] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0113] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0114] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the control method embodiment of each circuit described above. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
[0115] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A circuit control method, characterized in that: The circuit includes a controller and a switch tube, and the controller controls the switch tube to operate in a pulse frequency modulation (PFM) manner; The method comprises: Determining a first switching frequency of the switch tube at intervals of one or more interrupt control cycles, wherein the first switching frequency is a switching frequency required for the switch tube to operate; Determine a first configuration value, where the first configuration value is a configuration value of the PFM corresponding to the first switching frequency; In the current interrupt control cycle, configuring the first configuration value in the first PFM generating unit of the controller to control the switch tube to operate at the first switching frequency in the next switching cycle; The frequency of the interrupt control is adjusted so that the frequency of the interrupt control is adjusted to the first switching frequency in the next switching cycle.
2. The circuit control method according to claim 1, characterized in that: The determining the first switching frequency of the switch tube includes: Sampling the circuit at a specified phase of a first interrupt control cycle to obtain sampled data; the first interrupt control cycle is a current interrupt control cycle or an interrupt control cycle before the current interrupt control cycle; The first switching frequency is calculated using a control loop and the sampled data.
3. The circuit control method according to claim 2, characterized in that: The step of configuring the first configuration value in the first PFM generating unit of the controller within the current interrupt control cycle includes: In a current interrupt control cycle, after obtaining the first configuration value, the first configuration value is configured in the first PFM generation unit of the controller; Alternatively, at a specified time in the current interrupt control cycle, the first configuration value is configured in the first PFM generation unit of the controller.
4. The circuit control method according to claim 2, characterized in that: Before determining the first switching frequency of the switch tube, the method further includes: Calculating an interrupt occupancy rate of the first interrupt control period; wherein the interrupt occupancy rate is a ratio of a calculation duration to the interrupt control period; wherein the calculation duration is a total duration required to calculate the first switching frequency and the first configuration value of the switch tube; If the interruption occupancy rate of the first interruption control period is greater than a preset threshold, the calculation of the first switching frequency and the first configuration quantity of the switch tube is distributed to be completed in multiple interruption control periods.
5. The circuit control method according to claim 4, characterized in that: The step of allocating the calculation of the first switching frequency and the first configuration value of the switch tube to a plurality of interrupt control cycles includes: Calculating a ratio of the interrupt occupancy rate of the first interrupt control period to the preset threshold, and rounding up the ratio to obtain N; The calculation of the first switching frequency and the first configuration value of the switch tube is not performed in N-1 interruption control periods after the first interruption period.
6. The circuit control method according to any one of claims 2 to 5, characterized in that: After determining the first switching frequency of the switch tube, the method further includes: The loop parameters of the control loop are adjusted so that the loop parameters correspond to the first switching frequency in the next switching cycle.
7. The circuit control method according to any one of claims 1 to 5, characterized in that: The adjusting of the frequency of the interrupt control includes: configuring the first configuration amount in the second PFM generating unit of the controller; Alternatively, a parameter of the timer is adjusted according to the first switching frequency.
8. The circuit control method according to any one of claims 1 to 5, characterized in that: The first PFM generating unit is a PWM generator.
9. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the circuit control method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the circuit control method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
AC-DC-AC power supply system control and protection method
CN108957217A