Constant-power PWM signal control method, power circuit, equipment and medium

By collecting the voltage and current values ​​of the load, calculating the pre-adjusted duty cycle of the PWM signal, and adjusting the duty cycle of the PWM signal, the problem of difficulty in achieving accurate constant power output in the circuit is solved, and efficient and accurate constant power control is achieved.

CN119628610APending Publication Date: 2025-03-14上海芯导电子科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411471899.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The prior art is difficult to achieve accurate constant power output of circuits, and often requires MCU resources, which cannot meet the requirements of fixed frequency of PWM signals.

Method used

By collecting the voltage value and current value of the load, calculating the ratio of the first and second voltage values, the pre-adjusted duty cycle of the PWM signal is obtained, and the duty cycle of the PWM signal is adjusted based on this to achieve a constant power output.

Benefits of technology

It realizes the accurate constant power output of the circuit, avoids direct interference from load voltage and current, and does not occupy MCU resources, and meets the requirements of fixed frequency of PWM signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119628610A_ABST
    Figure CN119628610A_ABST
Patent Text Reader

Abstract

The invention provides a constant-power PWM signal control method, a computer readable storage medium and electronic equipment, and the method comprises the steps: obtaining a first digital value through collecting a voltage value of a load, and enabling the first digital value to be used for representing the voltage digital value of the load; based on the first digital quantity, the reference current value and the first resistance value, a first voltage value is obtained, and the first voltage value is inversely proportional to the first digital quantity; the current value flowing through the load is collected, a second voltage value is obtained based on the current value flowing through the load and the second resistance value, and the second voltage value is larger than the first voltage value; calculating a ratio of the first voltage value to the second voltage value to obtain a pre-adjustment duty ratio of the PWM signal; and adjusting the duty ratio of the PWM signal based on the pre-adjusted duty ratio. Therefore, the pre-adjustment duty ratio is only related to the product of the quantized load voltage and the quantized load current, and accurate constant power output of the circuit is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power electronics, and in particular to a constant power PWM signal control method, a power circuit, a power device, a computer-readable storage medium and an electronic device. Background Art

[0002] Power circuits are widely used in various occasions, such as power management, motor control, etc.

[0003] Traditional power control usually adopts constant voltage circuit design or constant effective value control method, where:

[0004] The constant voltage circuit design needs to maintain a constant voltage across the load. In actual applications, the resistance may change due to multiple external factors, which may make the actual power inconsistent with expectations. The voltage can only be constant for the average voltage value within the set time, and constant power cannot be achieved. In addition, since the circuit must frequently adjust the voltage to adapt to load changes, the power supply efficiency is usually low.

[0005] The constant effective value control method is to measure the load current and voltage in real time to adjust the power output. However, this will involve complex power control algorithms and require the use of MCU resources to achieve control. There will also be problems with poor accuracy.

[0006] Therefore, how to ensure accurate constant power output of the circuit has become a technical problem that needs to be solved urgently in the industry. Summary of the invention

[0007] The present invention provides a constant power PWM signal control method, a power circuit, a power device, a computer-readable storage medium and an electronic device, which solve the technical problem of how to output constant power accurately in a circuit.

[0008] According to a first aspect of the present invention, an embodiment of the present invention provides a constant power PWM signal control method, wherein the PWM signal is used to control the on and off of a switch device in a power circuit;

[0009] The method includes:

[0010] Collecting a voltage value of a load to obtain a first digital quantity, where the first digital quantity is used to characterize a digital quantity of the voltage of the load;

[0011] Obtaining a reference current value, a reference voltage value, a first resistance value, and a second resistance value;

[0012] Obtaining a first voltage value based on the first digital value, the reference current value, and the first resistance value, wherein the first voltage value is inversely proportional to the first digital value;

[0013] collecting a current value flowing through the load, and obtaining a second voltage value based on the current value flowing through the load and the second resistance value, wherein the second voltage value is greater than the first voltage value;

[0014] Calculating a ratio of the first voltage value to the second voltage value to obtain a pre-adjusted duty cycle of the PWM signal;

[0015] Based on the pre-adjusted duty cycle, the PWM signal is output.

[0016] Optionally, obtaining a first voltage value based on the first digital quantity, the reference current value, and the first resistance value includes:

[0017] Based on the first digital quantity and the reference current value, a first current value is obtained:

[0018]

