Constant-power PWM signal control method, power circuit, equipment and medium
By adjusting the clock frequency and duty cycle of the PWM signal, the reliability and efficiency of the traditional constant power control method in the PWM signal cycle change, and the precise control of the output power and the stable switch of the power MOS tube.
Patent Information
- Application Number
- CN202411315519.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-28
AI Technical Summary
When the PWM signal cycle changes dramatically, the traditional constant power control method may cause the power MOS to fail to turn on or off normally, resulting in a decrease in system reliability and efficiency.
By obtaining the initial and real -time digital quantity of obtaining the blocking load, and the initial clock frequency of the PWM signal, the clock frequency and duty ratio of the PWM signal are adjusted to make the total cycle period unchanged and ensure that the power circuit output power is constant.
The stability of the PWM signal frequency and cycle is implemented, the accurate control of the output power is ensured, and the power MOS tube works within the appropriate switch range, which improves the reliability and efficiency of the system.
Smart Images

Figure CN119382676A_ABST
Abstract
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] Constant power circuits are widely used in various occasions, such as power management, motor control, etc.
[0003] Traditional constant power control usually uses pulse width modulation (PWM) technology to adjust power output and controls the average power by changing the duty cycle of the PWM signal. However, when the voltage or current of the circuit changes, the traditional PWM control method generally ensures that the high level time of the PWM signal remains unchanged and maintains the constant power output of the circuit by changing the period of the PWM signal.
[0004] However, when the period of the PWM signal changes dramatically, unexpected situations may occur such as the power MOS in the circuit cannot be turned on or off normally.
[0005] Therefore, how to maintain the stability of PWM signal frequency and period, achieve precise control of output power, ensure that the power MOS tube operates within the appropriate switching range, and improve the reliability and efficiency of the system has become a technical problem that needs to be solved urgently in the industry. Summary of the invention
[0006] 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 maintain the stability of the PWM signal frequency and period, achieve accurate control of the output power, ensure that the power MOS tube works within a suitable switching range, and improve the reliability and efficiency of the system.
[0007] 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;
[0008] The method includes:
[0009] Obtaining an initial digital quantity of the resistive load and an initial clock frequency of the PWM signal, wherein the initial digital quantity is characterized by a power value of the resistive load at an initial moment;
[0010] Obtaining a first digital quantity of a resistive load, wherein the first digital quantity represents a real-time power value of the resistive load;
[0011] Adjusting the clock frequency of the PWM signal based on the initial digital quantity, the first digital quantity and the initial clock frequency;
[0012] Obtaining a second digital quantity, where the second digital quantity is a fixed value and is used to set a reference duty cycle of the PWM signal;
[0013] Based on the first digital quantity, the second digital quantity and the adjusted clock frequency, the duty cycle of the PWM signal is adjusted so that the total cycle time of the PWM signal remains unchanged and the output power of the power circuit is constant.
[0014] Optionally, the formula for adjusting the clock frequency of the PWM signal is:
[0015]
[0016] Among them, CLK2 is the adjusted clock frequency, Ad1 is the initial digital value, Ad1′ is the first digital value, and CLK1 is the initial clock frequency.
[0017] Optionally, the formula for adjusting the duty cycle of the PWM signal is:
[0018]
[0019] Wherein, Duty′ is the adjusted duty cycle of the PWM signal, and Ad2 is the second digital value.
[0020] Optionally, a method for obtaining a first digital quantity of a resistive load includes:
[0021] Collecting the current value flowing through the resistive load and the voltage value of the resistive load;
[0022] Based on the current value flowing through the resistive load and the voltage value across the resistive load, a third digital quantity and a fourth digital quantity are obtained, wherein the third digital quantity is used to characterize the digital quantity of the voltage of the resistive load, and the fourth digital quantity is used to characterize the digital quantity of the current flowing through the resistive load;
[0023] The first digital quantity is obtained based on the third digital quantity and the fourth digital quantity.
[0024] 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:
[0025] A voltage detection module, used for detecting the voltage value of the resistive load in real time and outputting a first signal;
[0026] A current detection module, used for monitoring the current value flowing through the resistive load in real time and outputting a second signal;
[0027] A first ADC module, used for converting the first signal into a third digital quantity, wherein the third digital quantity is used for representing the digital quantity of the voltage of the resistive load;
[0028] A second ADC module, used for converting the second signal into a fourth digital quantity, where the fourth digital quantity is used for representing a digital quantity of a current flowing through the resistive load;
[0029] a multiplier, configured to multiply the third digital quantity and the fourth digital quantity to obtain the first digital quantity;
[0030] a calculation module, configured to adjust the clock frequency of the PWM signal based on the initial digital quantity, the first digital quantity and the initial clock frequency; and
[0031] Adjusting the duty cycle of the PWM signal based on the first digital quantity, the second digital quantity and the adjusted clock frequency;
[0032] The PWM control module is used to output the PWM signal based on the adjusted clock frequency and the adjusted duty cycle.
[0033] Optionally, the PWM control module is further used to: adjust the clock frequency of the PWM signal to a set clock frequency to set the period of the PWM signal.
[0034] Optionally, the PWM control module is further used to output a clock frequency adjustment signal, wherein the clock frequency adjustment signal includes adjusted clock frequency information;
[0035] The power circuit further comprises:
[0036] An oscillator is used to adjust the clock frequencies in the first ADC module, the second ADC module, the multiplier and the calculation module based on the clock frequency adjustment signal.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] Compared with the prior art, the technical solution of the embodiment of the present invention has the following beneficial effects:
[0041] In the constant power PWM signal control method, computer-readable storage medium and electronic device of the technical solution of the present invention, by obtaining the initial digital quantity of the resistive load and the initial clock frequency of the PWM signal, the initial digital quantity is characterized as the power value of the resistive load at the initial moment; obtaining the first digital quantity of the resistive load, the first digital quantity is characterized as the real-time power value of the resistive load; adjusting the clock frequency of the PWM signal based on the initial digital quantity, the first digital quantity and the initial clock frequency; obtaining the second digital quantity, the second digital quantity is a fixed value, used to set the reference duty cycle of the PWM signal; adjusting the duty cycle of the PWM signal based on the first digital quantity, the second digital quantity and the adjusted clock frequency, so that the total cycle time of the PWM signal remains unchanged, and the output power of the power circuit is constant. Furthermore, the present invention can not only maintain the stability of the frequency and period of the PWM signal, but also realize the precise control of the output power, while ensuring that the power MOS tube works within a suitable switching range, and improving the reliability and efficiency of the system.
[0042] In the power circuit and power device of the technical solution of the present invention, the collected current and voltage are quantized into digital quantities through ADC, and the output of the PWM signal is calculated using the digital quantity. The speed is relatively fast, and the stability of the frequency and period of the PWM signal can be maintained, while the output power can be accurately controlled. At the same time, it is ensured that the power MOS tube operates within a suitable switching range, thereby improving the reliability and efficiency of the system.
[0043] Furthermore, the PWM control module is also used to adjust the clock frequency of the PWM signal to a set clock frequency to set the period of the PWM signal. Thus, the present invention can not only ensure the stability of the PWM signal frequency and period, but also adjust the PWM signal frequency and period as needed.
[0044] Furthermore, the power circuit of the present invention also includes: an oscillator, which is used to adjust the clock frequencies in the first ADC module, the second ADC module, the multiplier and the calculation module based on the clock frequency adjustment signal, so that the calculation is faster and the stability of the PWM signal frequency and period is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, 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.
[0046] Figure 1 It is a flow chart of a constant power PWM signal control method provided by an embodiment of the present invention;
[0047] Figure 2 is a flow chart of a constant power PWM signal control method provided by another embodiment of the present invention;
[0048] Figure 3 is a schematic structural diagram of an electronic device provided by an exemplary embodiment;
[0049] Figure 4 is a schematic diagram of the structure of a power circuit provided by an embodiment of the present invention;
[0050] Figure 5 It is a schematic diagram of the structure of a power circuit provided by another embodiment of the present invention.
[0051] Description of reference numerals:
[0052] 71- voltage detection module;
[0053] 72-current detection module;
[0054] 73- first ADC module;
[0055] 74- second ADC module;
[0056] 75-Multiplier;
[0057] 76-computing module;
[0058] 77-PWM control module;
[0059] Clk_control-clock frequency adjustment signal;
[0060] OSC - Oscillator. DETAILED DESCRIPTION
[0061] 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.
[0062] 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.
[0063] 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.
[0064] As described in the background technology, how to maintain the stability of the PWM signal frequency and period, achieve precise control of the output power, and ensure that the power MOS tube works within a suitable switching range to improve the reliability and efficiency of the system has become a technical problem that needs to be solved in the industry. The following will be described in detail.
[0065] Constant power circuits are used in many fields, especially in light source control, gas sensor, liquid sensor, etc.
[0066] 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 resistive loads.
[0067] At present, in the aspect of constant power control of resistive 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.
[0068] 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:
[0069] 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.
[0070] 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.
[0071] 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.
[0072] 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.
[0073] 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.
[0074] It can be seen that the current constant power circuit has the following disadvantages:
[0075] 1) Currently, constant power requires the use of MCU resources and is implemented through programming.
[0076] 2) The fixed frequency requirement of PWM signal cannot be met.
[0077] 3) Currently, constant power is mostly achieved by "constant voltage circuit design", the disadvantage of which is that the default resistance value remains unchanged and the efficiency is low. The disadvantage of using "constant effective value control method" is that the default resistance value remains unchanged and the accuracy is poor.
[0078] In summary, it is difficult for current circuits or methods to maintain the stability of the PWM signal frequency and period, achieve precise control of the output power, and ensure that the power MOS tube operates within a suitable switching range.
[0079] In view of this, the present invention provides a constant power PWM signal control method, by obtaining the initial digital quantity of the resistive load and the initial clock frequency of the PWM signal, the initial digital quantity is characterized as the power value of the resistive load at the initial moment; obtaining the first digital quantity of the resistive load, the first digital quantity is characterized as the real-time power value of the resistive load; adjusting the clock frequency of the PWM signal based on the initial digital quantity, the first digital quantity and the initial clock frequency; obtaining the second digital quantity, the second digital quantity is a fixed value, used to set the reference duty cycle of the PWM signal; adjusting the duty cycle of the PWM signal based on the first digital quantity, the second digital quantity and the adjusted clock frequency, so that the total cycle length of the PWM signal remains unchanged, and the output power of the power circuit is constant. Furthermore, the present invention can not only maintain the stability of the frequency and period of the PWM signal, but also realize the precise control of the output power, while ensuring that the power MOS tube works within a suitable switching range, and improving the reliability and efficiency of the system.
[0080] 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.
[0081] Figure 1 : is a flow chart of a constant power PWM signal control method according to an embodiment of the present invention, comprising:
[0082] S1: obtaining an initial digital quantity of the resistive load and an initial clock frequency of the PWM signal, wherein the initial digital quantity is characterized by a power value of the resistive load at an initial moment;
[0083] It should be understood that the initial moment can be considered as the power value of the resistive load at any moment, and the present invention does not limit the time for obtaining the initial digital value.
[0084] S2: Obtain a first digital quantity of the resistive load, where the first digital quantity represents a real-time power value of the resistive load;
[0085] S3: adjusting the clock frequency of the PWM signal based on the initial digital quantity, the first digital quantity and the initial clock frequency;
[0086] S4: obtaining a second digital quantity, where the second digital quantity is a fixed value and is used to set a reference duty cycle of the PWM signal;
[0087] S5: Based on the first digital quantity, the second digital quantity and the adjusted clock frequency, adjust the duty cycle of the PWM signal so that the total cycle length of the PWM signal remains unchanged and the output power of the power circuit is constant.
[0088] It can be seen that this solution makes full use of the first digital quantity, the second digital quantity and the adjusted clock frequency to adjust the duty cycle of the PWM signal so that the total cycle length of the PWM signal remains unchanged and the output power of the power circuit is constant. Furthermore, the present invention can not only maintain the stability of the PWM signal frequency and cycle, but also achieve precise control of the output power, while ensuring that the power MOS tube operates within a suitable switching range, thereby improving the reliability and efficiency of the system.
[0089] The method provided by the embodiment of the present invention is now further described:
[0090] Since the current and voltage of resistive loads (such as electronic cigarette heating wires, LEDs, etc.) will change in real time, please refer to Figure 1 , execute step S2:
[0091] S2: Obtain a first digital quantity of the resistive load, where the first digital quantity represents a real-time power value of the resistive load.
[0092] In one implementation, please refer to Figure 2 , a method for obtaining a first digital quantity of a resistive load, comprising:
[0093] S21: collecting a current value flowing through the resistive load and a voltage value of the resistive load;
[0094] S22: Based on the current value flowing through the resistive load and the voltage value across the resistive load, obtain a third digital quantity and a fourth digital quantity, wherein the third digital quantity is used to characterize the digital quantity of the voltage of the resistive load, and the fourth digital quantity is used to characterize the digital quantity of the current flowing through the resistive load;
[0095] S23: Obtain the first digital quantity based on the third digital quantity and the fourth digital quantity.
[0096] Please refer to Figure 1 , execute step S3:
[0097] S3: Adjust the clock frequency of the PWM signal based on the initial digital quantity, the first digital quantity and the initial clock frequency.
[0098] In one implementation, the formula for adjusting the clock frequency of the PWM signal is:
[0099]
[0100] Among them, CLK2 is the adjusted clock frequency, Ad1 is the initial digital value, Ad1′ is the first digital value, and CLK1 is the initial clock frequency.
[0101] Specifically, when the initial digital value Ad1 of the resistive load is obtained to be 11110000=240, the first digital value Ad1′ is obtained to be 11110101=245, and the initial clock frequency CLK1 of the PWM signal, the clock frequency of the PWM signal after adjustment is
[0102]
[0103] Please refer to Figure 1 , execute step S4:
[0104] S4: Obtain a second digital quantity, where the second digital quantity is a fixed value and is used to set a reference duty cycle of the PWM signal.
[0105] In actual work, when the initial digital value of the resistive load, the initial clock frequency of the PWM signal and the second digital value are known, the reference duty cycle of the PWM signal can be obtained.
[0106] As an example, assuming that the initial digital value Ad1 of the resistive load is 11110000, the initial clock frequency CLK1 of the PWM signal and the second digital value Ad2 is 01111000, then the reference duty cycle of the PWM signal is
[0107]
[0108] Please refer to Figure 1 , execute step S5:
[0109] S5: Based on the first digital quantity, the second digital quantity and the adjusted clock frequency, adjust the duty cycle of the PWM signal so that the total cycle length of the PWM signal remains unchanged and the output power of the power circuit is constant.
[0110] As an example, assume that the initial digital value Ad1 of the resistive load is obtained = 11110000, the first digital value Ad1' is obtained = 11110101, the second digital value Ad2 is obtained = 01111000, the initial clock frequency CLK1 of the PWM signal, and the initial clock frequency of the PWM signal after adjustment is The duty cycle of the adjusted PWM signal is
[0111]
[0112] Since the denominator of Duty' is the period and the numerator is the on-time, the period of the PWM waveform can be kept unchanged while the duration of the high level is reduced.
[0113] We also have power P = U × I × Duty′, and Ad1′=Ad3×Ad4, wherein Ad3 is the third digital quantity and Ad4 is the fourth digital quantity. It can be seen that the present invention can not only realize constant power but also ensure that the PWM frequency remains unchanged.
[0114] In summary, the present invention adjusts the clock frequency and duty cycle of the PWM signal through the real-time power value of the resistive load, so that the total cycle length of the PWM signal remains unchanged and the output power of the power circuit is constant. Furthermore, the present invention can not only maintain the stability of the PWM signal frequency and cycle, but also achieve precise control of the output power, while ensuring that the power MOS tube operates within a suitable switching range, thereby improving the reliability and efficiency of the system.
[0115] In addition, please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device where a power circuit is provided by an exemplary embodiment. Figure 3 At the hardware level, the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610, 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 602 reading the corresponding computer instructions from the non-volatile memory 610 into the memory 608 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.
[0116] Please refer to Figure 4 , Figure 4 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 3 In the electronic device shown, the technical solution of this specification is implemented.
[0117] Wherein, the power circuit is used to output a constant power PWM signal, including:
[0118] A voltage detection module 71, used to detect the voltage value of the resistive load in real time and output a first signal;
[0119] A current detection module 72, used for real-time monitoring of the current value flowing through the resistive load and outputting a second signal;
[0120] A first ADC module 73, used for converting the first signal into a third digital value Ad3, wherein the third digital value Ad3 is used for representing the digital value of the voltage of the resistive load;
[0121] A second ADC module 74, used for converting the second signal into a fourth digital value Ad4, where the fourth digital value Ad4 is used for representing a digital value of a current flowing through the resistive load;
[0122] A multiplier 75, configured to multiply the third digital value Ad3 and the fourth digital value Ad4 to obtain the first digital value Ad1';
[0123] a calculation module 76, configured to adjust the clock frequency of the PWM signal based on the initial digital value Ad1, the first digital value Ad1' and the initial clock frequency CLK1; and
[0124] Adjusting the duty cycle Duty' of the PWM signal based on the first digital value Ad1', the second digital value and the adjusted clock frequency CLK2;
[0125] The PWM control module 77 is used to output the PWM signal based on the adjusted clock frequency CLK2 and the adjusted duty cycle Duty′.
[0126] It can be seen that the present invention quantizes the collected current and voltage into digital quantities through ADC, and adopts the digital quantity to calculate the output of the PWM signal. The speed is relatively fast, and it can not only maintain the stability of the PWM signal frequency and period, but also achieve accurate control of the output power, while ensuring that the power MOS tube operates within a suitable switching range, thereby improving the reliability and efficiency of the system.
[0127] In a preferred embodiment, the PWM control module 77 is further used to adjust the clock frequency of the PWM signal to a set clock frequency to set the period of the PWM signal.
[0128] Therefore, the present invention can not only ensure the stability of the frequency and period of the PWM signal, but also adjust the frequency and period of the PWM signal as required.
[0129] In practical applications, the PWM control module 77 is also used to output a clock frequency adjustment signal Clk_control, wherein the clock frequency adjustment signal Clk_control includes adjusted clock frequency information;
[0130] In this case, please refer to Figure 5 , the power circuit further includes:
[0131] The oscillator OSC is used to adjust the clock frequencies in the first ADC module 73, the second ADC module 74, the multiplier 75 and the calculation module 76 based on the clock frequency adjustment signal Clk_control.
[0132] In this way, the circuit can calculate faster and the stability of the PWM signal frequency and period can be guaranteed.
[0133] It should be understood that the clock frequency adjustment signal Clk_control can not only adjust the oscillator OSC to the updated clock frequency, but also adjust the oscillator OSC to the set clock frequency.
[0134] In addition, an embodiment of the present invention further provides a power device, including a power circuit as described above. As an example, the power device may be a sensor, etc., and the present invention is not limited thereto. Any device that needs to achieve constant power control output and has a fixed PWM output frequency is within the protection scope of the present invention.
[0135] 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.
[0136] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0137] 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.
[0138] 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.
[0139] In summary, the present invention obtains the initial digital quantity of the resistive load and the initial clock frequency CLK1 of the PWM signal, the initial digital quantity is characterized by the power value of the resistive load at the initial moment; obtains the first digital quantity Ad1' of the resistive load, the first digital quantity Ad1' is characterized by the real-time power value of the resistive load; based on the initial digital quantity, the first digital quantity Ad1' and the initial clock frequency CLK1, the clock frequency of the PWM signal is adjusted; the second digital quantity is obtained, the second digital quantity is a fixed value, and is used to set the reference duty cycle of the PWM signal; based on the first digital quantity Ad1', the second digital quantity and the adjusted clock frequency, the duty cycle of the PWM signal is adjusted, so that the total cycle time of the PWM signal remains unchanged, and the output power of the power circuit is constant. Furthermore, the present invention can not only maintain the stability of the frequency and period of the PWM signal, but also realize the precise control of the output power, while ensuring that the power MOS tube works within a suitable switching range, thereby improving the reliability and efficiency of the system.
[0140] 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: Obtaining an initial digital quantity of the resistive load and an initial clock frequency of the PWM signal, wherein the initial digital quantity is characterized by a power value of the resistive load at an initial moment; Obtaining a first digital quantity of a resistive load, wherein the first digital quantity represents a real-time power value of the resistive load; Adjusting the clock frequency of the PWM signal based on the initial digital quantity, the first digital quantity and the initial clock frequency; Obtaining a second digital quantity, where the second digital quantity is a fixed value and is used to set a reference duty cycle of the PWM signal; Based on the first digital quantity, the second digital quantity and the adjusted clock frequency, the duty cycle of the PWM signal is adjusted so that the total cycle time of the PWM signal remains unchanged and the output power of the power circuit is constant.
2. The constant power PWM signal control method according to claim 1, characterized in that: The formula for adjusting the clock frequency of the PWM signal is: Among them, CLK2 is the adjusted clock frequency, Ad1 is the initial digital value, Ad1′ is the first digital value, and CLK1 is the initial clock frequency.
3. The constant power PWM signal control method according to claim 2, characterized in that: The formula for adjusting the duty cycle of the PWM signal is: Wherein, Duty′ is the adjusted duty cycle of the PWM signal, and Ad2 is the second digital value.
4. The constant power PWM signal control method according to claim 1, characterized in that: A method for obtaining a first digital quantity of a resistive load, comprising: Collecting the current value flowing through the resistive load and the voltage value of the resistive load; Based on the current value flowing through the resistive load and the voltage value across the resistive load, a third digital quantity and a fourth digital quantity are obtained, wherein the third digital quantity is used to characterize the digital quantity of the voltage of the resistive load, and the fourth digital quantity is used to characterize the digital quantity of the current flowing through the resistive load; The first digital quantity is obtained based on the third digital quantity and the fourth digital quantity.
5. A power circuit based on the constant power PWM signal control method according to any one of claims 1 to 4, used for outputting a constant power PWM signal, characterized in that: include: A voltage detection module, used to detect the voltage value of the resistive load in real time and output a first signal; A current detection module, used for monitoring the current value flowing through the resistive load in real time and outputting a second signal; A first ADC module, used for converting the first signal into a third digital quantity, wherein the third digital quantity is used for representing the digital quantity of the voltage of the resistive load; A second ADC module, used for converting the second signal into a fourth digital quantity, where the fourth digital quantity is used for representing a digital quantity of a current flowing through the resistive load; a multiplier, configured to multiply the third digital quantity and the fourth digital quantity to obtain the first digital quantity; a calculation module, configured to adjust the clock frequency of the PWM signal based on the initial digital quantity, the first digital quantity and the initial clock frequency; as well as Adjusting the duty cycle of the PWM signal based on the first digital quantity, the second digital quantity and the adjusted clock frequency; The PWM control module is used to output the PWM signal based on the adjusted clock frequency and the adjusted duty cycle.
6. The power circuit according to claim 5, characterized in that: The PWM control module is further used to adjust the clock frequency of the PWM signal to a set clock frequency to set the period of the PWM signal.
7. The power circuit according to claim 5 or 6, characterized in that: The PWM control module is also used to output a clock frequency adjustment signal, wherein the clock frequency adjustment signal includes adjusted clock frequency information; The power circuit further comprises: An oscillator is used to adjust the clock frequencies in the first ADC module, the second ADC module, the multiplier and the calculation module based on the clock frequency adjustment signal.
8. A power device, characterized in that: The invention comprises the power circuit as claimed in any one of claims 5 to 7.
9. 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 4 are implemented.
10. 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 4 when executing the program.
Citation Information
Cited By
Constant power control method and device based on fixed period, equipment and storage medium
CN120827220A