Power switching method, control device and power switching system

By using a voltage detection circuit in the power switching system to adjust the output voltage and phase of the backup power supply to make it consistent with the mains power supply, the arc ignition problem during power switching in the prior art is solved, and the stability of the system and the service life of the relay are improved.

CN119675217APending Publication Date: 2025-03-21SHENZHEN PYS IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411712009.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

During the switching process, the existing power switching system will cause arc ignition of the mains relay and bypass relay, reducing the service life of the relay.

Method used

By using a voltage detection circuit in the power switching system to detect the voltage and phase of the mains power supply and the backup power supply, adjust the output voltage and phase of the backup power supply, so that it is consistent with the mains power supply, thereby avoiding arc ignition during switching.

Benefits of technology

It effectively avoids arc ignition, improves the service life of the relay, and improves the working stability of the power switching system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119675217A_ABST
    Figure CN119675217A_ABST
Patent Text Reader

Abstract

The invention discloses a power supply switching method, a control device and a power supply switching system, and relates to the technical field of power supply management. The method comprises the steps that under the condition that the standby power supply supplies power to a load, a voltage detection signal output by a mains supply corresponding to a voltage detection circuit is acquired, and the input state of the mains supply is confirmed; under the condition that the input state is a normal state, determining the voltage and phase of the mains supply according to the voltage detection signal; adjusting the voltage and phase of the standby power supply according to the voltage and phase of the commercial power supply; and under the condition that the voltage and the phase of the commercial power supply are consistent with the output voltage and the phase of the standby power supply, controlling the commercial power switching circuit to switch on a path between the commercial power supply and the load, and controlling the standby power supply switching circuit to switch off the path between the standby power supply and the load. The invention aims to improve the working stability of the power supply switching system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power management, and in particular to a power switching method, a control device and a power switching system. Background Art

[0002] Many existing electronic devices and systems have very high requirements for power quality, especially those used in the fields of medical, communications, finance and data centers. These devices are extremely sensitive to the stability of the power supply, and any short power outage may cause data loss, equipment failure or even serious safety accidents. Therefore, fast switching to backup power can ensure that these devices can still operate normally when the mains power is lost.

[0003] In the prior art, usually, an energy storage device or an uninterruptible power supply or other backup power source is used to invert the output power to supply power to the load. After confirming that the mains power supply is normal, the bypass relay is disconnected and then the mains relay is closed, thereby switching from the backup power supply to the mains power supply. However, this switching method will cause arcing and ignition in both the mains relay and the bypass relay, reducing the service life of the relay. Summary of the invention

[0004] The main purpose of the present invention is to provide a power switching method, a control device and a power switching system, aiming to improve the working stability of the power switching system.

[0005] To achieve the above object, the present invention proposes a power switching method, which is applied to a power switching system, wherein the power switching system includes an access terminal of a mains power supply, a backup power supply, and a control device, wherein the control device includes a mains switching circuit, a backup power supply switching circuit, and a voltage detection circuit, and the method includes:

[0006] Under the condition that the backup power supply supplies power to the load, obtaining a voltage detection signal output by the voltage detection circuit corresponding to the mains power supply, and confirming the input state of the mains power supply;

[0007] Under the condition that the input state is a normal state, confirming the voltage and phase of the mains power supply according to the voltage detection signal;

[0008] According to the voltage and phase of the mains power supply, adjusting the voltage and phase of the backup power supply;

[0009] Under the condition that the voltage and phase of the AC power supply are consistent with the output voltage and phase of the backup power supply, the AC power switch circuit is controlled to connect the path between the AC power supply and the load, and the backup power switch circuit is controlled to disconnect the path between the backup power supply and the load.

[0010] In one embodiment, the step of obtaining the voltage detection signal output by the voltage detection circuit corresponding to the mains power supply and confirming the input state of the mains power supply is specifically as follows:

[0011] Obtaining a voltage detection signal outputted by a voltage detection circuit corresponding to the mains power supply, and confirming an actual phase of the mains power supply according to the voltage detection signal;

[0012] Based on the voltage detection signal, confirm the zero crossing point of the actual phase and generate a corresponding reference phase;

[0013] The input state of the commercial power supply is confirmed according to the phase difference between the actual phase and the reference phase.

[0014] In one embodiment, the step of confirming the zero-crossing point of the actual phase based on the voltage detection signal and generating the corresponding reference phase specifically includes:

[0015] Based on the voltage detection signal, confirming the zero crossing point of the actual phase;

[0016] Confirming the frequency of the mains power supply according to the zero-crossing point of the actual phase;