[0019] Among them, ADC V is the first digital quantity, and Iref is the reference current value;

[0020] Based on the first current value and the first resistance value, a first voltage value is obtained:

[0021] V1=I1×R1

[0022] Wherein, I1 is the first current value, and R1 is the first resistance value.

[0023] Optionally, obtaining a second voltage value based on a current value flowing through the load and the second resistance value includes:

[0024] Obtaining a second proportionality coefficient;

[0025] Based on the second proportionality coefficient, the current value flowing through the load, and the second resistance value, a second voltage value is obtained:

[0026] V2=I×k×R2

[0027] Wherein, I is the current value flowing through the load, k is the second proportional coefficient, and R2 is the second resistance value.

[0028] Optionally, a formula for obtaining the pre-adjusted duty cycle of the PWM signal is:

[0029]

[0030] Among them, ADC DUTY For the pre-adjusted duty cycle, the ADC V is the first digital quantity.

[0031] Optionally, the method of collecting the voltage value of the load to obtain the first digital value includes:

[0032] Collect the voltage value of the load;

[0033] Obtain a third proportionality coefficient;

[0034] Based on the third proportionality coefficient, the voltage value of the load and the reference voltage value, a first digital value is obtained:

[0035]

[0036] Wherein, U is the voltage value of the load, and K1 is the third proportional coefficient.

[0037] Optionally, the formula for the power of the output PWM signal is:

[0038]

[0039] According to a second aspect of the present invention, an embodiment of the present invention provides a power circuit based on the constant power PWM signal control method according to any one of the first aspects of the present invention, which is used to output a constant power PWM signal, including:

[0040] A voltage acquisition module, used for acquiring a voltage value of a load in real time to obtain a first digital quantity, where the first digital quantity is used to characterize a digital quantity of the voltage of the load;

[0041] A current detection module, used for collecting the current value flowing through the load in real time;

[0042] A first voltage conversion module, configured to obtain a first voltage value based on the first digital value, a reference current value, and a first resistance value, wherein the first voltage value is inversely proportional to the first digital value;

[0043] a second voltage conversion module, configured to obtain a second voltage value based on a current value flowing through the load and the second resistance value, wherein the second voltage value is greater than the first voltage value;

[0044] a pre-adjustment duty cycle calculation module, configured to calculate a ratio of the first voltage value to the second voltage value to obtain a pre-adjustment duty cycle of the PWM signal;

[0045] A PWM generator is used to output the PWM signal based on the pre-adjusted duty cycle.

[0046] Optionally, the first voltage conversion module includes:

[0047] A current conversion unit, configured to obtain a first current value based on the first digital quantity and the reference current value;

[0048] The voltage conversion unit is used to obtain a first voltage value based on the first current value and the first resistance value.

[0049] Optionally, the current conversion unit includes a digital-to-analog conversion subunit, a first current mirror and a first resistor:

[0050] The input end of the digital-to-analog conversion subunit receives the first digital quantity, the second end thereof is coupled to the first end of the first current mirror, and the third end thereof is grounded. The first end of the first current mirror also receives the reference current, the second end thereof is grounded, and the third end thereof is grounded through the first resistor. The third end of the first current mirror is used to output the first current value.

[0051] Wherein, the digital-to-analog conversion subunit is used to control the magnitude of the current received by the first current mirror;

[0052] The first current mirror is used to control the ratio of the first current value to the current value received by the first current mirror to be 1.

[0053] Optionally, the current detection module includes a first MOS tube and a second MOS tube, and the second voltage conversion module includes a second resistor;

[0054] The first end of the first MOS tube and the first end of the second MOS tube both receive a power supply voltage, the gate of the first MOS tube is coupled to the gate of the second MOS tube, the second end of the first MOS tube is respectively coupled to the first end of the load and the first end of the voltage acquisition module, the second end of the load is grounded, the second end of the voltage acquisition module is used to output a first load voltage value, the third end of the voltage acquisition module is grounded, and the second end of the second MOS tube is grounded through the second resistor.

[0055] Wherein, the width-to-length ratio of the first MOS tube is greater than the width-to-length ratio of the second MOS tube;

[0056] The first load voltage value corresponds to the first digital quantity.

[0057] According to a third aspect of the present invention, an embodiment of the present invention provides a power device, comprising a power circuit as described in any one of the second aspect of the present invention.

