Conversion efficiency test method, circuit and buck conversion efficiency test circuit
By acquiring the switching pulse count value and the analog-to-digital converter acquisition voltage, the conversion efficiency of the DC converter is calculated, and the problem of increasing power consumption and complexity of the current sampling resistance is solved, achieving a more accurate and simplified power conversion efficiency measurement.
Patent Information
- Application Number
- CN202411054527.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-02
Smart Images

Figure CN118604439B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic circuits, and in particular to a conversion efficiency testing method, circuit, and buck conversion efficiency testing circuit. Background Art
[0002] The DC converter is a DC voltage conversion module commonly used in electronic products, which can convert the input voltage into the DC voltage required by each power module. In order to detect the power conversion efficiency of the DC converter, such as Figure 1 As shown, it is usually necessary to collect the input voltage and output voltage through a resistor divider network, and then connect a current sampling resistor R in series on the power input side and the voltage output side of the DC converter. isense1 , R isense2 , to detect the input current and output current. The input power and output power are calculated, and the ratio of output power to input power is used as the power conversion efficiency. In this way, two additional current sampling resistors need to be connected in series at the power input end and voltage output end of the DC conversion circuit. The additional series current sampling resistors will increase the power consumption of the DC converter and affect the accuracy of the power conversion efficiency measurement. At the same time, the additional series current sampling resistors will also increase the complexity of the DC converter power conversion efficiency test circuit. Summary of the invention
[0003] In order to accurately measure the power conversion efficiency of a DC converter, this application provides the following technical solutions:
[0004] In a first aspect, a conversion efficiency test circuit is provided, including: a signal processing module, a first voltage sampling network, a second voltage sampling network, and a third voltage sampling network.
[0005] The first port of the first voltage sampling network is electrically connected to the voltage input port of the circuit under test, and the second port of the first voltage sampling network is electrically connected to the first port of the signal processing module; the first port of the second voltage sampling network is electrically connected to the voltage output port of the circuit under test, and the second port of the second voltage sampling network is electrically connected to the second port of the signal processing module; the first port of the third voltage sampling network is electrically connected to the switch level output port of the circuit under test, and the second port of the third voltage sampling network is electrically connected to the third port of the signal processing module.
[0006] Furthermore, the signal processing module includes:
[0007] A counter, a first interrupt capture module, a second interrupt capture module, a first analog-to-digital converter, and a second analog-to-digital converter.
[0008] The counter input port serves as the third port of the signal processing module, and the counter output port is electrically connected to the first interrupt capture module input port and the second interrupt capture module input port; the first analog-to-digital converter input port serves as the first port of the signal processing module; and the second analog-to-digital converter input port serves as the second port of the signal processing module.
[0009] Furthermore, the first voltage sampling network includes: a first resistor R1 and a second resistor R2.
[0010] One end of the first resistor R1 serves as the first port of the first voltage sampling network. The other end of the first resistor R1 is electrically connected to one end of the second resistor R2 and serves as the second port of the first voltage sampling network. The other end of the second resistor R2 serves as the third port of the first voltage sampling network and is grounded.
[0011] Furthermore, the second voltage sampling network includes: a third resistor R3 and a fourth resistor R4.
[0012] One end of the third resistor R3 serves as the first port of the second voltage sampling network. The other end of the third resistor R3 is electrically connected to one end of the fourth resistor R4 and serves as the second port of the second voltage sampling network. The other end of the fourth resistor R4 serves as the third port of the second voltage sampling network and is grounded.
[0013] Furthermore, the third voltage sampling network includes: a fifth resistor R5 and a sixth resistor R6.
[0014] One end of the fifth resistor R5 serves as the first port of the third voltage sampling network. The other end of the fifth resistor R5 is electrically connected to one end of the sixth resistor R6 and serves as the second port of the third voltage sampling network. The other end of the sixth resistor R6 serves as the third port of the third voltage sampling network and is grounded.
[0015] In a second aspect, a conversion efficiency test method is provided, which is applicable to the conversion efficiency test circuit described in the first aspect, and the conversion efficiency test circuit includes:
[0016] The count value corresponding to the switch pulse of the DC conversion module is collected to determine the average duty cycle of the switch pulse, wherein the count value is accumulated by the counter.
[0017] Collect the input voltage and output voltage of the DC conversion module.
[0018] The conversion efficiency of the DC conversion module is determined based on the average duty cycle, input voltage, and output voltage.
[0019] Furthermore, collecting the count value corresponding to the switching pulse of the DC conversion module to determine the average duty cycle of the switching pulse includes:
[0020] The counter, the first interrupt capture module and the second interrupt capture module are enabled to collect the count value corresponding to the switch pulse, wherein the first interrupt capture module is used to capture the rising edge of the switch pulse, and the second interrupt capture module is used to capture the falling edge of the switch pulse.
[0021] Based on the rising edge of the switching pulse and the falling edge of the switching pulse, an average duty cycle is determined.
[0022] Further, enabling the counter, the first interrupt capture module and the second interrupt capture module to collect the count value corresponding to the switch pulse includes:
[0023] The count value corresponding to the rising edge of the switch pulse is collected by the first interrupt capture module.
[0024] The count value corresponding to the falling edge of the switch pulse is collected by the second interrupt capture module.
[0025] Further, based on the rising edge of the switching pulse and the falling edge of the switching pulse, an average duty cycle is determined, including:
[0026] The total duration of the high level of the switch pulse is determined based on the count value corresponding to the rising edge of the switch pulse and the count value corresponding to the falling edge of the switch pulse.
[0027] The total duration of the switching pulse is determined based on the count value corresponding to the rising edge of the switching pulse.
[0028] The average duty cycle is determined based on the total high level duration of the switch pulses and the total duration of the switch pulses.
[0029] Further, based on the count value corresponding to the rising edge of the switch pulse and the count value corresponding to the falling edge of the switch pulse, the total duration of the high level of the switch pulse is determined, including:
[0030] Specifically, according to:
[0031] ,
[0032] Determine the total high-level duration of the switch pulse, where T SW_HIGH is the total duration of the high level of the switching pulse, f clk is the clock frequency of the counter, a is the high level number of the switch pulse, N DE_T is the total number of falling edges of the switching pulses in the acquired multiple switching cycles.
[0033] Further, based on the count value corresponding to the rising edge of the switch pulse, the total duration of the switch pulse is determined, including:
[0034] according to:
[0035] ,
[0036] Determine the total duration of the off pulse, where T SW_ALL is the total duration of the switching pulse, Indicates the count value of the counter when the rising edge of the last switch pulse is captured, T_IC 10 It represents the count value of the counter when the rising edge of the first switch pulse is captured, n is the overflow count variable, and RL is the reload value.
[0037] Further, based on the total duration of the high level of the switch pulse and the total duration of the switch pulse, the average duty cycle is determined, including:
[0038] according to:
[0039] ,
[0040] Determine the average duty cycle, where is the average duty cycle, T SW_HIGH is the total duration of the high level of the switch pulse, T SW_ALL is the total duration of the switching pulse.
[0041] Furthermore, the input voltage and output voltage of the DC conversion module are collected, including:
[0042] The input voltage is determined by a first voltage sampling network and a first analog-to-digital converter.
[0043] The output voltage is determined by a second voltage sampling network and a second analog-to-digital converter.
[0044] Further, determining the input voltage through a first voltage sampling network and a first analog-to-digital converter includes:
[0045] A first analog-to-digital converter is used to obtain a first sampling voltage V through a first voltage sampling network. INS , where the first sampling voltage V INS is the input voltage V IN The first voltage sampling network includes: a first resistor R1 and a second resistor R2. One end of the first resistor R1 is connected to the input voltage V IN The other end of the first resistor R1 is connected in series with the second resistor R2 and then grounded.
[0046] according to:
[0047] ,
[0048] Determine the input voltage V IN , where R1 is the resistance value of the first resistor, and R2 is the resistance value of the second resistor.
[0049] Further, determining the output voltage through a second voltage sampling network and a second analog-to-digital converter includes:
[0050] A second analog-to-digital converter is used to obtain a second sampling voltage V through a second voltage sampling network. OUTS , where the second sampling voltage V OUTS is the output voltage V OUT The second voltage sampling network includes: a third resistor R3 and a fourth resistor R4. One end of the third resistor R3 is connected to the output voltage V OUT The other end of the third resistor R3 is connected in series with the fourth resistor R4 and then grounded.
[0051] according to:
[0052] ,
[0053] Determine the output voltage V OUT ,in, R 3 is the resistance of the third resistor, R 4 is the resistance value of the fourth resistor.
[0054] Further, the conversion efficiency of the DC conversion module is determined according to the average duty cycle, the input voltage, and the output voltage, including:
[0055] according to:
[0056] ,
[0057] Determine the conversion efficiency of the DC conversion module, where η is the conversion efficiency of the DC conversion module. is the average duty cycle, V IN is the input voltage, V OUT is the output voltage.
[0058] Furthermore, before collecting the count value corresponding to the switching pulse and determining the average duty cycle of the switching pulse, the method further includes:
[0059] A counter, a first interrupt capture module and a second interrupt capture module are configured.
[0060] Furthermore, collecting the count value corresponding to the switch pulse also includes:
[0061] The third voltage sampling network is used according to:
[0062] ,
[0063] Convert the switch pulse high level voltage to the counter input voltage, where V S is the counter input voltage, V Pis a switching pulse high level voltage, the third voltage sampling network includes a fifth resistor R5 and a sixth resistor R6, R5 is the resistance value of the fifth resistor, and R6 is the resistance value of the sixth resistor.
[0064] In a third aspect, a conversion efficiency test device is provided, comprising:
[0065] The duty cycle determination module is used to collect the count value corresponding to the switching pulse of the DC conversion module and determine the average duty cycle of the switching pulse, wherein the count value is accumulated by the counter.
[0066] The voltage determination module is used to collect the input voltage and output voltage of the DC conversion module.
[0067] The conversion efficiency determination module is used to determine the conversion efficiency of the DC conversion module according to the average duty cycle, input voltage and output voltage.
[0068] In a fourth aspect, a computer program product is provided, including a computer program, which implements the conversion efficiency testing method recorded in the second aspect when executed by a processor.
[0069] In a fifth aspect, a buck conversion efficiency test circuit is provided, comprising: the conversion efficiency test circuit described in the first aspect, and a buck conversion module.
[0070] The voltage input port of the step-down conversion module is electrically connected to the first port of the first voltage sampling network, the voltage output port of the step-down conversion module is electrically connected to the first port of the second voltage sampling network, and the switch level output port of the step-down conversion module is electrically connected to the first port of the third voltage sampling network.
[0071] Furthermore, the step-down conversion module includes: a driving submodule, a first transistor T1, a second transistor T2, an inductor L, and a capacitor C.
[0072] The first output port of the driving submodule is electrically connected to the first pole of the first transistor, the second output port of the driving submodule is electrically connected to the first pole of the second transistor, the second pole of the first transistor serves as the voltage input port of the buck conversion module, the third pole of the first transistor is electrically connected to the second pole of the second transistor and serves as the switch level output port of the buck conversion module, the third pole of the second transistor is grounded, the third pole of the first transistor is also electrically connected to one end of the inductor L, the other end of the inductor L is electrically connected to one end of the capacitor C and serves as the voltage output port of the buck conversion module, and the other end of the capacitor C is grounded.
[0073] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0074] By implementing the conversion efficiency testing method, circuit and buck conversion efficiency testing circuit disclosed in the embodiments of the present application, the measurement accuracy of the DC converter power conversion efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0076] Figure 1 It is a schematic diagram of a conversion efficiency test circuit of a DC converter;
[0077] Figure 2 is a schematic diagram of a conversion efficiency testing method provided in an embodiment of the present application;
[0078] Figure 3 is a schematic diagram of a DC converter provided in an embodiment of the present application;
[0079] Figure 4 It is a switching pulse schematic diagram provided in an embodiment of the present application;
[0080] Figure 5 is a schematic diagram of a conversion efficiency testing device provided in an embodiment of the present application;
[0081] Figure 6 is a schematic diagram of a conversion efficiency test circuit provided in an embodiment of the present application;
[0082] Figure 7 It is a schematic diagram of a buck conversion efficiency test circuit provided in an embodiment of the present application. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the implementation mode of this application will be clearly and completely described below in conjunction with the drawings in the implementation mode of this application. Obviously, the described implementation mode is only a part of the embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0084] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure shall have the usual meanings understood by persons with ordinary skills in the field to which the present disclosure belongs. The words "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one", "one" or "the" do not indicate a quantity limitation, but indicate that there is at least one. The numbers in the drawings of the specification only indicate the distinction between various functional components or modules, and do not indicate the logical relationship between components or modules. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0085] Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It should be noted that in the accompanying drawings, the same reference numerals are given to components having substantially the same or similar structures and functions, and repeated descriptions thereof will be omitted.
[0086] In order to solve the problem that when a measurement circuit is used to measure the efficiency of a DC converter, the introduction of a current sampling resistor will increase the power consumption of the DC converter and affect the accuracy of its power conversion efficiency measurement, the present application provides the following technical solutions:
[0087] In some embodiments, Figure 2 As shown, a conversion efficiency testing method includes:
[0088] S100: Collecting count values corresponding to switching pulses of a DC conversion module to determine an average duty cycle of the switching pulses, wherein the count values are accumulated by a counter.
[0089] S200: Collect input voltage and output voltage of the DC conversion module.
[0090] S300: Determine the conversion efficiency of the DC conversion module according to the average duty cycle, the input voltage, and the output voltage.
[0091] The specific method of determining the conversion efficiency of the DC conversion module according to the average duty cycle, input voltage, and output voltage is:
[0092] ;
[0093] Where, η is the conversion efficiency of the DC conversion module, W OUTis the output power of the DC conversion module, W IN is the input power of the DC conversion module, V OUT is the output voltage of the DC conversion module, V IN is the input voltage of the DC conversion module, is the average duty cycle of the DC conversion module.
[0094] This is because: Figure 3 In the DC conversion module shown in FIG. , the DC conversion module has several switching cycles T SW The input power at the input end is:
[0095] ;
[0096] The input power at the input is:
[0097] ;
[0098] The ratio of output power to input power is the conversion efficiency.
[0099] Collect the count value corresponding to the switching pulse of the DC conversion module to determine the average duty cycle of the switching pulse, including:
[0100] S110: Enable the counter, the first interrupt capture module and the second interrupt capture module to collect the count value corresponding to the switch pulse, wherein the first interrupt capture module is used to capture the rising edge of the switch pulse, and the second interrupt capture module is used to capture the falling edge of the switch pulse.
[0101] S120: Determine an average duty cycle based on the rising edge of the switching pulse and the falling edge of the switching pulse.
[0102] S110: enabling the counter, the first interrupt capture module and the second interrupt capture module to collect the count value corresponding to the switch pulse, including:
[0103] S111: Collecting the count value corresponding to the rising edge of the switch pulse through the first interrupt capture module.
[0104] S112: Collect the count value corresponding to the falling edge of the switch pulse through the second interrupt capture module.
[0105] Enabling the counter, the first interrupt capture module, and the second interrupt capture module can be completed by program instructions, or by a hardware module under certain preset conditions. Enabling the counter, the first interrupt capture module, and the second interrupt capture module usually involves writing specific values to specific registers. Schematically, writing specific values to specific registers with program instructions can enable the counter, the first interrupt capture module, and the second interrupt capture module. The order of enabling is usually to enable the counter first, then enable the first interrupt capture module, and / or the second interrupt capture module. The present application does not limit the specific instructions for enabling the counter, the first interrupt capture module, and the second interrupt capture module, the specific registers operated by the corresponding instructions, and the specific values written to the specific registers.
[0106] When the counter is enabled, it will clock at a frequency f clk The count value is accumulated step by step (usually the step size is set to 1). When the count value accumulates to the reload value RL, the counter will automatically start counting again from 0 and trigger the counter overflow event, and enable the counter interrupt function.
[0107] After being enabled, the first interrupt capture (IC) module IC1 is used to detect the rising edge of the switch pulse sent by the DC converter drive circuit. When the rising edge of the switch pulse arrives, the first interrupt capture module IC1 enables the first interrupt capture function.
[0108] After the first interrupt capture function is enabled, the processor will obtain the count value of the counter when capturing the rising edge of the switch pulse, as well as the switch pulse rising edge count variable N when capturing the rising edge of the switch pulse. RE The number of rising edges of the switching pulse.
[0109] Optionally, the count value when capturing the rising edge of the switch pulse is stored in the memory in the form of an array. The corresponding number of rising edges of the switch pulse can be used as the number of the corresponding array element in the array. It should be noted that the number of the first array element in the array is 0. When the number of rising edges of the switch pulse is used to represent the corresponding array element number, the number of rising edges of the switch pulse minus 1 needs to be used as the corresponding array element number.
[0110] Indicatively, the count value of the counter when the rising edge of the switch pulse is captured is saved in the switch pulse rising edge array, and the switch pulse rising edge array is in the following form:
[0111] T_IC1 = { T_IC 10 , T_IC 11 ,…,T_IC 1i};
[0112] Among them, T_IC1 is the array name of the switch pulse rising edge array.10 To capture the corresponding count value of the counter when the first switch pulse rises, T_IC 11 To capture the corresponding count value of the counter when the second switch pulse rises, T_IC 1i is the corresponding count value of the counter when the rising edge of the last switch pulse is captured. Where, i = N RE_T - 1. N RE_T is the total number of rising edges of the switching pulse.
[0113] After being enabled, the second interrupt capture module IC2 is used to detect the falling edge of the switch pulse sent by the DC converter drive circuit. When the falling edge of the switch pulse arrives, the second interrupt capture module IC2 enables the second interrupt capture function.
[0114] After the second interrupt capture function is enabled, the processor will obtain the count value of the counter when capturing the falling edge of the switch pulse, as well as the switch pulse falling edge count variable N when capturing the falling edge of the switch pulse. DE The number of falling edges of the switching pulse.
[0115] Optionally, the count value when capturing the falling edge of the switch pulse is stored in the memory in the form of an array. The corresponding number of falling edges of the switch pulse can be used as the number of the corresponding array element in the array. It should be noted that the number of the first array element in the array is 0. When the number of falling edges of the switch pulse is used to represent the corresponding array element number, the number of falling edges of the switch pulse minus 1 needs to be used as the corresponding array element number.
[0116] Schematically, the count value of the counter when the falling edge of the switch pulse is captured is saved in the falling edge array of the switch pulse. The falling edge array of the switch pulse is in the following form:
[0117] T_IC2 = { T_IC 20 , T_IC 21 …, T_IC 2j};
[0118] Among them, T_IC2 is the array name of the falling edge array of the switch pulse, T_IC 20 To capture the corresponding count value of the counter when the first switching pulse falls, T_IC 21 is the corresponding count value of the counter at the falling edge of the second switch pulse captured, T_IC 2j is the corresponding count value of the counter when the last falling edge of the switch pulse is captured. Where, j = N DE_T -1. N DE_T is the total number of falling edges of the switching pulse.
[0119] Preferably, the memory mentioned above is the internal memory of the system.
[0120] Preferably, the internal memory of the system is RAM (Random Access Memory).
[0121] Based on the rising edge of the switching pulse and the falling edge of the switching pulse, the average duty cycle is determined, including:
[0122] S121: Determine the total duration of the high level of the switch pulse based on the count value corresponding to the rising edge of the switch pulse and the count value corresponding to the falling edge of the switch pulse.
[0123] S122: Determine the total duration of the switch pulse based on the count value corresponding to the rising edge of the switch pulse.
[0124] S123: Determine an average duty cycle based on the total duration of the high level of the switch pulse and the total duration of the switch pulse.
[0125] For the switching pulse modulated by PWM (Pulse Width Modulation), the duration of the high level in a single switching cycle has jitter. Therefore, the duty cycle calculated by the duration of the high level in a single switching cycle will fluctuate. In order to improve the detection accuracy and avoid the error caused by the duty cycle fluctuation of a single switching cycle, usually, data of multiple switching cycles are collected to calculate the average duty cycle.
[0126] Optionally, the plurality of switching cycles may be 100 switching cycles, 200 switching cycles, etc.
[0127] In order to determine the average duty cycle, it is first necessary to determine the total high level duration of the switching pulse and the total duration of the switching pulse within multiple switching cycles during which the count values corresponding to the switching pulse are collected.
[0128] Based on the count value corresponding to the rising edge of the switch pulse and the count value corresponding to the falling edge of the switch pulse, the total high level duration of the switch pulse is determined, including:
[0129] Specifically, according to:
[0130] ,
[0131] Determine the total high-level duration of the switch pulse, where T SW_HIGH is the total duration of the high level of the switching pulse, f clk is the clock frequency of the counter, a is the high level number of the switch pulse, N DE_T is the total number of falling edges of the switching pulse in the multiple switching cycles collected. This is because the appearance of the falling edge of the switching pulse marks the end of the high level in a switching pulse cycle. Therefore, N DE_T Indicates the number of high levels.
[0132] The specific value of X[a] can be determined by the following formula:
[0133] ;
[0134] Among them, the maximum value of a is N DE_T – 1, corresponding to the total number of array elements in the falling edge array of the switch pulse. This is because usually, for the high level in the same switch pulse, the time when the falling edge of the switch pulse arrives is later than the time when the rising edge of the switch pulse arrives. Therefore, in most cases, the falling edge of the switch pulse in the same switch pulse T_IC 2a With the rising edge of the switching pulse T_IC 1a The difference between the high level and the high level can determine how many count values the high level continues; however, since the counter will automatically start counting from 0 when it accumulates to the reload value, if the counter is reloaded when the high level of a switch pulse continues, the count value corresponding to the falling edge of the switch pulse must be less than the count value corresponding to the rising edge of the corresponding switch pulse. Therefore, when calculating the count value of the high level of this switch pulse, the reload number RL needs to be added.
[0135] Based on the count value corresponding to the rising edge of the switch pulse, the total duration of the switch pulse is determined, including:
[0136] according to:
[0137] ,
[0138] Determine the total duration of the off pulse, where T SW_ALL is the total duration of the switching pulse, Indicates the count value of the counter when the last rising edge of the switch pulse is captured. This is because each time a switch pulse rises, it marks the end of the previous switch cycle. Therefore, the total duration of the switch pulse can be calculated by the number of count values between the last switch pulse rise and the first switch pulse rise. When calculating, the difference between the overflow count value and the reload value also needs to be added. T_IC 10 It represents the count value of the counter when the rising edge of the first switch pulse is captured, n is the overflow count variable, and RL is the reload value.
[0139] It should be noted that the number of array elements stored in the corresponding switching pulse rising edge array is one more than the number of array elements stored in the switching pulse falling edge array. This is because there is a complete switching cycle T between the two rising edges. SW , and there is a falling edge between the two rising edges, and the pulse high level D·T between the falling edge and the previous rising edge SW ,like Figure 4 shown.
[0140] S123: Determine an average duty cycle based on the total duration of the high level of the switch pulse and the total duration of the switch pulse, including:
[0141] according to:
[0142] ,
[0143] Determine the average duty cycle, where is the average duty cycle, T SW_HIGH is the total duration of the high level of the switching pulse, T SW_ALL is the total duration of the switching pulse.
[0144] Collect the input voltage and output voltage of the DC conversion module, including:
[0145] S210: Determine an input voltage through a first voltage sampling network and a first analog-to-digital converter.
[0146] S220: Determine the output voltage through a second voltage sampling network and a second analog-to-digital converter.
[0147] S210: Determine an input voltage through a first voltage sampling network and a first analog-to-digital converter, including:
[0148] S211: Using a first analog-to-digital converter to obtain a first sampling voltage V through a first voltage sampling network INS , where the first sampling voltage V INS is the input voltage V IN The first voltage sampling network includes: a first resistor R1 and a second resistor R2. One end of the first resistor R1 is connected to the input voltage V IN The other end of the first resistor R1 is connected in series with the second resistor R2 and then grounded.
[0149] S212: According to:
[0150] ,
[0151] Determine the input voltage V IN , where R1 is the resistance value of the first resistor, and R2 is the resistance value of the second resistor.
[0152] S220: Determine the output voltage through a second voltage sampling network and a second analog-to-digital converter, including:
[0153] S221: Using a second analog-to-digital converter to obtain a second sampling voltage V through a second voltage sampling network OUTS , where the second sampling voltage V OUTS is the output voltage V OUTThe second voltage sampling network includes: a third resistor R3 and a fourth resistor R4. One end of the third resistor R3 is connected to the output voltage V OUT The other end of the third resistor R3 is connected in series with the fourth resistor R4 and then grounded.
[0154] S222: According to:
[0155] ,
[0156] Determine the output voltage V OUT ,in, R 3 is the resistance of the third resistor, R 4 is the resistance value of the fourth resistor.
[0157] S300: Determine the conversion efficiency of the DC conversion module according to the average duty cycle, the input voltage, and the output voltage, including:
[0158] according to:
[0159] ,
[0160] Determine the conversion efficiency of the DC conversion module, where η is the conversion efficiency of the DC conversion module. is the average duty cycle, V IN is the input voltage, V OUT is the output voltage.
[0161] The conversion efficiency η can be expressed as:
[0162] ;
[0163] Among them, W OUT is the output power of the DC conversion module, W IN Input power to the DC conversion module.
[0164] The DC conversion module has a switching cycle T SW The input power at the input end is:
[0165] ;
[0166] The input power at the input is:
[0167] ;
[0168] Among them, I OUT is the output current, I IN The calculation formula used in this application can be obtained by replacing the duty cycle of a single switching cycle with the average duty cycle.
[0169] Preferably, before collecting the count value corresponding to the switching pulse and determining the average duty cycle of the switching pulse, the method further includes:
[0170] S000: Configure a counter, a first interrupt capture module and a second interrupt capture module.
[0171] Configuring the counter includes at least: configuring the counter's counting mode, clock frequency f clk and reload value RL. The counting mode of the counter is configured as the up counting mode. After the configured counter is enabled, it will count at the clock frequency f clk The count value is accumulated step by step (usually the step size is set to 1). When the count value accumulates to the reload value RL, the counter will automatically start counting again from 0 and trigger the counter overflow event, and enable the counter interrupt function.
[0172] The processor in the system will give priority to executing the interrupt function that triggers the interrupt. Taking the interrupt triggered by the counter interrupt function as an example, the overflow count variable n is set in the counter interrupt function to count the number of overflow events of the counter. The initial value of the overflow count variable n is 0. Each time an overflow event occurs, the processor accumulates an overflow count step based on the previous overflow count value and updates the overflow count value of the overflow count variable n.
[0173] Schematically, the counting mode of the counter is configured as the up counting mode, and the clock frequency of the counter is f clk Set to 10MHz; reload value RL is set to 65535 (the maximum value of a 16-bit binary number), and the overflow count step is set to 1. Taking the counter in the MCU (Microcontroller Unit) as an example, the counter reload value, RL=65535, is configured in the TIM1_ARR register. Whenever the counter accumulates to 65535, the counter will automatically start counting from 0 and trigger a counter overflow event. At the same time, the counter interrupt function is enabled. After the counter interrupt function is enabled, the processor increases the overflow count variable n in the counter interrupt function by 1 based on the previous overflow count value, and updates the overflow count value of the overflow count variable n.
[0174] The first interrupt capture module IC1 is configured to enable the first interrupt capture function when the rising edge of the switch pulse sent by the DC converter drive circuit is detected. The first interrupt capture function is provided with a switch pulse rising edge count variable N RE , which is used to count the number of times the switch pulse rising edge occurs. Usually, the switch pulse rising edge counting variable is initialized to 0. When the switch pulse rising edge is captured, the switch pulse rising edge counting variable N RE The count value is accumulated step by step (usually the step size is set to 1) until the total number of rising edges of the switching pulse NRE_T The total number of rising edges of the switching pulse is N RE_T Is a settable variable.
[0175] For example, to capture 101 rising edges of switch pulses, set N RE_T Set to: N RE_T = 101. When the number of rising edges of the captured switching pulses reaches the total number of rising edges of the switching pulses N RE_T , then turn off the first interrupt capture module IC1 and stop capturing the rising edge of the switch pulse.
[0176] The second interrupt capture module IC2 is configured to enable the second interrupt capture function when the falling edge of the switch pulse sent by the DC converter drive circuit is detected. The second interrupt capture function is provided with a switch pulse falling edge count variable N DE , which is used to count the number of times the falling edge of the switch pulse occurs. Usually, the falling edge counting variable of the switch pulse is initialized to 0. When the falling edge of the switch pulse is captured, the falling edge counting variable N DE The count value is accumulated step by step (usually the step size is set to 1) until the total number of falling edges N DE_T The total number of falling edges is N DE_T Is a settable variable.
[0177] For example, to capture 100 falling edges of switch pulses, set N DE_T Set to: N DE_T = 100.
[0178] The DC converter driving circuit described above is used to generate a switching pulse waveform to control the alternating on and off of the switching device in the DC converter so that the DC converter can work normally.
[0179] Collect the count value corresponding to the switch pulse, including:
[0180] The third voltage sampling network is used according to:
[0181] ,
[0182] Convert the switch pulse high level voltage to the counter input voltage, where V S is the counter input voltage, V P is a switching pulse high level voltage, the third voltage sampling network includes a fifth resistor R5 and a sixth resistor R6, R5 is the resistance value of the fifth resistor, and R6 is the resistance value of the sixth resistor.
[0183] It should be understood that although Figure 2The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0184] In some other embodiments, a conversion efficiency testing device, such as Figure 5 As shown, including:
[0185] The duty cycle determination module is used to collect the count value corresponding to the switch pulse of the DC conversion module and determine the average duty cycle of the switch pulse, wherein the count value is accumulated by the counter.
[0186] The voltage determination module is used to collect the input voltage and output voltage of the DC conversion module.
[0187] The conversion efficiency determination module is used to determine the conversion efficiency of the DC conversion module according to the average duty cycle, input voltage and output voltage.
[0188] For the specific definition of the conversion efficiency test device described above, please refer to the definition of the commodity queue adjustment method described above, which will not be repeated here. Each module in the above conversion efficiency test device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0189] In some other embodiments, a computer program product includes a computer program, and when the computer program is executed by a processor, the conversion efficiency test method described above is implemented. The conversion efficiency test method is not described in detail here.
[0190] In some other embodiments, a conversion efficiency test circuit is used to implement the conversion efficiency test method described above. Figure 6 As shown, the conversion efficiency test circuit includes: a first voltage sampling network 100 , a second voltage sampling network 200 , a third voltage sampling network 300 , and a signal processing module 400 .
[0191] The first port of the first voltage sampling network is connected to the voltage input port V INThe second port of the first voltage sampling network is electrically connected to the first port of the signal processing module; the first port of the second voltage sampling network is electrically connected to the voltage output port V OUT The second port of the second voltage sampling network is electrically connected to the second port of the signal processing module; the first port of the third voltage sampling network is electrically connected to the switch level output port SW of the circuit under test, and the second port of the third voltage sampling network is electrically connected to the third port of the signal processing module.
[0192] The signal processing module includes 400:
[0193] The counter 410 , the first interrupt capture module 420 , the second interrupt capture module 430 , the first analog-to-digital converter 440 , and the second analog-to-digital converter 450 .
[0194] Preferably, the signal processing module can be obtained by configuring the modular circuit in the MCU. The above text describes the functions of the counter 410, the first interrupt capture module 420, and the second interrupt capture module 430 after configuration. The first analog-to-digital converter 440 and the second analog-to-digital converter 450 are used to convert analog signals into digital signals.
[0195] The counter input port serves as the third port of the signal processing module, and the counter output port is electrically connected to the first interrupt capture module input port and the second interrupt capture module input port; the first analog-to-digital converter input port serves as the first port of the signal processing module; and the second analog-to-digital converter input port serves as the second port of the signal processing module.
[0196] The first voltage sampling network includes: a first resistor R1 and a second resistor R2.
[0197] One end of the first resistor R1 serves as the first port of the first voltage sampling network. The other end of the first resistor R1 is electrically connected to one end of the second resistor R2 and serves as the second port of the first voltage sampling network. The other end of the second resistor R2 serves as the third port of the first voltage sampling network and is grounded.
[0198] The second voltage sampling network includes: a third resistor R3 and a fourth resistor R4.
[0199] One end of the third resistor R3 serves as the first port of the second voltage sampling network. The other end of the third resistor R3 is electrically connected to one end of the fourth resistor R4 and serves as the second port of the second voltage sampling network. The other end of the fourth resistor R4 serves as the third port of the second voltage sampling network and is grounded.
[0200] The third voltage sampling network includes: a fifth resistor R5 and a sixth resistor R6.
[0201] One end of the fifth resistor R5 serves as the first port of the third voltage sampling network. The other end of the fifth resistor R5 is electrically connected to one end of the sixth resistor R6 and serves as the second port of the third voltage sampling network. The other end of the sixth resistor R6 serves as the third port of the third voltage sampling network and is grounded.
[0202] In some other embodiments, a buck conversion efficiency test circuit is provided, such as Figure 7 As shown, it includes: the conversion efficiency test circuit described above, and a buck conversion module 500.
[0203] The voltage input port of the step-down conversion module is electrically connected to the first port of the first voltage sampling network, the voltage output port of the step-down conversion module is electrically connected to the first port of the second voltage sampling network, and the switch level output port of the step-down conversion module is electrically connected to the first port of the third voltage sampling network.
[0204] The step-down conversion module includes: a driving submodule 510, a first transistor T1, a second transistor T2, an inductor L, and a capacitor C.
[0205] The first output port of the driving submodule is electrically connected to the first pole of the first transistor, the second output port of the driving submodule is electrically connected to the first pole of the second transistor, the second pole of the first transistor serves as the voltage input port of the buck conversion module, the third pole of the first transistor is electrically connected to the second pole of the second transistor and serves as the switch level output port of the buck conversion module, the third pole of the second transistor is grounded, the third pole of the first transistor is also electrically connected to one end of the inductor L, the other end of the inductor L is electrically connected to one end of the capacitor C and serves as the voltage output port of the buck conversion module, and the other end of the capacitor C is grounded.
[0206] By implementing the conversion efficiency test method, circuit and buck conversion efficiency test circuit disclosed in the embodiments of the present application, the measurement accuracy of the DC converter power conversion efficiency can be improved. At the same time, the DC converter power conversion efficiency measurement circuit can be simplified by using the circuit module in the electronic product.
[0207] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here. Embodiment 1
[0208] A conversion efficiency test method, such as Figure 2 As shown, including:
[0209] S100: collecting count values corresponding to the switching pulses of the DC conversion module to determine an average duty cycle of the switching pulses, wherein the count values are accumulated by a counter.
[0210] S200: Collect input voltage and output voltage of the DC conversion module.
[0211] S300: Determine the conversion efficiency of the DC conversion module according to the average duty cycle, the input voltage, and the output voltage. Embodiment 2
[0212] On the basis of the first embodiment, the count value corresponding to the switching pulse of the DC conversion module is collected to determine the average duty cycle of the switching pulse, including:
[0213] S110: Enable the counter, the first interrupt capture module and the second interrupt capture module to collect the count value corresponding to the switch pulse, wherein the first interrupt capture module is used to capture the rising edge of the switch pulse, and the second interrupt capture module is used to capture the falling edge of the switch pulse.
[0214] S120: Determine an average duty cycle based on the rising edge of the switching pulse and the falling edge of the switching pulse.
[0215] S110: enabling the counter, the first interrupt capture module and the second interrupt capture module to collect the count value corresponding to the switch pulse, including:
[0216] S111: Collecting the count value corresponding to the rising edge of the switch pulse through the first interrupt capture module.
[0217] S112: Collect the count value corresponding to the falling edge of the switch pulse through the second interrupt capture module.
[0218] S120: Determine an average duty cycle based on a rising edge of a switching pulse and a falling edge of a switching pulse, including:
[0219] S121: Determine the total duration of the high level of the switch pulse based on the count value corresponding to the rising edge of the switch pulse and the count value corresponding to the falling edge of the switch pulse.
[0220] S122: Determine the total duration of the switch pulse based on the count value corresponding to the rising edge of the switch pulse.
[0221] S123: Determine an average duty cycle based on the total duration of the high level of the switch pulse and the total duration of the switch pulse.
[0222] S121: Determine the total duration of the high level of the switch pulse based on the count value corresponding to the rising edge of the switch pulse and the count value corresponding to the falling edge of the switch pulse, including:
[0223] Specifically, according to:
[0224] ,
[0225] Determine the total high-level duration of the switch pulse, where T SW_HIGH is the total duration of the high level of the switching pulse, f clk is the clock frequency of the counter, a is the high level number of the switch pulse, NDE_T is the total number of falling edges of the switching pulses in the acquired multiple switching cycles.
[0226] S122: Determine the total duration of the switch pulse based on the count value corresponding to the rising edge of the switch pulse, including:
[0227] according to:
[0228] ,
[0229] Determine the total duration of the off pulse, where T SW_ALL is the total duration of the switching pulse, Indicates the count value of the counter when the rising edge of the last switch pulse is captured, T_IC 10 It represents the count value of the counter when the rising edge of the first switch pulse is captured, n is the overflow count variable, and RL is the reload value.
[0230] S123: Determine an average duty cycle based on the total duration of the high level of the switch pulse and the total duration of the switch pulse, including:
[0231] according to:
[0232] ,
[0233] Determine the average duty cycle, where is the average duty cycle, T SW_HIGH is the total duration of the high level of the switch pulse, T SW_ALL is the total duration of the switching pulse.
[0234] S200: collects the input voltage and output voltage of the DC conversion module, including:
[0235] S210: Determine an input voltage through a first voltage sampling network and a first analog-to-digital converter.
[0236] S220: Determine the output voltage through a second voltage sampling network and a second analog-to-digital converter.
[0237] S210: Determine an input voltage through a first voltage sampling network and a first analog-to-digital converter, including:
[0238] S211: Using a first analog-to-digital converter to obtain a first sampling voltage V through a first voltage sampling network INS , where the first sampling voltage V INS is the input voltage V IN The first voltage sampling network includes: a first resistor R1 and a second resistor R2. One end of the first resistor R1 is connected to the input voltage V IN The other end of the first resistor R1 is connected in series with the second resistor R2 and then grounded.
[0239] S212: According to:
[0240] ,
[0241] Determine the input voltage V IN , where R1 is the resistance value of the first resistor, and R2 is the resistance value of the second resistor.
[0242] S220: Determine the output voltage through a second voltage sampling network and a second analog-to-digital converter, including:
[0243] S221: Using a second analog-to-digital converter to obtain a second sampling voltage V through a second voltage sampling network OUTS , where the second sampling voltage V OUTS is the output voltage V OUT The second voltage sampling network includes: a third resistor R3 and a fourth resistor R4. One end of the third resistor R3 is connected to the output voltage V OUT The other end of the third resistor R3 is connected in series with the fourth resistor R4 and then grounded.
[0244] S222: According to:
[0245] ,
[0246] Determine the output voltage V OUT ,in, R 3 is the resistance of the third resistor, R 4 is the resistance value of the fourth resistor.
[0247] S300: Determine the conversion efficiency of the DC conversion module according to the average duty cycle, the input voltage, and the output voltage, including:
[0248] according to:
[0249] ,
[0250] Determine the conversion efficiency of the DC conversion module, where η is the conversion efficiency of the DC conversion module. is the average duty cycle, V IN is the input voltage, V OUT is the output voltage.
[0251] S100: Before collecting the count value corresponding to the switch pulse and determining the average duty cycle of the switch pulse, the process further includes:
[0252] S000: Configure a counter, a first interrupt capture module and a second interrupt capture module.
[0253] S100: Collecting the count value corresponding to the switch pulse, and also including:
[0254] The third voltage sampling network is used according to:
[0255] ,
[0256] Convert the switch pulse high level voltage to the counter input voltage, where V S is the counter input voltage, V P is a switch pulse high level voltage, the third voltage sampling network includes a fifth resistor R5 and a sixth resistor R6, R5 is the resistance value of the fifth resistor, and R6 is the resistance value of the sixth resistor.
[0257] The contents described in the first embodiment will not be repeated here. Embodiment 3
[0258] A conversion efficiency testing device, such as Figure 5 As shown, including:
[0259] The duty cycle determination module is used to collect the count value corresponding to the switch pulse of the DC conversion module and determine the average duty cycle of the switch pulse, wherein the count value is accumulated by the counter.
[0260] The voltage determination module is used to collect the input voltage and output voltage of the DC conversion module.
[0261] The conversion efficiency determination module is used to determine the conversion efficiency of the DC conversion module according to the average duty cycle, input voltage and output voltage. Embodiment 4
[0262] A computer program product includes a computer program, and when the computer program is executed by a processor, the conversion efficiency test method described in Embodiment 1 or Embodiment 2 is implemented. The contents described in Embodiment 1 and Embodiment 2 are not repeated here. Embodiment 5
[0263] A conversion efficiency test circuit is used to implement the conversion efficiency test method described in the first or second embodiment. Figure 6 As shown, the conversion efficiency test circuit includes: a first voltage sampling network 100 , a second voltage sampling network 200 , a third voltage sampling network 300 , and a signal processing module 400 .
[0264] The first port of the first voltage sampling network is connected to the voltage input port V IN The second port of the first voltage sampling network is electrically connected to the first port of the signal processing module; the first port of the second voltage sampling network is electrically connected to the voltage output port V OUTThe second port of the second voltage sampling network is electrically connected to the second port of the signal processing module; the first port of the third voltage sampling network is electrically connected to the switch level output port SW of the circuit under test, and the second port of the third voltage sampling network is electrically connected to the third port of the signal processing module.
[0265] The signal processing module includes 400:
[0266] The counter 410 , the first interrupt capture module 420 , the second interrupt capture module 430 , the first analog-to-digital converter 440 , and the second analog-to-digital converter 450 .
[0267] Preferably, the signal processing module can be obtained by configuring the modular circuit in the MCU. The above text describes the functions of the counter 410, the first interrupt capture module 420, and the second interrupt capture module 430 after configuration. The first analog-to-digital converter 440 and the second analog-to-digital converter 450 are used to convert analog signals into digital signals.
[0268] The counter input port serves as the third port of the signal processing module, and the counter output port is electrically connected to the first interrupt capture module input port and the second interrupt capture module input port; the first analog-to-digital converter input port serves as the first port of the signal processing module; and the second analog-to-digital converter input port serves as the second port of the signal processing module.
[0269] The first voltage sampling network includes: a first resistor R1 and a second resistor R2.
[0270] One end of the first resistor R1 serves as the first port of the first voltage sampling network. The other end of the first resistor R1 is electrically connected to one end of the second resistor R2 and serves as the second port of the first voltage sampling network. The other end of the second resistor R2 serves as the third port of the first voltage sampling network and is grounded.
[0271] The second voltage sampling network includes: a third resistor R3 and a fourth resistor R4.
[0272] One end of the third resistor R3 serves as the first port of the second voltage sampling network. The other end of the third resistor R3 is electrically connected to one end of the fourth resistor R4 and serves as the second port of the second voltage sampling network. The other end of the fourth resistor R4 serves as the third port of the second voltage sampling network and is grounded.
[0273] The third voltage sampling network includes: a fifth resistor R5 and a sixth resistor R6.
[0274] One end of the fifth resistor R5 serves as the first port of the third voltage sampling network. The other end of the fifth resistor R5 is electrically connected to one end of the sixth resistor R6 and serves as the second port of the third voltage sampling network. The other end of the sixth resistor R6 serves as the third port of the third voltage sampling network and is grounded.
[0275] The contents described in the first or second embodiment will not be repeated here. Embodiment 6
[0276] A buck conversion efficiency test circuit, such as Figure 7 As shown, it includes: the conversion efficiency test circuit recorded in the fifth embodiment, and a buck conversion module 500.
[0277] The voltage input port of the step-down conversion module is electrically connected to the first port of the first voltage sampling network, the voltage output port of the step-down conversion module is electrically connected to the first port of the second voltage sampling network, and the switch level output port of the step-down conversion module is electrically connected to the first port of the third voltage sampling network.
[0278] The buck conversion module includes: a driving submodule 510, a first transistor T1, a second transistor T2, an inductor L, and a capacitor C;
[0279] The first output port of the driving submodule is electrically connected to the first pole of the first transistor, the second output port of the driving submodule is electrically connected to the first pole of the second transistor, the second pole of the first transistor serves as the voltage input port of the buck conversion module, the third pole of the first transistor is electrically connected to the second pole of the second transistor and serves as the switch level output port of the buck conversion module, the third pole of the second transistor is grounded, the third pole of the first transistor is also electrically connected to one end of the inductor L, the other end of the inductor L is electrically connected to one end of the capacitor C and serves as the voltage output port of the buck conversion module, and the other end of the capacitor C is grounded.
[0280] The contents described in Example 5 are not repeated here.
[0281] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program loaded on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a memory, or installed from a ROM. When the computer program is executed by an external processor, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0282] It should be noted that the computer-readable medium of the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In an embodiment of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0283] The computer-readable medium may be included in the server; or it may exist independently without being installed in the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: in response to detecting that the peripheral mode of the terminal is not activated, obtains the frame rate of the application on the terminal; when the frame rate meets the screen-off condition, determines whether the user is obtaining the screen information of the terminal; in response to the judgment result that the user is not obtaining the screen information of the terminal, controls the screen to enter the immediate dimming mode.
[0284] Computer program code for performing the operation of the embodiments of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0285] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0286] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.
[0287] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A conversion efficiency test circuit, It is characterized in that include: A signal processing module, a first voltage sampling network, a second voltage sampling network, and a third voltage sampling network; The first port of the first voltage sampling network is electrically connected to the voltage input port of the circuit under test, and the second port of the first voltage sampling network is electrically connected to the first port of the signal processing module; the first port of the second voltage sampling network is electrically connected to the voltage output port of the circuit under test, and the second port of the second voltage sampling network is electrically connected to the second port of the signal processing module; the first port of the third voltage sampling network is electrically connected to the switch level output port of the circuit under test, and the second port of the third voltage sampling network is electrically connected to the third port of the signal processing module; Wherein, the signal processing module includes: A counter, a first interrupt capture module, a second interrupt capture module, a first analog-to-digital converter, and a second analog-to-digital converter; The counter input port serves as the third port of the signal processing module, and the counter output port is electrically connected to the first interrupt capture module input port and the second interrupt capture module input port; the first analog-to-digital converter input port serves as the first port of the signal processing module; and the second analog-to-digital converter input port serves as the second port of the signal processing module.
2. The conversion efficiency test circuit according to claim 1, It is characterized in that The first voltage sampling network includes: a first resistor R 1 , the second resistor R 2 ; The first resistor R 1 As the first port of the first voltage sampling network, the first resistor R 1 The other end of the second resistor R 2 After one end is electrically connected to the first voltage sampling network, the second resistor R 2 The other end serves as the third port of the first voltage sampling network and is grounded.
3. The conversion efficiency test circuit according to claim 1, It is characterized in that The second voltage sampling network includes: a third resistor R 3 , the fourth resistor R 4 ; The third resistor R 3 As the first port of the second voltage sampling network, the third resistor R 3 The other end of the fourth resistor R 4 After one end of the second voltage sampling network is electrically connected, the fourth resistor R 4 The other end serves as the third port of the second voltage sampling network and is grounded.
4. The conversion efficiency test circuit according to claim 1, It is characterized in that The third voltage sampling network includes: a fifth resistor R 5 , the sixth resistor R 6 ; The fifth resistor R 5 As the first port of the third voltage sampling network, the fifth resistor R 5 The other end of the sixth resistor R 6 After one end of the sixth resistor R is electrically connected to the second port of the third voltage sampling network, the sixth resistor R 6 The other end serves as the third port of the third voltage sampling network and is grounded.
5. A conversion efficiency test method, It is characterized in that A conversion efficiency test circuit applicable to any one of claims 1 to 4, comprising: Collecting the count value corresponding to the switching pulse of the DC conversion module to determine the average duty cycle of the switching pulse; Collecting the input voltage and output voltage of the DC conversion module; The conversion efficiency of the DC conversion module is determined according to the average duty cycle, the input voltage, and the output voltage.
6. The conversion efficiency testing method according to claim 5, It is characterized in that The collecting count values corresponding to the switching pulses of the DC conversion module to determine the average duty cycle of the switching pulses includes: Enable the counter, the first interrupt capture module and the second interrupt capture module to collect the count value corresponding to the switch pulse, wherein the first interrupt capture module is used to capture the rising edge of the switch pulse, and the second interrupt capture module is used to capture the falling edge of the switch pulse; An average duty cycle is determined based on the switching pulse rising edge and the switching pulse falling edge.
7. The conversion efficiency testing method according to claim 6, It is characterized in that The enabling counter, the first interrupt capture module and the second interrupt capture module collect count values corresponding to the switch pulses, including: Collecting the count value corresponding to the rising edge of the switch pulse by the first interrupt capture module; The count value corresponding to the falling edge of the switch pulse is collected by the second interrupt capture module.
8. The conversion efficiency testing method according to claim 6, It is characterized in that The determining of the average duty cycle based on the rising edge of the switching pulse and the falling edge of the switching pulse comprises: Determine the total duration of the high level of the switch pulse based on the count value corresponding to the rising edge of the switch pulse and the count value corresponding to the falling edge of the switch pulse; Determining the total duration of the switching pulse based on the count value corresponding to the rising edge of the switching pulse; The average duty cycle is determined based on the total duration of the high level of the switch pulse and the total duration of the switch pulse.
9. The conversion efficiency testing method according to claim 8, It is characterized in that The determining the total duration of the high level of the switch pulse based on the count value corresponding to the rising edge of the switch pulse and the count value corresponding to the falling edge of the switch pulse comprises: Specifically, according to: , Determine the total high-level duration of the switch pulse, where: T SW_HIGH is the total duration of the high level of the switch pulse, f clk is the clock frequency of the counter, a N is the number of the high level of the switch pulse. DE_T is the total number of falling edges of the switching pulses in the acquired multiple switching cycles.
10. The conversion efficiency testing method according to claim 8, It is characterized in that The determining the total duration of the switching pulse based on the count value corresponding to the rising edge of the switching pulse comprises: according to: , Determine the total duration of the off pulse, where T SW_ALL is the total duration of the switching pulse, Indicates the count value of the counter when the rising edge of the last switch pulse is captured, T_IC 10 It represents the count value of the counter when the rising edge of the first switch pulse is captured, n is the overflow count variable, and RL is the reload value.
11. The conversion efficiency testing method according to claim 8, It is characterized in that The determining the average duty cycle based on the total duration of the high level of the switch pulse and the total duration of the switch pulse comprises: according to: , Determine the average duty cycle, where is the average duty cycle, T SW_HIGH is the total duration of the high level of the switching pulse, T SW_ALL is the total duration of the switching pulse.
12. The conversion efficiency testing method according to claim 5, It is characterized in that The collecting of the input voltage and the output voltage of the DC conversion module includes: Determine the input voltage through a first voltage sampling network and a first analog-to-digital converter; The output voltage is determined by a second voltage sampling network and a second analog-to-digital converter.
13. The conversion efficiency testing method according to claim 12, It is characterized in that The step of determining the input voltage through a first voltage sampling network and a first analog-to-digital converter includes: The first analog-to-digital converter is used to obtain a first sampling voltage through the first voltage sampling network. V INS , wherein the first sampling voltage V INS For the input voltage V IN The sampling value of according to: , Determine the input voltage V IN ,in, R 1 is the resistance value of the first resistor, R 2 is the resistance value of the second resistor.
14. The conversion efficiency testing method according to claim 12, It is characterized in that The step of determining the output voltage through a second voltage sampling network and a second analog-to-digital converter includes: The second analog-to-digital converter is used to obtain the second sampling voltage through the second voltage sampling network. V OUTS , where the second sampling voltage V OUTS The output voltage V OUT The sampling value of according to: , Determine the output voltage V OUT ,in, R 3 is the resistance of the third resistor, R 4 is the resistance value of the fourth resistor.
15. The conversion efficiency testing method according to claim 5, It is characterized in that The step of determining the conversion efficiency of the DC conversion module according to the average duty cycle, the input voltage, and the output voltage includes: according to: , Determine the conversion efficiency of the DC conversion module, wherein: η is the conversion efficiency of the DC conversion module, is the average duty cycle, V IN is the input voltage, V OUT is the output voltage.
16. The conversion efficiency testing method according to claim 5, It is characterized in that Before collecting the count value corresponding to the switch pulse and determining the average duty cycle of the switch pulse, the method further includes: A counter, a first interrupt capture module and a second interrupt capture module are configured.
17. The conversion efficiency testing method according to claim 5, It is characterized in that The collecting of the count value corresponding to the switch pulse also includes: The third voltage sampling network is used according to: , The switch pulse high level voltage is converted into a counter input voltage, wherein: V S The counter input voltage is V P is the switching pulse high level voltage, R 5 is the resistance value of the fifth resistor, R 6 is the resistance value of the sixth resistor.
18. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the conversion efficiency testing method described in any one of claims 5 to 17 is implemented.
19. A buck conversion efficiency test circuit, It is characterized in that include: The conversion efficiency test circuit and the buck conversion module according to any one of claims 1 to 4; The voltage input port of the step-down conversion module is electrically connected to the first port of the first voltage sampling network, the voltage output port of the step-down conversion module is electrically connected to the first port of the second voltage sampling network, and the switch level output port of the step-down conversion module is electrically connected to the first port of the third voltage sampling network.
20. The buck conversion efficiency test circuit according to claim 19, It is characterized in that The step-down conversion module includes: a driving submodule, a first transistor T 1 , the second transistor T 2 , inductance L, capacitance C; The first output port of the driving submodule is electrically connected to the first pole of the first transistor, the second output port of the driving submodule is electrically connected to the first pole of the second transistor, the second pole of the first transistor serves as the voltage input port of the step-down conversion module, the third pole of the first transistor is electrically connected to the second pole of the second transistor and serves as the switch level output port of the step-down conversion module, the third pole of the second transistor is grounded, the third pole of the first transistor is also electrically connected to one end of the inductor L, the other end of the inductor L is electrically connected to one end of the capacitor C and serves as the voltage output port of the step-down conversion module, and the other end of the capacitor C is grounded.
