AC power failure detection method, electronic device and computer readable storage medium
By performing phase and superimposed transformation of the AC input voltage, the bias superimposed waveform is generated, which solves the problem of insufficient timeliness and high cost of AC power outage detection in the prior art, and achieves rapid and economical power outage detection, improving the continuity and reliability of power supply.
Patent Information
- Application Number
- CN202411373911.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-09-29
AI Technical Summary
The existing AC power-down detection methods have problems such as insufficient timeliness and high cost, especially in bidirectional inverters, which requires at least 16ms to detect, which affects the continuity and reliability of power supply.
By obtaining the initial waveform of the AC input voltage and performing phase and superimposed transformations, a biased superimposed waveform with a period of 1/4 of the initial waveform is generated. When multiple voltage values of the bias superposition waveform are lower than a preset power-down threshold for half a continuous target period, it is determined that the AC input voltage has powered down.
It effectively improves the timeliness of power-down detection of AC power, can complete the detection within 3ms, reduces the detection cost, and improves the continuity and reliability of power supply.
Smart Images

Figure CN118962517B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power supply and electric power technology, and in particular to an alternating current power failure detection method, an electronic device, and a computer-readable storage medium. Background Art
[0002] Currently, many key application scenarios such as data centers, medical equipment, industrial control systems, and energy storage have extremely high reliability requirements for power supply. Short power outages may cause equipment failure, data loss, or production interruptions, resulting in economic losses or safety risks. Power outage detection can quickly identify power outages and ensure that the uninterruptible power supply (UPS) function of the bidirectional inverter can convert direct current (DC) into alternating current (AC) in time to maintain uninterruptible power supply. Existing power outage detection methods include software detection of power outages and hardware circuit detection of power outages.
[0003] For software detection of power failure, the cycle of the AC waveform is 20ms, and it takes at least half a cycle (i.e. 10ms) to calculate its effective value. If the bidirectional inverter requires a detection time of more than 10ms, plus the mechanical execution time of the relay (usually 6ms), then the time required to implement the uninterruptible power supply function is at least 16ms. This high delay will affect the continuity and reliability of power supply. For hardware circuit detection of power failure, it usually includes a zero-crossing sampling module, a power failure time response setting module, and a hysteresis comparison module. However, this method is complex to implement, has poor anti-interference ability, and significantly increases the hardware cost of the system. Summary of the invention
[0004] The main technical problem solved by the present application is to provide an alternating current power failure detection method, an electronic device and a computer-readable storage medium, which can effectively improve the timeliness of the alternating current power failure detection and reduce the detection cost.
[0005] In order to solve the above technical problems, a technical solution adopted in this application is: the method comprises:
[0006] An initial waveform corresponding to an AC input voltage is acquired; a phase and superposition transformation is performed on the initial waveform to obtain a bias superposition waveform corresponding to the initial waveform; wherein a target period of the bias superposition waveform is 1 / 4 period of the initial waveform; in response to multiple target voltage values corresponding to the bias superposition waveform collected in a time period corresponding to half of the target period being lower than a preset power-off threshold, it is determined that the AC input voltage is powered off.
[0007] Optionally, performing phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform includes:
[0008] The initial waveform is converted to an absolute value so that the target voltage values corresponding to the initial waveform are all non-negative values to obtain a first waveform; wherein the period of the first waveform is 1 / 2 period of the initial waveform; the first waveform is converted to a phase offset to obtain a second waveform; wherein the phase difference between the second waveform and the first waveform is 1 / 4 period of the initial waveform; the first waveform is superimposed with the second waveform to obtain the offset superimposed waveform.
[0009] Optionally, performing phase offset conversion on the first waveform to obtain a second waveform includes:
[0010] The first waveform is subjected to all-pass filtering to perform phase offset conversion on the first waveform to obtain the second waveform.
[0011] Optionally, before performing phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform, the method includes:
[0012] Collecting a plurality of sample waveforms corresponding to the AC input voltage; performing the superposition and phase transformation on the sample waveforms to obtain a sample bias superposition waveform; wherein the sample period of the sample bias superposition waveform is 1 / 4 of the period of the initial waveform;
[0013] A sample voltage value is selected from a plurality of sample voltage values within the sample period as the power-off threshold.
[0014] Optionally, each of the sample periods includes a voltage peak value; and selecting a sample voltage value from a plurality of sample voltage values within the sample period as the power-off threshold value comprises: taking an angle corresponding to the voltage peak value as a reference, and determining half of the angle corresponding to the voltage peak value as the threshold angle;
[0015] The target voltage value corresponding to the threshold angle is used as the power-off threshold, so that the power-off threshold exists on both sides of the voltage peak in each sample cycle, and the corresponding time period of each adjacent power-off threshold is half of the target cycle.
[0016] Optionally, after performing phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform, the method further comprises:
[0017] In response to the fact that the bias superimposed waveform collected during a time period corresponding to a continuous half of the target cycle satisfies a preset voltage differential condition, it is determined that the AC input voltage is powered off.
[0018] Optionally, in response to the corresponding bias superimposed waveform collected in a time period corresponding to a continuous half of the target cycle satisfying a preset voltage differential condition, determining that the AC input voltage is powered off includes:
[0019] The collected corresponding bias superposition waveform is derived to obtain a derivative result; in response to the derivative results corresponding to half of the target cycle being negative, it is determined that the AC input voltage is powered off.
[0020] Optionally, the derivation of the collected corresponding bias superposition waveform to obtain a derivation result includes:
[0021] The bias superposition waveform is divided into a plurality of operation cycles; wherein the operation cycle is less than half of the target cycle; and the derivative result is obtained for the bias superposition waveform corresponding to each operation cycle.
[0022] In order to solve the above technical problems, another technical solution adopted by the present application is: an electronic device, the electronic device comprising:
[0023] A memory for storing executable program codes;
[0024] The processor is used to call and run the executable program code from the memory, so that the electronic device executes the AC power failure detection method as described in any one of the above.
[0025] To solve the above technical problems, another technical solution adopted in the present application is: a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the AC power failure detection method as described in any one of the above items is implemented.
[0026] Different from the prior art, an embodiment of the present application provides an alternating current power failure detection method, the method comprising: obtaining an initial waveform corresponding to an AC input voltage; performing phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform; wherein a target period of the biased superposition waveform is 1 / 4 period of the initial waveform; in response to multiple target voltage values corresponding to the biased superposition waveform collected in a time period corresponding to half of the target period being lower than a preset power failure threshold, determining that the AC input voltage has failed.
[0027] By obtaining the initial waveform of the AC input voltage and performing phase and superposition transformation on it, a biased superposition waveform with a period of 1 / 4 of the initial waveform is generated; when multiple voltage values of the biased superposition waveform are lower than the preset power-off threshold within half a target period, it is determined that the AC input voltage has been powered off, which can effectively improve the timeliness of AC power-off detection and reduce detection costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1a This is a schematic diagram of the working state of the bidirectional inverter of the present application under normal power supply;
[0029] Figure 1b It is a schematic diagram of the working state of the bidirectional inverter of the present application under abnormal power failure;
[0030] Figure 2 It is a flow chart of the first embodiment of the AC power failure detection method of the present application;
[0031] Figure 3 It is a flow chart of the second embodiment of the AC power failure detection method of the present application;
[0032] Figure 4 is an exemplary schematic diagram of an initial waveform of an AC input voltage of the present application;
[0033] Figure 5 is an exemplary schematic diagram of an initial waveform and a first waveform of an input voltage of the present application;
[0034] Figure 6 is an exemplary schematic diagram of the first waveform and the second waveform of the present application;
[0035] Figure 7 is an exemplary schematic diagram of a bias superposition waveform of the present application;
[0036] Figure 8 is an exemplary schematic diagram of a power-off threshold and a bias superimposed waveform of the present application;
[0037] Fig. 9 It is a flow chart of a third embodiment of the AC power failure detection method of the present application;
[0038] Fig.10 is an exemplary schematic diagram of the initial waveform of the AC input voltage under no-load power-off condition of the present application;
[0039] Fig.11 It is a flow chart of a fourth embodiment of the AC power failure detection method of the present application;
[0040] Fig.12 It is a flowchart of a fifth embodiment of the AC power failure detection method of the present application;
[0041] Fig.13 It is an exemplary structural block diagram of an electronic device of the AC power failure detection method of the present application;
[0042] Fig.14 It is an exemplary structural block diagram of a computer-readable storage medium of the AC power failure detection method of the present application. DETAILED DESCRIPTION
[0043] The present application is described in detail below with reference to the accompanying drawings and implementation methods.
[0044] This embodiment takes into account that the current input mains (mains is AC) power failure judgment method often uses software calculation and hardware circuit detection. The software calculates the effective value of the input voltage as a judgment condition. For a 50Hz mains, the mains cycle is 20ms, and it takes half a mains cycle, or 10ms, to calculate the effective value of the mains. For the uninterruptible power supply function of the bidirectional inverter, if it takes at least 10ms to detect whether the mains is powered off, then plus the 6ms mechanical execution time of the relay, it takes at least 16ms to achieve the uninterruptible power supply switching. The hardware power failure detection circuit requires a zero-crossing sampling module, a power failure time response setting module, and a hysteresis comparison module, etc., which are complex to implement, have poor anti-interference, and increase costs.
[0045] Therefore, the present application proposes a method for quickly detecting power failure of AC input voltage, which uses software calculation to shorten the AC input power failure judgment time to less than 3ms, so as to switch the UPS mains bypass to DC-AC inverter. When the AC input voltage is normally supplied, Figure 1a As shown, the current flows from AC_IN to AC_OUT; when the AC input voltage drops abnormally, such as Figure 1b As shown, through DC-AC inversion, the current goes from DC to AC_OUT. Among them, AC_IN is the AC input and AC_OUT is the AC output. In addition, compared with the hardware solution, there is no need for a zero-crossing sampling module, a power-off time response setting module, and a hysteresis comparison module, which saves hardware costs.
[0046] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of the first embodiment of the AC power failure detection method of the present application. It should be noted that if there is substantially the same result, the method of the present application is not limited to the first embodiment. Figure 2 The process sequence shown is limited. Figure 2 As shown, the method includes:
[0047] Step S210, obtaining an initial waveform corresponding to the AC input voltage;
[0048] Specifically, this embodiment takes the application of a bidirectional inverter as an example. This bidirectional inverter can be connected to an AC power source (such as a power grid) and can detect in real time whether the AC power input voltage is powered off. That is, by obtaining the initial waveform corresponding to the AC input voltage, the bidirectional inverter can perform backup power switching and other operations in time when the AC power is powered off.
[0049] In this embodiment, the initial waveform corresponding to the AC input voltage may be a 50 Hz sine wave of the mains input, and the period of this initial waveform is 2π. In other embodiments, the initial waveform corresponding to the AC input voltage may also be a 60 Hz sine wave or a 47 Hz sine wave, which is not limited in this embodiment.
[0050] Step S220, performing phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform; wherein the target period of the biased superposition waveform is 1 / 4 of the period of the initial waveform;
[0051] Specifically, in order to improve the efficiency of power-off detection and reduce detection delay, the initial waveform can be subjected to phase transformation and superposition transformation. Phase offset conversion can be to shift the waveform on the time axis to change the phase of the waveform. Superposition can be to add the voltage values of corresponding points of two waveforms to form a new waveform. The target period can be the complete period of the biased superposition waveform. Due to the phase and superposition transformation, the length of the target period is 1 / 4 of the period of the initial waveform. For example, for the initial waveform of the 50Hz AC input voltage, the period of the initial waveform is 20ms, and the target period is 5ms.
[0052] In an exemplary embodiment, the initial waveform is converted into a first waveform having only non-negative values after absolute value conversion; then, a second waveform having a phase difference of 1 / 4 period of the initial waveform with the first waveform is generated through a phase offset operation; finally, the two waveforms are superimposed together to obtain a biased superimposed waveform, and the target period of the biased superimposed waveform is 1 / 4 period of the initial waveform.
[0053] Step S230, in response to the fact that a plurality of target voltage values corresponding to the bias superimposed waveform collected in a time period corresponding to a continuous half of the target cycle are all lower than a preset power-off threshold, it is determined that the AC input voltage is powered off.
[0054] The power-off threshold is used to detect whether the input voltage value within a time period corresponding to half a target cycle is normal.
[0055] Specifically, after phase transformation and superposition, the target period of the biased superimposed waveform becomes shorter than the period of the initial waveform, and a more concentrated waveform characteristic can be obtained. Therefore, when the AC power is off, the input voltage will drop rapidly, and the amplitude of the waveform will also decrease accordingly. If the collected voltage values are lower than the preset power-off threshold value during the time corresponding to half a target period, it means that the voltage has been significantly reduced during this period, and this low voltage state persists. Since the biased superimposed waveform is a periodic waveform, its voltage will rise from zero to the voltage peak and then drop to zero during a complete target period, that is, the biased superimposed waveform will not remain at a low level for such a long time under normal power supply conditions, so it can be determined that the AC input voltage has lost power.
[0056] This embodiment obtains the initial waveform of the AC input voltage and performs phase and superposition transformation on it to generate a biased superposition waveform with a period of 1 / 4 of the initial waveform; when multiple voltage values of the biased superposition waveform are lower than the preset power-off threshold within half a target period, it is determined that the AC input voltage has been powered off, which can effectively improve the timeliness of AC power-off detection and reduce the detection cost.
[0057] See also Figure 3 , Figure 3 1 is a flow chart of a second embodiment of the AC power failure detection method of the present application. In this embodiment, the method includes the following steps:
[0058] Step S310, obtaining an initial waveform corresponding to the AC input voltage;
[0059] The initial waveform may be a sine wave of the input voltage under load, which may cause power failure. Figure 4 , Figure 4 The initial waveform of the AC input voltage of 50Hz is shown as .
[0060] Step S320, performing absolute value conversion on the initial waveform so that the target voltage values corresponding to the initial waveform are all non-negative values, so as to obtain a first waveform; wherein the period of the first waveform is 1 / 2 of the period of the initial waveform;
[0061] Specifically, since the initial waveform may be a sine wave or other forms of periodic signals with alternating positive and negative voltage values, that is, there are two symmetrical parts (a positive half-cycle and a negative half-cycle) in one complete cycle of the initial waveform, the absolute value operation can flip the negative part and merge the two parts on the positive axis, so that the period of the first waveform becomes 1 / 2 period of the initial waveform.
[0062] In an exemplary embodiment, see Figure 5 , Figure 5 The initial waveform and the first waveform y1 of the AC input voltage are shown. Taking the absolute value, we get .
[0063] Step S330, performing phase offset conversion on the first waveform to obtain a second waveform; wherein the phase difference between the second waveform and the first waveform is 1 / 4 period of the initial waveform;
[0064] Specifically, the phase offset conversion may be to phase-shift the first waveform on the time axis to form the second waveform. For example, the first waveform is moved forward or backward by 1 / 4 of the period of the initial waveform, so that the characteristic point (such as the peak or zero point) of the first waveform changes relative to the period of 1 / 4 of the initial waveform to form the second waveform.
[0065] In an exemplary embodiment, the first waveform Perform all-pass filtering to obtain Figure 6 Shown is lagging behind y1 The signal, that is, the second waveform .
[0066] Step S340: superimpose the first waveform and the second waveform to obtain the biased superimposed waveform.
[0067] Specifically, since there is a phase difference of 1 / 4 of the period of the initial waveform between the first waveform and the second waveform, and the period of the first waveform and the second waveform are both 1 / 2 of the period of the initial waveform, adding the voltage values of the corresponding points of the first waveform and the second waveform can shorten the target period of the final biased superimposed waveform to 1 / 4 of the period of the initial waveform, and this biased superimposed waveform can also represent the initial waveform.
[0068] In an exemplary embodiment, the first waveform With the second waveform Superposition is performed to obtain Figure 7 The bias superimposed waveform shown .
[0069] Step S350, in response to the fact that a plurality of target voltage values corresponding to the bias superimposed waveform collected in a time period corresponding to a continuous half of the target cycle are all lower than a preset power-off threshold, it is determined that the AC input voltage is powered off.
[0070] In an exemplary embodiment, see Figure 8 , in the bias superimposed waveform moment, ,Will As the power-off threshold. is a complete target cycle of the bias superimposed waveform. Figure 8 , which is lower than the target period The duration is , while the 50Hz sine wave The corresponding time is 2.5ms, so the offset waveform can be superimposed Lower than continued The corresponding duration is used as the judgment condition. During the corresponding time period, the collected voltage values are all lower than , it means that the AC input is powered off. In other words, the power failure can be quickly determined in about 2.5ms.
[0071] in, The A in represents the effective value of the input voltage, and its specific value can be 220V or 230V. In other words, no matter it is 50Hz, 47Hz or 60Hz, When , y can be equal to 1.848A.
[0072] As mentioned above, for AC input voltages of different frequencies, the time required to determine input voltage power failure is different. For example, when determining a 60Hz input voltage power failure, the time required for a 60Hz sine wave is The corresponding time is about 2.08ms. It can be seen that the higher the AC input voltage frequency (such as the power grid), the faster the power-off time is judged, so the lower the AC input voltage frequency, the slower the power-off time is judged. The corresponding time is about 2.66ms. Therefore, no matter it is 47Hz, 50Hz or 60Hz, it can be ensured that whether the AC input is powered off can be determined within 3ms.
[0073] In this embodiment, the 50 Hz sine wave of the AC input under load is processed by absolute value, phase offset, and superposition to obtain a 200 Hz biased superposition waveform, that is, the initial waveform with a period of 2π of the AC input is transformed to obtain a target period of the transformed biased superposition waveform. , so that the input voltage can be in the initial waveform The fault can be detected within the time corresponding to a cycle, that is, the detection time is shortened to less than 3ms, and then the AC power bypass of the UPS is switched to DC-AC inverter, which effectively improves the timeliness of AC power failure detection and reduces the detection cost.
[0074] See also Fig. 9 , Fig. 91 is a flow chart of a third embodiment of the AC power failure detection method of the present application. In this embodiment, before step S220, it includes:
[0075] Step S910, collecting a plurality of sample waveforms corresponding to the AC input voltage;
[0076] The sample waveform may be a sine wave corresponding to the loaded AC input voltage under normal power supply conditions, and this sample waveform does not have a power failure condition.
[0077] Step S920, performing the superposition and phase transformation on the sample waveform to obtain a sample bias superposition waveform; wherein the sample period of the sample bias superposition waveform is 1 / 4 of the period of the initial waveform;
[0078] Specifically, the specific execution steps of superimposing and phase-changing the sample waveforms in this embodiment may be as described in the above steps S320 to S340, so as to obtain the sample bias superimposed waveform corresponding to the loaded AC power under normal power supply conditions.
[0079] Step S930: Selecting a sample voltage value from a plurality of sample voltage values within the sample period as the power-off threshold.
[0080] Specifically, by shortening the complete cycle of the sample bias superimposed waveform to 1 / 4 cycle of the original waveform, the sample bias superimposed waveform is analyzed to obtain multiple power-off thresholds. Due to the symmetrical characteristics of the waveform, two power-off thresholds can exist in each sample cycle. The time period corresponding to adjacent power-off thresholds can be used to detect whether the bias superimposed waveform is continuously lower than the power-off threshold during this time period. For the selection of the power-off threshold, it can be any voltage value in the interval from zero point to voltage peak.
[0081] Further, step S930 includes:
[0082] Taking the angle corresponding to the voltage peak as a reference, half of the angle corresponding to the voltage peak is determined as the threshold angle; taking the target voltage value corresponding to the threshold angle as the power-off threshold, so that the power-off threshold exists on both sides of the voltage peak in each sample cycle, and the corresponding time period of each adjacent power-off threshold is half of the target cycle.
[0083] In an exemplary embodiment, please continue to refer to Figure 8 For the first sample cycle of the sample bias superposition waveform, the peak value of the voltage can be the extreme point in this sample cycle, and half of the angle corresponding to the extreme point is used as the threshold angle, and then the target voltage value corresponding to this threshold angle is used as the power-off threshold, so that the power-off threshold exists on both sides of the voltage peak in each sample cycle.
[0084] In this embodiment, by detecting the change of the input voltage at both the rising edge and the falling edge of the bias superposition waveform, each target cycle is effectively covered. By taking the time period corresponding to each two adjacent power-off thresholds as half a target cycle, the change of the input voltage can be detected within the time period corresponding to the half target cycle, and a judgment can be made quickly within a short time when the voltage power off occurs, which helps to switch to the backup power supply (such as UPS) more timely to ensure continuous power supply to the equipment.
[0085] Furthermore, unlike the load-related power-off, since there is an X capacitor at the input end of the bidirectional inverter, when the bidirectional inverter works in the AC bypass mode, that is, the AC output is directly transmitted from the AC input, under no-load conditions, if the AC power is off at the highest point of the input voltage, the output voltage will slowly drop linearly, such as Fig.10 Shown, Fig.10 The figure shows the AC input voltage waveform under no-load power failure. The voltage starts to drop slowly at the point where the AC voltage is abnormal, and the UPS inverter output needs to be cut off. Since the voltage drop rate of AC voltage under no-load condition is slower than that under no-load condition, its detection efficiency is slower.
[0086] Therefore, this embodiment performs phase and superposition transformation on the initial waveform to obtain the offset superimposed waveform, and sets a judgment condition for the derivation of the real-time value of the input voltage under no-load conditions. This no-load power-off judgment condition and the above-mentioned load power-off judgment condition are used as the overall judgment condition in an or relationship, so that fast and accurate power-off detection can be achieved under abnormal working conditions of no-load or load.
[0087] See also Fig.11 , Fig.11 1 is a flow chart of a fourth embodiment of the AC power failure detection method of the present application. In this embodiment, the method includes the following steps:
[0088] Step S1110, obtaining an initial waveform corresponding to the AC input voltage;
[0089] The initial waveform may be a sine wave of the AC input voltage under no-load conditions, which may result in power failure.
[0090] Step S1120, performing phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform; wherein the target period of the biased superposition waveform is 1 / 4 of the period of the initial waveform;
[0091] The above step S220 may be performed and will not be described in detail here.
[0092] Step S1130, in response to the corresponding bias superimposed waveform collected in the time period corresponding to the continuous half of the target cycle meeting the preset voltage differential condition, determining that the AC input voltage is powered off.
[0093] The voltage differential condition may be to detect whether the derivative result of the bias superimposed waveform is a negative number to determine whether the no-load AC input voltage is abnormal or power is off.
[0094] Specifically, when the input voltage of the AC power source operates normally, the input voltage is generally a stable sinusoidal waveform, and the derivative result of the offset superimposed waveform will be a positive number at the rising edge of the sinusoidal waveform and a negative number at the falling edge.
[0095] However, when the AC input voltage drops, due to the presence of the capacitor, the drop will not be instantaneous, but will show a linear slow drop, especially when the input voltage suddenly drops at its highest point, the time required to drop to zero is much longer than the period of the initial waveform. If the initial waveform itself is monitored directly, there may be hysteresis.
[0096] Therefore, by monitoring the voltage change in the time period corresponding to half a target cycle of the bias superimposed waveform, if the derivative results of the bias superimposed waveform meet the voltage differential condition within the time corresponding to half a cycle, it is determined that the AC input voltage is powered off.
[0097] This embodiment utilizes the unique characteristics of voltage change and waveform regularity during no-load power failure, and by satisfying the voltage differential condition by taking the derivative of the bias superimposed waveform collected during the time period corresponding to half a target cycle, the power failure can be responded to within 3ms, making the detection process more efficient and accurate. In addition, the backup power supply (such as UPS) can be switched to more quickly to ensure continuous power supply to the system and equipment.
[0098] See also Fig.12 , Fig.12 1 is a flow chart of a fifth embodiment of the AC power failure detection method of the present application. In this embodiment, the method includes the following steps:
[0099] Step S1210, obtaining an initial waveform corresponding to the AC input voltage;
[0100] The initial waveform may be a sine wave of the AC input voltage under no-load conditions, which may result in power failure.
[0101] Step S1220, performing phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform; wherein the target period of the biased superposition waveform is 1 / 4 of the period of the initial waveform;
[0102] The above step S220 may be performed and will not be described in detail here.
[0103] Step S1230, deriving the collected corresponding bias superposition waveform to obtain a derivative result;
[0104] Specifically, since the derivation can reveal the trend of voltage change, that is, whether the voltage is rising, remaining stable, or falling, that is, the direction and speed of voltage change can be determined in real time. Therefore, by real-time monitoring of the derivative results of the bias superposition waveform, slow changes in voltage can be detected in a shorter time, without having to wait until the voltage value itself drops to zero before making a judgment.
[0105] Further, step S1230 includes:
[0106] The bias superposition waveform is divided into a plurality of operation cycles; wherein the operation cycle is less than half of the target cycle; and the derivative result is obtained for the bias superposition waveform corresponding to each operation cycle.
[0107] Specifically, the bias superposition waveform is divided into multiple operation cycles, and the time length of each operation cycle is much shorter than half of the target cycle. This subdivision can sample the voltage change more densely. Among them, each operation cycle can correspond to a derivative result, and the derivative result can characterize the rate of change of the voltage in a very short period of time. Therefore, by calculating the derivative results in multiple operation cycles, multiple slope values in a period of time can be obtained. For example, the target cycle is (1 / 200s), the operation period can be 1 / 36000s, which is much smaller than the target period.
[0108] Step S1240: In response to the derivative results corresponding to consecutive half of the target cycle being negative numbers, it is determined that the AC input voltage is powered off.
[0109] Specifically, if the corresponding derivative results in the time period corresponding to half the target cycle are all negative, it means that the voltage continues to decrease in the entire time period without an upward trend, which can indicate that the input voltage decreases due to power interruption.
[0110] In an exemplary embodiment, the bias waveform is superimposed using the law of the sine waveform. Derivation, by dividing the collected bias superposition waveform into multiple operation cycles, the bias superposition waveform is derived in each operation cycle, where the operation cycle can be much smaller than the mains cycle 2π, and each operation cycle can correspond to a slope , and then we can judge that in the continuous target cycle The slope of the corresponding time period Are they all negative? In this case, you can The waveform is abnormal in the corresponding time period, that is, The power failure can be detected within the time period corresponding to the period (2π) of the initial waveform, or within 3ms of the normal mains frequency.
[0111] In this embodiment, by dividing the bias superposition waveform into multiple smaller operation cycles, the voltage changes can be accurately collected and analyzed, and the trend of slowly decreasing voltage can be quickly identified, so as to determine the power failure of the power grid, thereby improving the speed and accuracy of power failure detection and ensuring that the bidirectional inverter can respond in time and switch to the backup power supply.
[0112] See also Fig.13 , Fig.13 1 is an exemplary structural block diagram of an electronic device of the AC power failure detection method of the present application. The electronic device 1300 of the present application may include a processor 1301 and a memory 1302, wherein the processor 1301 and the memory 1302 communicate with each other via a bus. The memory 1302 stores program instructions for AC power failure detection, and when the program instructions are executed by the processor 1301, the method steps described in the above text in combination with the accompanying drawings are implemented:
[0113] An initial waveform corresponding to an AC input voltage is acquired; a phase and superposition transformation is performed on the initial waveform to obtain a bias superposition waveform corresponding to the initial waveform; wherein a target period of the bias superposition waveform is 1 / 4 period of the initial waveform; in response to multiple target voltage values corresponding to the bias superposition waveform collected in a time period corresponding to half of the target period being lower than a preset power-off threshold, it is determined that the AC input voltage is powered off.
[0114] Optionally, the processor 1301 performs the phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform, including:
[0115] The initial waveform is converted to an absolute value so that the target voltage values corresponding to the initial waveform are all non-negative values to obtain a first waveform; wherein the period of the first waveform is 1 / 2 period of the initial waveform; the first waveform is converted to a phase offset to obtain a second waveform; wherein the phase difference between the second waveform and the first waveform is 1 / 4 period of the initial waveform; the first waveform is superimposed with the second waveform to obtain the offset superimposed waveform.
[0116] Optionally, the processor 1301 performs the phase offset conversion on the first waveform to obtain a second waveform, including:
[0117] The first waveform is subjected to all-pass filtering to perform phase offset conversion on the first waveform to obtain the second waveform.
[0118] Optionally, before the processor 1301 performs the phase and superposition transformation on the initial waveform to obtain the offset superposition waveform corresponding to the initial waveform, the process includes:
[0119] Collecting a plurality of sample waveforms corresponding to the AC input voltage; performing the superposition and phase transformation on the sample waveforms to obtain a sample bias superposition waveform; wherein the sample period of the sample bias superposition waveform is 1 / 4 of the period of the initial waveform;
[0120] A sample voltage value is selected from a plurality of sample voltage values within the sample period as the power-off threshold.
[0121] Optionally, the processor 1301 executes each of the sample cycles including a voltage peak; the selecting a sample voltage value from a plurality of sample voltage values within the sample cycle as the power-off threshold comprises: taking the angle corresponding to the voltage peak as a reference, and determining half of the angle corresponding to the voltage peak as the threshold angle;
[0122] The target voltage value corresponding to the threshold angle is used as the power-off threshold, so that the power-off threshold exists on both sides of the voltage peak in each sample cycle, and the corresponding time period of each adjacent power-off threshold is half of the target cycle.
[0123] Optionally, after the processor 1301 performs the phase and superposition transformation on the initial waveform to obtain the offset superposition waveform corresponding to the initial waveform, the process includes:
[0124] In response to the fact that the bias superimposed waveform collected during a time period corresponding to a continuous half of the target cycle satisfies a preset voltage differential condition, it is determined that the AC input voltage is powered off.
[0125] Optionally, the processor 1301 executes the step of determining that the AC input voltage is powered off in response to the corresponding bias superimposed waveform collected in a time period corresponding to a continuous half of the target cycle satisfying a preset voltage differential condition, including:
[0126] The collected corresponding bias superposition waveform is derived to obtain a derivative result; in response to the derivative results corresponding to half of the target cycle being negative, it is determined that the AC input voltage is powered off.
[0127] Optionally, the processor 1301 performs the derivation of the collected corresponding bias superposition waveform to obtain a derivation result, including:
[0128] The bias superposition waveform is divided into a plurality of operation cycles; wherein the operation cycle is less than half of the target cycle; and the derivative result is obtained for the bias superposition waveform corresponding to each operation cycle.
[0129] See also Fig.14 , Fig.14 is an exemplary structural block diagram of a computer-readable storage medium of the AC power failure detection method of the present application. Fig.14 As shown, the computer-readable storage medium 1400 stores a computer program 1401. When the computer program 1401 is executed on a computer, the computer executes the above-mentioned related method steps to implement an AC power failure detection method in the above-mentioned embodiment.
[0130] The above scheme obtains the initial waveform corresponding to the AC input voltage; performs phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform; wherein the target period of the biased superposition waveform is 1 / 4 period of the initial waveform; in response to the fact that multiple target voltage values corresponding to the biased superposition waveform collected in the time period corresponding to half of the target period are all lower than the preset power-off threshold, it is determined that the AC input voltage is powered off.
[0131] By obtaining the initial waveform of the AC input voltage and performing phase and superposition transformation on it, a biased superposition waveform with a period of 1 / 4 of the initial waveform is generated; when multiple voltage values of the biased superposition waveform are lower than the preset power-off threshold within half a target period, it is determined that the AC input voltage has been powered off, which can effectively improve the timeliness of AC power-off detection and reduce detection costs.
[0132] In the several embodiments provided in the present application, it should be understood that the disclosed methods, electronic devices and storage media can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0133] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0134] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0135] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0136] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for detecting power failure of alternating current, characterized in that: The AC power failure detection method includes: Obtaining the initial waveform corresponding to the AC input voltage; The initial waveform is subjected to phase and superposition transformation to obtain a biased superposition waveform corresponding to the initial waveform; wherein the period of the initial waveform is 2π, and the biased superposition waveform is , the target period of the bias superposition waveform is π / 2; The performing phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform includes: performing absolute value transformation on the initial waveform so that the target voltage values corresponding to the initial waveform are all non-negative values to obtain a first waveform; performing all-pass filtering on the first waveform to perform phase bias transformation on the first waveform to obtain a second waveform; and superimposing the first waveform and the second waveform to obtain the biased superposition waveform; The period of the first waveform is 1 / 2 of the period of the initial waveform, and the phase difference between the second waveform and the first waveform is 1 / 4 of the period of the initial waveform; In response to the fact that a plurality of target voltage values corresponding to the bias superimposed waveform collected in a time period corresponding to a continuous half of the target cycle are all lower than a preset power-off threshold, determining that the AC input voltage is powered off; After performing phase and superposition transformation on the initial waveform to obtain the bias superposition waveform corresponding to the initial waveform, the method includes: dividing the bias superposition waveform into multiple operation cycles; obtaining a derivative result for the bias superposition waveform corresponding to each operation cycle; in response to the derivative results corresponding to half of the target cycle being negative, determining that the AC input voltage is powered off; wherein the operation cycle is less than half of the target cycle.
2. The AC power failure detection method according to claim 1, characterized in that: Before performing phase and superposition transformation on the initial waveform to obtain a biased superposition waveform corresponding to the initial waveform, the method includes: Collecting a plurality of sample waveforms corresponding to the AC input voltage; Performing the superposition and phase transformation on the sample waveform to obtain a sample bias superposition waveform; wherein the sample period of the sample bias superposition waveform is 1 / 4 of the period of the initial waveform; A sample voltage value is selected from a plurality of sample voltage values within the sample period as the power-off threshold.
3. The AC power failure detection method according to claim 2, characterized in that: Each of the sample periods includes a voltage peak value; and selecting a sample voltage value from a plurality of sample voltage values within the sample period as the power-off threshold value comprises: Taking the angle corresponding to the voltage peak as a reference, determining half of the angle corresponding to the voltage peak as a threshold angle; The target voltage value corresponding to the threshold angle is used as the power-off threshold, so that the power-off threshold exists on both sides of the voltage peak in each sample cycle, and the corresponding time period of each adjacent power-off threshold is half of the target cycle.
4. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor is used to call and run the executable program code from the memory, so that the electronic device executes the AC power failure detection method as described in any one of claims 1 to 3.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for detecting AC power failure as claimed in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Poweroff detection method of alternating current power supply and poweroff protection method of direct current inverter compressor
CN102901936A
Power system and control method thereof
CN108054724A
Method and system for judging abnormal working condition of extra-high voltage transformer
CN110031703A
Power supply device
JP2008128897A