[0058] According to a fourth aspect of the present invention, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any one of the methods described in the first aspect of the present invention.

[0059] According to the fifth aspect of the present invention, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect of the present invention when executing the program.

[0060] Compared with the prior art, the technical solution of the embodiment of the present invention has the following beneficial effects:

[0061] In the constant power PWM signal control method, computer readable storage medium and electronic device of the technical solution of the present invention, a first digital quantity is obtained by collecting the voltage value of the load, and the first digital quantity is used to characterize the digital voltage value of the load; a reference current value, a reference voltage value, a first resistance value and a second resistance value are obtained; based on the first digital value, the reference current value and the first resistance value, a first voltage value is obtained, and the first voltage value is inversely proportional to the first digital quantity; the current value flowing through the load is collected, and based on the current value flowing through the load and the second resistance value, a second voltage value is obtained, and the second voltage value is greater than the first voltage value; the ratio of the first voltage value and the second voltage value is calculated to obtain the pre-adjusted duty cycle of the PWM signal; based on the pre-adjusted duty cycle, the duty cycle of the PWM signal is adjusted. Therefore, the pre-adjusted duty cycle of the present invention is only related to the product of the quantized load voltage and the load current, and the circuit achieves precise constant power output. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0063] Figure 1 It is a flow chart of a constant power PWM signal control method in one embodiment of the present invention;

[0064] Figure 2 is a schematic structural diagram of an electronic device provided by an exemplary embodiment;

[0065] Figure 3 is a schematic diagram of the structure of a power circuit in one embodiment of the present invention;

[0066] Figure 4 is a schematic structural diagram of a power circuit in another embodiment of the present invention;

[0067] Figure 5 It is a structural schematic diagram of a first voltage conversion module in an embodiment of the present invention.

[0068] Description of reference numerals:

[0069] 10- voltage acquisition module;

[0070] 20-current detection module;

[0071] 30-a first voltage conversion module;

[0072] 301-current conversion unit;

[0073] 302- voltage conversion unit;

[0074] 3011-digital-analog conversion subunit;

[0075] 3012-first current mirror;

[0076] 40-a second voltage conversion module;

[0077] 50-pre-adjustment duty cycle calculation module;

[0078] 60-PWM generator;

[0079] 702 - processor;

[0080] 704-internal bus;

[0081] 706-network interface;

[0082] 708-Memory;

[0083] 710-Non-volatile memory. DETAILED DESCRIPTION

[0084] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0085] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0086] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0087] As described in the background art, how to output constant power accurately in a circuit has become a technical problem that needs to be solved urgently in the industry. The following will explain it in detail.

[0088] Constant power circuits are used in many fields, especially in light source control, gas sensor, liquid sensor, etc.

[0089] In infrared gas sensors and infrared gas detection instruments, the luminous intensity of the light source is required to remain constant, that is, the power of the light source remains constant. The light source is a pure resistive load, which will change with temperature changes and load material loss. Changes in the resistance of the load will cause changes in the current or voltage of the load, thereby changing the load power. During the light emission process, the temperature of the light source will rise, causing the equivalent resistance of the light source to change; as the light source material is consumed, the load resistance also changes, and the light intensity changes, which will cause the output signal of the infrared gas sensor and infrared gas detection instrument to fluctuate. In addition, in a batch of light source products, the internal resistance of the light source will also be different, and the consistency of the infrared gas sensor products made with it will be poor. Therefore, it is of great practical significance to study the constant power control of the electrical load.

[0090] At present, in the aspect of constant power control of electric load, a constant power circuit controlled by software has been designed, which has the advantages of simple and reliable control algorithm, flexible and adjustable setting value, etc. However, it needs to write a program, and the program will report an error when the single-chip microcomputer is affected by its own or external environmental factors.

[0091] The same problem also exists in the field of LED loads. Different LED loads bring different requirements for the design of driving power supply parameters such as power, voltage, current, ripple, etc. Even light source modules with the same power have different requirements for driving voltage and current. There are two reasons for this:

[0092] On the one hand, the various types of LED modules used in various lighting scenarios have many unconventional voltages in addition to the standard driving voltages of 12V and 24V. For example, the LED street light module RL-DA-50W-1-W-33 has a rated power of 50W and a driving voltage of 32~35V; the RL-DB-50W-4-N-22 has a rated power of 50W and a driving voltage of 42~48V. On the other hand, lighting manufacturers often connect multiple lamp groups in series and parallel according to the needs of the application scenario. For example, plant lighting combines LED growth lamp modules with different wavelengths of 380-780nm according to the growth needs of plants, and the requirements for driving voltage and driving current are different.

