Method, device and storage medium for controlling power supply power
By obtaining the load model and the preset mapping relationship, calculating the equivalent resistance and pulse width modulation parameters of the feedback circuit, and generating the equivalent impedance, the problem of low power control efficiency of traditional power supplies is solved, and fast matching of load models and precise adjustment of output power are achieved.
Patent Information
- Application Number
- CN202510734795.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-06-04
AI Technical Summary
Traditional power control solutions for power supplies are inefficient and require manual replacement of resistor components to adapt to different types of load devices, resulting in low efficiency.
By obtaining the load model selected by the user, the target output power is determined based on the preset mapping relationship, the equivalent resistance and pulse width modulation parameters required for the feedback circuit are calculated, the pulse width modulation signal is generated and converted into equivalent impedance, and the pulse width modulation parameters are adjusted in real time to meet the preset convergence conditions.
It improves the efficiency of power supply control, realizes rapid matching of load models and precise adjustment of output power, reduces manual intervention, and improves the adaptability and stability of the power supply system.
Smart Images

Figure CN120262866B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of voltage power conversion, and particularly relates to a power supply power control method, device and storage medium. BACKGROUND
[0002] Precise control of power supply power plays a key role in modern electronic device power supply systems, directly affecting device adaptability and energy efficiency performance. At present, the traditional power supply power control scheme usually adopts a fixed output power mode adjustment method, which realizes power switching of different loads by manually replacing resistance elements in a feedback circuit. This type of method needs to prepare corresponding hardware parameters for different models of load devices in advance, and relies on manual intervention to complete the switching of resistance elements in actual application.
[0003] In actual application, when facing different manufacturers and different models of load devices, since there are differences in the working power parameters of the load devices, the staff must replace the power supply module and adjust the hardware circuit to meet the power matching requirements of different models of load devices, which leads to low efficiency of the traditional scheme in power supply power control.
[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0005] The present application provides a power supply power control method, device and storage medium, aiming to solve the problem of low efficiency of the traditional scheme in power supply power control.
[0006] To achieve the above purpose, the present application provides a power supply power control method, which comprises the following steps:
[0007] Obtaining a user-selected load model, and determining a target output power corresponding to the load model based on a preset mapping relationship;
[0008] Determining an equivalent resistance required by a feedback circuit according to the target output power, and determining a pulse width modulation parameter matched with the equivalent resistance;
[0009] Generating a pulse width modulation signal matched with the pulse width modulation parameter, and converting the pulse width modulation signal into an equivalent impedance corresponding to the equivalent resistance in the feedback circuit;
[0010] Detecting an actual output power of the power supply in the feedback circuit, adjusting the pulse width modulation parameter according to a deviation value between the actual output power and the target output power, until a preset convergence condition is met.
[0011] In an embodiment, the step of detecting the actual output power of the power supply in the feedback circuit, and adjusting the pulse width modulation parameter according to a deviation value between the actual output power and the target output power comprises:
[0012] collecting the actual output power in the feedback circuit at a preset period;
[0013] calculating the deviation value of the current period according to the actual output power and the target output power;
[0014] when the deviation value exceeds a first threshold value, increasing or decreasing the modulation parameter by a preset step size;
[0015] when the deviation value is less than a second threshold value, stopping adjustment and locking the current pulse width modulation parameter.
[0016] In an embodiment, the preset convergence condition comprises at least one of the following:
[0017] the relative error between the actual output power and the target output power is less than a preset percentage for a preset time;
[0018] the fluctuation amplitude of the actual output power does not exceed the fluctuation threshold value of the target output power within a first period;
[0019] during the adjustment process of the pulse width modulation parameter, the adjustment amount of the pulse width modulation parameter is less than the target adjustment step size for a continuous preset number of times.
[0020] In an embodiment, the step of converting the pulse width modulation signal into an equivalent impedance corresponding to the equivalent resistance in the feedback circuit comprises:
[0021] outputting the pulse width modulation signal to the control end of the switching transistor through a preset interface of the Bluetooth single-chip microcomputer module;
[0022] determining the target output current corresponding to the pulse width modulation signal;
[0023] generating an equivalent impedance corresponding to the target output current according to the on-off action of the switching transistor, in combination with the equivalent resistance relationship between the parallel resistance and the reference resistance.
[0024] In an embodiment, after the step of obtaining the user-selected load model and determining the target output power corresponding to the load model based on a preset mapping relationship, the method further comprises:
[0025] receiving a load configuration instruction sent by a terminal through a Bluetooth communication interface, the load configuration instruction containing a target full-load current value;
[0026] convert the full load current value into corresponding output power, and update the preset mapping relationship according to the output power;
[0027] When adjusting the pulse width modulation parameter according to the deviation value of the actual output power and the target output power, the adjustment range of adjusting the pulse width modulation parameter is limited as a constraint condition of the target full load current value.
[0028] In an embodiment, after the step of converting the full load current value into corresponding output power, and updating the preset mapping relationship according to the output power, the method further comprises:
[0029] According to the detected actual output power and the corresponding acquisition period, a power curve graph is constructed;
[0030] According to the power curve graph, a target actual output power is determined, which satisfies a preset condition in the acquisition period;
[0031] The current modulation parameter corresponding to the target actual output power and the target relationship of the load model are recorded;
[0032] The preset mapping relationship of the load model and the target output power is updated by the newly recorded target relationship.
[0033] In an embodiment, after the step of obtaining the user-selected load model, and determining the target output power corresponding to the load model based on the preset mapping relationship, the method further comprises:
[0034] A batch configuration instruction sent by a wireless communication module is received, and a device group identifier and a corresponding load model set in the batch configuration instruction are parsed;
[0035] According to a preset configuration strategy, a physical space is divided into a plurality of communication time slots, and each communication time slot corresponds to a control channel of a feedback circuit;
[0036] In the allocated communication time slot, the pulse width modulation parameter corresponding to each load model is written into the register of the target feedback circuit;
[0037] The parameter write completion state of the pulse width modulation parameter is detected, when a timeout unresponsive state is detected, the write operation is reinitiated in a redundant time slot until the parameter write completion state is write success, and the parameter write operation of the pulse width modulation parameter is terminated.
[0038] In an embodiment, after the step of detecting the actual output power of the power supply in the feedback circuit, adjusting the pulse width modulation parameter according to the deviation value of the actual output power and the target output power, and until the preset convergence condition is met, the method further comprises:
[0039] When the pulse width modulation parameter is detected to be abnormal, a dual-core switching mechanism is triggered to migrate control right from the main processor to the secondary processor;
[0040] A high-speed impedance scan is started to complete full-band impedance phase detection of the feedback circuit within a preset time length to determine impedance phase characteristics of the feedback circuit;
[0041] An equivalent circuit model is reconstructed based on the impedance phase characteristics, and a target duty cycle corresponding to the feedback circuit is determined;
[0042] When the target duty cycle after reconstruction is stable for a second continuous period, the main processor is switched back and an abnormal event log is recorded.
[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a power supply power control device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the power supply power control method as described above.
[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the power supply power control method as described above.
[0045] The present application provides a power supply power control method, a power supply power control device and a storage medium. The power supply power control method comprises the following steps: acquiring a selected load model of a user; determining a target output power corresponding to the load model based on a preset mapping relationship; determining an equivalent resistance required by a feedback circuit according to the target output power; determining a pulse width modulation parameter matched with the equivalent resistance; generating a pulse width modulation signal matched with the pulse width modulation parameter; converting the pulse width modulation signal into an equivalent impedance corresponding to the equivalent resistance in the feedback circuit; detecting an actual output power of a power supply in the feedback circuit; and adjusting the pulse width modulation parameter according to a deviation value between the actual output power and the target output power until a preset convergence condition is met. The present application effectively converts the pulse width modulation signal into the equivalent impedance, thereby adjusting the output power of the power supply correspondingly to improve the efficiency of power supply power control. BRIEF DESCRIPTION OF DRAWINGS
[0046] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings are provided only for the purpose of explaining the embodiments of the present application and thus should not be used to limit the scope of the present application.
[0048] Figure 1 Flowchart of a first embodiment of the power supply power control method of the present application;
[0049] Figure 2 Flowchart of a second embodiment of the power supply power control method of the present application;
[0050] Figure 3 Flowchart of a third embodiment of the power supply power control method of the present application;
[0051] Figure 4 Flowchart of a fourth embodiment of the power supply power control method of the present application;
[0052] Figure 5 Architectural diagram of the hardware operating environment of the power supply power control device involved in the embodiments of the present application.
[0053] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are merely intended to explain the present application and should not be used to limit the present application.
[0055] In order to better understand the above technical solutions, the exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0056] In order to better understand the above technical solutions, the above technical solutions will be described in detail below in combination with the accompanying drawings and specific embodiments.
[0057] The main solution of the present application is to obtain a user-selected load model and determine a target output power corresponding to the load model based on a preset mapping relationship;
[0058] According to the target output power, an equivalent resistance required by a feedback circuit is determined, and a pulse width modulation parameter matched with the equivalent resistance is determined;
[0059] generate a pulse width modulation signal matching the pulse width modulation parameter, convert the pulse width modulation signal into an equivalent impedance corresponding to the equivalent resistance in the feedback circuit;
[0060] detect an actual output power of the power supply in the feedback circuit, and adjust the pulse width modulation parameter according to a deviation value between the actual output power and the target output power until a preset convergence condition is met.
[0061] At present, the traditional power supply power control scheme usually adopts a fixed output power mode adjustment method, and different loads are switched by manually replacing the resistance elements in the feedback circuit. This kind of method needs to prepare corresponding hardware parameters for different models of load devices in advance, and relies on manual intervention to complete the switching of resistance elements in actual application. In actual application, when facing different manufacturers and different models of load devices, due to the difference of the working power parameters of the load devices, the power supply module must be replaced and the hardware circuit must be adjusted to meet the power matching requirements of different models of load devices, which leads to low efficiency of the traditional scheme for power supply power control.
[0062] By obtaining the user-selected load model, determining the target output power corresponding to the load model based on a preset mapping relationship, determining the equivalent resistance required by the feedback circuit according to the target output power, determining the pulse width modulation parameter matched with the equivalent resistance, generating a pulse width modulation signal matching the pulse width modulation parameter, converting the pulse width modulation signal into an equivalent impedance corresponding to the equivalent resistance in the feedback circuit, and finally detecting an actual output power of the power supply in the feedback circuit, adjusting the pulse width modulation parameter according to a deviation value between the actual output power and the target output power until a preset convergence condition is met. The present application accurately calculates and sets the equivalent resistance of the feedback circuit and the pulse width modulation parameter, and effectively converts the pulse width modulation signal into the equivalent impedance, so as to adjust the output power of the power supply, thereby improving the efficiency of the power supply power control.
[0063] Embodiment one
[0064] Based on this, the embodiments of the present application provide a power supply power control method, referring to Figure 1 , Figure 1 The flowchart of the first embodiment of the power supply power control method of the present application is shown in the figure, and the power supply power control method comprises steps S10-S40:
[0065] Step S10: Obtain the user-selected load model, and determine the target output power corresponding to the load model based on a preset mapping relationship.
[0066] In the embodiment, the processing action is performed by the power control system, and the load type refers to a category identification of different electrical equipment according to design parameters and purposes, wherein the load refers to an electronic element connected in a circuit with a certain potential difference between two ends, and is a device for converting electrical energy into other forms of energy; in electrotechnics, it refers to a device receiving electrical energy in a circuit, and is a general term for various electrical appliances. The preset mapping relationship is a data association rule that is previously set and corresponds different load types to corresponding target output powers, and is stored in a storage unit of the power control system in the form of a table, a function, etc.
[0067] Specifically, the input interface of the power control system receives a load type selected by a user through an operation interface (such as a touch screen, a key, etc.). Then, the processor calls the preset mapping relationship data stored in the memory, takes the received load type as a query key, and performs retrieval matching in the mapping relationship table. When a matched load type is found, the corresponding pre-set target output power value can be called out.
[0068] Step S20: determining an equivalent resistance required by the feedback circuit according to the target output power, and determining a pulse width modulation parameter matched with the equivalent resistance.
[0069] In the embodiment, the feedback circuit is a circuit structure for real-time detection of the output state of a feedback power supply, and is usually composed of various electronic elements including resistors, capacitors, operational amplifiers, etc. Its function is to convert the actual output information of the power supply into an electrical signal convenient for processing. The equivalent resistance refers to a single resistance value in the feedback circuit that can make the circuit exhibit the same or similar electrical characteristics as the actual complex circuit, and it can be obtained through specific circuit theory and calculation methods (such as Thevenin theorem, Norton theorem, etc.). The pulse width modulation parameter mainly includes a duty cycle and a frequency of pulse width modulation, the duty cycle determines the proportion of the high level duration of the pulse signal to the whole cycle time, and the frequency determines the speed of the pulse signal repetition.
[0070] In determining the equivalent resistance required by the feedback circuit, first according to the target output power and the electrical characteristics of the feedback circuit. Specifically, the circuit analysis method can be used, the structure of the feedback circuit and the target output power requirements are substituted into the corresponding formula, and the equivalent resistance value that meets the requirements is solved. After determining the equivalent resistance, according to the principle of pulse width modulation technology, using the formula, that is, the corresponding relationship formula of duty cycle and equivalent resistance to calculate the pulse width modulation parameters matched with the equivalent resistance. For example, assuming that the feedback circuit adopts a simple resistance voltage division type feedback structure, the voltage value corresponding to the target output power is known, and the calculation formula of the equivalent resistance can be obtained through circuit analysis R=Vfeedback×(1-Vfeedback / Vpower) / (Iload×K), wherein Vfeedback is the feedback voltage, Vpower is the power supply voltage, Iload is the load current, and K is the proportional coefficient. After calculating the equivalent resistance, according to the characteristics of the pulse width modulator, such as the relationship formula between the duty cycle and the output voltage: duty cycle=R equivalent / (R reference+R equivalent), wherein R reference is a known reference resistance value, so as to determine the corresponding pulse width modulation duty cycle and other parameters.
[0071] Step S30: generating a pulse width modulation signal matched with the pulse width modulation parameters, and converting the pulse width modulation signal into an equivalent impedance corresponding to the equivalent resistance in the feedback circuit.
[0072] In this embodiment, the pulse width modulation signal is a periodic square wave signal with adjustable high level and low level duration ratio, and the signal form is changed by setting the pulse width modulation parameters such as duty cycle and frequency. The equivalent impedance refers to the impedance value equivalent to a single resistance, inductance or capacitance presented by a complex network (such as various element combinations in the feedback circuit) to the outside under the action of alternating current circuit or pulse signal. The pulse width modulation signal matched with the pulse width modulation parameters is usually generated by using a pulse width modulation chip, configuring its internal registers and control logic according to the determined pulse width modulation parameters, and then outputting the pulse width modulation signal with corresponding characteristics.
[0073] In the process of converting the pulse width modulation signal into the equivalent impedance corresponding to the equivalent resistance in the feedback circuit, when the pulse width modulation signal is input into the feedback circuit, the energy storage elements such as capacitance and inductance in the circuit will charge and discharge the pulse signal, according to the duty cycle, frequency of the pulse width modulation signal and the parameters of the circuit elements, according to the impedance calculation method of the alternating current circuit or the average value calculation method of the pulse signal, finally the entire feedback circuit presents the equivalent impedance corresponding to the equivalent resistance. For example, in a feedback circuit composed of resistance and capacitance, when a pulse width modulation signal with a duty cycle of D is input, the voltage across the capacitor will charge and discharge with the high and low level of the pulse signal, according to the charge and discharge formula of the capacitor and the calculation method of the average voltage, the average impedance of the feedback circuit Z=Vpower(R equivalent×C×f×(1-D)+1) / (R equivalent×C×f×D) can be obtained, where f is the frequency of the pulse width modulation signal, C is the capacitance value, so as to realize the conversion of the pulse width modulation signal into the equivalent impedance.
[0074] Optionally, in the embodiment, the step of converting the pulse width modulation signal into the equivalent impedance corresponding to the equivalent resistance in the feedback circuit comprises:
[0075] Through the preset interface of the Bluetooth single-chip microcomputer module, the pulse width modulation signal is output to the control end of the switching transistor; the target output current corresponding to the pulse width modulation signal is determined; and the equivalent impedance corresponding to the target output current is generated according to the on-off action of the switching transistor and the equivalent resistance value relationship between the parallel resistance and the reference resistance.
[0076] Specifically, the Bluetooth single-chip microcomputer module is a single-chip microcomputer integrated with Bluetooth communication function, which has data processing and wireless communication capability, and the preset interface is an I / O port defined in advance for signal transmission with other devices. The switching transistor is a semiconductor device with switching characteristics, which can quickly switch the on-off state of the circuit, and its on-off action refers to the conversion between the on and off states of the transistor under the action of the control signal. The control end is used to receive the control signal to realize the switching of the on and off states. The target output current is the current value expected to be output in the current working state. There is a certain correlation between the pulse width modulation signal and the output current in power control, and the size of the output current can be changed by adjusting the parameters (such as duty cycle) of the pulse width modulation signal. The parallel resistance refers to the resistance connected in parallel with another resistance element in the circuit, and the reference resistance is a resistance element with accurate resistance value, which is usually used as a reference resistance value in the circuit. The equivalent resistance value relationship refers to the relationship between the equivalent resistance value presented by multiple resistance elements under certain circuit structure and working conditions and the resistance value of each resistance element, which can be determined by circuit principles such as Kirchhoff's law and Ohm's law.
[0077] In this embodiment, the Bluetooth microcontroller module generates a corresponding pulse-width modulated signal based on pre-defined control logic. The generated pulse-width modulated signal is then transmitted through its preset output interface. This signal is electrically connected to the control terminal of the switching transistor, thereby controlling the switching transistor. The theoretically required target output current is calculated based on the power rating of the power supply system and current operating conditions (such as input voltage and load type). The power control system then correlates and maps the parameters of the pulse-width modulated signal with the target output current to determine the target output current corresponding to the pulse-width modulated signal. When the switching transistor switches on and off under the influence of the pulse-width modulated signal, its on and off states change the current path and impedance distribution in the circuit. At this point, the equivalent impedance corresponding to the target output current is generated by combining the equivalent resistance relationship between the parallel resistor and the reference resistor.
[0078] Specifically, in the circuit, when the switching transistor is on, the parallel resistor and the reference resistor form a specific equivalent resistance; when the switching transistor is off, the circuit's impedance assumes a different state. By precisely controlling the duty cycle of the pulse-width modulation signal, the ratio of the switching transistor's on and off times matches the target output current, and the corresponding equivalent impedance value is calculated based on the equivalent resistance relationship. The calculation of the equivalent impedance satisfies a preset relationship, and the equivalent impedance is adjusted by adjusting the duty cycle of the pulse-width modulation signal to match the full-load current requirements of different lamp models.
[0079] The PWM signal is precisely output through the Bluetooth microcontroller module's preset interface, ensuring the accuracy and stability of the control signal. Secondly, the target output current corresponding to the PWM signal is determined, allowing the power supply's output to better meet the actual load requirements. Finally, based on the on-off behavior of the switching transistor and the equivalent resistance relationship between the parallel resistor and the reference resistor, the equivalent impedance can be flexibly adjusted and accurately generated, thereby improving the power control accuracy and dynamic response capability of the power supply.
[0080] Step S40: detecting the actual output power of the power supply in the feedback circuit, and adjusting the pulse width modulation parameters according to the deviation between the actual output power and the target output power until a preset convergence condition is met.
[0081] In the embodiment, the actual output power is achieved by a power detection circuit, which usually uses sensors such as voltage transformers and current transformers to obtain the voltage and current signals of the power supply output in real time, and then calculates the actual output power by a power calculation formula (e.g., P=V×I×cosφ, where φ is the power factor angle). The deviation value refers to the difference between the actual output power and the target output power. The preset convergence condition refers to a standard that is set in advance to determine whether the power supply output power control process reaches a stable and accurate state, which can usually be that the deviation value is less than a certain set threshold (e.g., 1 W) or the change of the deviation value in continuous multiple detections is within a certain range.
[0082] First, the detection circuit collects the feedback voltage and current signals in real time, which are sent to the power calculation module after being processed by the signal conditioning circuit. The power calculation module calculates the actual output power of the current power supply according to the collected voltage, current signals, and power factor information, according to the power calculation formula. Then, the actual output power calculated is compared with the target output power determined before to obtain the deviation value. According to the size and sign of the deviation value, the pulse width modulation parameter is adjusted using the PID control algorithm.
[0083] For example, if the deviation value is positive and large, it means that the actual output power is lower than the target output power, so the duty cycle of the pulse width modulation signal is appropriately increased, and vice versa. This adjustment process is repeated until the deviation value meets the preset convergence condition, i.e., the actual output power of the power supply is stable around the target output power, and the control process reaches a stable state. For example, when using the PID control algorithm, according to the deviation value e(k) and the deviation values of the previous times (e.g., e(k-1), e(k-2), etc.), the adjustment amount ΔD(k) of the pulse width modulation parameter is calculated according to the PID control formula: where Kp, Ki, and Kd are PID control parameters, so as to realize the dynamic adjustment of the pulse width modulation signal, so that the power supply output power gradually approaches the target output power and meets the convergence condition.
[0084] Optionally, in the embodiment, the step of adjusting the pulse width modulation parameter according to the deviation value between the actual output power and the target output power in the feedback circuit includes:
[0085] The actual output power is collected in the feedback circuit at a preset period; the deviation value of the current period is calculated according to the actual output power and the target output power; when the deviation value exceeds a first threshold, the modulation parameter is increased or decreased by a preset step; when the deviation value is less than a second threshold, the adjustment is stopped and the current pulse width modulation parameter is locked.
[0086] Specifically, the preset period refers to a time interval at which the actual power data is collected in the feedback circuit. The target output power is a desired output power value determined according to the user-selected load model and the preset mapping relationship. The first threshold is a preset value used to determine whether the deviation value exceeds the allowable error range. When the deviation value exceeds the first threshold, it indicates that the difference between the power output and the target output power is large, and adjustment is needed. The second threshold is another preset value, usually smaller than the first threshold, used to determine whether the deviation value is small enough. When the deviation value is smaller than the second threshold, it indicates that the power output is close to the target output power, at which point the adjustment is stopped and the current pulse width modulation parameter is locked to maintain the stability of the output power. The preset step size refers to the magnitude of each adjustment when adjusting the pulse width modulation parameter.
[0087] A power detection module can be provided in the power control system to detect the voltage and current signals in the feedback circuit in real time. Then, according to the preset collection period, the data collection action is triggered. In each collection period, the power detection module samples the detected voltage and current signals and converts them into digital signals. After each collection period, the processor of the power control system reads the current collection of actual power data from the buffer memory. The target output power determined previously is obtained, and the deviation value between the actual output power and the target output power is calculated.
[0088] After the processor of the power control system calculates the deviation value, it compares it with the preset first threshold. If the absolute value of the deviation value is greater than the first threshold, it indicates that the pulse width modulation parameter needs to be adjusted to reduce the deviation. According to the positive or negative of the deviation value, it is determined whether to increase or decrease the pulse width modulation parameter. For example, if the deviation value is positive, it indicates that the actual output power is lower than the target output power, and the duty cycle of the pulse width modulation signal needs to be increased. If the deviation value is negative, the duty cycle needs to be decreased. The step size of the adjustment is usually a fixed value (preset step size), such as an increase or decrease of 0.01 (1%) in the duty cycle each time. According to the preset step size, the current pulse width modulation parameter is increased or decreased, and the new pulse width modulation parameter value is sent to the pulse width modulation signal generation module.
[0089] After adjusting the pulse width modulation parameter and outputting a new pulse width modulation signal each time, the power control system continues to detect the actual output power and calculate the deviation value in the subsequent sampling period. When the processor detects that the absolute value of the deviation value is less than the second threshold value, it is considered that the power output power has reached a satisfactory accuracy, at which point further adjustment of the pulse width modulation parameter is stopped. At the same time, the current pulse width modulation parameter value is locked, i.e. kept unchanged, until the next time the condition for re-adjustment occurs (such as a change in load causing the deviation value to exceed the threshold value again). The locking mechanism can be achieved by storing the pulse width modulation parameter in a non-volatile memory or by fixing its value through a software algorithm. For example, in a digitally controlled power supply system, when the deviation value is less than the second threshold value, the controller clears the update flag bit of the pulse width modulation parameter, so that the subsequent control logic no longer modifies the pulse width modulation parameter, thereby locking the current parameter.
[0090] Optionally, in the embodiment, the preset convergence condition comprises at least one of the following:
[0091] The relative error between the actual output power and the target output power is less than a preset percentage for a preset time; the fluctuation amplitude of the actual output power does not exceed a fluctuation threshold value of the target output power within a first period; and the adjustment amount of the pulse width modulation parameter is less than a target adjustment step size for a preset number of consecutive times during the adjustment process of the pulse width modulation parameter.
[0092] Specifically, the relative error refers to the ratio of the difference between the actual output power and the target output power to the target output power, which is a relative index for measuring the output accuracy of the power supply. The preset time is a pre-set time length for judging the stability of the relative error. The preset percentage is a pre-set maximum allowable range of the relative error, and when the relative error is less than the percentage for a continuous period, it is considered that the power output power has reached a stable state. The fluctuation amplitude refers to the difference between the maximum and minimum values of the actual output power within a period, which is used to measure the stability of the power output power. The fluctuation threshold value is a pre-set maximum fluctuation range allowed for the actual output power, and when the fluctuation amplitude does not exceed the fluctuation threshold value, it is considered that the power output power is stable. The adjustment amount of the pulse width modulation parameter refers to the change amplitude of the pulse width modulation parameter at adjacent two times of adjusting the pulse width modulation parameter, such as the change amount of the duty cycle. The preset number of times is a pre-set count standard for judging whether the adjustment of the pulse width modulation parameter is tending to be stable. The target adjustment step size is a pre-set lower limit value of the expected adjustment amplitude of the pulse width modulation parameter, and when the adjustment amount is less than the step size for a continuous period, it is considered that the pulse width modulation parameter has approached a stable state.
[0093] In the technical scheme provided in the embodiment, the load model selected by the user is acquired, the target output power corresponding to the load model is determined based on a preset mapping relationship, the equivalent resistance required by the feedback circuit is determined according to the target output power, the pulse width modulation parameter matched with the equivalent resistance is determined, then the pulse width modulation signal matched with the pulse width modulation parameter is generated, the pulse width modulation signal is converted into the equivalent impedance corresponding to the equivalent resistance in the feedback circuit, finally the actual output power of the power supply is detected in the feedback circuit, the pulse width modulation parameter is adjusted according to the deviation value between the actual output power and the target output power until the preset convergence condition is met. The embodiment adjusts the output power of the power supply by accurately calculating and setting the equivalent resistance of the feedback circuit and the pulse width modulation parameter, and effectively converting the pulse width modulation signal into the equivalent impedance, so as to improve the efficiency of power supply power control.
[0094] In addition, the target output power is quickly and accurately determined according to the load model selected by the user, so that the power supply output matches the load demand. Then, the accurate adjustment of the output power of the power supply is provided by accurately calculating and setting the equivalent resistance of the feedback circuit and the pulse width modulation parameter, and effectively converting the pulse width modulation signal into the equivalent impedance. Finally, the stable and accurate control of the output power of the power supply is realized by detecting the actual output power in real time and dynamically adjusting the pulse width modulation parameter according to the deviation value until the preset convergence condition is met.
[0095] Embodiment Two
[0096] Based on the same inventive concept, the present application also provides a second embodiment, which refers to Figure 2 , Figure 2 The flowchart of the second embodiment of the power supply power control method of the present application is shown in the figure, and after step S10, steps S50-S70 are further included:
[0097] Step S50: receiving the load configuration instruction sent by the terminal through the Bluetooth communication interface, wherein the load configuration instruction includes a target full load current value.
[0098] Step S60: converting the full load current value into a corresponding output power, and updating the preset mapping relationship according to the output power.
[0099] Step S70: when adjusting the pulse width modulation parameter according to the deviation value between the actual output power and the target output power, the adjustment range of adjusting the pulse width modulation parameter is limited as a constraint condition by the target full load current value.
[0100] In the embodiment, the load configuration instruction is an instruction sent by a user through a terminal for configuring load-related parameters, and the full-load current value contained therein refers to the current value required by the load when it is running at full load. The terminal can be a mobile phone, a tablet computer, or the like. Conversion of the full-load current value into a corresponding output power requires the use of a power calculation formula (e.g., P = V x I, where V is the power supply voltage and I is the full-load current value). The target full-load current value is the full-load current value obtained from the load configuration instruction and converted, and it is used as a constraint condition for limiting the adjustment range of the pulse width modulation parameter. The adjustment range of the pulse width modulation parameter refers to the range of variation amplitude allowed when adjusting the pulse width modulation parameter (e.g., the duty cycle), and limiting the adjustment range can avoid excessive adjustment of the pulse width modulation parameter, which would cause the output current to exceed the full-load current value of the load, thereby protecting the load and the power supply system.
[0101] Specifically, the power control system first initializes the Bluetooth communication interface to be in a detection state, waiting for the load configuration instruction sent by the terminal. When the terminal establishes a Bluetooth connection and sends an instruction containing the target full-load current value, the Bluetooth communication interface receives the instruction and extracts the target full-load current value therefrom. After receiving the data, the Bluetooth communication interface notifies the processor through a serial port interrupt or the like, and the processor reads the data and extracts the target full-load current value therefrom.
[0102] After the processor obtains the extracted target full-load current value, it reads the current output voltage value (which can be detected in real time by a voltage sensor and stored). The output power is calculated using a power calculation formula, which is output power = power supply voltage x full-load current value. Then, a new mapping relationship between the calculated output power and the corresponding load model is established, and the preset mapping relationship table stored in the system memory is updated. In the process of adjusting the pulse width modulation parameter, the processor calculates the adjustment amount of the pulse width modulation parameter required according to the deviation value in real time. At the same time, the maximum adjustment amount of the pulse width modulation parameter allowed is calculated according to the target full-load current value and the current actual output current value (which can be detected in real time by a current sensor). Specifically, the formula: allowed duty cycle adjustment amount = (target full-load current value / actual output current value - 1) x current duty cycle (assuming that the power supply voltage is stable, the output power is proportional to the current) is used. If the adjustment amount calculated according to the deviation value exceeds the allowed adjustment amount, the adjustment amount of the pulse width modulation parameter is limited within the allowed range.
[0103] For example, the current duty cycle is 0.5, the actual output current is 2 A, and the target full-load current value is 3 A. The allowed duty cycle adjustment amount = (3 A / 2 A - 1) x 0.5 = 0.25. If the duty cycle adjustment amount calculated according to the deviation value is 0.3 (exceeding the allowed 0.25), the duty cycle adjustment amount is limited to 0.25, i.e., the duty cycle is adjusted to 0.5 + 0.25 = 0.75, thereby limiting the output current from exceeding the target full-load current value.
[0104] Further, in the present embodiment, after the step S60, further comprising:
[0105] According to the detected actual output power and the corresponding collection period, a power curve is constructed; according to the power curve, a target actual output power in the collection period is determined, which satisfies a preset condition; a target relationship between a current modulation parameter corresponding to the target actual output power and the load model is recorded; and the preset mapping relationship between the load model and the target output power is updated by the newly recorded target relationship.
[0106] Specifically, by acquiring the actual output power data of each collection period and the corresponding collection timestamp, and storing these data points in chronological order. Then using a graphics rendering library or a custom drawing algorithm, a power curve is drawn according to the stored data points. Then analyze the constructed power curve, and traverse each data point on the power curve. For each data point, check whether it meets the preset condition. If it does, determine the actual output power of the data point as the target actual output power, and record its corresponding collection period. Wherein, the preset condition can be that the actual output power remains stable within a period of time, or is within a preset interval. When the target actual output power and its corresponding collection period are determined, the current modulation parameter used in the collection period and the corresponding load model are obtained. These information is combined into a new record and stored in the database of the system. Finally, these information is inserted into the "modulation parameter-load relationship" table of the database as a new record. Finally, under certain trigger conditions, such as recording a certain number of new target relationships, statistical analysis is performed on the new recorded target relationships and the preset mapping relationship is updated according to the analysis results.
[0107] In the technical scheme provided in the present embodiment, the preset mapping relationship is updated by receiving the load configuration instruction through the Bluetooth communication interface, and the target full load current value is used as a constraint condition when adjusting the pulse width modulation parameter, further enhancing the flexibility of the power control system. The load configuration instruction sent by the terminal is received through the Bluetooth communication interface, so that the user can conveniently remotely configure the load parameter, improving the operability of the power control system. Secondly, the full load current value is converted into the corresponding output power and the preset mapping relationship is updated, realizing the dynamic adjustment of the preset mapping relationship, which can better adapt to the changes of different loads and working conditions, and enhance the adaptability of the power control system. Finally, the target full load current value is used as a constraint condition to limit the adjustment range when adjusting the pulse width modulation parameter, effectively avoiding the problem of output current overload caused by excessive adjustment of the pulse width modulation parameter, protecting the load and power system, and improving the reliability and safety of the power control system.
[0108] Embodiment three
[0109] Based on the same inventive concept, the present application also provides embodiment three, please refer to Figure 3 , Figure 3 The flowchart of the third embodiment of the power supply power control method of the present application is shown in the figure, after step S10, it further includes steps S80-S110:
[0110] Step S80: receiving the batch configuration instruction sent by the wireless communication module, parsing the device group identifier and the corresponding load model set in the batch configuration instruction.
[0111] Step S90: according to the preset configuration strategy, the physical space is divided into a plurality of communication time slots, wherein each communication time slot corresponds to a control channel of a feedback circuit.
[0112] Step S100: in the allocated communication time slot, write the pulse width modulation parameter corresponding to each load model into the register of the target feedback circuit.
[0113] Step S110: detect the parameter write completion state of the pulse width modulation parameter, when detecting timeout unresponsive, jump to redundant time slot to reinitiate write operation, until the parameter write completion state is write success, terminate the parameter write operation of the pulse width modulation parameter.
[0114] In this embodiment, the batch configuration instruction is an instruction containing multiple device configuration information, which is used to configure multiple devices at the same time. The device group identifier is used to distinguish the unique identifier of different device groups, and the load model set refers to the model combination of each load belonging to the same device group. The preset configuration strategy refers to the rule prepared in advance for dividing the physical space into communication time slots. The communication time slot refers to the special communication time period divided in the time dimension, which is used to allocate independent communication resources for different feedback circuit control channels. The parameter write completion state refers to the state information fed back by the feedback circuit to the main controller after receiving the pulse width modulation parameter, indicating whether the parameter write is successful. Timeout unresponsive refers to the device that does not send a response signal to the main controller within a specified time. The redundant time slot refers to the reserved standby communication time slot, which is used to process communication failure or retry operation.
[0115] When the wireless communication module detects the signal, the instruction data is received and the instruction is decoded by the protocol analysis program. During the analysis process, the device group identifier and the corresponding load model set information in the instruction are extracted. The main controller in the power control system divides the physical space (such as the communication frequency band or the time axis) according to the preset configuration strategy. Specifically, the time axis can be divided into multiple time slots using a time division multiple access strategy, and each time slot is assigned to a control channel of a feedback circuit. In addition, the controller ensures that each control channel communicates within the assigned time slot through a timer and a scheduling algorithm. For example, in a power supply system using a time division multiple access strategy, the preset configuration strategy divides 1 second of time into 10 time slots, each of which is 100 milliseconds.
[0116] Then, the main controller assigns the feedback circuit control channel corresponding to each load to different time slots according to the number of devices in the load model set. When each time slot arrives, the corresponding communication operation is triggered. In the assigned communication time slot, the pulse width modulation parameters corresponding to each load model are sent to the register of the target feedback circuit through the data bus or interface. After the register of the feedback circuit receives the data, it updates its internal state and generates a signal and controls the power according to the new pulse width modulation parameters.
[0117] Then, the main controller starts a timer after sending the pulse width modulation parameters and waits for the feedback circuit to return a parameter write completion state. If a successful response from the feedback circuit is received within the preset timeout, subsequent operations are continued. If no response is received within the timeout, the main controller determines that the device is a timeout non-responsive device and immediately transfers its communication task to a pre-set redundant time slot. In the redundant time slot, the write operation is re-initiated until success or the preset upper limit of the number of retries is reached, and the parameter write operation of the pulse width modulation parameters is terminated when the parameter write completion state is write success. At the same time, the main controller records the timeout event for subsequent fault diagnosis and maintenance.
[0118] In the technical solution provided in this embodiment, by receiving batch configuration instructions, dividing communication time slots, writing pulse width modulation parameters, and processing timeout non-responsive devices, the efficiency of power supply power in a multi-device configuration scenario is improved. By receiving batch configuration instructions sent by the wireless communication module and analyzing the device group identifier and the load model set, the power control system can handle the configuration requirements of multiple devices simultaneously, improving the configuration efficiency and being applicable to large-scale distributed power supply systems. According to the preset configuration strategy, the physical space is divided into multiple communication time slots, and each control channel of the feedback circuit is assigned independent communication resources, effectively avoiding communication conflicts and ensuring the stability of data transmission.
[0119] In addition, the writing completion state of the detection parameter is detected, and a timeout non-response device is processed, the fault tolerance and reliability of the power control system are enhanced through the setting of the redundant time slots, so that all devices can complete the configuration in time and accurately.
[0120] Embodiment Four
[0121] Based on the same inventive concept, the present application also provides embodiment four, please refer to Figure 4 , Figure 4 The flowchart of the fourth embodiment of the power control method of the present application is shown in the figure, and after step S40, steps S120-S150 are further included.
[0122] Step S120: When the pulse width modulation parameter is detected to be abnormal, a dual-core switching mechanism is triggered to migrate the control right from the main processor to the secondary processor.
[0123] Step S130: Start high-speed impedance scanning to complete the full-band impedance phase detection of the feedback circuit within a preset time length, and determine the impedance phase characteristics of the feedback circuit.
[0124] Step S140: Reconstruct the equivalent circuit model based on the impedance phase characteristics, and determine the target duty cycle corresponding to the feedback circuit.
[0125] Step S150: When the target duty cycle after reconstruction is stable for a second period, switch back to the main processor and record the abnormal event log.
[0126] In this embodiment, when the pulse width modulation parameter exceeds the normal working range or appears abnormal such as mutation, the pulse width modulation parameter is determined to be abnormal. The dual-core switching mechanism refers to setting two processing cores of the main processor and the secondary processor in the power control system, and when the main processor appears abnormal, the control right is switched to the secondary processor. The high-speed impedance scanning can quickly detect the impedance and phase characteristics of the feedback circuit at different frequencies. The impedance phase characteristics refer to the law that the impedance size and phase angle of the feedback circuit change with the frequency. The equivalent circuit model refers to a model that uses simple circuit elements to simulate the electrical characteristics of the feedback circuit. The target duty cycle refers to the pulse width modulation signal duty cycle calculated according to the equivalent circuit model, which can make the feedback circuit achieve the expected output power. The abnormal event log is used to record the document record of the abnormal events and the processing process of the power system.
[0127] Specifically, the power control system detects the state of the pulse width modulation parameter in real time through a detection module, and triggers a dual-core switching mechanism when an abnormality in the pulse width modulation parameter is detected, such as a sudden jump in the duty cycle or a value beyond the preset upper and lower limits. Through the cooperation of hardware circuits such as watchdog timers, interrupt controllers, and state machine switching logic, the control is smoothly transferred from the main processor to the secondary processor. The secondary processor is in standby state before this time, synchronizing the key data and state information of the main processor in real time, and immediately takes over the control task of the system once it receives the control right, ensuring the uninterrupted operation of the power system. The secondary processor uses the previously synchronized load information, target output power, and other data to continue performing the power control task.
[0128] After the secondary processor takes over the control right, it starts the high-speed impedance scanning function. Through the impedance detection circuit, a series of test signals of different frequencies are applied to the feedback circuit within a preset time. At the same time, the impedance and phase response of the feedback circuit at each frequency are detected, and the corresponding data are collected. Then, using the fast Fourier transform signal processing algorithm, the collected data are analyzed to obtain the impedance phase characteristic curve of the feedback circuit. According to the obtained impedance phase characteristics, the secondary processor uses the circuit modeling algorithm to reconstruct the equivalent circuit model of the feedback circuit. By comparing and fitting the impedance phase data with the standard circuit model, the parameters of each element in the equivalent circuit are determined. Based on the reconstructed equivalent circuit model, the target duty cycle of the output target power of the feedback circuit is calculated.
[0129] After the secondary processor sets the new target duty cycle, it continues to detect the actual output power and pulse width modulation parameter of the feedback circuit. In each detection period, the current target duty cycle is compared with the target duty cycle of the previous period. If the target duty cycle remains stable for two consecutive detection periods, it means that the feedback circuit has stabilized. At this time, the secondary processor switches the control right back to the main processor through the dual-core switching mechanism. After the main processor resumes control, it records the relevant information of this abnormal event, including the abnormal event time, the abnormal value of the pulse width modulation parameter, the dual-core switching time, the impedance phase characteristics, the target duty cycle, and other information into the abnormal event log.
[0130] In the technical solution provided in this embodiment, the stability of the power control is enhanced by adding the pulse width modulation parameter abnormality detection and processing process. When an abnormality in the pulse width modulation parameter is detected, the dual-core switching mechanism is triggered, and the control right is transferred from the main processor to the secondary processor, which can avoid system downtime caused by abnormality of the main processor and improve the fault tolerance of the power system.
[0131] In addition, the equivalent circuit model is reconstructed based on the impedance phase characteristics, and the target duty cycle is determined, so as to realize accurate control of the feedback circuit and ensure the accuracy of the power output. When the reconstructed target duty cycle is continuously stable, the main processor is switched back and an abnormal event log is recorded, so as to not only restore the normal control logic of the power system, but also provide detailed records for subsequent fault analysis and maintenance, thereby facilitating quick positioning and problem solving.
[0132] The application provides a power supply power control device, including: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the power supply power control method in the above embodiment one.
[0133] Reference is made below to Figure 5 which shows a structural schematic diagram of a power supply power control device suitable for being used to implement the embodiments of the application. The power supply power control device in the embodiments of the application can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDA), tablet computers (PAD), portable multimedia players (PMP), vehicle-mounted terminals (for example, vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 5 The power supply power control device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the application.
[0134] As Figure 5As shown, the power supply power control device can include a processing device 1001 (e.g., a core processor, a graphics processor, etc.) that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. Various programs and data required for the power supply power control device to operate are also stored in the random access memory 1004. The processing device 1001, the read only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the power supply power control device to communicate with other devices wirelessly or by wire to exchange data. Although the power supply power control device with various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or fewer systems can be alternatively implemented or possessed.
[0135] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the read only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0136] The power supply power control device provided by the present disclosure adopts the power supply power control method in the above-mentioned embodiments, and can solve the technical problem of low efficiency of power supply power control in the prior art. Compared with the prior art, the power supply power control device provided by the present disclosure has the same beneficial effects as the power supply power control method provided by the above-mentioned embodiments, and other technical features in the power supply power control device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0137] It should be understood that various parts of the present application can be realized with hardware, software, firmware, or a combination thereof. In the above description of embodiments, specific functional configurations, structures, materials or characteristics can be combined in any appropriate manner in one or more embodiments or examples.
[0138] The above description is merely a specific implementation of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, and all such changes or replacements should be encompassed within the scope of protection of the present application. Therefore, the scope of protection of the present application should be subject to the scope of protection of the claims.
[0139] The present application provides a computer-readable storage medium having stored thereon computer-readable program instructions (i.e., a computer program) for performing the power control method of the power supply power in the above-described embodiments.
[0140] The computer-readable storage medium provided by the present application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination of the above. In the present embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium can be transmitted in any appropriate medium, including but not limited to electrical wires, optical cables, radio frequency (RF), and the like, or any appropriate combination of the above.
[0141] The above-described computer-readable storage medium can be included in the power supply power control device; or can exist separately without being assembled into the power supply power control device.
[0142] The computer readable storage medium described above carries one or more programs, when the one or more programs are executed by the power supply power control device, the power supply power control device: acquires a user-selected load model, and determines a target output power corresponding to the load model based on a preset mapping relationship; determines an equivalent resistance required by a feedback circuit according to the target output power, and determines a pulse width modulation parameter matched with the equivalent resistance; generates a pulse width modulation signal matched with the pulse width modulation parameter, and converts the pulse width modulation signal into an equivalent impedance corresponding to the equivalent resistance in the feedback circuit; detects an actual output power of the power supply in the feedback circuit, and adjusts the pulse width modulation parameter according to a deviation value of the actual output power and the target output power until a preset convergence condition is met.
[0143] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0144] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0145] The modules described in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the names of the modules do not constitute a limitation on the modules themselves.
[0146] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., a computer program) for executing the power control method described above, and can solve the technical problem of low efficiency of power control in the prior art. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the power control method provided by the above embodiments, and will not be described here.
[0147] The embodiments of the present application provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the power control method described above are implemented.
[0148] The computer program product provided by the present application can solve the technical problem of low efficiency of power control in the prior art. Compared with the prior art, the computer program product provided by the embodiments of the present application has the same beneficial effects as the power control method provided by the above embodiments, and will not be described here.
[0149] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation based on the content of the present application specification and drawings, or direct or indirect application in other related technical fields, is also included in the patent processing scope of the present application.
Claims
1. A method for controlling power supply, characterized in that: The power control method comprises the following steps: Obtaining a load model selected by a user, and determining a target output power corresponding to the load model based on a preset mapping relationship; Determining an equivalent resistance required by a feedback circuit according to the target output power, and determining a pulse width modulation parameter that matches the equivalent resistance; generating a pulse width modulation signal matching the pulse width modulation parameter, and converting the pulse width modulation signal into an equivalent impedance corresponding to the equivalent resistance in the feedback circuit; detecting the actual output power of the power supply in the feedback circuit, and adjusting the pulse width modulation parameters according to a deviation between the actual output power and the target output power until a preset convergence condition is met; The step of converting the pulse width modulation signal into an equivalent impedance corresponding to the equivalent resistance in the feedback circuit includes: Outputting the pulse width modulation signal to the control terminal of the switching transistor through a preset interface of the Bluetooth single chip microcomputer module; determining a target output current corresponding to the pulse width modulation signal; Based on the on-off action of the switching transistor and the equivalent resistance relationship between the parallel resistor and the reference resistor, an equivalent impedance corresponding to the target output current is generated, including: by controlling the duty cycle of the pulse width modulation signal, the on-off time ratio of the switching transistor is matched with the target output current, and the corresponding equivalent impedance value is calculated according to the equivalent resistance relationship, wherein the calculation of the equivalent impedance satisfies a preset relationship, and the equivalent impedance is adjusted by adjusting the duty cycle of the pulse width modulation signal to match the full-load current requirement of different lamp models. The preset relationship is an impedance calculation method for an AC circuit or an average value calculation method for a pulse signal.
2. The method according to claim 1, wherein The step of detecting the actual output power of the power supply in the feedback circuit and adjusting the pulse width modulation parameters according to the deviation between the actual output power and the target output power includes: collecting the actual output power at a preset period in the feedback circuit; Calculating the deviation value of the current cycle according to the actual output power and the target output power; When the deviation value exceeds a first threshold, increasing or decreasing the modulation parameter according to a preset step size; When the deviation value is smaller than the second threshold, the adjustment is stopped and the current pulse width modulation parameters are locked.
3. The method according to any one of claims 1 or 2, wherein: The preset convergence condition includes at least one of the following: The relative error between the actual output power and the target output power is less than a preset percentage for a preset period of time; The fluctuation amplitude of the actual output power does not exceed the fluctuation threshold of the target output power within the first period; During the adjustment process of the pulse width modulation parameter, the adjustment amount of the pulse width modulation parameter is smaller than the target adjustment step length for a consecutive preset number of times.
4. The method according to claim 1, wherein After the step of obtaining the load model selected by the user and determining the target output power corresponding to the load model based on a preset mapping relationship, the method further includes: Receiving a load configuration instruction sent by the terminal through the Bluetooth communication interface, wherein the load configuration instruction includes a target full-load current value; Converting the full-load current value into a corresponding output power, and updating the preset mapping relationship according to the output power; When the pulse width modulation parameter is adjusted according to the deviation between the actual output power and the target output power, the target full load current value is used as a constraint condition to limit the adjustment range of the pulse width modulation parameter.
5. The method according to claim 4, wherein After the step of converting the full-load current value into the corresponding output power and updating the preset mapping relationship according to the output power, the method further includes: Constructing a power curve graph according to the detected actual output power and the corresponding acquisition period; Determining, according to the power curve, that the actual output power in the acquisition period satisfies a target actual output power under a preset condition; Recording the target relationship between the current modulation parameters corresponding to the target actual output power and the load model; The preset mapping relationship between the load model and the target output power is updated using the newly recorded target relationship.
6. The method according to claim 1, wherein After the step of obtaining the load model selected by the user and determining the target output power corresponding to the load model based on a preset mapping relationship, the method further includes: Receive a batch configuration instruction sent by the wireless communication module, and parse the device group identifier and the corresponding load model set in the batch configuration instruction; Dividing the physical space into a plurality of communication time slots according to a preset configuration strategy, wherein each communication time slot corresponds to a control channel of a feedback circuit; Writing the pulse width modulation parameters corresponding to each load model into the register of the target feedback circuit within the allocated communication time slot; Detect the parameter writing completion status of the pulse width modulation parameter. When no response is detected after timeout, jump to the redundant time slot to re-initiate the writing operation until the parameter writing completion status is writing success, and terminate the parameter writing operation of the pulse width modulation parameter.
7. The method according to claim 1, wherein After the step of detecting the actual output power of the power supply in the feedback circuit and adjusting the pulse width modulation parameters according to the deviation between the actual output power and the target output power until a preset convergence condition is met, the method further includes: When the pulse width modulation parameter is detected to be abnormal, a dual-core switching mechanism is triggered to transfer control from the main processor to the secondary processor; Initiating a high-speed impedance scan to complete full-band impedance phase detection of the feedback circuit within a preset time period, and determining the impedance phase characteristics of the feedback circuit; reconstructing an equivalent circuit model based on the impedance phase characteristic, and determining a target duty cycle corresponding to the feedback circuit; When the reconstructed target duty cycle is stable for the second consecutive period, the main processor is switched back and an abnormal event log is recorded.
8. A power control device, characterized in that: The power control device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the power control method according to any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the power control method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Load self-adaption control method and system during closed-loop starting of variable frequency controller
CN119210271A
Power supply feedback control circuit, switching power supply and electronic equipment
CN119382507A