[0017] According to the frequency of the commercial power supply, a reference phase of the corresponding frequency is generated.

[0018] In one embodiment, the step of confirming the input state of the mains power supply according to the phase difference between the actual phase and the reference phase specifically includes:

[0019] comparing the actual phase with the reference phase to confirm a phase difference between the actual phase and the reference phase;

[0020] Under the condition that the phase difference is less than a preset phase difference, confirming that the mains power supply is in a normal state;

[0021] Under the condition that the phase difference is greater than the preset phase difference, it is confirmed that the mains power supply is in an abnormal state.

[0022] In one embodiment, under the condition that the phase difference is greater than a preset phase difference, the step of confirming that the mains power supply is in an abnormal state specifically further includes:

[0023] Under the condition that the phase difference is greater than the preset phase difference, accumulating the number of times that the mains power supply is in an abnormal state;

[0024] Under the condition that the number of times that the mains power supply is in an abnormal state is cumulatively greater than a preset number, it is confirmed that the mains power supply is in a power-off state.

[0025] In one embodiment, the steps under the condition that the voltage and phase of the mains power supply are consistent with the output voltage and phase of the backup power supply specifically include:

[0026] Accumulating the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply;

[0027] Under the condition that the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply is greater than a preset number of synchronizations, it is confirmed that the voltage and phase of the mains power supply are consistent with the output voltage and phase of the backup power supply.

[0028] In one embodiment, after the step of accumulating the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply, the method further comprises:

[0029] Under the condition that the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply is less than the preset number of synchronizations, the voltage and phase of the mains power supply are not synchronized with the output voltage and phase of the backup power supply, and the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply is less than the preset number of synchronizations is cleared.

[0030] The present invention also proposes a control device, comprising: a memory, a processor, and a power switching program stored in the memory and executable on the processor, wherein the power switching program is configured to implement the steps of the power switching method as described in any one of the above items.

[0031] In one embodiment, the power switching system includes an access terminal of a mains power supply and a backup power supply, and the control device also includes a voltage detection circuit, a mains switch circuit, a backup power switch circuit, and a main control circuit;

[0032] Wherein, the voltage detection circuit is electrically connected to the access end of the mains power supply and the backup power supply respectively, and is used to detect the mains power supply and the backup power supply, and output a mains voltage detection signal and a backup power supply voltage detection signal;

[0033] The input end of the mains switch circuit is electrically connected to the access end of the mains power supply, the input end of the backup power switch circuit is electrically connected to the output end of the backup power supply, the mains switch circuit and the controlled end of the backup power switch circuit are electrically connected to the main control circuit respectively, and the output end of the mains switch circuit and the output end of the backup power switch circuit are electrically connected to the load;

[0034] The main control circuit is used to control the mains switch circuit and / or the backup power switch circuit to turn on or off the path between the mains power supply and / or the backup power supply and the load according to the mains voltage detection signal and the backup power supply voltage detection signal.

[0035] The present invention further provides a power switching system, which includes an access terminal for a mains power supply, a backup power supply, and the control device as described above.

[0036] The technical solution of the present invention detects the mains power supply and the backup power supply respectively by using a voltage detection circuit, thereby obtaining the corresponding voltage detection signal, and confirming whether the mains power supply is in a normal power supply state through the voltage detection signal. After confirming that the mains power supply is in a normal working state, the voltage and phase of the mains power supply and the backup power supply are further confirmed by the voltage detection signal. By adjusting the voltage and phase of the backup power supply, the output voltage and phase of the backup power supply are consistent with the mains power supply, thereby connecting the path between the mains power supply and the load, and disconnecting the path between the backup power supply and the load. It is understandable that if there is a large voltage difference between the output of the mains power supply and the backup power supply, it will cause arcing and sparking at the moment when the switch contacts are separated. Therefore, the present invention avoids the phenomenon of arcing and sparking by adjusting the output of the backup power supply and the mains power supply to a consistent level, effectively improving the service life of the switch device, and thus improving the stability of the power switching system. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0038] Figure 1 is a flow chart of a power switching method of the present invention;

[0039] Figure 2 A schematic diagram of a flow chart of an embodiment of a power switching method of the present invention;

[0040] Figure 3 A schematic diagram of a module of another embodiment of the power switching method of the present invention;

[0041] Figure 4 It is a structural schematic diagram of another embodiment of the power switching method of the present invention;

[0042] Figure 5 A schematic diagram of a flow chart of another embodiment of a power switching method of the present invention;