[0093] Faced with a wide variety of LED load requirements, most drivers on the market currently use a constant current method to match the light source, and the parameters of each driver can only match a specific light source. Another common measure is to add a potentiometer to the external structure to condition the current reference value and change the output current, but the cost is to increase the opening of the potentiometer knob in the shell, and the waterproofness and stability are reduced.

[0094] In addition, the price of LED driver power supply on the market is determined by the output power. Common driver power supplies on the market are all constant current output. When the output voltage does not match, the power supply can only be used at a reduced rating, which undoubtedly increases the purchase cost of the power supply per unit power. Power supplies with adjustable output voltage / current can achieve full power operation within a certain load variation range, which is a more cost-effective option for users.

[0095] In the field of gas sensors and liquid sensors, taking the heating atomization circuit as an example, this circuit can be widely used in electronic medical atomizers, women's beauty moisturizing sprayers, electronic cigarettes and other products. At this stage, the circuit has the problem that the output power cannot be constant as the battery voltage and the resistance of the heating wire change. At the same time, there is a lack of effective temperature monitoring and control mechanism. Therefore, the circuit design needs to be able to produce excellent atomization effect while ensuring product safety and reliability.

[0096] When designing the atomization control module, circuit designers need to consider the following unique factors in addition to being able to effectively atomize the liquid into gas. First, due to the particularity of the use environment, the circuit needs to ensure that the heating wire continues to work in a small temperature range during normal use. If the temperature is too low, the active ingredients in the drug cannot be released normally, which will affect the consumer's experience in electronic cigarettes. Even insufficiently atomized liquid may cause harm after being inhaled by the human body. Excessive temperature will cause changes in the pharmacological properties of the drug, and may also accelerate the aging of the atomization wire and affect its use. In severe cases, it will cause burns or even explosion threats. Therefore, it is necessary to control the continuous working temperature of the heating wire within the corresponding temperature range; on the other hand, it is necessary to maintain the circuit at a constant power output, so as to ensure that the patient takes in a continuous standard dose of drugs, and in the application of electronic cigarettes, the consistency of the product can be guaranteed. In addition, especially in electronic cigarette products and some portable medical devices, lithium batteries are required for power supply, and battery management and use efficiency are also design points that need to be considered.

[0097] It can be seen that the current constant power circuit has the following disadvantages:

[0098] 1) Currently, constant power requires the use of MCU resources and is implemented through programming.

[0099] 2) The fixed frequency requirement of PWM signal cannot be met.

[0100] In short, it is difficult to achieve accurate constant power output of the circuit with current circuits or methods.

[0101] In view of this, the present invention provides a constant power PWM signal control method, which obtains a first digital quantity by collecting the voltage value of the load, and the first digital quantity is used to characterize the digital quantity of the voltage of the load; obtains a reference current value, a reference voltage value, a first resistance value and a second resistance value; obtains a first voltage value based on the first digital value, the reference current value and the first resistance value, and the first voltage value is inversely proportional to the first digital quantity; collects the current value flowing through the load, and obtains a second voltage value based on the current value flowing through the load and the second resistance value, and the second voltage value is greater than the first voltage value; calculates the ratio of the first voltage value and the second voltage value, and obtains the pre-adjusted duty cycle of the PWM signal; adjusts the duty cycle of the PWM signal based on the pre-adjusted duty cycle. Therefore, the pre-adjusted duty cycle of the present invention is only related to the product of the quantized load voltage and the load current, and realizes the precise constant power output of the circuit.

[0102] In order to make the above-mentioned objects, features and beneficial effects of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0103] Figure 1 : is a flow chart of a constant power PWM signal control method according to an embodiment of the present invention, comprising:

[0104] S1: collecting a voltage value of a load to obtain a first digital value, where the first digital value is used to represent a digital value of the voltage of the load;

[0105] S2: Obtain a reference current value, a reference voltage value, a first resistance value, and a second resistance value;

[0106] S3: obtaining a first voltage value based on the first digital value, the reference current value, and the first resistance value, wherein the first voltage value is inversely proportional to the first digital value;

