Loop control method and device, equipment and storage medium
By obtaining the target bit mask and output feedback of the loop in the switching power supply, the target working method of the loop is determined, and the problem that the ripples are difficult to control under the intermittent working state are solved, and the effective improvement of the power supply stability is achieved.
Patent Information
- Application Number
- CN202411499755.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-24
AI Technical Summary
The output voltage and current ripple generated by the switching power supply during intermittent working state is difficult to control, especially when the load is small or no-load, the ripple is particularly large, affecting the stability of the equipment.
By obtaining the target bit mask of the loop and the loop output feedback, the target working mode of the loop is determined, and an intermittent working section controlled by the loop is added to effectively control the degree of intermittent working status and reduce ripple.
Effectively reduce the ripples during intermittent work, improve the stability of the power supply, and meet the demand for equipment that requires higher power stability.
Smart Images

Figure CN119362854A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of switching power supplies, and in particular to a loop control method, device, equipment and storage medium. Background Art
[0002] In the field of power supply technology, switching power supplies are widely used in various electronic devices due to their advantages such as high efficiency, high power density and stability. However, during the operation of the switching power supply, due to the characteristics of its working principle and circuit structure, ripples in the output voltage and current will be generated, which is an important problem for some devices that require high power stability. When the output load is small or unloaded, the power supply usually works intermittently, that is, it works for a period of time and then stops for a period of time; this will cause the ripple to be particularly large, especially in the frequency modulation system, where the ripple is more difficult to control.
[0003] In order to solve the problem of intermittent working ripple, the usual approach is to increase the filter or modify the feedback control algorithm, but these two methods are less effective in solving the intermittent working ripple. Summary of the invention
[0004] The embodiments of the present application provide a loop control method, apparatus, device and storage medium. By determining the target working mode of the loop according to the target bit mask and the loop output feedback, an intermittent working section controlled by the loop can be added to effectively control the degree of the intermittent working state and reduce the ripple during intermittent operation.
[0005] In a first aspect, an embodiment of the present application provides a loop control method, including:
[0006] Obtain a target bit mask of the loop; determine whether the output of the loop is less than the target bit mask; detect that the output of the loop is not less than the target bit mask, and obtain a target pulse width modulation value according to the output of the loop; determine a target operating mode of the loop according to the target pulse width modulation value and the target bit mask, wherein the target operating mode includes enabling a pulse width modulation signal or disabling a pulse width modulation signal.
[0007] In a second aspect, an embodiment of the present application provides a loop control device, including:
[0008] An acquisition module, used to obtain the target bit mask of the loop;
[0009] A processing module is used to determine whether the output of the loop is less than the target bit mask; and to detect that the output of the loop is not less than the target bit mask, and obtain a target pulse width modulation value according to the output of the loop; and to determine a target operating mode of the loop according to the target pulse width modulation value and the target bit mask, wherein the target operating mode includes enabling a pulse width modulation signal or disabling a pulse width modulation signal.
[0010] In a third aspect, an embodiment of the present application provides a loop control device, the device comprising:
[0011] A memory, a processor, and a loop control program stored in the memory and executable on the processor, wherein the loop control program is configured to implement part or all of the steps described in any method in the first aspect.
[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a loop control program is stored. When the loop control program is executed by a processor, some or all of the steps described in any method in the first aspect are implemented.
[0013] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product can be a software installation package.
[0014] By implementing the embodiment of the present application, the server of the loop control system first obtains the target bit mask of the loop; then determines whether the output of the loop is less than the target bit mask; then detects that the output of the loop is not less than the target bit mask, and obtains the target pulse width modulation value according to the output of the loop; finally, the target working mode of the loop is determined according to the target pulse width modulation value and the target bit mask, and the target working mode includes enabling the pulse width modulation signal or turning off the pulse width modulation signal. By determining the target working mode of the loop according to the target bit mask and the loop output feedback, an intermittent working section controlled by the loop can be added, the degree of the intermittent working state can be effectively controlled, and the ripple during intermittent work can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0016] Figure 1 It is a schematic diagram of the architecture of a loop control system provided in an embodiment of the present application;
[0017] Figure 2is a flow chart of a loop control method provided by an embodiment of the present application;
[0018] Figure 3 It is a flow chart of a working method for determining a loop target provided by an embodiment of the present application;
[0019] Figure 4 is a structural schematic diagram of a loop control device provided in an embodiment of the present application;
[0020] Figure 5 It is a structural schematic diagram of a loop control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. According to the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0022] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. 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 limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0024] In the field of power supply technology, switching power supplies are widely used in various electronic devices due to their advantages such as high efficiency, high power density and stability. However, during the operation of the switching power supply, due to the characteristics of its working principle and circuit structure, output voltage and current ripples will be generated, which is an important problem for some devices that have high requirements for power supply stability. When the output load is small or unloaded, the power supply usually works intermittently, that is, it works for a period of time and then stops for a period of time; this will cause the ripple to be particularly large, especially in the frequency modulation system, the ripple is more difficult to control. In order to solve the problem of intermittent working ripple, the usual practice is to increase the filter or modify the feedback control algorithm, but these two methods are less effective in solving intermittent working ripples.
[0025] In view of the above problems, the embodiments of the present application provide a loop control method, device, equipment and storage medium. The server of the loop control system first obtains the target bit mask of the loop; then determines whether the output of the loop is less than the target bit mask; then detects that the output of the loop is not less than the target bit mask, and obtains the target pulse width modulation value according to the output of the loop; finally, the target working mode of the loop is determined according to the target pulse width modulation value and the target bit mask, and the target working mode includes enabling the pulse width modulation signal or turning off the pulse width modulation signal. By determining the target working mode of the loop according to the target bit mask and the loop output feedback, an intermittent working section controlled by the loop can be added, the degree of the intermittent working state can be effectively controlled, and the ripple during intermittent work can be reduced.
[0026] The loop control method, apparatus, device and storage medium provided in the embodiments of the present application can be applied to Figure 1 In the loop control system shown, refer to Figure 1 , Figure 1 1 is a schematic diagram of the architecture of a loop control system provided by an embodiment of the present application. The loop control system 100 includes a sensor 101 and a controller 102. The sensor 101 refers to a device used to detect and measure a certain physical quantity or signal and convert it into an electrical signal or other form, such as a current sensor, a voltage sensor, etc. In this solution, the sensor 101 can obtain the output voltage or current signal of the loop, and convert these signals into a digital form for measuring the current working state of the loop or the loop output for processing by the controller 102 for subsequent control and adjustment operations. The controller 102 is a device for processing feedback signals and generating control instructions. In this solution, the controller 102 receives the loop output information from the sensor 101, calculates the target bit mask, performs logical judgment, and finally generates the corresponding control instruction. At the same time, the controller 102 determines whether the pulse width modulation value needs to be adjusted based on the relationship between the loop output and the target bit mask, and determines the target working mode of the loop according to the situation.
[0027] Based on this, the present application provides a loop control method, device, equipment and storage medium, and the present application is described in detail below in conjunction with the accompanying drawings.
[0028] See also Figure 2 , Figure 2 is a flow chart of a loop control method provided in an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0029] S201, obtaining a target bit mask of the loop.
[0030] Among them, bitmask is a technology used to perform bit operations on binary data. Bitmask uses an integer value to represent a set of flags or options, and each binary bit represents a specific state or attribute. By setting or clearing the bit at a specific position, the relevant operation can be controlled.
[0031] For example, when using a bit mask to represent a set of switch states or options, the following is a specific example: Suppose we have four switches (A, B, C, D) in a system, and we need to use a bit mask to represent their states. First, we need to define the bit mask corresponding to each switch. Switch A corresponds to bit0, switch B corresponds to bit1, switch C corresponds to bit2, and switch D corresponds to bit3. At this time, the lowest bit (bit0) of the bit mask represents switch A, the second bit (bit1) of the bit mask represents switch B, the third bit (bit3) of the bit mask represents switch C, and the fourth bit (bit3) of the bit mask represents switch D. Then you can set an integer variable to store the states corresponding to the four switches, and use the bitwise AND operator to detect whether the value of the corresponding position of each switch is 1. If the value is 1, the corresponding switch is turned on.
[0032] In a possible implementation, the target bit mask of the acquisition loop includes:
[0033] Acquire the frequency range of the pulse width modulation signal of the loop; determine the loop output corresponding to the maximum frequency in the frequency range of the pulse width modulation signal as the target bit mask.
[0034] Among them, Pulse Width Modulation (PWM) is a technology used to control electronic devices. It simulates continuous signals by continuously changing the duty cycle of pulse signals. In addition to controlling the conduction state of the switch tube in this solution, it can also be used to control motor speed, LED brightness adjustment, audio amplifier, etc. The frequency of the PWM signal represents the number of pulse repetitions per unit time, usually in Hertz (Hz). The higher the frequency, the shorter the single cycle time.
[0035] The frequency range of the PWM signal depends on the specific application requirements. Different systems and devices may have different frequency requirements. A lower PWM frequency can provide higher power consumption capacity and better transient response capability, while a higher PWM frequency can achieve more accurate, smooth and low-noise output.
[0036] Exemplarily, the specific steps of calculating the bitmask value of the loop may be:
[0037] Step 1, determine the PWM frequency range, set the PWM frequency range to 60KHz to 200KHz;
[0038] Step 2, determine the maximum loop output value, when the PWM frequency is 200KHz, the corresponding loop output is 50. The loop output can be any suitable measurement indicator, such as voltage, current, etc.
[0039] Step 3, calculate the bit mask range, and determine the bit mask range based on the maximum loop output value. In this example, the bit mask range is 0 to 50.
[0040] The bit mask may be further set and obtained later. An integer variable may be used to represent the bit mask and initialized to 0. Then, according to actual needs, the bit at a specific position may be set to 1 to enable the corresponding function or option.
[0041] It can be seen that in this example, by determining the bit mask according to the maximum loop output value and the associated PWM frequency, it is beneficial to achieve precise control of the loop output state or index, and it is also possible to adaptively adjust the bit mask according to the maximum loop output value.
[0042] S202, determining whether the output of the loop is less than the target bit mask.
[0043] The output of the loop may be a measurement indicator of the circuit, such as a voltage value and a current value.
[0044] Exemplarily, a voltage value is used as the output of the loop. At this time, the output of the loop is 40 volts (V), and the target bit mask is 50. At this time, the loop output 40 is less than the target bit mask 50.
[0045] In a possible implementation, after determining whether the output of the loop is less than the target bit mask, the method further includes:
[0046] Detecting that the output of the loop is less than the target bit mask; determining whether it is the first time to enter the loop calculation; detecting that it is the first time to enter the loop calculation, updating the pointing bit of the pulse width modulation signal to the first bit of the target bit mask; updating the target bit mask of the loop according to the pulse width modulation signal.
[0047] When updating the target bit mask of the loop, the PWM frequency of the current loop and the loop output at the current PWM frequency are obtained, and the value of the loop output is used as the new target bit mask.
[0048] Exemplarily, this is the first time to enter the loop calculation. At this time, the pointing bit of the PWM signal is updated to the first bit of the target bit mask, and the current PWM frequency is obtained to be 20kHz. Then, it is determined that the voltage value of the loop output under the current PWM frequency (20kHz) is 30 volts (V). At this time, the target bit mask is updated to 30, and then the feedback value of the loop output is assigned to the value of the current loop PWM. The PWM value can be a PWM frequency value, a PWM duty cycle, and / or a PWM phase.
[0049] If it is not the first time to enter the loop calculation, the target bit mask is not updated, and the feedback value of the loop output is directly assigned to the value of the current loop PWM. The PWM value can be a PWM frequency value, a PWM duty cycle, and / or a PWM phase.
[0050] It can be seen that in this example, by determining whether it is the first time to enter the loop calculation and updating the pointing bit of the pulse width modulation (PWM) signal and the target bit mask of the loop, precise adjustment of the loop control parameters can be achieved; at the same time, it is determined that the target bit mask is updated when entering the loop calculation for the first time, which can achieve dynamic adjustment and improve the adaptability of the loop response changes.
[0051] Specifically, in a possible implementation, the determining whether the loop calculation is entered for the first time includes:
[0052] Determine whether it is the first time to enter the loop calculation based on the previous output of the loop and the target bit mask; if it is detected that the previous output of the loop is not less than the target bit mask, determine that it is the first time to enter the loop calculation; if it is detected that the output of the loop is less than the target bit mask, determine that it is not the first time to enter the loop calculation.
[0053] The method for determining whether it is the first time to enter the loop calculation is to compare the feedback value and target bit mask of the previous loop output with the feedback value and target bit mask of the current loop output. If the feedback value of the previous loop output is not less than the target bit mask, and the feedback value of the current loop output is less than the target bit mask, it is considered that the current is the first time to enter the bitmask working strategy, that is, the first time to enter the loop calculation.
[0054] For example, the feedback value of the previous loop output is 50, the target bit mask is 40, and the feedback value of the current loop output is 30. According to the judgment condition: the feedback value (50) of the previous loop output is not less than the target bit mask (40), and the feedback value (30) of the current loop output is less than the target bit mask (40). Therefore, according to the given conditions, it can be concluded that this is the first time to enter the loop calculation.
[0055] In another example, an additional flag bit or a counter variable may be set to record whether it is the first time to enter the loop calculation.
[0056] The specific steps of determining whether the current loop calculation is entered for the first time by setting the flag bit are: setting it to true (True) in the initialization phase, and setting it to false (False) after entering the loop calculation. In this way, it can be judged according to the state of the flag bit. When the flag bit is true, it is the first time to enter the loop calculation, and when the flag bit is false, it is not the first time to enter the loop calculation.
[0057] The specific steps of determining whether the current loop calculation is entered for the first time by setting a counter variable are as follows: a counter variable is introduced to record the number of times the loop calculation is entered. The counter is set to 0 during initialization and incremented each time the loop calculation is entered. When the counter is equal to 1, it indicates that the loop calculation is entered for the first time.
[0058] It can be seen that in this example, by setting the target bit mask, defining the feedback values of the previous loop output and the current loop output, and using the corresponding comparison operation to determine whether it is the first time to enter the loop, it is beneficial to save system resources and improve judgment efficiency.
[0059] S203, detecting that the output of the loop is not less than the target bit mask, and obtaining a target pulse width modulation value according to the output of the loop.
[0060] The output of the loop may be a measurement indicator of the circuit, such as a voltage value and a current value.
[0061] Exemplarily, the voltage value is used as the output of the loop. At this time, the output of the loop is 60 volts (V), and the target bit mask is 50. At this time, the loop output 60 is greater than the target bit mask 50, and the loop output is converted to the target pulse width modulation value of the loop.
[0062] Among them, the method of obtaining the target pulse width modulation value according to the output of the loop can be linear mapping, feedback control, lookup table, etc. Specifically, linear mapping is to use a linear function or proportional relationship to map the loop output to the target PWM value. According to the actual application requirements, a linear conversion function can be set so that the loop output is proportional or inversely proportional to the PWM value. Feedback control is to use the feedback control algorithm, take the loop output as the input signal, and combine the control strategy to calculate the corresponding target PWM value. By continuously adjusting the duty cycle and other parameters of the PWM signal, the loop output gradually approaches or reaches the expected value. The lookup table is to establish a lookup table, which lists the target PWM values corresponding to different loop output voltages. According to the current loop output voltage, the corresponding target PWM value is searched in the lookup table and matched.
[0063] S204: Determine a target operating mode of the loop according to the target pulse width modulation value and the target bit mask.
[0064] It can be seen that in this example, by determining the target working mode of the loop according to the target bit mask and the loop output feedback, an intermittent working section controlled by the loop can be added to effectively control the degree of the intermittent working state and reduce the ripple during intermittent operation.
[0065] In a possible implementation, determining a target operating mode of a loop according to the target pulse width modulation value and the target bit mask includes:
[0066] The pulse width modulation value in the loop is updated according to the target pulse width modulation value; and the target working mode of the loop is determined according to the enable value and the mask value corresponding to the enable value.
[0067] The target working mode includes enabling a pulse width modulation signal or disabling a pulse width modulation signal.
[0068] In the switching power supply control, we set an adjustment cycle of 16 switching cycles and use the target pulse width modulation value to update the pulse width modulation (PWM) value in the loop. At the same time, the target working mode of the loop is determined according to the enable value and the corresponding mask value.
[0069] For example, assume that we are currently in the 8th switching cycle, the enable value is 3, and the corresponding mask value is 0b0011. At this time, we need to update the PWM value in the loop according to the target pulse width modulation value and determine the corresponding working mode. Among them, when using the enable value and its corresponding mask to perform logical operations to determine the corresponding working mode, the enable value is 3, which is represented by 0b0011 in binary. After the bitwise AND operation with the corresponding mask 0b0011, the result is non-zero, then the target working mode of the loop is determined to be the enabled pulse width modulation signal.
[0070] Assuming the target PWM value is 75%, the index corresponding to the current position in the 16 feedback outputs can be calculated based on the current switching cycle and the total number of adjustment cycles: current_index = (8% 16) = 8. The feedback output at the corresponding position is obtained based on the index: feedback_output = 8. The new PWM value is calculated based on the feedback output and the target PWM ratio as follows:
[0071] new_pwm_value=feedback_output*(target_pulse_width / total_pulse_width_range)=8*(0.75 / 15)=0.4, that is, the new PWM value is 0.4.
[0072] It can be seen that in this example, by using the enable value and its corresponding mask to determine the target working mode of the loop, the enable at a specific bit is bitwise ANDed with the mask of 1 at the corresponding position, and an intermittent working section controlled by the loop can be added, thereby effectively controlling the degree of the intermittent working state and reducing the ripple during intermittent operation.
[0073] In one possible implementation, see Figure 3 , Figure 3 is a flow chart of a loop target determination working method provided by an embodiment of the present application, such as Figure 3 As shown, the step of determining whether to generate a wave in a pulse width modulation period according to an enable value and a mask value corresponding to the enable value includes:
[0074] Determine whether the enable value is greater than the target number of cycles; if the enable value is not greater than the target number of cycles, determine whether the mask value corresponding to the enable value is 1; if the bit mask corresponding to the enable value is 1, determine that the target working mode of the loop is to enable the pulse width modulation signal; if the bit mask corresponding to the enable value is not 1, determine that the target working mode of the loop is to turn off the pulse width modulation signal.
[0075] Among them, when it is detected that the enable value is greater than the target number of cycles, the enable value is updated to 0, and it is determined whether the mask value corresponding to the current enable value is 1; when it is detected that the bit mask corresponding to the enable value is 1, it is determined that the target working mode of the loop is to enable the pulse width modulation signal; when it is detected that the bit mask corresponding to the enable value is not 1, it is determined that the target working mode of the loop is to turn off the pulse width modulation signal.
[0076] For example, assume that the target number of cycles is 10, the enable value is 8, and the binary mask associated with it is 0b1000. First, determine whether 8 is greater than 10, so the condition is met and proceed to the next step. Then check whether the fourth bit (counting from right to left) in the binary mask is 1. Since the fourth bit is 0, the condition is not met. Finally, it is concluded that in this case, the loop will be configured to turn off the pulse width modulation signal.
[0077] It can be seen that in this example, by detecting the relationship between the enable value and the target number of cycles, and determining the target working mode of the loop based on whether the bit mask corresponding to the enable value is 1, it is beneficial to improve the loop control efficiency, effectively control the degree of intermittent working state, and reduce ripple during intermittent operation.
[0078] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a loop control device provided in an embodiment of the present application, such as Figure 4 As shown, the control device 400 includes:
[0079] An acquisition module 401 is used to acquire a target bit mask of a loop;
[0080] The processing module 402 is used to determine whether the output of the loop is less than the target bit mask; and to detect that the output of the loop is not less than the target bit mask, and obtain a target pulse width modulation value according to the output of the loop; and to determine a target operating mode of the loop according to the target pulse width modulation value and the target bit mask, wherein the target operating mode includes enabling a pulse width modulation signal or disabling a pulse width modulation signal.
[0081] In a possible implementation, in terms of obtaining the target mask value of the loop, the acquisition module 401 is specifically used to: obtain the frequency range of the pulse width modulation signal of the loop; and determine the loop output corresponding to the maximum frequency in the frequency range of the pulse width modulation signal as the target mask value.
[0082] In one possible implementation, in terms of determining the target operating mode of the loop according to the target pulse width modulation value and the target bit mask, the processing module 402 is specifically used to: update the pulse width modulation value in the loop according to the target pulse width modulation value; and determine the target operating mode of the loop according to the enable value and the mask value corresponding to the enable value.
[0083] In one possible implementation, in terms of determining the target operating mode of the loop according to the enable value and the mask value corresponding to the enable value, the processing module 402 is specifically used to: determine whether the enable value is greater than the target number of cycles; if it is detected that the enable value is not greater than the target number of cycles, determine whether the mask value corresponding to the enable value is 1; if it is detected that the bit mask corresponding to the enable value is 1, determine that the target operating mode of the loop is to enable the pulse width modulation signal; if it is detected that the bit mask corresponding to the enable value is not 1, determine that the target operating mode of the loop is to turn off the pulse width modulation signal.
[0084] In a possible implementation, the processing module 402 is further used to: detect that the enable value is greater than the target number of cycles, update the enable value to 0, and determine whether the mask value corresponding to the current enable value is 1; detect that the bit mask corresponding to the enable value is 1, and determine that the target working mode of the loop is to enable the pulse width modulation signal; detect that the bit mask corresponding to the enable value is not 1, and determine that the target working mode of the loop is to turn off the pulse width modulation signal.
[0085] In a possible implementation, after detecting that the output of the loop is less than the target mask value, the processing module 402 is further used to: determine whether it is the first time to enter the loop calculation; if it is detected that it is the first time to enter the loop calculation, update the pointing bit of the pulse width modulation signal to the first bit of the target bit mask; and update the target mask value of the loop according to the pulse width modulation signal.
[0086] In one possible implementation, in terms of determining whether the loop calculation is entered for the first time, the processing module 402 is specifically used to determine whether the loop calculation is entered for the first time based on the previous output of the loop and the target bit mask; if it is detected that the previous output of the loop is not less than the target bit mask, it is determined that it is the first time to enter the loop calculation; if it is detected that the output of the loop is less than the target bit mask, it is determined that it is not the first time to enter the loop calculation.
[0087] It is worth noting that the specific functional implementation of the loop control device 400 is shown in the above Figure 2The description of the loop control method shown in the figure, for example, the acquisition module 401 is used to implement the relevant content of executing S201, and the processing module 402 is used to implement the relevant content of executing S202-S204. Each unit or module in the loop control device 400 can be separately or completely combined into one or more other units or modules to constitute, or one (some) of the units or modules can also be divided into multiple smaller units or modules in function to constitute, which can achieve the same operation without affecting the realization of the technical effect of the embodiment of the present invention. The above-mentioned units or modules are divided according to logical functions. In practical applications, the function of one unit (or module) is realized by multiple units (or modules), or the function of multiple units (or modules) is realized by one unit (or module).
[0088] According to the description of the above method embodiment and related device embodiment, please refer to Figure 5 , an embodiment of the present invention also provides a structural schematic diagram of a loop control device 500. Figure 5 The loop control device 500 shown includes a processor 501 , a memory 502 , a communication interface 503 and a bus 504 . The processor 501 , the memory 502 , and the communication interface 503 are connected to each other through the bus 504 .
[0089] Optionally, the memory 502 is a ROM, a static storage device, a dynamic storage device or a RAM.
[0090] The memory 502 can store executable program codes. When the executable program codes stored in the memory 502 are executed by the processor 501, the processor 501 and the communication interface 503 are used to execute Figure 2 The various steps of the loop control method of the illustrated embodiment.
[0091] The processor 501 adopts a general-purpose CPU, a microprocessor, an application-specific integrated circuit ASIC, a GPU or one or more integrated circuits to execute relevant programs to execute the loop control method of the method embodiment of the present application.
[0092] The processor 501 can also be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the loop control method of the present application can be completed by the hardware integrated logic circuit or software instructions in the processor 501. Optionally, the processor 501 is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. The processor can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor is a microprocessor or the processor is any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The optional software module is located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage media in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502, and combines its hardware to complete the functions required to be executed by the modules included in a loop control device 400 of an embodiment of the present application, or executes the loop control method of the method embodiment of the present application.
[0093] The communication interface 503 uses a transceiver or other related device such as, but not limited to, a transceiver.
[0094] The bus 504 may include a pathway for transmitting information between the various components of the loop control device 500 (eg, the memory 502 , the processor 501 , and the communication interface 503 ).
[0095] It should be noted that although Figure 5 The loop control device 500 shown only shows a memory, a processor, and a communication interface, but in the specific implementation process, those skilled in the art should understand that the loop control device 500 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the loop control device 500 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the loop control device 500 may also include only the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 5 All devices shown in .
[0096] An embodiment of the present application provides a computer-readable storage medium, in which a computer program for electronic data exchange is stored. The computer program includes execution instructions, and the execution instructions are used to execute part or all of the steps of any one of the loop control methods recorded in the above-mentioned loop control method embodiments. The above-mentioned computer includes an electronic terminal device.
[0097] An embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program can be operated to enable a computer to perform part or all of the steps of any loop control method recorded in the above method embodiments. The computer program product can be a software installation package.
[0098] It should be noted that, for the sake of simplicity, the embodiments of any of the aforementioned loop control methods are described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present application.
[0099] The above is a detailed introduction to the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of a loop control method, device, equipment and storage medium of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the idea of a loop control method, device, equipment and storage medium of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, hardware products, and computer program products of the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable loop control device to generate a machine, so that the instructions executed by the processor of the computer or other programmable loop control device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable loop control device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, the instruction device being implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1The memory may include: a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0102] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude multiple situations. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0103] A person skilled in the art can understand that all or part of the steps in the various methods of the method embodiments of any of the above-mentioned loop control methods can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a disk or an optical disk, etc.
[0104] It can be understood that any product that is controlled or configured to execute the processing method of the flowchart described in an embodiment of a loop control method of the present application, such as the device and computer program product of the above flowchart, falls within the scope of the related products described in the present application.
[0105] Obviously, those skilled in the art can make various changes and modifications to the loop control method, device, equipment and storage medium provided by the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A loop control method, characterized in that: The method comprises: Get the target bit mask of the loop; Determining whether the output of the loop is less than the target bit mask; detecting that the output of the loop is not less than the target bit mask, and obtaining a target pulse width modulation value according to the output of the loop; A target operating mode of the loop is determined according to the target pulse width modulation value and the target bit mask, wherein the target operating mode includes enabling a pulse width modulation signal or disabling a pulse width modulation signal.
2. The method according to claim 1, characterized in that The target bit mask of the acquisition loop includes: Obtain the frequency range of the pulse width modulation signal of the loop; A loop output corresponding to a maximum frequency in a frequency range of the pulse width modulation signal is determined as a target bit mask.
3. The method according to claim 1, characterized in that Determining a target operating mode of the loop according to the target pulse width modulation value and the target bit mask includes: Update the pulse width modulation value in the loop according to the target pulse width modulation value; The target working mode of the loop is determined according to the enable value and the mask value corresponding to the enable value.
4. The method according to claim 3, characterized in that The determining the target working mode of the loop according to the enable value and the mask value corresponding to the enable value includes: Determine whether the enable value is greater than the target cycle number; Detecting that the enable value is not greater than the target number of cycles, determining whether a mask value corresponding to the enable value is 1; When it is detected that the bit mask corresponding to the enable value is 1, it is determined that the target working mode of the loop is to enable the pulse width modulation signal; when it is detected that the bit mask corresponding to the enable value is not 1, it is determined that the target working mode of the loop is to disable the pulse width modulation signal.
5. The method according to claim 4, characterized in that The method further comprises: Detecting that the enable value is greater than the target number of cycles, updating the enable value to 0, and determining whether the mask value corresponding to the current enable value is 1; When it is detected that the bit mask corresponding to the enable value is 1, it is determined that the target working mode of the loop is to enable the pulse width modulation signal; when it is detected that the bit mask corresponding to the enable value is not 1, it is determined that the target working mode of the loop is to disable the pulse width modulation signal.
6. The method according to claim 1, characterized in that After determining whether the output of the loop is less than the target bit mask, the method further includes: Detecting that the output of the loop is less than the target bit mask, determining whether it is the first time to enter the loop calculation; It is detected that it is the first time to enter the loop calculation, and the pointing bit of the pulse width modulation signal is updated to the first bit of the target bit mask; A target bit mask of the loop is updated according to the pulse width modulated signal.
7. The method according to claim 6, characterized in that The determining whether the loop calculation is entered for the first time includes: Determining whether to enter the loop calculation for the first time according to the previous output of the loop and the target bit mask; If it is detected that the previous output of the loop is not less than the target bit mask, it is determined that it is the first time to enter the loop calculation; if it is detected that the output of the loop is less than the target bit mask, it is determined that it is not the first time to enter the loop calculation.
8. A loop control device, characterized in that: The device comprises: An acquisition module, used to obtain the target bit mask of the loop; A processing module is used to determine whether the output of the loop is less than the target bit mask; and to detect that the output of the loop is not less than the target bit mask, and obtain a target pulse width modulation value according to the output of the loop; and to determine a target operating mode of the loop according to the target pulse width modulation value and the target bit mask, wherein the target operating mode includes enabling a pulse width modulation signal or disabling a pulse width modulation signal.
9. A loop control device, characterized in that: The device comprises: A memory, a processor, and an executable program code stored in the memory and executable on the processor, wherein the processor executes the steps of the loop control method according to any one of claims 1 to 7 when executing the executable program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a loop control program, wherein the loop control program includes execution instructions, and the execution instructions are used to execute the steps of the loop control method according to any one of claims 1 to 7.