[0043] Figure 6 It is a structural schematic diagram of an embodiment of a control device of the present invention.

[0044] Description of Figure Numbers:

[0045] 10. Main control circuit; 20. Voltage detection circuit; 30. AC power switch circuit; 40. Backup power switch circuit.

[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0049] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0050] Many existing electronic devices and systems have very high requirements for power quality, especially those used in the fields of medical, communications, finance and data centers. These devices are extremely sensitive to the stability of the power supply, and any short power outage may cause data loss, equipment failure or even serious safety accidents. Therefore, fast switching to backup power can ensure that these devices can still operate normally when the mains power is lost.

[0051] In the prior art, usually, an energy storage device or an uninterruptible power supply or other backup power source is used to invert the output power to supply power to the load. After confirming that the mains power supply is normal, the bypass relay is disconnected and then the mains relay is closed, thereby switching from the backup power supply to the mains power supply. However, this switching method will cause arcing and ignition in both the mains relay and the bypass relay, reducing the service life of the relay.

[0052] Therefore, reference Figure 1 The present invention proposes a power switching method, which is applied to a power switching system. The power switching system includes an access terminal of a mains power supply, a backup power supply, and a control device. The control device includes a mains switch circuit, a backup power switch circuit, and a voltage detection circuit. The method includes:

[0053] Step S100: Under the condition that the backup power supply supplies power to the load, obtaining a voltage detection signal output by the voltage detection circuit corresponding to the mains power supply, and confirming the input state of the mains power supply;

[0054] Step S200: Under the condition that the input state is a normal state, confirming the voltage and phase of the mains power supply according to the voltage detection signal;

[0055] Step S300: adjusting the voltage and phase of the backup power supply according to the voltage and phase of the mains power supply;

[0056] Step S400: Under the condition that the voltage and phase of the AC power supply are consistent with the output voltage and phase of the backup power supply, the AC power switch circuit is controlled to turn on the path between the AC power supply and the load, and the backup power switch circuit is controlled to disconnect the path between the backup power supply and the load.

[0057] It is understandable that after the mains power failure detection confirms that the mains power supply is in a power failure state, the control device will control the backup power supply to supply power to the load to avoid data loss, equipment failure, etc. caused by power failure of the load. Among them, when the control device determines that the mains power supply is in a power failure state, the control device will immediately control the path between the backup power supply and the load. Further, the backup power supply needs to convert the DC power output by the inverter circuit into 220V AC power to replace the mains power supply to supply power to the load. Among them, the control device can confirm the voltage and phase of the mains power supply before the power failure through the voltage detection signal output by the voltage detection circuit, and then control the inverter circuit so that the backup power supply outputs 220V AC power that is basically consistent with the voltage and phase before the mains power supply is powered off. At this time, the backup power supply will temporarily supply power to the load.

[0058] In this embodiment, the backup power switch circuit in the control device is in the on state, while the mains power switch circuit is in the off state, that is, the backup power supply supplies power to the load. The mains power supply is continuously detected by the voltage detection circuit to confirm whether the mains power supply has restored the normal power supply state. Among them, the voltage detection circuit can be implemented by a high-voltage voltage-dividing detection circuit, a rectifier detection circuit, a Hall effect detection circuit, etc. In order to accurately detect the amplitude change of the mains power supply at each moment, and further obtain the phase change of the mains power supply. After the voltage detection signal outputs the corresponding voltage detection signal, it is also necessary to amplify and condition the voltage detection signal through an operational amplifier circuit, so that the main control circuit obtains the corresponding digital signal after analog-to-digital conversion of the input analog signal, thereby calculating the phase change of the mains power supply through Fourier transform or other algorithms. The main control circuit can confirm the voltage and phase of the mains power supply through the voltage detection signal, thereby confirming whether the mains power supply has restored the normal power supply state, and then executing the corresponding control action.

[0059] In this embodiment, in order to achieve the switching from the backup power supply to the mains power supply, the voltage of the connection contacts between the backup power supply switch circuit and the mains power switch circuit remains consistent, it is necessary to continuously detect the output state of the mains power supply, and correspondingly adjust the inverter circuit in the backup power supply to the input DC voltage. By controlling the inverter process of the inverter circuit, the DC voltage input to the inverter circuit is converted into a 220V AC of corresponding voltage and phase. For example, the control circuit can output a pulse width modulation signal to the switch device in the inverter circuit to adjust the amplitude and frequency of the output waveform by changing the proportion of the switch device conduction time, so that the voltage and phase of the backup power supply output are synchronized with the voltage and phase of the mains power supply output. Further, to ensure that the AC output of the inverter circuit meets the actual needs. A feedback control loop can also be set in the control device to monitor the output voltage and current in real time, and adjust the PWM waveform according to the set target value. Among them, the feedback control loop can be implemented by a proportional integral differential controller to eliminate steady-state errors and improve the dynamic response speed.