[0107] S4: collecting a current value flowing through the load, and obtaining a second voltage value based on the current value flowing through the load and the second resistance value, wherein the second voltage value is greater than the first voltage value;

[0108] S5: Calculate the ratio of the first voltage value to the second voltage value to obtain a pre-adjusted duty cycle of the PWM signal;

[0109] S6: Outputting the PWM signal based on the pre-adjusted duty cycle.

[0110] It can be seen that this solution avoids the direct influence of the load voltage and current by converting the load voltage and current into voltage quantities, so that the pre-adjusted duty cycle of the present invention is only related to the product of the quantized load voltage and load current, thereby achieving accurate constant power output of the circuit.

[0111] The method provided by the embodiment of the present invention is now further described:

[0112] In one implementation, the method for obtaining the first voltage value based on the first digital quantity, the reference current value, and the first resistance value in step S3 includes:

[0113] Based on the first digital quantity and the reference current value, a first current value is obtained:

[0114]

[0115] Among them, ADC V is the first digital quantity, and Iref is the reference current value;

[0116] Based on the first current value and the first resistance value, a first voltage value is obtained:

[0117] V1=I1×R1

[0118] Wherein, I1 is the first current value, and R1 is the first resistance value.

[0119] On this basis, in one implementation, the method for obtaining the second voltage value based on the current value flowing through the load and the second resistance value in step S4 includes:

[0120] Obtaining a second proportionality coefficient;

[0121] Based on the second proportionality coefficient, the current value flowing through the load, and the second resistance value, a second voltage value is obtained:

[0122] V2=I×k×R2

[0123] Wherein, I is the current value flowing through the load, k is the second proportional coefficient, and R2 is the second resistance value.

[0124] Furthermore, the formula for obtaining the pre-adjusted duty cycle of the PWM signal in step S5 is:

[0125]

[0126] Among them, ADC DUTY For the pre-adjusted duty cycle, the ADC V is the first digital quantity.

[0127] In this case, the formula for the power of the output PWM signal is:

[0128]

[0129] Since ADC V Generally, it is between 150 and 256, making is approximately 1, so that the output PWM signal has constant power.

[0130] In order to obtain the above-mentioned first digital quantity, in a specific implementation manner, the method of acquiring the voltage value of the load in step S1 to obtain the first digital quantity includes:

[0131] Collect the voltage value of the load;

[0132] Obtain a third proportionality coefficient;

[0133] Based on the third proportionality coefficient, the voltage value of the load and the reference voltage value, a first digital value is obtained:

[0134]

[0135] Wherein, U is the voltage value of the load, and K1 is the third proportional coefficient.

[0136] It can be seen that the present invention obtains a first digital quantity by collecting the voltage value of the load, and the first digital quantity is used to characterize the digital voltage value of the load; obtains a reference current value, a reference voltage value, a first resistance value, and a second resistance value; obtains a first voltage value based on the first digital value, the reference current value, and the first resistance value, and the first voltage value is inversely proportional to the first digital quantity; collects the current value flowing through the load, and obtains a second voltage value based on the current value flowing through the load and the second resistance value, and the second voltage value is greater than the first voltage value; calculates the ratio of the first voltage value and the second voltage value, and obtains the pre-adjusted duty cycle of the PWM signal; adjusts the duty cycle of the PWM signal based on the pre-adjusted duty cycle. Therefore, the pre-adjusted duty cycle of the present invention is only related to the product of the quantized load voltage and the load current, and realizes accurate constant power output of the circuit.

[0137] In addition, please refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of an electronic device where a power circuit is provided by an exemplary embodiment. Figure 2 At the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710, and may also include hardware required for other services. One or more embodiments of this specification may be implemented based on software, such as the processor 702 reading the corresponding computer instructions from the non-volatile memory 710 into the memory 708 and then running them. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0138] Please refer to Figure 3 , Figure 3 A schematic diagram of a power circuit structure based on a constant power PWM signal control method as described in any one of the above is provided as an exemplary embodiment, which can be applied to Figure 2 In the electronic device shown, the technical solution of this specification is implemented.

[0139] Wherein, the power circuit is used to output a constant power PWM signal, including:

[0140] The voltage acquisition module 10 is used to collect the voltage value of the load in real time and obtain the first digital value ADC V , the first digital quantity ADC V A voltage digital quantity used to characterize the load;

