Voltage conversion circuit control method and device, electronic equipment and readable storage medium
By using the sparrow search algorithm in the voltage conversion circuit to determine the reference current signal based on the voltage difference value, the problem of poor stability of DC-DC converter when voltage and current suddenly change is solved, and the effect of improving the stability and fault tolerance of the voltage conversion circuit is achieved.
Patent Information
- Application Number
- CN202411636598.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-25
AI Technical Summary
The existing DC-DC converters have poor stability when voltage and current suddenly change. How to improve the stability of DC-DC converters has become a problem that needs to be solved.
By obtaining the sample bus voltage and the current sampling inductor current of the voltage conversion circuit, calculate the voltage difference between the target bus voltage and the sample bus voltage, use the voltage difference as the input of the sparrow search algorithm, output the reference current signal, and determine the switch driving signal based on the reference current signal and the current sampling inductor current, and send it to the switching device in the voltage conversion circuit.
By setting up a sparrow search algorithm to determine the reference current signal based on the voltage difference, the error tolerance and stability of the voltage conversion circuit are improved. The sparrow search algorithm has high convergence accuracy and efficiency, which is suitable for the control needs of the voltage conversion circuit.
Smart Images

Figure CN119519377A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of circuits, and in particular to a voltage conversion circuit control method, device, electronic equipment and readable storage medium. Background Art
[0002] At present, low-voltage, high-current DC power supplies based on high-power semiconductor switches have become a hot topic of research at home and abroad; many new topologies and control technologies of DC-DC converters have emerged; existing DC-DC converters have poor stability when encountering sudden changes in voltage and current. Therefore, how to improve the stability of DC-DC converters has become a problem that needs to be solved. Summary of the invention
[0003] The main purpose of the present invention is to propose a voltage conversion circuit control method, device, electronic device and readable storage medium, aiming to solve the problem of how to improve the stability of DC-DC converters in the prior art.
[0004] To achieve the above object, the present invention provides a voltage conversion circuit control method, the voltage conversion circuit control method comprising:
[0005] Acquire a sampled bus voltage of a voltage conversion circuit, and acquire a current sampled inductor current of the voltage conversion circuit;
[0006] Obtaining a target bus voltage, and calculating a voltage difference between the target bus voltage and the sampled bus voltage;
[0007] Using the voltage difference as an input of a sparrow search algorithm to obtain a reference current signal output by the sparrow search algorithm based on the voltage difference;
[0008] A switch drive signal is determined according to the reference current signal and the currently sampled inductor current, and the switch drive signal is sent to a switch device in the voltage conversion circuit.
[0009] Optionally, the using the voltage difference as an input of a sparrow search algorithm to obtain a reference current signal output by the sparrow search algorithm based on the voltage difference comprises:
[0010] Constructing the objective function of the sparrow search algorithm based on the voltage difference;
[0011] Setting the fitness of the sparrow search algorithm to the difference between the bus voltage and the target bus voltage;
[0012] Iterating the sparrow search algorithm and monitoring the number of iterations of the sparrow search algorithm;
[0013] Determine whether the number of iterations reaches the target number;
[0014] If the number of iterations reaches the target number, the best position corresponding to the sparrow with the minimum fitness in the sparrow search algorithm is used as the reference current signal.
[0015] Optionally, determining a switch driving signal according to the reference current signal and the currently sampled inductor current includes:
[0016] Acquiring an input voltage of the voltage conversion circuit, and obtaining a target current signal through the input voltage and the reference current signal;
[0017] Calculating a current difference between the target current signal and the currently sampled inductor current;
[0018] Performing deadbeat control on the current difference to determine a target duty cycle corresponding to the switch drive signal;
[0019] The switch driving signal having a duty ratio equal to the target duty ratio is generated.
[0020] Optionally, the acquiring a currently sampled inductor current of the voltage conversion circuit includes:
[0021] Acquire a first sampled inductor current and a second sampled inductor current of two consecutive previous control cycles, wherein the control cycle corresponding to the first sampled inductor current is before the control cycle corresponding to the second sampled inductor current;
[0022] The difference between twice the second sampled inductor current and the first sampled inductor current is taken as the current sampled inductor current.
[0023] Optionally, the voltage conversion circuit includes a plurality of conversion branches, each of the conversion branches corresponds to one of the currently sampled inductor currents; determining a switch drive signal according to the reference current signal and the currently sampled inductor current, and sending the switch drive signal to a switch device in the voltage conversion circuit includes:
[0024] For each of the conversion branches, determining a switch driving signal according to the reference current signal and the current sampled inductor current corresponding to the conversion branch;
[0025] The switch drive signal is sent to the switch device in the conversion branch.
[0026] Optionally, determining a switch driving signal according to the reference current signal and the current sampled inductor current corresponding to the conversion branch includes:
[0027] Obtaining the currently sampled inductor current corresponding to each of the conversion branches;
[0028] Determining a duty cycle compensation value corresponding to each of the conversion branches according to a difference between each of the currently sampled inductor currents;
[0029] For each of the conversion branches, determining an initial duty cycle according to the reference current signal and the current sampled inductor current corresponding to the conversion branch;
[0030] Compensating the initial duty cycle by the duty cycle compensation value to obtain a target duty cycle;
[0031] The switch driving signal having a duty ratio equal to the target duty ratio is generated.
[0032] Optionally, determining the duty cycle compensation value corresponding to each of the conversion branches according to the difference between the currently sampled inductor currents includes:
[0033] Obtaining a bus current value of the voltage conversion circuit;
[0034] For each of the conversion branches, determining a current deviation value between the currently sampled inductor current corresponding to the conversion branch and the bus current value;
[0035] A duty cycle compensation value corresponding to the current deviation value is matched.
[0036] To achieve the above object, the present invention further provides a voltage conversion circuit control device, the voltage conversion circuit control device comprising:
[0037] A first acquisition module, used to acquire a sampled bus voltage of a voltage conversion circuit and to acquire a current sampled inductor current of the voltage conversion circuit;
[0038] A second acquisition module, used to acquire a target bus voltage and calculate a voltage difference between the target bus voltage and the sampled bus voltage;
[0039] A first execution module, configured to use the voltage difference as an input of a sparrow search algorithm to obtain a reference current signal output by the sparrow search algorithm based on the voltage difference;
[0040] The first determination module is used to determine a switch drive signal according to the reference current signal and the current sampled inductor current, and send the switch drive signal to the switch device in the voltage conversion circuit.
[0041] To achieve the above objectives, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the voltage conversion circuit control method as described above.
[0042] To achieve the above object, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the voltage conversion circuit control method as described above are implemented.
[0043] The present invention proposes a voltage conversion circuit control method, device, electronic device and readable storage medium, which obtains the sampled bus voltage of the voltage conversion circuit, obtains the current sampled inductor current of the voltage conversion circuit; obtains the target bus voltage, and calculates the voltage difference between the target bus voltage and the sampled bus voltage; uses the voltage difference as the input of the sparrow search algorithm to obtain the reference current signal output by the sparrow search algorithm based on the voltage difference; determines the switch drive signal according to the reference current signal and the current sampled inductor current, and sends the switch drive signal to the switch device in the voltage conversion circuit. By setting the sparrow search algorithm to determine the reference current signal based on the voltage difference, the fault tolerance of the voltage conversion circuit can be improved. At the same time, the sparrow search algorithm has high convergence accuracy and efficiency, can adapt to the control requirements of the voltage conversion circuit, and improve the stability of the voltage conversion circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0047] Figure 1 It is a flowchart of a first embodiment of a voltage conversion circuit control method of the present invention;
[0048] Figure 2 A topological schematic diagram of a BUCK circuit in a voltage conversion circuit control method of the present invention;
[0049] Figure 3 It is an overall logic diagram of the voltage conversion circuit control method of the present invention;
[0050] Figure 4 It is a flow chart of the sparrow search algorithm in the voltage conversion circuit control method of the present invention;
[0051] Figure 5 A topological diagram of a three-phase BUCK circuit in a voltage conversion circuit control method of the present invention;
[0052] Figure 6 It is a schematic diagram of the overall flow of the voltage conversion circuit control method of the present invention;
[0053] Figure 7 It is a module structure diagram of the voltage conversion circuit control device of the present invention;
[0054] Figure 8 It is a schematic diagram of the module structure of the electronic device of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0056] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0057] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present application.
[0058] The present invention provides a voltage conversion circuit control method, referring to Figure 1 , Figure 1 This is a flow chart of a first embodiment of a voltage conversion circuit control method according to the present invention. The method comprises the following steps:
[0059] Step S10, obtaining a sampled bus voltage of a voltage conversion circuit, and obtaining a current sampled inductor current of the voltage conversion circuit;
[0060] The sampled bus voltage is a voltage value obtained by sampling the bus voltage;
[0061] The sampled inductor current is a current value obtained by sampling the inductor current; and the current sampled inductor current is a sampled inductor current obtained by sampling in the current cycle.
[0062] The voltage conversion circuit in this embodiment is described by taking the BUCK circuit as an example. Other types of voltage conversion circuits can be implemented by analogy, such as the BOOST circuit; see Figure 2 , Figure 2 It is the basic topology diagram of the BUCK circuit. The BUCK circuit includes an input capacitor C1, an inductor L, a switch S, a diode D and a bus capacitor C2. Among them, the bus voltage V0 is the voltage on both sides of the bus capacitor of the BUCK circuit, and the inductor current IL is the current in the branch where the inductor is located.
[0063] The specific sampling method of voltage and current can be set based on actual needs, such as collecting bus sampling voltage through a voltage sensor, and obtaining the inductor sampling current by detecting and amplifying the voltage difference across the inductor.
[0064] Step S20, obtaining the target bus voltage, and calculating the target bus voltage and the sampled bus voltage V fdb1 The voltage difference between
[0065] See also Figure 3 , target bus voltage V set The voltage that the voltage conversion circuit needs to output is the expected value of the bus voltage;
[0066] The voltage difference error1 indicates the difference between the actual value and the expected value of the bus voltage.
[0067] It can be understood that the control of the voltage conversion circuit is to output a bus voltage that is consistent with the target bus voltage. Therefore, the voltage difference reflects the degree to which the current bus voltage needs to be adjusted. Therefore, based on the voltage difference, it is possible to know the degree to which the switching devices in the voltage conversion circuit need to be adjusted.
[0068] Step S30, using the voltage difference as an input of a sparrow search algorithm to obtain a reference current signal output by the sparrow search algorithm based on the voltage difference;
[0069] Reference current signal V out1 Indicates the degree of regulation of the bus voltage.
[0070] The sparrow search algorithm finds the optimal solution by simulating the behavior of sparrows when foraging and escaping predators. Sparrows gather together when foraging, but they also disperse to avoid being discovered by predators. When danger approaches, some sparrows will sound the alarm, and others will quickly change their behavior to avoid danger. The sparrow search algorithm uses these behavioral patterns to optimize the search process and find the global optimal solution by simulating the group behavior of sparrows.
[0071] The sparrow search algorithm has the characteristics of high convergence accuracy, fast convergence speed, strong robustness, strong optimization ability and high solution efficiency.
[0072] Step S40: determining a switch drive signal according to the reference current signal and the currently sampled inductor current, and sending the switch drive signal to a switch device in the voltage conversion circuit.
[0073] After the reference current signal is determined, the switch drive signal of the switch device can be determined based on the reference current signal and the current sampled inductor current. The specific method of determining the switch drive signal based on the reference current signal and the current sampled inductor current can be set based on actual needs.
[0074] It can be understood that the switch driving signal is a PWM signal output to the switching device, and the switching device performs switching based on the switch driving signal, thereby adjusting the output bus voltage.
[0075] This embodiment determines the reference current signal based on the voltage difference by setting a sparrow search algorithm, so that the fault tolerance of the voltage conversion circuit can be improved. At the same time, the sparrow search algorithm has high convergence accuracy and efficiency, can adapt to the control requirements of the voltage conversion circuit, and improve the stability of the voltage conversion circuit.
[0076] Further, see Figure 4 In the second embodiment of the voltage conversion circuit control method of the present invention proposed based on the first embodiment of the present invention, the step S30 includes the steps of:
[0077] Step S31, constructing the objective function of the sparrow search algorithm based on the voltage difference;
[0078] Step S32, setting the fitness of the sparrow search algorithm to the difference between the bus voltage and the target bus voltage;
[0079] Step S33, iterating the sparrow search algorithm and monitoring the number of iterations of the sparrow search algorithm;
[0080] Step S34, determining whether the number of iterations reaches the target number;
[0081] Step S35: If the number of iterations reaches the target number, the best position corresponding to the sparrow with the minimum fitness in the sparrow search algorithm is used as the reference current signal.
[0082] The objective function of the sparrow search algorithm is to evaluate the fitness of each individual sparrow, thereby determining its chances of survival and reproduction. The objective function optimizes the global optimal solution by simulating the behaviors of finders and followers in the process of sparrow foraging, as well as the reaction mechanism when facing danger. It can be understood that in this embodiment, the ultimate goal of the voltage conversion circuit is to obtain a bus voltage consistent with the target bus voltage, and the sparrow search algorithm ultimately needs to obtain a reference current signal, that is, the reference current signal needs to indicate that its corresponding bus voltage is consistent with the target bus voltage. Therefore, in this embodiment, the objective function is constructed based on the voltage difference, so that the sparrow search algorithm can select the reference current signal with the smallest difference between the corresponding bus voltage and the target bus voltage.
[0083] The fitness is used to evaluate the quality of the solution and guide the search direction of the algorithm. It can be understood that in each iteration of the sparrow search algorithm, the sparrows are sorted based on the fitness, and in this embodiment, the fitness is set to the difference between the corresponding bus voltage and the target bus voltage. Therefore, in the iteration, the sparrow with a smaller fitness is ranked higher, that is, the corresponding reference current signal is better. Finally, after the iteration is completed, the optimal reference current signal can be obtained, that is, the reference current signal with the smallest difference between the corresponding bus voltage and the target bus voltage.
[0084] In the simulation experiment, virtual sparrows are used to search for food, and the sparrow population can be represented by the following matrix:
[0085]
[0086] Where n represents the number of sparrows; d is the dimension of the problem variable to be optimized, and n and d are set based on actual needs.
[0087] Fitness F X have:
[0088] F X =[f(X1),f(X2),...f(X n )] T
[0089] Among them, f(X n ) is the fitness of the nth sparrow; T is the number of iterations.
[0090] There are two behavioral strategies for sparrows during foraging. One is the discoverer, and the other is the joiner. The discoverer is the leader of the population, mainly discovering the foraging area and specific direction of the entire sparrow population. The joiners usually follow the guidance of the discoverers to obtain food. At the same time, to improve their predation rate, some joiners will monitor the discoverers in order to compete with them for the surrounding food or feed. When the entire sparrow population is threatened by predators or becomes aware of danger, anti-predation behavior will occur.
[0091] In the sparrow search algorithm, the discoverers with better fitness will prioritize food and are responsible for finding food for the entire sparrow population and providing the foraging direction for all joiners. Therefore, the discoverers can obtain a larger foraging range than the joiners. The position update of the discoverers in each iteration is shown as follows:
[0092]
[0093] where R2 is the safety value; X t i,j is the position information of the i-th sparrow in the j-th dimension; exp() represents the warning value, ST is the safety threshold, ST is usually taken as 0.8, Q is a random number obeying the normal distribution, and L is a matrix with all elements being 1, and its size is 1×d.
[0094] When R2 < ST, it indicates that the sparrow population is safe and large-scale search will be carried out. On the contrary, the warning sparrows send warning signals to other sparrows, and all sparrows in the population must fly to a safe area to forage. For the discoverers, their position update is as follows:
[0095]
[0096] where X P is the current optimal position of the discoverer, X worst is the worst position of the overall population in this iteration, and A is a 1×d matrix, and its elements are randomly assigned as 1 or -1, representing the search direction.
[0097] When i > n / 2, it means that the i-th joiner with a lower fitness value has not obtained food and is in a very hungry state. At this time, it needs to fly to other places to forage to obtain more energy. When danger is detected, the sparrow group will perform anti-predation behavior. The sparrows at the edge of the group will quickly move to a safe area to obtain a better position. The sparrows in the middle of the population will move randomly to get closer to other sparrows. The algorithm assumes that 10% to 20% of the sparrows can be aware of danger. Randomly select sparrows, and their position update is as follows:
[0098]
[0099] where X bestis the optimal position of the population during the iteration, K is the step size control parameter, K is a random number in the range of [-l, l], f i is the fitness value of the current sparrow individual, f g and f w is the best fitness value and the worst fitness value of the current population, and ε is a constant far less than 0.
[0100] When f i >f g When f i =f g When , it means that the sparrows in the middle of the population are aware of the danger, and they need to move closer to the best position to reduce the risk of being preyed on. For the support vector regression model, the optimized objective function is defined here to find the optimal hyperparameters C, g, d, r, s so that the mean square error MSE between the predicted value and the original data is minimized:
[0101]
[0102] Among them, f(x i ) is the predicted value, y i is the actual value.
[0103] It can be understood that in each iteration, the position of the sparrow is updated based on the above-mentioned update method. After each update, the position of the sparrow changes, and correspondingly, the corresponding fitness of the sparrow also changes; the number of iterations, that is, the target number, is set based on actual needs. When the number of iterations of the sparrow search algorithm reaches the target number, the iteration is completed, and the minimum fitness at this time is determined. The position of the sparrow corresponding to the minimum fitness indicates the optimal output of the sparrow search algorithm, that is, the reference current signal with the smallest difference between the corresponding bus voltage and the target bus voltage.
[0104] In this embodiment, the fitness and objective function of the sparrow search algorithm are set in combination with specific parameters in the voltage conversion circuit, so that the sparrow search algorithm can output a reference current signal with the smallest difference between the corresponding bus voltage and the target bus voltage.
[0105] Further, see Figure 3 In the third embodiment of the voltage conversion circuit control method of the present invention proposed based on the first embodiment of the present invention, the step S40 includes the steps of:
[0106] Step S41, acquiring an input voltage of the voltage conversion circuit, and obtaining a target current signal through the input voltage and the reference current signal;
[0107] Step S42, calculating the target current signal and the current sampled inductor current Ifdb1 The current difference between
[0108] Step S43, performing deadbeat control on the current difference to determine a target duty cycle corresponding to the switch drive signal;
[0109] Step S44, generating the switch driving signal with a duty cycle equal to the target duty cycle.
[0110] Reference current signal V out1 Indicates the degree of regulation of the bus voltage, which is the input voltage V in Therefore, multiplying the input voltage by the reference current signal can obtain the target current signal I set .
[0111] The input voltage is the voltage input to the voltage conversion circuit. The input voltage is filtered by the power supply through the filter circuit and then output to the voltage conversion circuit.
[0112] The current difference error2 indicates the difference between the actual value and the expected value of the inductor current. Therefore, the duty cycle of the switch drive signal is determined according to the current difference so that the obtained switch drive signal can eliminate the difference and achieve the proximity between the actual value and the expected value.
[0113] The current difference indicates the degree of regulation of the inductor current, and the closing and opening of the switch affects the magnitude of the inductor current. Therefore, after the current difference is determined, the corresponding target duty cycle I can be determined based on the current difference. out1 .
[0114] The target duty cycle indicates the duty cycle required to eliminate the current difference. Therefore, using the target duty cycle as the duty cycle of the switch drive signal in the next current sampling period can achieve accurate regulation of the inductor current, thereby further achieving accurate regulation of the bus voltage.
[0115] Deadbeat control aims to find an input signal that allows the system to enter a steady state in the shortest time; its basic idea is to calculate the pulse width of the next switching cycle based on the system's state equation and output feedback signal to ensure that the system output can quickly and accurately reach the expected value.
[0116] Deadbeat control can eliminate or reduce the possible deadbeat phenomenon in the system, thereby further improving the performance and stability of the system.
[0117] Furthermore, the step S10 includes the steps of:
[0118] Step S11, acquiring a first sampled inductor current and a second sampled inductor current of two consecutive previous control cycles, wherein the control cycle corresponding to the first sampled inductor current is before the control cycle corresponding to the second sampled inductor current;
[0119] Step S12: taking a difference between twice the second sampled inductor current and the first sampled inductor current as the current sampled inductor current.
[0120] It can be understood that at the beginning of each control cycle, the inductor current is sampled; for the current control cycle, the sampled inductor current closest to the current control cycle is the second sampled inductor current I(k, 2), and the sampled inductor current adjacent to the second sampled inductor current and before the second sampled inductor current in the control cycle is the first sampled inductor current I(k, 1); it should be noted that the control cycles corresponding to the first sampled inductor current and the second sampled inductor current are within one control beat; since the duty cycles of the two cycles in each beat are the same, the input and output voltages can also be considered constant, so the current changes are also equal, and based on this, linear interpolation can be performed to obtain the inductor current value one cycle in advance, that is, the current sampled inductor current I SET (k):
[0121] I SET (k)=2I(k,2)-I(k,1)
[0122] The target duty cycle d is:
[0123]
[0124] Among them, k indicates the control beat, and k+1 is the next control beat.
[0125] This embodiment can obtain the inductor current value one cycle in advance through linear extrapolation.
[0126] Further, in a fourth embodiment of the voltage conversion circuit control method of the present invention proposed based on the first embodiment of the present invention, the voltage conversion circuit includes a plurality of conversion branches, each of the conversion branches corresponds to one of the currently sampled inductor currents; the step S40 includes the steps of:
[0127] Step S45, for each of the conversion branches, determining a switch driving signal according to the reference current signal and the current sampled inductor current corresponding to the conversion branch;
[0128] Step S46: sending the switch drive signal to the switch device in the conversion branch.
[0129] See also Figure 5, taking the voltage conversion circuit including three conversion branches as an example for explanation, it can be understood that the conversion branch is a BUCK circuit, that is, the voltage change circuit includes three BUCK circuits in parallel.
[0130] It is understandable that when the voltage conversion circuit includes multiple conversion branches, due to the differences in the parasitic parameters of each phase conversion branch during actual implementation, phase current imbalance will occur; in order to make the output current of each branch consistent, it is necessary to determine the switch drive signal for each branch based on its corresponding current sampled inductor current, so that different branches can output the same inductor current and achieve current output balance.
[0131] By balancing the currents of multiple branches, the current stress of components in the circuit can be reduced, the current stress of each phase branch can be ensured to be the same, and the inductor magnetic saturation phenomenon caused by excessive current in a branch can be effectively prevented.
[0132] Furthermore, the step S45 comprises the steps of:
[0133] Step S451, obtaining the currently sampled inductor current corresponding to each of the conversion branches;
[0134] Step S452, determining a duty cycle compensation value corresponding to each of the conversion branches according to a difference between the currently sampled inductor currents;
[0135] Step S453, for each of the conversion branches, determining an initial duty cycle according to the reference current signal and the current sampled inductor current corresponding to the conversion branch;
[0136] Step S454, compensating the initial duty cycle by the duty cycle compensation value to obtain a target duty cycle;
[0137] Step S455, generating the switch driving signal with a duty cycle equal to the target duty cycle.
[0138] It is understandable that the switching of the switching device will affect the inductor current. Therefore, in order to eliminate the difference between the inductor currents of different conversion branches, it can also be achieved by adjusting the duty cycle of the switching device. Therefore, in this embodiment, the duty cycle compensation value corresponding to each conversion branch is determined based on the difference between the currently sampled inductor currents; the duty cycle compensation value indicates the degree of switch adjustment to eliminate the difference between the inductor currents of different conversion branches; and the initial duty cycle is determined based on the needs of the bus voltage and the inductor current. On the basis of the initial duty cycle, combined with the difference between the inductor currents of different conversion branches, that is, combined with the duty cycle compensation value, the target duty cycle of the final output can be obtained. Specifically, the initial duty cycle and the duty cycle compensation value can be added to obtain the target duty cycle.
[0139] After the target duty cycle is determined, a switch driving signal having a duty cycle equal to the target duty cycle may be provided.
[0140] In a specific application, the target duty cycle D can be determined by the MCU, and the target duty cycle D can be sent to the driving module, so that the driving module generates a switch driving signal according to the target duty cycle.
[0141] Furthermore, the step S452 includes the steps of:
[0142] Step S4521, obtaining the bus current value of the voltage conversion circuit;
[0143] Step S4522, for each of the conversion branches, determining a current deviation value between the currently sampled inductor current corresponding to the conversion branch and the bus current value;
[0144] Step S4523, matching a duty cycle compensation value corresponding to the current deviation value.
[0145] It can be understood that the bus current can be obtained through acquisition. When an inter-phase current imbalance occurs, the current sampled inductor currents corresponding to different conversion branches are different. Therefore, the current deviation value is obtained by comparing the current sampled inductor current with the bus current respectively, so that the current deviation value can indicate the difference between the inductor current of the corresponding conversion branch and the bus current; therefore, by determining the duty cycle compensation value through the current deviation value, the difference between different conversion branches can be eliminated or reduced through the duty cycle compensation value; in actual applications, the duty cycle compensation values corresponding to different current deviation values can be determined in advance based on experimental or historical data. After the current deviation value is determined, the corresponding duty cycle compensation value can be matched.
[0146] See also Figure 6 ,based on Figure 6 The overall implementation process of this embodiment is described as follows:
[0147] 1. The self-test instruction triggers the drive circuit of the BUCK circuit to enable;
[0148] 2. Sample the bus voltage and the inductor current of each conversion branch according to the A / D triggering time;
[0149] 3. Calculate the initial duty cycle of each conversion branch respectively;
[0150] 4. Calculate the current deviation value between the current sampled inductor current and the bus current;
[0151] 6. Determine the duty cycle compensation value corresponding to the current deviation value;
[0152] 7. Obtain the target duty cycle of the switch drive signal in the next current sampling period according to the initial duty cycle and the duty cycle compensation value, and proceed to steps 8 and 10;
[0153] 8. Generate switch drive PWM signal and output;
[0154] 9. The switching device in the BUCK circuit operates based on the switch drive signal;
[0155] 10. Calculate the next A / D trigger time based on the duty cycle.
[0156] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0158] The present application also provides a voltage conversion circuit control device for implementing the above voltage conversion circuit control method, see Figure 7 , the voltage conversion circuit control device comprises:
[0159] A first acquisition module, used to acquire a sampled bus voltage of a voltage conversion circuit and to acquire a current sampled inductor current of the voltage conversion circuit;
[0160] A second acquisition module, used to acquire a target bus voltage and calculate a voltage difference between the target bus voltage and the sampled bus voltage;
[0161] A first execution module, configured to use the voltage difference as an input of a sparrow search algorithm to obtain a reference current signal output by the sparrow search algorithm based on the voltage difference;
[0162] The first determination module is used to determine a switch drive signal according to the reference current signal and the current sampled inductor current, and send the switch drive signal to the switch device in the voltage conversion circuit.
[0163] The voltage conversion circuit control device determines the reference current signal based on the voltage difference by setting the sparrow search algorithm, so that the fault tolerance of the voltage conversion circuit can be improved. At the same time, the sparrow search algorithm has high convergence accuracy and efficiency, can adapt to the control requirements of the voltage conversion circuit, and improve the stability of the voltage conversion circuit.
[0164] It should be noted that the first acquisition module in this embodiment can be used to execute step S10 in the embodiment of the present application, the second acquisition module in this embodiment can be used to execute step S20 in the embodiment of the present application, the first execution module in this embodiment can be used to execute step S30 in the embodiment of the present application, and the first determination module in this embodiment can be used to execute step S40 in the embodiment of the present application.
[0165] Furthermore, the first execution module includes:
[0166] A first construction submodule, used for constructing the objective function of the sparrow search algorithm based on the voltage difference;
[0167] A first setting submodule, used to set the fitness of the sparrow search algorithm to the difference between the bus voltage and the target bus voltage;
[0168] A first monitoring submodule, used for iterating the sparrow search algorithm and monitoring the number of iterations of the sparrow search algorithm;
[0169] A first judgment submodule is used to judge whether the number of iterations reaches the target number;
[0170] The first execution submodule is used for taking the best position corresponding to the sparrow with the minimum fitness in the sparrow search algorithm as the reference current signal if the number of iterations reaches the target number.
[0171] Furthermore, the first determining module includes:
[0172] A first acquisition submodule, used for acquiring an input voltage of the voltage conversion circuit, and obtaining a target current signal through the input voltage and the reference current signal;
[0173] A first calculation submodule, configured to calculate a current difference between the target current signal and the currently sampled inductor current;
[0174] A first determination submodule, configured to perform deadbeat control on the current difference to determine a target duty cycle corresponding to the switch drive signal;
[0175] The first generating submodule is used to generate the switch driving signal with a duty cycle equal to the target duty cycle.
[0176] Furthermore, the first acquisition module includes:
[0177] A second acquisition submodule is used to acquire a first sampled inductor current and a second sampled inductor current of two consecutive previous control cycles, wherein the control cycle corresponding to the first sampled inductor current is before the control cycle corresponding to the second sampled inductor current;
[0178] The second calculation submodule is used to take a difference between twice the second sampled inductor current and the first sampled inductor current as the current sampled inductor current.
[0179] Further, the voltage conversion circuit includes a plurality of conversion branches, each of the conversion branches corresponds to one of the currently sampled inductor currents; and the first determination module includes:
[0180] A second determination submodule, configured to determine, for each of the conversion branches, a switch drive signal according to the reference current signal and the current sampled inductor current corresponding to the conversion branch;
[0181] The first sending submodule is used to send the switch drive signal to the switch device in the conversion branch.
[0182] Furthermore, the second determining submodule includes:
[0183] A first acquisition unit, used for acquiring the current sampled inductor current corresponding to each of the conversion branches;
[0184] A first determining unit, configured to determine a duty cycle compensation value corresponding to each of the conversion branches according to a difference between each of the currently sampled inductor currents;
[0185] A second determining unit, configured to determine, for each of the conversion branches, an initial duty cycle according to the reference current signal and the currently sampled inductor current corresponding to the conversion branch;
[0186] A first compensation unit, configured to compensate the initial duty cycle by using the duty cycle compensation value to obtain a target duty cycle;
[0187] The first generating unit is used to generate the switch driving signal with a duty cycle equal to the target duty cycle.
[0188] Further, the first determining unit includes:
[0189] A first acquisition subunit, used to acquire a bus current value of the voltage conversion circuit;
[0190] A first determining subunit, configured to determine, for each of the conversion branches, a current deviation value between the currently sampled inductor current corresponding to the conversion branch and the bus current value;
[0191] The first matching subunit is used to match a duty cycle compensation value corresponding to the current deviation value.
[0192] Reference Figure 8 In terms of hardware structure, the electronic device may include components such as a communication module 10, a memory 20, and a processor 30. In the electronic device, the processor 30 is connected to the memory 20 and the communication module 10 respectively, and a computer program is stored in the memory 20. The computer program is executed by the processor 30 at the same time, and the steps of the above method embodiment are implemented when the computer program is executed.
[0193] The communication module 10 can be connected to an external communication device through a network. The communication module 10 can receive requests from an external communication device, and can also send requests, instructions and information to the external communication device, which can be other electronic devices, servers or Internet of Things devices, such as televisions, etc.
[0194] The memory 20 can be used to store software programs and various data. The memory 20 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as obtaining a sampled bus voltage of a voltage conversion circuit), etc.; the data storage area can include a database, and the data storage area can store data or information created according to the use of the system, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0195] The processor 30 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 20, and calling data stored in the memory 20, so as to monitor the electronic device as a whole. The processor 30 may include one or more processing units; optionally, the processor 30 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 30.
[0196] although Figure 8Although not shown, the electronic device may further include a circuit control module, which is used to connect to a power source to ensure the normal operation of other components. Figure 8 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0197] The present invention also provides a computer-readable storage medium on which a computer program is stored. The computer-readable storage medium may be Figure 8 The memory 20 in the electronic device may also be at least one of a ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, and an optical disk. The computer-readable storage medium includes a number of instructions for enabling a terminal device with a processor (which may be a television, a car, a mobile phone, a computer, a server, a terminal, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0198] In the present invention, the terms "first", "second", "third", "fourth" and "fifth" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0199] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0200] Although the embodiments of the present invention have been shown and described above, the scope of protection of the present invention is not limited thereto. It is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art can change, modify and replace the above embodiments within the scope of the present invention, and these changes, modifications and replacements should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A voltage conversion circuit control method, characterized in that: The voltage conversion circuit control method comprises: Acquire a sampled bus voltage of a voltage conversion circuit, and acquire a current sampled inductor current of the voltage conversion circuit; Obtaining a target bus voltage, and calculating a voltage difference between the target bus voltage and the sampled bus voltage; Using the voltage difference as an input of a sparrow search algorithm to obtain a reference current signal output by the sparrow search algorithm based on the voltage difference; A switch drive signal is determined according to the reference current signal and the currently sampled inductor current, and the switch drive signal is sent to a switch device in the voltage conversion circuit.
2. The voltage conversion circuit control method according to claim 1, characterized in that: The step of using the voltage difference as an input of a sparrow search algorithm to obtain a reference current signal output by the sparrow search algorithm based on the voltage difference comprises: Constructing the objective function of the sparrow search algorithm based on the voltage difference; Setting the fitness of the sparrow search algorithm to the difference between the bus voltage and the target bus voltage; Iterating the sparrow search algorithm and monitoring the number of iterations of the sparrow search algorithm; Determine whether the number of iterations reaches the target number; If the number of iterations reaches the target number, the best position corresponding to the sparrow with the minimum fitness in the sparrow search algorithm is used as the reference current signal.
3. The voltage conversion circuit control method according to claim 1, characterized in that: The step of determining a switch driving signal according to the reference current signal and the current sampled inductor current comprises: Acquiring an input voltage of the voltage conversion circuit, and obtaining a target current signal through the input voltage and the reference current signal; Calculating a current difference between the target current signal and the currently sampled inductor current; Performing deadbeat control on the current difference to determine a target duty cycle corresponding to the switch drive signal; The switch driving signal having a duty ratio equal to the target duty ratio is generated.
4. The voltage conversion circuit control method according to claim 3, characterized in that: The obtaining of the current sampled inductor current of the voltage conversion circuit comprises: Acquire a first sampled inductor current and a second sampled inductor current of two consecutive previous control cycles, wherein the control cycle corresponding to the first sampled inductor current is before the control cycle corresponding to the second sampled inductor current; The difference between twice the second sampled inductor current and the first sampled inductor current is taken as the current sampled inductor current.
5. The voltage conversion circuit control method according to claim 1, characterized in that: The voltage conversion circuit includes a plurality of conversion branches, each of which corresponds to one of the currently sampled inductor currents; the step of determining a switch drive signal according to the reference current signal and the currently sampled inductor current, and sending the switch drive signal to a switch device in the voltage conversion circuit includes: For each of the conversion branches, determining a switch driving signal according to the reference current signal and the current sampled inductor current corresponding to the conversion branch; The switch drive signal is sent to the switch device in the conversion branch.
6. The voltage conversion circuit control method according to claim 5, characterized in that: The determining of the switch driving signal according to the reference current signal and the current sampled inductor current corresponding to the conversion branch comprises: Acquire the currently sampled inductor current corresponding to each of the conversion branches; Determining a duty cycle compensation value corresponding to each of the conversion branches according to a difference between each of the currently sampled inductor currents; For each of the conversion branches, determining an initial duty cycle according to the reference current signal and the current sampled inductor current corresponding to the conversion branch; Compensating the initial duty cycle by the duty cycle compensation value to obtain a target duty cycle; The switch driving signal having a duty ratio equal to the target duty ratio is generated.
7. The voltage conversion circuit control method according to claim 6, characterized in that: The step of determining the duty cycle compensation value corresponding to each of the conversion branches according to the difference between the currently sampled inductor currents includes: Obtaining a bus current value of the voltage conversion circuit; For each of the conversion branches, determining a current deviation value between the currently sampled inductor current corresponding to the conversion branch and the bus current value; A duty cycle compensation value corresponding to the current deviation value is matched.
8. A voltage conversion circuit control device, characterized in that: The voltage conversion circuit control device comprises: A first acquisition module, used to acquire a sampled bus voltage of a voltage conversion circuit and to acquire a current sampled inductor current of the voltage conversion circuit; A second acquisition module, used to acquire a target bus voltage and calculate a voltage difference between the target bus voltage and the sampled bus voltage; A first execution module, configured to use the voltage difference as an input of a sparrow search algorithm to obtain a reference current signal output by the sparrow search algorithm based on the voltage difference; The first determination module is used to determine a switch drive signal according to the reference current signal and the current sampled inductor current, and send the switch drive signal to the switch device in the voltage conversion circuit.
9. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the voltage conversion circuit control method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the voltage conversion circuit control method according to any one of claims 1 to 7 are implemented.