[0060] In this embodiment, the main control circuit detects the mains power supply and the backup power supply at the same time through the voltage detection circuit, thereby obtaining voltage detection signals of the two, and confirms the voltage relationship and phase relationship between the two according to the voltage detection signals. When it is confirmed that the voltage and phase of the mains power supply are consistent with the voltage and phase of the backup power supply, the main control circuit will first control the mains switch circuit to conduct the path between the mains power supply and the load, and then control the backup power switch circuit to disconnect the path between the backup power supply and the load, so that the mains power supply supplies power to the load. It can be understood that during this period, there is a period of time when the mains switch circuit and the backup power circuit are simultaneously turned on, but because the mains power clamps the backup power supply, the load can only receive power from the mains power supply.

[0061] Optionally, the control device may also be provided with a switch circuit between the mains power supply and the backup power supply, so that the mains power supply can charge the backup battery while supplying power to the load.

[0062] In this embodiment, the mains power supply and the backup power supply are respectively detected by using a voltage detection circuit, so as to obtain the corresponding voltage detection signal, and confirm whether the mains power supply is in a normal power supply state through the voltage detection signal. After confirming that the mains power supply is in a normal working state, the voltage and phase of the mains power supply and the backup power supply are further confirmed through the voltage detection signal. By adjusting the voltage and phase of the backup power supply, the output voltage and phase of the backup power supply are consistent with the mains power supply, thereby connecting the path between the mains power supply and the load, and disconnecting the path between the backup power supply and the load. It can be understood that if there is a large voltage difference between the output of the mains power supply and the backup power supply, it will cause the phenomenon of arcing and sparking at the moment when the switch contacts are separated. Therefore, the present invention avoids the phenomenon of arcing and sparking by adjusting the output of the backup power supply and the mains power supply to a consistent level, effectively improving the service life of the switching device, and thus improving the stability of the power switching system.

[0063] refer to Figure 2 In one embodiment of the present invention, the step of obtaining the voltage detection signal output by the voltage detection circuit corresponding to the mains power supply and confirming the input state of the mains power supply is specifically as follows:

[0064] Step S110: obtaining a voltage detection signal outputted by a voltage detection circuit corresponding to the mains power supply, and confirming an actual phase of the mains power supply according to the voltage detection signal;

[0065] Step S120: confirming the zero-crossing point of the actual phase based on the voltage detection signal, and generating a corresponding reference phase;

[0066] Step S130: confirming the input state of the AC power supply according to the phase difference between the actual phase and the reference phase.

[0067] In the present embodiment, in order to obtain the actual phase of the mains power supply, it is also possible to adopt an embedded method to set a mains phase-locked loop in a main control circuit such as an MCU. The mains power supply is sampled by a voltage detection circuit, and the analog-to-digital conversion in the main control circuit is performed to obtain a discrete voltage value, and then the waveform of the mains power supply is obtained. Among them, the mains phase-locked loop can track the input voltage detection signal, and the output signal can be kept synchronized with the mains even when the mains frequency fluctuates. When the mains power supply is working normally, the phase of the mains phase-locked loop output is consistent with the phase of the mains power supply; if the mains power supply is powered off, the output of the mains phase-locked loop will become unstable because it loses the synchronization reference. In other words, the mains phase-locked loop will still output a waveform signal of a fixed frequency and phase after the mains power is powered off, but it will not be synchronized with the normal mains.

[0068] Further, refer to Figure 3 The step of confirming the zero-crossing point of the actual phase based on the voltage detection signal and generating the corresponding reference phase specifically includes:

[0069] Step S121: confirming the zero-crossing point of the actual phase based on the voltage detection signal;

[0070] Step S122: confirming the frequency of the mains power supply according to the zero-crossing point of the actual phase;

[0071] Step S123: Generate a reference phase of the corresponding frequency according to the frequency of the mains power supply.

