Power state detection method, power system, and electronic device
By adjusting the power supply detection cycle and threshold according to the load status, the accuracy problem of power supply health status detection is solved, thereby improving the stability and safety of the power supply system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GOLDCARD HIGH TECH
- Filing Date
- 2024-12-31
- Publication Date
- 2026-06-30
Smart Images

Figure CN122307411A_ABST
Abstract
Description
Technical Field
[0001] This application relates to power technology, and more particularly to a power supply status detection method, power supply system, and electronic equipment. Background Technology
[0002] In the field of power technology, the reliability of power supply directly determines whether the power system can work normally. Therefore, the detection of the health status of the power supply is of utmost importance.
[0003] In existing technologies, power supply health status is typically detected by measuring power supply voltage at a fixed frequency, and the health status of the power supply is determined based on the voltage value. However, when the power supply is supplying power to a high-power load module, the power supply may have insufficient discharge capacity, causing the power supply voltage to drop. After the high-power load is turned off, the power supply voltage may recover rather than actually dropping, resulting in poor accuracy in power supply health status detection. Summary of the Invention
[0004] This application provides a power supply status detection method, a power supply system, and an electronic device to improve the accuracy of power supply health status detection.
[0005] On the one hand, this application provides a power state detection method, including:
[0006] The current power supply operating state is determined based on the current power-on state of the high-power load module and the previous power supply operating state; wherein, the power of the high-power load module is greater than a preset power threshold; the power supply operating state includes normal state, cooling state, and high-power state;
[0007] Based on the current power supply operating state, a corresponding first power supply voltage detection cycle and a first voltage detection threshold are determined. Based on the first power supply voltage detection cycle and the first voltage detection threshold, the current power supply health status is detected. The power supply voltage detection cycle and voltage detection threshold are different for different power supply operating states.
[0008] Optionally, the power supply voltage detection cycle corresponding to the normal state is a first cycle, and the power supply voltage detection cycle corresponding to the high-power state is a second cycle, wherein the first cycle is longer than the second cycle; the voltage detection threshold corresponding to the normal state is a first voltage threshold, and the voltage detection threshold corresponding to the high-power state is a second voltage threshold, wherein the first voltage threshold is greater than the second voltage threshold; and no power supply voltage detection is performed in the cooling state.
[0009] Optionally, determining the current power supply operating state based on the current power-on state of the high-power load module and the previous power supply operating state includes:
[0010] If a high-power load module is detected to be turned on when the power supply was in normal operating state, the current power supply operating state is determined to be high-power state; otherwise, the current power supply operating state is determined to be normal state.
[0011] If all high-power load modules are detected to be off when the power supply was in high-power mode in the previous operation, the current power supply is determined to be in cooling mode and the cooling timer is started; otherwise, the current power supply is determined to be in high-power mode.
[0012] If a high-power load module is detected to be turned on when the power supply was in the cooling state in the previous operation, the current power supply operation state is determined to be the high-power state; if all high-power load modules are detected to be turned off and the cooling time is not less than the cooling time threshold, the current power supply operation state is determined to be the normal state; otherwise, the current power supply operation state is determined to be the cooling state.
[0013] Optionally, the step of detecting the current power supply health status based on the first power supply voltage detection cycle and the first voltage detection threshold includes:
[0014] The power supply voltage is detected according to the power supply voltage detection cycle to obtain a first voltage value;
[0015] The current power supply health status is determined based on the first voltage value and the first voltage detection threshold.
[0016] Optionally, the power health state includes a normal state and a power-down state, and the first voltage detection threshold includes a power-on voltage threshold; determining the current power health state based on the first voltage value and the first voltage detection threshold includes:
[0017] If the first voltage value is not less than the power-on voltage threshold when the previous power health state was in a power-down state, then the current power health state is determined to be in a normal state; otherwise, the current power health state is determined to be in a power-down state.
[0018] Optionally, the power health state further includes a locked state, and the first voltage detection threshold further includes a power-down voltage threshold; determining the current power health state based on the first voltage value and the first voltage detection threshold includes:
[0019] If the first voltage value is less than the power-down voltage threshold when the previous power health state was locked, then the current power health state is determined to be power-down; otherwise, the current power health state is determined to be locked.
[0020] Optionally, the power health state further includes a low-voltage state, and the first voltage detection threshold further includes a lockout voltage threshold; determining the current power health state based on the first voltage value and the first voltage detection threshold includes:
[0021] When the previous power health state was low, if the first voltage value is less than the power-down voltage threshold, the current power health state is determined to be power-down; if the first voltage value is not less than the power-down voltage threshold and is less than the lockout voltage threshold, the current power health state is determined to be lockout; otherwise, the current power health state is determined to be low.
[0022] Optionally, the first voltage detection threshold further includes a low voltage threshold; determining the current power supply health status based on the first voltage value and the first voltage detection threshold includes:
[0023] When the power supply was in a normal state in the previous test, if the first voltage value was less than the power-down voltage threshold, the current power supply health state was determined to be in a power-down state; if the first voltage value was not less than the power-down voltage threshold and was less than the lockout voltage threshold, the current power supply health state was determined to be in a lockout state; if the first voltage value was not less than the lockout voltage threshold and was less than the low voltage threshold, the current power supply health state was determined to be in a low voltage state; otherwise, the current power supply health state was determined to be in a normal state.
[0024] Optionally, determining the current power supply health status based on the first voltage value and the first voltage detection threshold includes:
[0025] When the power supply was in a low-power state in the previous power health state, if the first voltage value is less than the power-down voltage threshold, the power-down count is incremented by one; if the first voltage value is not less than the power-down voltage threshold and is less than the lockout voltage threshold, both the power-down count and the lockout count are incremented by one; otherwise, the power-down count and the lockout count are cleared to zero.
[0026] If the current number of power outages is not less than the power outage threshold, the current power supply health status is determined to be a power outage state; if the current number of power outages is less than the power outage threshold and the current number of lockouts is not less than the lockout threshold, the current power supply health status is determined to be a lockout state; otherwise, the current power supply health status is determined to be a low power state.
[0027] Optionally, the method further includes:
[0028] If the first voltage value is not less than the power-down voltage threshold and is less than the lockout voltage threshold, then the high-power load module is controlled to shut down.
[0029] Optionally, the method further includes:
[0030] Based on the normal voltage value, determine the threshold number of lockouts corresponding to the normal voltage value; wherein, the normal voltage value includes the voltage value detected when the power supply is in normal operating state.
[0031] On the other hand, this application provides a power supply system, including: a power supply, a controller, and a voltage acquisition circuit;
[0032] The controller is connected to the voltage acquisition circuit and is used to determine the current power supply operating state based on the current on state of the high-power load module and the previous power supply operating state; wherein the power of the high-power load module is greater than a preset power threshold; the power supply operating state includes normal state, cooling state and high-power state;
[0033] Based on the current power supply operating state, determine the corresponding first power supply voltage detection cycle and first voltage detection threshold; wherein, the power supply voltage detection cycle and voltage detection threshold are different for different power supply operating states.
[0034] In addition, according to the first power supply voltage detection cycle, the voltage acquisition circuit is controlled to acquire the current power supply voltage to obtain a first voltage value;
[0035] Furthermore, the current power supply health status is determined based on the first voltage value and the first voltage detection threshold.
[0036] In another aspect, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described above.
[0037] In another aspect, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the method described above.
[0038] In another aspect, this application provides a computer program product, including a computer program that, when executed by a processor, is used to implement the method described above.
[0039] The power status detection method, power system, and electronic equipment provided in this application determine the current power operating status based on the current on-state of the high-power load module and the previous power operating state. For different power operating states, power health status detection is performed based on different voltage detection thresholds, which can effectively avoid power health status detection errors caused by the high-power load pulling down the power supply voltage. Furthermore, by acquiring the power supply voltage through frequency conversion, timely switching of power health status can be performed. Therefore, the reliability and accuracy of power status detection can be effectively improved, as well as the reliability and safety of the power system. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0041] Figure 1 The diagram illustrates a process flow diagram for switching power health states in the prior art.
[0042] Figure 2 The diagram below illustrates a flowchart of the power state detection method provided in an embodiment of this application.
[0043] Figure 3 The diagram above exemplarily illustrates the structure of a power supply system provided in an embodiment of this application;
[0044] Figure 4 The diagram above illustrates a power supply state switching process according to an embodiment of this application.
[0045] Figure 5 The diagram above illustrates a scenario of power health status management provided in an embodiment of this application.
[0046] Figure 6 The diagram above illustrates another power health state switching process provided in an embodiment of this application.
[0047] Figure 7 The diagram illustrates, by way of example, another power health state switching process provided in an embodiment of this application;
[0048] Figure 8 The diagram illustrates, by way of example, another power health state switching process provided in an embodiment of this application;
[0049] Figure 9 The diagram illustrates, by way of example, another power health state switching process provided in an embodiment of this application;
[0050] Figure 10 The diagram above exemplarily illustrates the structure of the voltage acquisition circuit provided in an embodiment of this application;
[0051] Figure 11 The diagram above illustrates a structural schematic of the compensation electronic device provided in an embodiment of this application.
[0052] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0053] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0054] In this application, a module refers to a functional module or a logical module. It can be in software form, where its function is implemented by a processor executing program code; or it can be in hardware form. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "OR" relationship.
[0055] In the field of power technology, the reliability of power supply directly determines whether the power system can work normally. Therefore, the detection of the health status of the power supply is of utmost importance.
[0056] In existing technologies, power supply health status is typically detected by measuring power supply voltage at a fixed frequency, and the health status of the power supply is determined based on the voltage value. However, when the power supply is supplying power to a high-power load module, the power supply may have insufficient discharge capacity, causing the power supply voltage to drop. After the high-power load is turned off, the power supply voltage may recover rather than actually dropping, resulting in poor accuracy in power supply health status detection.
[0057] The following is combined Figure 1 This section explains the existing technology.
[0058] Figure 1 This is a schematic diagram illustrating the power supply health state switching process in existing technologies. For example... Figure 1As shown, power supply health states include normal state, power-down state, and low power state. When the previous power supply health state was normal, if a low power event occurs, the system switches to the low power state; if a power-down event occurs, the system switches to the power-down state; otherwise, it remains in the normal state. When the previous power supply health state was low, if a power-down event occurs, the system switches to the power-down state; otherwise, it remains in the low power state. When the previous power supply health state was power-down, if a power-on event occurs, the system switches to the normal state; otherwise, it remains in the power-down state. A power-down event can include a power supply voltage below a power-down voltage threshold, and a low power event can include a power supply voltage not lower than the power-down voltage threshold but lower than the low power voltage threshold.
[0059] However, when the power supply supplies power to a high-power load module, the power supply may have insufficient discharge capacity, causing the power supply voltage to drop and switch to a low-power state. However, after the high-power load module is turned off, the power supply voltage value can recover to the voltage value before it was pulled down. The battery level is not actually low, and the power supply health status cannot be restored, resulting in an error in the power supply health status detection.
[0060] Based on the above-mentioned technical problems, this application provides a power supply status detection method, a power supply system, and an electronic device, which are used to determine the current working state of the power supply based on whether a high-power load module is currently turned on, and to select different power supply voltage detection cycles and thresholds for different power supply working states, thereby avoiding the impact of the turn-on of high-power load modules on the accuracy of power supply health status detection.
[0061] The technical solutions of this application are illustrated below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0062] Figure 2 This is a flowchart illustrating a power state detection method provided in an embodiment of this application. The execution entity of this method can be a controller. Figure 2 As shown, the method includes:
[0063] S201. Determine the current power supply operating state based on the current power-on state of the high-power load module and the previous power supply operating state; wherein, the power of the high-power load module is greater than the preset power threshold; the power supply operating state includes normal state, cooling state and high-power state;
[0064] S202. Based on the current power supply operating state, determine the corresponding first power supply voltage detection cycle and first voltage detection threshold, and detect the current power supply health status based on the first power supply voltage detection cycle and first voltage detection threshold; wherein, the power supply voltage detection cycle and voltage detection threshold are different for different power supply operating states.
[0065] In practical implementation, the power supply operating states include normal state, cooling state, and high-power state. The current power supply operating state can be switched based on the current on / off state of the high-power load module and the previous power supply operating state. Load modules with power exceeding a preset power threshold can be designated as high-power load modules. Different power supply operating states correspond to different power supply voltage detection cycles and point voltage detection thresholds. After determining the current power supply operating state, the corresponding first power supply voltage detection cycle and first voltage detection threshold can be determined, and the current power supply health status can be detected based on these parameters.
[0066] Figure 3 A schematic diagram of the power supply system provided in the embodiments of this application is shown below. Figure 3 As shown, the power supply provides power to the load and the controller. The controller can collect the power supply voltage, detect the power supply health status, and control the load. Therefore, when the power supply voltage is too low, it may drop to the controller reset threshold, causing the controller to reset and resulting in the loss of critical data. By accurately detecting the power supply health status, timely responses can be taken when the power supply health status level is low, preventing controller data loss and effectively improving the controller's data security and reliability.
[0067] For example, the controller can be a microcontroller unit (MCU).
[0068] In this embodiment, the current power supply operating state is determined based on the current on-state of the high-power load module and the previous power supply operating state. For different power supply operating states, power supply health status detection is performed according to different voltage detection thresholds. This can effectively avoid errors in power supply health status detection caused by the high-power load pulling down the power supply voltage. Furthermore, by acquiring the power supply voltage through frequency conversion, the power supply health status can be switched in a timely manner. Therefore, the reliability and accuracy of power supply status detection can be effectively improved, as well as the reliability and safety of the power supply system.
[0069] For example, the power supply voltage detection cycle corresponding to the normal state is the first cycle, and the power supply voltage detection cycle corresponding to the high-power state is the second cycle, with the first cycle being longer than the second cycle; the voltage detection threshold corresponding to the normal state is the first voltage threshold, and the voltage detection threshold corresponding to the high-power state is the second voltage threshold, with the first voltage threshold being greater than the second voltage threshold; no power supply voltage detection is performed in the cooling state.
[0070] In practical implementation, the power supply voltage is highly likely to be pulled low under high power conditions. Therefore, the frequency of power supply voltage detection can be increased to allow for timely switching of the power supply health state based on the voltage level. This prevents data loss due to excessively low power supply voltage affecting controller reset, thereby improving the accuracy of power supply health status detection and the stability of controller operation. For example, the power supply voltage can be detected in real time during high power operation, and then checked at fixed intervals during normal operation. In the cooling state, power supply voltage detection is not accurate enough, so it can be omitted.
[0071] In one possible implementation, the current power supply operating state is determined based on the current on-state of the high-power load module and the previous power supply operating state, including:
[0072] If a high-power load module is detected to be turned on when the power supply was in normal operating state, the current power supply operating state is determined to be high-power state; otherwise, the current power supply operating state is determined to be normal state.
[0073] If all high-power load modules are detected to be off when the power supply was in high-power mode in the previous operation, the current power supply is determined to be in cooling mode and the cooling timer is started; otherwise, the current power supply is determined to be in high-power mode.
[0074] If a high-power load module is detected to be turned on when the power supply was in the cooling state in the previous operation, the current power supply operation state is determined to be the high-power state; if all high-power load modules are detected to be turned off and the cooling time is not less than the cooling time threshold, the current power supply operation state is determined to be the normal state; otherwise, the current power supply operation state is determined to be the cooling state.
[0075] Figure 4 This is a schematic diagram illustrating the power supply operating state switching process provided in an embodiment of this application. Figure 4 As shown, if a high-power event is detected when the power supply was in normal operation, the current power supply operation state is determined to be a high-power state; otherwise, the current power supply operation state is determined to be normal. If all high-power events have ended when the power supply was in high-power operation, the current power supply operation state is determined to be a cooling state, and a cooling timer is started; otherwise, the current power supply operation state is determined to be high-power. If a high-power event is detected when the power supply was in cooling operation, the current power supply operation state is determined to be high-power. If all high-power events have ended, and the cooling timer is not less than the cooling time threshold, the current power supply operation state is determined to be normal; otherwise, the current power supply operation state is determined to be cooling. High-power events may include: a high-power load module being in the ON state.
[0076] Figure 5 This is a schematic diagram illustrating the power supply operating state switching process provided in an embodiment of this application. Figure 5 As shown, after entering the cooling state, the cooling timer is started; in the cooling state, if the cooling time is less than the cooling time threshold, the cooling state is maintained; if the cooling time is greater than or equal to the cooling time threshold, the cooling timer is turned off and the cooling timer is reset to zero, and the power supply working state is switched to normal state.
[0077] Understandably, the power supply will gradually recover its discharge capacity during the cooling process. Therefore, it is not necessary to monitor the power supply voltage during this period to avoid erroneous switching of the power supply's health state due to insufficient power-holding capacity. Under high-power conditions, increasing the power supply voltage detection frequency can more quickly detect excessively low power supply voltage and allow for timely switching of the power supply state.
[0078] In one possible implementation, the current power supply health status is detected based on a first power supply voltage detection cycle and a first voltage detection threshold, including:
[0079] The power supply voltage is detected according to the power supply voltage detection cycle to obtain the first voltage value;
[0080] The current power supply health status is determined based on the first voltage value and the first voltage detection threshold.
[0081] In a practical implementation, the first voltage value can be detected according to the power supply voltage detection cycle. Based on the first voltage value and the first voltage detection threshold corresponding to the current power supply operating state, the power supply health state can be switched to the corresponding power supply health state, thereby improving the accuracy of power supply health state switching.
[0082] Figure 5 This is a schematic diagram illustrating the power health state switching process provided in an embodiment of this application. Figure 5 As shown, in one possible implementation, the power supply health state includes a normal state and a power-down state. The first voltage detection threshold includes a power-on voltage threshold; based on the first voltage value and the first voltage detection threshold, the current power supply health state is determined, including:
[0083] If the first voltage value is not less than the power-on voltage threshold when the previous power health state was power-down, then the current power health state is determined to be normal; otherwise, the current power health state is determined to be power-down.
[0084] In the specific implementation, if a power-on event occurs when the previous power supply health state was in a power-down state, the current power supply health state is set to a normal state; otherwise, the power-down state is maintained. A power-on event includes a first voltage value that is not less than a power-on voltage threshold.
[0085] Figure 6This is a schematic diagram illustrating another power health state switching process provided in an embodiment of this application. For example... Figure 6 As shown, when the previous power health state was in the power-down state, if the first voltage value is greater than or equal to the power-on voltage threshold, the power-on count is incremented by 1; if the first voltage value is less than the power-on voltage threshold, the power-on count is reset to zero. Furthermore, it is determined whether the current power-on count is greater than or equal to the power-on count threshold. If the current power-on count is greater than or equal to the power-on count threshold, the power health state is assigned to the normal state; otherwise, the power-down state is maintained. This allows the power health state to be switched to the normal state only when the first voltage value is greater than or equal to the power-on voltage threshold and reaches the power-on count threshold, effectively improving the reliability and accuracy of the power health state.
[0086] like Figure 5 As shown, in one possible implementation, the power health state also includes a locked state. The first voltage detection threshold also includes a power-down voltage threshold; determining the current power health state based on the first voltage value and the first voltage detection threshold includes:
[0087] If the first voltage value is less than the power-down voltage threshold when the previous power health state was locked, then the current power health state is determined to be power-down; otherwise, the current power health state is determined to be locked.
[0088] In the specific implementation, the power health status level in the power-down state is lower than that in the locked state. Besides switching the power health status from the power-down state to the normal state, switching to a lower-level power health status is only permitted, thus ensuring the accuracy of power health status detection. Therefore, if a power-down event occurs when the previous power health status was locked, the power health status will be switched to the normal state. A power-down event includes a first voltage value being less than a power-down voltage threshold.
[0089] Figure 7 This is a schematic diagram illustrating another power health state switching process provided in an embodiment of this application. For example... Figure 7 As shown, when the previous power health state was locked, if the first voltage value is less than the power-down voltage threshold, the power-down count is incremented by 1; if the first voltage value is greater than or equal to the power-down voltage threshold, the power-down count is reset to zero. Furthermore, it is determined whether the current power-down count is greater than or equal to the power-down count threshold. If the current power-down count is greater than or equal to the power-down count threshold, the power health state is assigned to the power-down state; otherwise, the locked state is maintained. This allows the power health state to be switched to the power-down state only when the first voltage value is less than the power-down voltage threshold and reaches the power-down count threshold, rather than switching to the power-down state every time the first voltage value is less than the power-down voltage threshold. This effectively improves the reliability and accuracy of the power health state.
[0090] like Figure 5As shown, in one possible implementation, the power supply health state further includes a low-voltage state, and the first voltage detection threshold further includes a lockout voltage threshold; determining the current power supply health state based on the first voltage value and the first voltage detection threshold includes:
[0091] When the previous power health state was low, if the first voltage value is less than the power-down voltage threshold, the current power health state is determined to be power-down; if the first voltage value is not less than the power-down voltage threshold and is less than the lockout voltage threshold, the current power health state is determined to be lockout; otherwise, the current power health state is determined to be low.
[0092] In the specific implementation, the power health status level of the low-voltage state is lower than that of the power-down state. When the previous power health status was low, if a latching event occurs, the power health status is switched to the latched state; if a power-down event occurs, the power health status is switched to the power-down state; otherwise, the low-voltage state is maintained. A latching event includes a first voltage value that is not less than the power-down voltage threshold and less than the latching voltage threshold.
[0093] Figure 8 This is a schematic diagram illustrating another power health state switching process provided in an embodiment of this application. For example... Figure 8 As shown, for example, determining the current power supply health status based on a first voltage value and a first voltage detection threshold includes:
[0094] When the power supply was in a low-power state in the last time, if the first voltage value is less than the power-down voltage threshold, the power-down count is incremented by one; if the first voltage value is not less than the power-down voltage threshold and is less than the lockout voltage threshold, both the power-down count and the lockout count are incremented by one; otherwise, the power-down count and the lockout count are cleared to zero.
[0095] If the current number of power outages is not less than the power outage threshold, the current power supply health status is determined to be a power outage state; if the current number of power outages is less than the power outage threshold and the current number of lockouts is not less than the lockout threshold, the current power supply health status is determined to be a lockout state; otherwise, the current power supply health status is determined to be a low power state.
[0096] For example, the method also includes:
[0097] If the first voltage value is not less than the power-down voltage threshold and is less than the lockout voltage threshold, then the high-power load module is shut down.
[0098] In the specific implementation, if the first voltage value is not less than the power-down voltage threshold and less than the lockout voltage threshold, the high-power load module is controlled to shut down, thereby increasing the power supply voltage and effectively preventing the controller from resetting due to excessively low power supply voltage, thus effectively improving the reliability of the power supply.
[0099] For example, the method also includes:
[0100] Based on the normal voltage value, determine the threshold number of lockouts corresponding to the normal voltage value; where the normal voltage value includes the voltage value detected when the power supply is in normal operating state.
[0101] Different normal voltage values correspond to different lockout thresholds. When the power supply is in a normal operating state, the higher the normal voltage value, the more lockout thresholds there are, and vice versa. A higher normal voltage value indicates a healthier power supply. Therefore, when the power supply is relatively healthy, more lockouts can be allowed, and the switching of battery health status can be performed accurately.
[0102] like Figure 5 As shown, in one possible implementation, the first voltage detection threshold further includes a low voltage threshold; determining the current power supply health state based on the first voltage value and the first voltage detection threshold includes:
[0103] When the power supply was in a normal state in the previous test, if the first voltage value was less than the power-down voltage threshold, the current power supply health state was determined to be in a power-down state; if the first voltage value was not less than the power-down voltage threshold and was less than the lockout voltage threshold, the current power supply health state was determined to be in a lockout state; if the first voltage value was not less than the lockout voltage threshold and was less than the low voltage threshold, the current power supply health state was determined to be in a low voltage state; otherwise, the current power supply health state was determined to be in a normal state.
[0104] In the specific implementation, the power health status level of the low-voltage state is lower than that of the normal state. Therefore, when the previous power health status was normal, if a low-voltage event occurs, the power health status is switched to the low-voltage state; if a latching event occurs, the power health status is switched to the latched state; if a power-down event occurs, the power health status is switched to the power-down state; otherwise, the normal state is maintained. A low-voltage event includes a first voltage value that is not less than the latching voltage threshold and less than the low-voltage voltage threshold.
[0105] Figure 9 This is a schematic diagram illustrating another power health state switching process provided in an embodiment of this application. For example... Figure 9 As shown, when the power supply was in a normal health state in the previous instance, if the first voltage value is less than the power-down voltage threshold, the power-down count, lockout count, and low-power count are all incremented by 1; otherwise, the power-down count is reset to zero. Additionally, it checks if the power-down count is greater than or equal to the power-down count threshold. If the power-down count is greater than or equal to the threshold, the power supply health state is assigned to the power-down state; otherwise, the normal state is maintained.
[0106] Furthermore, if the first voltage value is greater than or equal to the power-down voltage threshold and less than the lockout voltage threshold, then both the lockout count and the low-power count are incremented by 1, and the power-down count is reset to zero. Additionally, it is determined whether the power-down count is greater than or equal to the lockout count threshold. If the lockout count is greater than or equal to the lockout count threshold, then the power health status is assigned to the locked state; otherwise, the normal state is maintained.
[0107] Furthermore, if the first voltage value is greater than or equal to the lockout voltage threshold and less than the low voltage threshold, then the low voltage count is incremented by 1, and the power-down count and lockout count are also incremented by 1. Additionally, it is determined whether the low voltage count is greater than or equal to the low voltage count threshold. If the low voltage count is greater than or equal to the low voltage count threshold, then the power supply health status is assigned to the low voltage state; otherwise, the normal state is maintained.
[0108] By switching the power supply health state to power-down / locked / low state only when the power supply voltage is below the power-down voltage threshold / locked voltage threshold / low voltage threshold for a certain number of times, the accuracy of power supply health state switching can be effectively improved.
[0109] This application embodiment also provides a power supply system, including: a power supply, a controller, and a voltage acquisition circuit;
[0110] The controller is connected to the voltage acquisition circuit and is used to determine the current power supply operating state based on the current on state of the high-power load module and the previous power supply operating state; wherein the power of the high-power load module is greater than a preset power threshold; the power supply operating state includes normal state, cooling state and high-power state;
[0111] Based on the current power supply operating state, determine the corresponding first power supply voltage detection cycle and first voltage detection threshold; wherein, the power supply voltage detection cycle and voltage detection threshold are different for different power supply operating states.
[0112] In addition, according to the first power supply voltage detection cycle, the voltage acquisition circuit is controlled to acquire the current power supply voltage to obtain a first voltage value;
[0113] Furthermore, the current power supply health status is determined based on the first voltage value and the first voltage detection threshold.
[0114] It should be noted that this power system is used to perform the power status detection method as described above, and its specific implementation method is as described above, and will not be repeated here.
[0115] Figure 10 This is a schematic diagram of a voltage acquisition circuit provided in an embodiment of this application. Figure 10As shown, one end of the voltage acquisition circuit is connected to power socket P4. When the MCU outputs a high level through the MCU-PWR-AD-CTL pin, transistors Q6 and Q7 are turned on. The MCU calculates the power supply voltage value based on the power supply voltage value acquired by the MCU-PWR-AD pin and the voltage division ratio of resistors R23 and R24. Capacitor C22 is used to maintain the voltage stability of the MCU-PWR-AD pin. When the MCU outputs a low level through the MCU-PWR-AD-CTL pin, transistors Q6 and Q7 are turned off.
[0116] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device can be a controller as described above. Figure 11 As shown, the electronic device includes:
[0117] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke logical instructions stored in the memory 292 to execute the methods of the above embodiments.
[0118] Furthermore, the logic instructions in the aforementioned memory 292 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0119] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, thereby implementing the methods in the above-described method embodiments.
[0120] The memory 292 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 292 may include high-speed random access memory and may also include non-volatile memory.
[0121] This application provides a non-transitory computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described in the foregoing embodiments.
[0122] This application provides a computer program product, including a computer program that, when executed by a processor, implements the methods provided in any of the embodiments described above.
[0123] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0124] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A power state detection method, characterized by, include: The current power supply operating state is determined based on the current power-on state of the high-power load module and the previous power supply operating state; wherein, the power of the high-power load module is greater than a preset power threshold; the power supply operating state includes normal state, cooling state, and high-power state; Based on the current power supply operating state, a corresponding first power supply voltage detection cycle and a first voltage detection threshold are determined. Based on the first power supply voltage detection cycle and the first voltage detection threshold, the current power supply health status is detected. The power supply voltage detection cycle and voltage detection threshold are different for different power supply operating states.
2. The method of claim 1, wherein, The power supply voltage detection cycle corresponding to the normal state is the first cycle, and the power supply voltage detection cycle corresponding to the high-power state is the second cycle, with the first cycle being longer than the second cycle; the voltage detection threshold corresponding to the normal state is the first voltage threshold, and the voltage detection threshold corresponding to the high-power state is the second voltage threshold, with the first voltage threshold being greater than the second voltage threshold; no power supply voltage detection is performed in the cooling state.
3. The method of claim 1, wherein, The process of determining the current power supply operating state based on the current power-on state of the high-power load module and the previous power supply operating state includes: If a high-power load module is detected to be turned on when the power supply was in normal operating state, the current power supply operating state is determined to be high-power state; otherwise, the current power supply operating state is determined to be normal state. If all high-power load modules are detected to be off when the power supply was in high-power mode in the previous operation, the current power supply is determined to be in cooling mode and the cooling timer is started; otherwise, the current power supply is determined to be in high-power mode. If a high-power load module is detected to be turned on when the power supply was in the cooling state in the previous operation, the current power supply operation state is determined to be the high-power state; if all high-power load modules are detected to be turned off and the cooling time is not less than the cooling time threshold, the current power supply operation state is determined to be the normal state; otherwise, the current power supply operation state is determined to be the cooling state.
4. The method according to any one of claims 1 to 3, characterized in that, The step of detecting the current power supply health status based on the first power supply voltage detection cycle and the first voltage detection threshold includes: The power supply voltage is detected according to the power supply voltage detection cycle to obtain a first voltage value; The current power supply health status is determined based on the first voltage value and the first voltage detection threshold.
5. The method of claim 4, wherein, The power supply health status includes a normal state, a power-down state, and a locked state; the first voltage detection threshold includes a power-on voltage threshold and a power-down voltage threshold; determining the current power supply health status based on the first voltage value and the first voltage detection threshold includes: If the first voltage value is not less than the power-on voltage threshold when the previous power health state was in a power-down state, then the current power health state is determined to be in a normal state; otherwise, the current power health state is determined to be in a power-down state. If the first voltage value is less than the power-down voltage threshold when the previous power health state was locked, then the current power health state is determined to be power-down; otherwise, the current power health state is determined to be locked.
6. The method of claim 5, wherein, The power supply health state also includes a low-voltage state, and the first voltage detection threshold also includes a lockout voltage threshold; determining the current power supply health state based on the first voltage value and the first voltage detection threshold includes: When the previous power health state was low, if the first voltage value is less than the power-down voltage threshold, the current power health state is determined to be power-down; if the first voltage value is not less than the power-down voltage threshold and is less than the lockout voltage threshold, the current power health state is determined to be lockout; otherwise, the current power health state is determined to be low.
7. The method of claim 6, wherein, The first voltage detection threshold further includes a low voltage threshold; determining the current power supply health status based on the first voltage value and the first voltage detection threshold includes: When the power supply was in a normal state in the previous test, if the first voltage value was less than the power-down voltage threshold, the current power supply health state was determined to be in a power-down state; if the first voltage value was not less than the power-down voltage threshold and was less than the lockout voltage threshold, the current power supply health state was determined to be in a lockout state; if the first voltage value was not less than the lockout voltage threshold and was less than the low voltage threshold, the current power supply health state was determined to be in a low voltage state; otherwise, the current power supply health state was determined to be in a normal state.
8. The method of claim 6, wherein, The step of determining the current power supply health status based on the first voltage value and the first voltage detection threshold includes: When the power supply was in a low-power state in the previous power health state, if the first voltage value is less than the power-down voltage threshold, the power-down count is incremented by one; if the first voltage value is not less than the power-down voltage threshold and is less than the lockout voltage threshold, both the power-down count and the lockout count are incremented by one; otherwise, the power-down count and the lockout count are cleared to zero. If the current number of power outages is not less than the power outage threshold, the current power supply health status is determined to be a power outage state; if the current number of power outages is less than the power outage threshold and the current number of lockouts is not less than the lockout threshold, the current power supply health status is determined to be a lockout state; otherwise, the current power supply health status is determined to be a low power state.
9. The method of claim 8, wherein, The method further includes: If the first voltage value is not less than the power-down voltage threshold and is less than the lockout voltage threshold, then the high-power load module is controlled to shut down.
10. The method of claim 9, wherein, The method further includes: Based on the normal voltage value, determine the threshold number of lockouts corresponding to the normal voltage value; wherein, the normal voltage value includes the voltage value detected when the power supply is in normal operating state.
11. A power supply system characterized by comprising: include: Power supply, controller, and voltage acquisition circuit; The controller is connected to the voltage acquisition circuit and is used to determine the current power supply operating state based on the current on state of the high-power load module and the previous power supply operating state; wherein the power of the high-power load module is greater than a preset power threshold; the power supply operating state includes normal state, cooling state and high-power state; Based on the current power supply operating state, determine the corresponding first power supply voltage detection cycle and first voltage detection threshold; wherein, the power supply voltage detection cycle and voltage detection threshold are different for different power supply operating states. In addition, according to the first power supply voltage detection cycle, the voltage acquisition circuit is controlled to acquire the current power supply voltage to obtain a first voltage value; Furthermore, the current power supply health status is determined based on the first voltage value and the first voltage detection threshold.
12. An electronic device, comprising: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-10.