[0141] A current detection module 20, used for collecting the current value flowing through the load in real time;

[0142] The first voltage conversion module 30 is used to convert the voltage of the first digital quantity ADC into V , a reference current value Iref and a first resistance value R1, obtain a first voltage value V1, the first voltage value V1 and the first digital quantity ADC V Inversely proportional;

[0143] A second voltage conversion module 40, configured to obtain a second voltage value V2 based on a current value I flowing through the load and the second resistance value R2, wherein the second voltage value V2 is greater than the first voltage value V1;

[0144] A pre-adjusted duty cycle calculation module 50, configured to calculate a ratio of the first voltage value V1 to the second voltage value V2, and obtain a pre-adjusted duty cycle of the PWM signal;

[0145] The PWM generator 60 is configured to output the PWM signal based on the pre-adjusted duty cycle.

[0146] In practical applications, the output frequency of the power MOS tube can be adjusted by the PWM generator 60. When the output frequency of the power MOS tube remains unchanged, the present invention can still achieve accurate constant power output of the circuit.

[0147] The following is an example of the structure of each module in actual application:

[0148] In a specific implementation, please refer to Figure 4 , showing a voltage acquisition module 10, a current detection module 20 and a second voltage conversion module 40, wherein the current detection module 20 includes a first MOS tube M1 and a second MOS tube M2, and the second voltage conversion module 40 includes a second resistor R2';

[0149] The first end of the first MOS transistor M1 and the first end of the second MOS transistor M2 both receive the power supply voltage VCC, the gate of the first MOS transistor M1 is coupled to the gate of the second MOS transistor M2, the second end of the first MOS transistor M1 is respectively coupled to the first end of the load Rload and the first end of the voltage acquisition module 10, the second end of the load Rload is grounded, and the second end of the voltage acquisition module 10 is used to output a first load voltage value V ADC , the third end of the voltage acquisition module 10 is grounded, and the second end of the second MOS tube M2 is grounded through the second resistor R2'.

[0150] The width-to-length ratio of the first MOS transistor M1 is greater than the width-to-length ratio of the second MOS transistor M2.

[0151] The first load voltage value V ADC With the first digital ADCV correspond.

[0152] It should be understood that the load Rload can be understood as the resistance of the above-mentioned load;

[0153] The resistance value of the second resistor R2 ′ can be understood as the second resistor R2 ′ value R2 mentioned above, and further, the second voltage value V2 can be understood as the voltage value of the second end of the second MOS transistor M2 .

[0154] Now combined Figure 4 The method provided by the present invention is described. Figure 4 In the example, the voltage acquisition module 10 includes three voltage-dividing resistors R3 connected in series. Now, for example, the resistance of each voltage-dividing resistor R3 is 200 kΩ, the supply voltage is 5 V, the voltage at the second end of the first MOS tube M1 is 4.8 V, and the reference voltage value is 1.2 V:

[0155] In this case, the first digital ADC V :

[0156]

[0157] The third proportionality coefficient is the voltage division ratio of the voltage acquisition module 10 to the load Rload.

[0158] The second proportionality factor:

[0159]

[0160] in, is the width-to-length ratio of the second MOS transistor M2 to the first MOS transistor M1.

[0161] It can be seen that in Figure 4 In the circuit shown, the first digital quantity ADC required by the above method can be obtained. V And the second voltage value V2.

[0162] For a specific implementation, please refer to Figure 5 , the first voltage conversion module 30 includes:

[0163] The current conversion unit 301 is used to convert the current based on the first digital quantity ADC V and the reference current value Iref, obtaining a first current value I1;

[0164] The voltage conversion unit 302 is configured to obtain a first voltage value V1 based on the first current value I1 and the first resistance value R1.

[0165] In practical applications, please continue to refer to Figure 5 , the current conversion unit 301 includes a digital-to-analog conversion subunit 3011, a first current mirror 3012 and a first resistor R1':

[0166] The input end of the digital-to-analog conversion subunit 3011 receives the first digital quantity ADC V , a second end thereof is coupled to the first end of the first current mirror 3012, a third end thereof is grounded, the first end of the first current mirror 3012 also receives the reference current Iref, a second end thereof is grounded, a third end thereof is grounded through the first resistor R1', and the third end of the first current mirror 3012 is used to output the first current value I1;