[0072] It is understandable that the voltage detection signal can also confirm that the mains voltage waveform passes through the zero point, that is, the node where the voltage value changes from positive to negative or from negative to positive, and then accurately obtain the phase and frequency of the mains. Among them, by detecting the time interval between two consecutive zero crossings, the frequency of the mains power supply can be calculated. After confirming the zero crossing point of the actual phase of the mains power supply, the corresponding reference phase can be generated by the virtual phase generation module. Among them, the virtual phase generation module is a built-in program in the main control circuit. The reference phase corresponds to the actual phase of the mains power supply when the mains power supply is normal. By confirming the zero crossing point, even in the absence of the mains power supply, the main control circuit can still obtain a reference phase corresponding to the actual phase when the mains power supply is normal, so as to facilitate the subsequent judgment of the mains power supply. Further, the output phase of the mains phase-locked loop and the output phase of the virtual phase generation module are synchronized when the mains power is normal, and will be different when the mains power is off, that is, the actual phase and the virtual phase are synchronized when the mains power is normal, and both generate the same number of waveform signals.

[0073] In this embodiment, when the mains power supply is powered normally, its phase is continuous and stable; and when the mains power supply is powered off, its phase will suddenly change or become unstable. It is understandable that the mains power supply is a continuous sine wave, and its phase changes continuously. For example, for a 50Hz mains power supply, there will be 50 complete sine wave cycles per second, and the phase of each cycle is from 0 to 2π and then back to 0. And when the mains power supply is powered normally, the phase of the mains power supply is stable and there will be no sudden jump. When the mains power supply is powered off, the voltage waveform will suddenly interrupt, resulting in a sudden change in phase. For example, if the mains power suddenly disappears at a certain moment, the phase will instantly change from a normal value to an uncertain value. After the mains power supply is powered off, the main control circuit continues to run the virtual phase generator, and a phase difference will appear between the actual phase and the reference phase, which can be detected by the phase comparison module. Among them, the phase comparison module is also a built-in program in the main control circuit. Therefore, the main control circuit can confirm the output state of the mains power supply by the phase difference between the actual phase and the reference phase.

[0074] In the present embodiment, the mains power supply is detected by using a voltage detection circuit to confirm the actual phase of the mains power supply. In addition, the zero crossing point of the actual phase of the mains power supply is confirmed by the voltage detection signal output by the voltage detection circuit, and the corresponding reference phase is generated according to the zero crossing point of the actual phase. When the output of the mains power supply is normal, the phase difference between the actual phase and the reference phase is within the preset phase difference; when the output of the mains power supply is powered off, the phase difference between the actual phase and the reference phase is greater than the preset phase difference and lasts for a certain period of time. Therefore, by the phase difference and duration between the actual phase and the reference phase, it is possible to quickly and accurately determine whether the mains power supply is in a power-off state, so as to facilitate the control device to quickly and accurately switch the power supply of the load.

[0075] refer to Figure 4 In one embodiment of the present invention, the step of confirming the input state of the mains power supply according to the phase difference between the actual phase and the reference phase specifically includes:

[0076] Step S131: comparing the actual phase with the reference phase to confirm the phase difference between the actual phase and the reference phase;

[0077] Step S132: under the condition that the phase difference is less than a preset phase difference, confirming that the mains power supply is in a normal state;

[0078] Step S133: Under the condition that the phase difference is greater than a preset phase difference, confirming that the mains power supply is in an abnormal state.

[0079] In this embodiment, by setting a program of phase comparison function in the main control circuit, the actual phase obtained is compared with the reference phase to obtain the phase difference between the two. Among them, in order to confirm the output state of the mains power supply, a preset phase difference needs to be set as a judgment standard, and the preset phase difference is set by the R&D personnel according to the corresponding equipment requirements. It can be understood that the smaller the preset phase difference is set, the higher the sensitivity of its detection is, but the probability of misjudgment is correspondingly increased; and the larger the preset phase difference is set, the lower the detection sensitivity is, but the probability of misjudgment is correspondingly reduced. Therefore, the setting of the preset phase difference needs to balance the relationship between sensitivity and probability of misjudgment. For example, in this embodiment, the preset phase difference is 3 degrees, that is, when the phase difference between the actual phase and the reference phase is less than 3 degrees, it is confirmed that the mains power supply is in a normal state; and when the phase difference between the actual phase and the reference phase is greater than 3 degrees, it will be confirmed that the mains power supply is in an abnormal state.

[0080] In an embodiment of the present invention, the step of confirming that the mains power supply is in an abnormal state under the condition that the phase difference is greater than a preset phase difference specifically further includes:

[0081] Under the condition that the phase difference is greater than the preset phase difference, accumulating the number of times that the mains power supply is in an abnormal state;

[0082] Under the condition that the number of times that the mains power supply is in an abnormal state is cumulatively greater than a preset number, it is confirmed that the mains power supply is in a power-off state.