[0167] The digital-to-analog conversion subunit 3011 is used to convert the first digital quantity ADC into V Controlling the magnitude of the current received by the first current mirror 3012;

[0168] The first current mirror 3012 is used to control the ratio of the first current value I1 to the current value received by the first current mirror 3012 to be 1.

[0169] It should be understood that the resistance value of the first resistor R1 ′ can be understood as the first resistance value R1 mentioned above.

[0170] exist Figure 5 In the example, the first current mirror 3012 includes a first NMOS transistor MN1 and a second NMOS transistor MN2. In an example, the width-to-length ratio of the second NMOS transistor MN2 is the same as that of the first NMOS transistor MN1.

[0171] Regarding the digital-to-analog conversion subunit 3011, in one example, a plurality of NMOS tubes may be connected in parallel in the digital-to-analog conversion unit, and the on-off of the plurality of NMOS tubes is controlled by the first digital quantity ADC. V to control the current size received by the first current mirror 3012.

[0172] Specifically, if the first digital quantity ADC V is 0, then the current value received by the first current mirror 3012 is the current value of the reference current Iref;

[0173] If the first digital ADC V is greater than 0, then the number of NMOS transistors turned on in the digital-to-analog conversion unit will increase, the current value received by the first current mirror 3012 will decrease, and then the first current value I1 will also decrease;

[0174] If all of the NMOS transistors in the digital-to-analog conversion unit are turned on, the current value received by the first current mirror 3012 is 1 / 2 of the current value of the reference current Iref.

[0175] It can be seen that in Figure 5 In the circuit shown, the first voltage value V1 required by the above method can be obtained.

[0176] In subsequent calculations, the ratio of the first voltage value V1 to the second voltage value V2 can be calculated by the pre-adjustment duty cycle calculation module 50 to obtain the pre-adjustment duty cycle of the PWM signal.

[0177] Of course, the present invention does not limit the specific internal structure of each of the above modules. As long as the circuit can implement the method provided by the present invention, it is within the protection scope of the present invention.

[0178] In summary, the pre-adjusted duty cycle of the present invention is only related to the product of the quantized load voltage and the load current, thereby avoiding direct interference of the load voltage and the load current and achieving precise constant power output of the circuit.

[0179] In addition, an embodiment of the present invention further provides a power device, including any power circuit as described above. As an example, the power device can be a sensor, etc. The present invention is not limited to this, and any device that needs to achieve constant power control output is within the protection scope of the present invention.

[0180] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0181] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0182] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0183] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0184] In summary, the embodiment of the present invention acquires a first digital quantity by collecting the voltage value of the load, and the first digital quantity is used to characterize the digital quantity of the voltage of the load; obtains a reference current value, a reference voltage value, a first resistance value, and a second resistance value; obtains a first voltage value based on the first digital value, the reference current value, and the first resistance value, and the first voltage value is inversely proportional to the first digital quantity; acquires the current value flowing through the load, and obtains a second voltage value based on the current value flowing through the load and the second resistance value, and the second voltage value is greater than the first voltage value; calculates the ratio of the first voltage value and the second voltage value, and obtains the pre-adjusted duty cycle of the PWM signal; and adjusts the duty cycle of the PWM signal based on the pre-adjusted duty cycle. Therefore, the pre-adjusted duty cycle of the present invention is only related to the product of the quantized load voltage and the load current, and realizes accurate constant power output of the circuit.

[0185] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.

Claims

1. A constant power PWM signal control method, characterized in that: The PWM signal is used to control the on and off of the switch device in the power circuit; The method includes: Collecting a voltage value of a load to obtain a first digital quantity, where the first digital quantity is used to characterize a digital quantity of the voltage of the load; Obtaining a reference current value, a reference voltage value, a first resistance value, and a second resistance value; Obtaining a first voltage value based on the first digital value, the reference current value, and the first resistance value, wherein the first voltage value is inversely proportional to the first digital value; collecting a current value flowing through the load, and obtaining a second voltage value based on the current value flowing through the load and the second resistance value, wherein the second voltage value is greater than the first voltage value; Calculating a ratio of the first voltage value to the second voltage value to obtain a pre-adjusted duty cycle of the PWM signal; Based on the pre-adjusted duty cycle, the PWM signal is output.