[0083] It is understandable that there may be short-term fluctuations in the mains power supply, but these fluctuations usually do not affect the power supply quality. Such short-term fluctuations are called "transient events" or "short-term disturbances", which are common phenomena in power systems. Therefore, it is necessary to avoid misjudging such phenomena as power failures in the mains power failure detection. From the above content, it can be seen that by building a mains phase-locked loop related program in the main control circuit, the mains signal can be tracked, and the output signal can be kept synchronized with the mains even when the mains frequency fluctuates, so as to accurately extract the phase information of the mains. By building a virtual phase generation module related program in the main control circuit, a virtual reference phase can be generated based on the zero-crossing point detection of the mains power supply. This reference phase matches the actual phase of the mains power supply when the mains power is normal; after the mains power is lost, the last known correct phase continues to be provided as a reference, and even in the absence of the mains power, the main control circuit can still obtain a relatively stable phase reference. When the mains is working normally, the phase of the mains phase-locked loop output is consistent with the mains phase; if the mains is in a power-off state, the phase of the mains phase-locked loop output will become unstable because the synchronization reference is lost. Further, when the mains is in a power-off state, the mains phase-locked loop will continue to output an unstable phase, while the virtual phase generation module will keep the last phase value before the mains power is off. Among them, the phase difference between the unstable phase output of the mains phase-locked loop and the last phase value before the mains power is off maintained by the virtual phase generation module will be greater than the preset phase difference, and the main control circuit will accumulate the number of times the phase difference is greater than the preset phase difference. When the number of times the mains power supply is in an abnormal state is greater than the preset number, the main control circuit will confirm that the mains power supply is in a power-off state. Among them, the preset number can be set according to the sensitivity requirements of different devices. It should be noted that if the preset number is too low, the probability of misjudgment may increase. By adding the preset number, the misjudgment problem caused by short-term changes caused by fluctuations in the mains power supply can be avoided.

[0084] Furthermore, after the step of accumulating the number of times the mains power supply is in an abnormal state under the condition that the phase difference is greater than the preset phase difference, the method further includes:

[0085] Under the condition that the phase difference is smaller than the preset phase difference and the cumulative number of times that the mains power supply is in an abnormal state is smaller than the preset number of times, the number of times that the mains power supply is in an abnormal state is reset to zero.

[0086] In this embodiment, the AC power supply may fluctuate, causing the phase difference between the actual phase output by the AC phase-locked loop and the reference phase output by the virtual phase generation module to be greater than the preset phase difference, but the duration of this fluctuation is short. Therefore, under the condition that the phase difference is greater than the preset phase difference, after the number of times the AC power supply is in an abnormal state is accumulated, and when the preset number is not reached, there is a phase difference less than the preset phase difference, it can be confirmed that the AC power supply fluctuates, and then the number of times the AC power supply is in an abnormal state is reset to zero, avoiding the number of times reaching the preset number due to the next power fluctuation. It can be understood that the accuracy of the main control circuit's detection of AC power failure can be further guaranteed by setting the number of times to be reset.

[0087] refer to Figure 5 In one embodiment of the present invention, the steps under the condition that the voltage and phase of the mains power supply are consistent with the output voltage and phase of the backup power supply specifically include:

[0088] Step S410: accumulating the number of times that the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply;

[0089] Step S420: confirming that the voltage and phase of the mains power supply are consistent with the output voltage and phase of the backup power supply under the condition that the number of synchronizations between the voltage and phase of the mains power supply and the output voltage and phase of the backup power supply is greater than a preset number of synchronizations.

[0090] In this embodiment, the mains power supply may have short-term fluctuations, but these fluctuations usually do not affect the power supply quality. Such short-term fluctuations are called "transient events" or "short-term disturbances", which are common phenomena in power systems. Therefore, when adjusting the voltage and phase of the backup power supply output, it is necessary to confirm that the mains power supply is in a stable state to avoid the voltage and phase adjustment errors of the backup power supply output. After the main control circuit adjusts and controls the output of the inverter circuit in the backup power supply, the output of the mains power supply and the output of the backup power supply are detected by the voltage detection circuit to confirm whether the voltage and phase of the mains power supply are synchronized with the voltage and phase of the backup power supply. By setting a corresponding counter in the main control circuit and setting a corresponding preset synchronization number. When the number accumulated by the counter is greater than the preset synchronization number, it can be confirmed that the mains power supply is in a stable state and the voltage and phase debugging of the backup power supply output are completed. Among them, the setting of the preset synchronization number will affect the confirmation of the mains power supply state and the backup power supply debugging state. Therefore, the setting of the preset synchronization number should be set to a corresponding value to ensure the consistency of the voltage and phase output of the mains power supply and the voltage and phase output of the backup power supply.