2. The constant power PWM signal control method according to claim 1, characterized in that: Obtaining a first voltage value based on the first digital quantity, the reference current value, and the first resistance value includes: Based on the first digital quantity and the reference current value, a first current value is obtained: Among them, ADC V is the first digital quantity, and Iref is the reference current value; Based on the first current value and the first resistance value, a first voltage value is obtained: V1=I1×R1 Wherein, I1 is the first current value, and R1 is the first resistance value.

3. The constant power PWM signal control method according to claim 2, characterized in that: Obtaining a second voltage value based on a current value flowing through the load and the second resistance value includes: Obtaining a second proportionality coefficient; Based on the second proportionality coefficient, the current value flowing through the load, and the second resistance value, a second voltage value is obtained: V2=I×k×R2 Wherein, I is the current value flowing through the load, k is the second proportional coefficient, and R2 is the second resistance value.

4. The constant power PWM signal control method according to claim 3, characterized in that: The formula for obtaining the pre-adjusted duty cycle of the PWM signal is: Among them, ADC DUTY For the pre-adjusted duty cycle, the ADC V is the first digital quantity.

5. The constant power PWM signal control method according to claim 4, characterized in that: The method of collecting the voltage value of the load and obtaining the first digital quantity includes: Collect the voltage value of the load; Obtain a third proportionality coefficient; Based on the third proportionality coefficient, the voltage value of the load and the reference voltage value, a first digital value is obtained: Wherein, U is the voltage value of the load, and K1 is the third proportional coefficient.

6. The constant power PWM signal control method according to claim 4, characterized in that: The formula for the power of the output PWM signal is:

7. A power circuit based on the constant power PWM signal control method according to any one of claims 1 to 6, used for outputting a constant power PWM signal, characterized in that: include: A voltage acquisition module, used for acquiring a voltage value of a load in real time to obtain a first digital quantity, where the first digital quantity is used to characterize a digital quantity of the voltage of the load; A current detection module, used for collecting the current value flowing through the load in real time; A first voltage conversion module, configured to obtain a first voltage value based on the first digital value, a reference current value, and a first resistance value, wherein the first voltage value is inversely proportional to the first digital value; a second voltage conversion module, configured to obtain a second voltage value based on a current value flowing through the load and the second resistance value, wherein the second voltage value is greater than the first voltage value; a pre-adjustment duty cycle calculation module, configured to calculate a ratio of the first voltage value to the second voltage value to obtain a pre-adjustment duty cycle of the PWM signal; A PWM generator is used to output the PWM signal based on the pre-adjusted duty cycle.

8. The power circuit according to claim 7, characterized in that: The first voltage conversion module comprises: A current conversion unit, configured to obtain a first current value based on the first digital quantity and the reference current value; The voltage conversion unit is used to obtain a first voltage value based on the first current value and the first resistance value.

9. The power circuit according to claim 8, characterized in that: The current conversion unit includes a digital-to-analog conversion subunit, a first current mirror and a first resistor: The input end of the digital-to-analog conversion subunit receives the first digital quantity, the second end thereof is coupled to the first end of the first current mirror, and the third end thereof is grounded. The first end of the first current mirror also receives the reference current, the second end thereof is grounded, and the third end thereof is grounded through the first resistor. The third end of the first current mirror is used to output the first current value. Wherein, the digital-to-analog conversion subunit is used to control the magnitude of the current received by the first current mirror; The first current mirror is used to control the ratio of the first current value to the current value received by the first current mirror to be 1.

10. The power circuit according to claim 7, characterized in that: The current detection module includes a first MOS tube and a second MOS tube, and the second voltage conversion module includes a second resistor; The first end of the first MOS tube and the first end of the second MOS tube both receive a power supply voltage, the gate of the first MOS tube is coupled to the gate of the second MOS tube, the second end of the first MOS tube is respectively coupled to the first end of the load and the first end of the voltage acquisition module, the second end of the load is grounded, the second end of the voltage acquisition module is used to output a first load voltage value, the third end of the voltage acquisition module is grounded, and the second end of the second MOS tube is grounded through the second resistor. Wherein, the width-to-length ratio of the first MOS tube is greater than the width-to-length ratio of the second MOS tube; The first load voltage value corresponds to the first digital quantity.

11. A power device, characterized in that: The invention comprises the power circuit as claimed in any one of claims 7 to 10.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

13. An electronic device, characterized in that: The method comprises a memory, a processor and a program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the program.