[0091] Furthermore, after the step of accumulating the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply, the method further includes:

[0092] Step S430: Under the condition that the number of times the voltage and phase of the AC power supply are synchronized with the output voltage and phase of the backup power supply is less than the preset synchronization number, the voltage and phase of the AC power supply are not synchronized with the output voltage and phase of the backup power supply, and the number of times the voltage and phase of the AC power supply are synchronized with the output voltage and phase of the backup power supply is less than the preset synchronization number is cleared.

[0093] In this embodiment, the mains power supply may fluctuate, causing the voltage and phase of the mains power supply to be out of sync with the output voltage and phase of the backup power supply. Therefore, under the condition that the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply is less than the preset number of synchronizations, and the voltage and phase of the mains power supply are out of sync with the output voltage and phase of the backup power supply due to the fluctuation of the mains power supply, it is necessary to reset the accumulated number of times to further ensure the consistency of the voltage and phase output by the mains power supply and the voltage and phase output by the backup power supply.

[0094] The present invention further proposes a control device, the control device comprising: a memory, a processor, and a power switching program stored in the memory and executable on the processor, the power switching program being configured to implement the steps of any of the power switching methods described above. It is worth noting that since the control device of the present invention is based on the above-mentioned power switching method, the embodiments of the control device of the present invention include all technical solutions of all embodiments of the above-mentioned power switching method, and the technical effects achieved are also exactly the same, which will not be repeated here.

[0095] refer to Figure 6 In one embodiment of the present invention, the power switching system includes an access terminal of a mains power supply and a backup power supply, and the control device also includes a voltage detection circuit 20, a mains switch circuit 30, a backup power switch circuit 40, and a main control circuit 10;

[0096] The voltage detection circuit 20 is electrically connected to the access end of the mains power supply and the backup power supply, respectively, for detecting the mains power supply and the backup power supply, and outputting a mains voltage detection signal and a backup power supply voltage detection signal;

[0097] The input end of the mains switch circuit 30 is electrically connected to the access end of the mains power supply, the input end of the backup power switch circuit 40 is electrically connected to the output end of the backup power supply, the controlled ends of the mains switch circuit 30 and the backup power switch circuit 40 are electrically connected to the main control circuit 10 respectively, and the output end of the mains switch circuit 30 and the output end of the backup power switch circuit 40 are electrically connected to the load;

[0098] The main control circuit 10 is used to control the mains switch circuit 30 and / or the backup power switch circuit 40 to turn on or off the path between the mains power supply and / or the backup power supply and the load according to the mains voltage detection signal and the backup power supply voltage detection signal.

[0099] In the present embodiment, the voltage detection circuit 20 can be implemented by a high voltage voltage divider detection circuit, a rectifier detection circuit, a Hall effect detection circuit, etc. The mains switch circuit 30 and the backup power switch circuit 40 can both be implemented by relays. The main control circuit 10 can be implemented by a main controller, such as SOC (System On Chip), MCU (Microcontroller Unit), DSP (Digital Signal Process), FPGA (Field Programmable Gate Array), etc. The main control circuit 10 can process the input voltage monitoring signal through the programs corresponding to the built-in mains tracking module and the mains synchronization determination module, and then determine the state of the mains power supply at this time. When the AC power supply is in a normal state, the main control circuit 10 will control the AC power switch circuit 30 to turn on the path between the AC power supply and the load, and control the backup power switch circuit 40 to disconnect the path between the backup power supply and the load, so as to achieve switching to the AC power supply when the AC power supply returns to normal, and adjust the output of the backup power supply and the AC power supply to a consistent level, thereby avoiding arcing and ignition, and effectively improving the service life of the switching device.

[0100] The present invention also proposes a power switching system, which includes an access terminal for a mains power supply, a backup power supply, and a control device as described in any one of the above. It is worth noting that since the power switching system of the present invention is based on the above control device, the embodiments of the power switching system of the present invention include all technical solutions of all embodiments of the above control device, and the technical effects achieved are also exactly the same, which will not be repeated here.

[0101] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.

Claims

1. A power switching method, applied to a power switching system, characterized in that: The power switching system includes an access terminal of a mains power supply, a backup power supply, and a control device, wherein the control device includes a mains switch circuit, a backup power switch circuit, and a voltage detection circuit, and the method includes: Under the condition that the backup power supply supplies power to the load, obtaining a voltage detection signal output by the voltage detection circuit corresponding to the mains power supply, and confirming the input state of the mains power supply; Under the condition that the input state is a normal state, confirming the voltage and phase of the mains power supply according to the voltage detection signal; According to the voltage and phase of the mains power supply, adjusting the voltage and phase of the backup power supply; Under the condition that the voltage and phase of the AC power supply are consistent with the output voltage and phase of the backup power supply, the AC power switch circuit is controlled to connect the path between the AC power supply and the load, and the backup power switch circuit is controlled to disconnect the path between the backup power supply and the load.

2. The method according to claim 1, characterized in that The step of obtaining the voltage detection signal output by the voltage detection circuit corresponding to the mains power supply and confirming the input state of the mains power supply is specifically as follows: Obtaining a voltage detection signal outputted by a voltage detection circuit corresponding to the mains power supply, and confirming an actual phase of the mains power supply according to the voltage detection signal; Based on the voltage detection signal, confirm the zero crossing point of the actual phase and generate a corresponding reference phase; The input state of the commercial power supply is confirmed according to the phase difference between the actual phase and the reference phase.

3. The method according to claim 2, characterized in that The step of confirming the zero-crossing point of the actual phase based on the voltage detection signal and generating the corresponding reference phase specifically includes: Based on the voltage detection signal, confirming the zero crossing point of the actual phase; Confirming the frequency of the mains power supply according to the zero-crossing point of the actual phase; According to the frequency of the commercial power supply, a reference phase of the corresponding frequency is generated.

4. The method according to any one of claims 2 to 3, characterized in that: The step of confirming the input state of the mains power supply according to the phase difference between the actual phase and the reference phase specifically includes: comparing the actual phase with the reference phase to confirm a phase difference between the actual phase and the reference phase; Under the condition that the phase difference is less than a preset phase difference, confirming that the mains power supply is in a normal state; Under the condition that the phase difference is greater than the preset phase difference, it is confirmed that the mains power supply is in an abnormal state.

5. The method according to claim 4, characterized in that The step of confirming that the mains power supply is in an abnormal state under the condition that the phase difference is greater than the preset phase difference specifically includes: Under the condition that the phase difference is greater than the preset phase difference, accumulating the number of times that the mains power supply is in an abnormal state; Under the condition that the number of times that the mains power supply is in an abnormal state is cumulatively greater than a preset number, it is confirmed that the mains power supply is in a power-off state.

6. The method according to claim 1, characterized in that The steps under the condition that the voltage and phase of the mains power supply are consistent with the output voltage and phase of the backup power supply specifically include: Accumulating the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply; Under the condition that the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply is greater than a preset number of synchronizations, it is confirmed that the voltage and phase of the mains power supply are consistent with the output voltage and phase of the backup power supply.

7. The method according to claim 6, characterized in that After the step of accumulating the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply, the method further comprises: Under the condition that the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply is less than the preset number of synchronizations, the voltage and phase of the mains power supply are not synchronized with the output voltage and phase of the backup power supply, and the number of times the voltage and phase of the mains power supply are synchronized with the output voltage and phase of the backup power supply is less than the preset number of synchronizations is cleared.

8. A control device, characterized in that: The control device includes: a memory, a processor, and a power switching program stored in the memory and executable on the processor, wherein the power switching program is configured to implement the steps of the power switching method according to any one of claims 1 to 7.

9. The control device according to claim 8, applied to a power switching system, characterized in that: The power switching system includes an access terminal of a mains power supply and a backup power supply, and the control device also includes a voltage detection circuit, a mains switch circuit, a backup power switch circuit, and a main control circuit; Wherein, the voltage detection circuit is electrically connected to the access end of the mains power supply and the backup power supply respectively, and is used to detect the mains power supply and the backup power supply, and output a mains voltage detection signal and a backup power supply voltage detection signal; The input end of the mains switch circuit is electrically connected to the access end of the mains power supply, the input end of the backup power switch circuit is electrically connected to the output end of the backup power supply, the mains switch circuit and the controlled end of the backup power switch circuit are electrically connected to the main control circuit respectively, and the output end of the mains switch circuit and the output end of the backup power switch circuit are electrically connected to the load; The main control circuit is used to control the mains switch circuit and / or the backup power switch circuit to turn on or off the path between the mains power supply and / or the backup power supply and the load according to the mains voltage detection signal and the backup power supply voltage detection signal.

10. A power switching system, characterized in that: The power switching system comprises an access terminal for a mains power supply, a backup power supply and a control device as claimed in claim 9.