A static transfer switch control method, system, device and medium
By collecting and analyzing power supply information, and combining voltage and frequency threshold judgments, the target operating state of the static switching switch is determined, which solves the problem of malfunction caused by single voltage threshold detection in the existing technology and improves the stability and reliability of the power supply system.
Patent Information
- Application Number
- CN202611684657.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-29
- Publication Date
- 2026-11-27
AI Technical Summary
Existing static switching control methods rely on voltage threshold detection, resulting in simple switching logic, which is prone to malfunctions, affects the stability of load power supply, and lacks recording and traceability of switch status.
The system collects voltage information from the first and second power supplies, combines this information with voltage and frequency threshold ranges to generate power supply judgment information, obtains the current operating status of the static switching switch, determines the target operating status based on the availability flag and the current status, and generates the target operating command.
It reduces malfunctions caused by fluctuations in a single parameter, improves the certainty of switching decisions and the reliability of system operation, and reduces the risk of power outages.
Smart Images

Figure CN123184297A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power switching technology, and in particular to a static switching switch control method, system, device and medium. Background Technology
[0002] Static switching switches (STSs) are used in dual-power supply systems to quickly switch to a backup power source when the primary power source fails, ensuring continuous power supply to the load. Existing STS control methods typically use voltage threshold detection to trigger the switching; that is, when the current power supply voltage is detected to be lower than a preset threshold, the current power source is immediately disconnected and the other power source is connected.
[0003] However, this threshold-triggered open-loop control method has the following shortcomings. On the one hand, the control decision relies solely on the instantaneous detection result of the power supply voltage, without considering the current operating state of the static switching switch. This results in a simplistic switching logic, which is prone to malfunctions, such as repeatedly triggering the switching command before the switching is completed, or outputting the turn-on command when the switch is already in the off state, causing system state disorder. On the other hand, due to the lack of recording and tracing of the switch state, unnecessary switching is easily triggered when the power supply voltage fluctuates briefly, affecting the stability of the load power supply. Summary of the Invention
[0004] This application aims to improve at least one technical problem in the background art.
[0005] This application provides a static switching control method, which includes: Collect voltage information from the first power source and the second power source to obtain first voltage information and second voltage information; Based on the preset voltage threshold range and frequency threshold range, the first voltage information and the second voltage information are judged respectively to obtain the first power supply judgment information and the second power supply judgment information. The first power supply judgment information and the second power supply judgment information are analyzed to obtain the first power supply availability flag and the second power supply availability flag; Obtain the current operating status of the static switching switch, and determine the target operating status based on the first power availability flag, the second power availability flag, and the current operating status; Based on the target operating state, generate the target operating instructions for the static switching switch.
[0006] According to some technical solutions of this application, the step of judging the first voltage information and the second voltage information according to the preset voltage threshold range and frequency threshold range respectively to obtain the first power supply judgment information and the second power supply judgment information specifically includes: The first voltage amplitude and the first frequency are extracted from the first voltage information, and the second voltage amplitude and the second frequency are extracted from the second voltage information; The first voltage amplitude is compared with a preset voltage threshold range to obtain a first voltage comparison result; the first frequency is compared with a preset frequency threshold range to obtain a first frequency comparison result. The second voltage amplitude is compared with a preset voltage threshold range to obtain a second voltage comparison result; the second frequency is compared with a preset frequency threshold range to obtain a second frequency comparison result. Based on the first voltage comparison result and the first frequency comparison result, first power supply judgment information is generated, and based on the second voltage comparison result and the second frequency comparison result, second power supply judgment information is generated.
[0007] According to some technical solutions of this application, the step of obtaining a first power supply availability flag and a second power supply availability flag based on the first power supply judgment information and the second power supply judgment information specifically includes: When the first power supply determination information is that the first voltage amplitude is within the voltage threshold range and the first frequency is within the frequency threshold range, the first power supply availability flag is set to true; When the second power supply determination information indicates that the second voltage amplitude is within the voltage threshold range and the second frequency is within the frequency threshold range, the second power supply availability flag is set to true.
[0008] According to some technical solutions of this application, obtaining the current operating state of the static switching switch and determining the target operating state based on the first power availability flag, the second power availability flag, and the current operating state specifically includes: Obtain the current operating state of the static switching switch, wherein the current operating state includes one of the following: disconnected state, first power-on state, second power-on state, switching transition state, and fault state; If neither the first power supply available flag nor the second power supply available flag is true, the disconnected state will be determined as the target working state. If the current working state is the first power-on state, and the first power availability flag is false and the second power availability flag is true, obtain the switching start time and determine the switching transition state as the target working state; If the current working state is the second power supply on state, and the second power supply available flag is false and the first power supply available flag is true, obtain the switching start time and determine the switching transition state as the target working state; If the current working state is a switching transition state, obtain the current time and the switching start time and calculate their time difference, and compare the time difference with the preset switching time threshold to obtain the comparison result; The switching result is verified based on the comparison results. If the verification is successful, the target power-on state is determined as the target working state. If the verification fails, the fault state is determined as the target working state. If the current working state is disconnected or faulty, the target working state is determined by the available high-priority power supply based on the preset power priority and the first power supply availability flag and the second power supply availability flag.
[0009] According to some technical solutions of this application, the step of verifying the switching result based on the comparison result specifically includes: When the comparison result shows that the time difference exceeds the preset switching time threshold, the output voltage of the switching power supply is obtained and it is determined whether it is within the rated range. If so, then the verification result is successful; If not, the verification fails.
[0010] According to some technical solutions of this application, the step of collecting voltage information of the first power supply and the second power supply to obtain first voltage information and second voltage information specifically includes: The voltage analog signals of the first power supply and the second power supply are collected at a preset sampling frequency to obtain the first voltage sampling data and the second voltage sampling data. The first voltage sampling data and the second voltage sampling data are respectively converted from analog to digital to obtain the first voltage information and the second voltage information.
[0011] According to some technical solutions of this application, after generating the target operating instruction for the static switching switch based on the target operating state, the method further includes: The target operating command is converted to obtain the drive level signal; The static switch is controlled to perform on, off, or switching actions based on the drive level signal.
[0012] This application also provides a static switching control system, which includes: The acquisition module is used to acquire voltage information from the first power supply and the second power supply to obtain first voltage information and second voltage information. The judgment module is used to judge the first voltage information and the second voltage information according to the preset voltage threshold range and frequency threshold range, respectively, so as to obtain the first power supply judgment information and the second power supply judgment information. The analysis module is used to analyze the first power supply judgment information and the second power supply judgment information to obtain the first power supply availability flag and the second power supply availability flag. The determination module is used to obtain the current operating state of the static switching switch and determine the target operating state based on the first power availability flag, the second power availability flag and the current operating state. The generation module is used to generate target operating instructions for static switching switches based on the target operating state.
[0013] This application also provides a static switching switch control device, the static switching switch control device comprising: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the static switching control device to perform the various steps of the static switching control method as described above.
[0014] This application also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the various steps of the static switching control method described above.
[0015] The static switching switch control method provided in this application has at least the following beneficial effects: by collecting voltage, generating judgment information, generating an availability flag, determining the target state in combination with the current state, and generating instructions, the static switching switch control is transformed from threshold triggering to state-driven mode, which helps to reduce malfunctions and state disorder caused by lack of state information, and can improve the certainty of switching decisions and the reliability of system operation. Attached Figure Description
[0016] Figure 1 A flowchart illustrating the static switching control method provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of the static switching control system provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of a static switching control device provided in an embodiment of this application. Detailed Implementation
[0017] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0018] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation or be constructed or operated in a specific orientation. Therefore, they should not be construed as limiting the present invention.
[0019] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0020] The following is combined Figures 1 to 3 Embodiments of the present invention will be described.
[0021] This application provides a static switching switch control method. In this embodiment, the static switching switch is a switching device used to switch the load power supply between two power sources. Its switching device can be a thyristor, IGBT, or other controllable electronic switch. The first power source is the power source currently used as the primary power source, and the second power source is the other power source used as a backup power source; their roles can be interchanged according to priority configuration. Voltage information is digital information obtained after sampling, analog-to-digital conversion, and parameter extraction of the power supply voltage analog signal, including at least voltage amplitude and frequency, and phase if necessary. Voltage threshold range and frequency threshold range are the allowable boundaries for determining whether the power source is usable. First power source judgment information and second power source judgment information are Boolean or enumerated results obtained after judging whether the voltage amplitude and frequency of the first and second power sources are simultaneously qualified. First power source availability flag and second power source availability flag are flags indicating whether the first and second power sources can be connected and used, such as logical true or false or numerical values 1 or 0. The current operating state is the current state machine state of the static switching switch, including one of the following: disconnected state, first power source on state, second power source on state, switching transition state, and fault state. The target operating state is the next state determined according to the available flags and the current operating state, following state transition rules. The target operating state is a command or command sequence used to control the switching device to perform on, off, or switching actions. This application includes the following steps: S100: Collect voltage information from the first power supply and the second power supply to obtain first voltage information and second voltage information.
[0022] In this step, analog voltage signals from the first and second power supplies are acquired at a sampling frequency of 10kHz. After analog-to-digital conversion, digitized first and second voltage information are obtained, which includes voltage amplitude, frequency, and phase parameters. The first power supply is the power source for the first circuit, and the second power supply is the power source for the second circuit or a backup generator. For example, the first voltage information has an amplitude of 221V and a frequency of 50.1Hz, and the second voltage information has an amplitude of 205V and a frequency of 49.8Hz.
[0023] S200, according to the preset voltage threshold range and frequency threshold range, the first voltage information and the second voltage information are judged respectively to obtain the first power supply judgment information and the second power supply judgment information. The frequency threshold range can be 50Hz ± 0.5Hz, and the voltage threshold range can be ± 10% of the rated voltage of 220V, i.e., 198V-242V. The first voltage information and the second voltage information are judged respectively. The amplitude and frequency of the first voltage information are extracted, and it is determined whether they fall within the voltage threshold range and the frequency threshold range at the same time. If they do, the judgment information of "first power supply is normal" is generated; otherwise, the judgment information of "first power supply is abnormal" is generated. Similarly, the second power supply is processed to obtain the judgment information of the second power supply.
[0024] S300: Analyze the first power supply judgment information and the second power supply judgment information to obtain the first power supply availability flag and the second power supply availability flag.
[0025] For example, when the first power supply judgment information indicates that the first voltage amplitude is within the voltage threshold range and the first frequency is within the frequency threshold range, the first power supply availability flag is set to true, for example, a_available equals 1; when the second power supply judgment information indicates that the second voltage amplitude is within the voltage threshold range and the second frequency is within the frequency threshold range, the second power supply availability flag is set to true, for example, b_available equals 1. If a voltage drops to 150V, the corresponding availability flag is set to false.
[0026] S400: Obtain the current operating status of the static switching switch, and determine the target operating status based on the first power supply availability flag, the second power supply availability flag, and the current operating status.
[0027] For example, the state variable `current_state` is read. If the initial power-on state is STS_OFF, and the first power availability flag is 1, the second power availability flag is 1, and the power priority is configured as first power priority, then the first power-on state STS_SOURCE_A is determined as the target operating state. If the current state is STS_SOURCE_A, and `a_available` equals 0 and `b_available` equals 1, then the switching start time is recorded, and the switching transition state STS_TRANSITION is determined as the target operating state. If both availability flags are false, then the STS_OFF state is determined as the target operating state.
[0028] S500: Based on the target operating state, generate the target operating instructions for the static switching switch. For example, if the target operating state is the first power-on state, generate the instruction sequence CONTROL_CONNECT_A for "connecting the first power supply and disconnecting the second power supply"; if the target operating state is a transitional state and needs to switch from the first power supply to the second power supply, generate the instruction sequence CONTROL_INITIATE_TRANSFER_AB for "disconnecting the first power supply and connecting the second power supply"; if the target operating state is the off state, generate the full disconnect instruction CONTROL_DISCONNECT_ALL; if there is no switching trigger condition, generate the instruction CONTROL_HOLD_CURRENT to maintain the current state.
[0029] In some embodiments, step S200 involves judging the first voltage information and the second voltage information according to a preset voltage threshold range and a frequency threshold range, respectively, to obtain first power supply judgment information and second power supply judgment information, specifically including: In this embodiment, the first voltage amplitude is a value representing the magnitude of the first power supply voltage extracted from the first voltage information; the first frequency is a value representing the frequency of the first power supply voltage extracted from the first voltage information; the second voltage amplitude and the second frequency are similarly derived. The voltage comparison result is a pass / fail result obtained by comparing the voltage amplitude with a voltage threshold range; the frequency comparison result is a pass / fail result obtained by comparing the frequency with a frequency threshold range. The first power supply judgment information is a judgment result generated by combining the first voltage comparison result and the first frequency comparison result; the second power supply judgment information is similarly derived.
[0030] S210, extract the first voltage amplitude and the first frequency from the first voltage information, and extract the second voltage amplitude and the second frequency from the second voltage information; extract the first voltage amplitude and the first frequency from the first voltage information, for example, the first voltage amplitude is 221V and the first frequency is 50.1Hz, and extract the second voltage amplitude and the second frequency from the second voltage information, for example, the second voltage amplitude is 205V and the second frequency is 49.8Hz.
[0031] S220, compare the first voltage amplitude with a preset voltage threshold range to obtain a first voltage comparison result; compare the first frequency with a preset frequency threshold range to obtain a first frequency comparison result; For example, the first voltage amplitude of 221V is compared with a preset voltage threshold range of 198V-242V. Since 221V is within this range, the first voltage comparison result is "qualified"; the first frequency of 50.1Hz is compared with a preset frequency threshold range of 49.5Hz-50.5Hz. Since 50.1Hz is within this range, the first frequency comparison result is "qualified".
[0032] S230, compare the second voltage amplitude with a preset voltage threshold range to obtain a second voltage comparison result; compare the second frequency with a preset frequency threshold range to obtain a second frequency comparison result.
[0033] Similarly, comparing the second voltage amplitude of 205V with the voltage threshold range of 198V-242V, 205V falls within the range, so the second voltage comparison result is "qualified"; comparing the second frequency of 49.8Hz with the frequency threshold range of 49.5Hz-50.5Hz, 49.8Hz falls within the range, so the second frequency comparison result is "qualified". S240: Based on the first voltage comparison result and the first frequency comparison result, generate first power supply judgment information, and based on the second voltage comparison result and the second frequency comparison result, generate second power supply judgment information.
[0034] Based on the first voltage comparison result and the first frequency comparison result, if both are qualified, the first power supply judgment information is generated as "first power supply normal". Based on the second voltage comparison result and the second frequency comparison result, if both are qualified, the second power supply judgment information is generated as "second power supply normal". If the voltage or frequency of a power supply exceeds the corresponding threshold range, the corresponding judgment information is "abnormal".
[0035] Therefore, this embodiment extracts the voltage amplitude and frequency separately, compares them with the preset threshold range item by item, and generates judgment information, which is beneficial for quantitatively evaluating power quality and helps to avoid misjudgment caused by a single parameter.
[0036] In some embodiments, step S300 involves analyzing the first power supply determination information and the second power supply determination information to obtain a first power supply availability flag and a second power supply availability flag; specifically including: In this embodiment, "set to true" means setting the availability flag to a logical true value, such as the Boolean value true or the numerical value 1; "set to false" means setting it to a logical false value, such as the Boolean value false or the numerical value 0. The first power supply availability flag and the second power supply availability flag respectively indicate whether the corresponding power supply meets the condition that both the voltage amplitude and frequency are simultaneously qualified.
[0037] S310, when the first power supply judgment information is that the first voltage amplitude is within the voltage threshold range and the first frequency is within the frequency threshold range, the first power supply available flag is set to true; For example, the first power supply determination information is read. In this embodiment, if the first power supply determination information indicates that the first voltage amplitude is within 198V to 242V and the first frequency is within 49.5Hz to 50.5Hz, then the first power supply availability flag is set to true, for example, a_available equals 1; otherwise, it is set to false, for example, a_available equals 0. For example, when the first power supply is 221V and 50.1Hz, a_available equals 1.
[0038] S320, when the second power supply determination information is that the second voltage amplitude is within the voltage threshold range and the second frequency is within the frequency threshold range, the second power supply availability flag is set to true.
[0039] For example, if the second voltage amplitude is within 198V-242V and the second frequency is within 49.5Hz-50.5Hz, then the second power supply availability flag is set to true, for example, b_available equals 1; otherwise, it is set to false. For example, when the second power supply is 205V and 49.8Hz, b_available equals 1; if the second power supply voltage drops to 150V, exceeding the 198V lower limit, then b_available equals 0. The two availability flags obtained thus serve as inputs for S400 to determine the target operating state.
[0040] In some embodiments, step S400 involves obtaining the current operating state of the static switching switch and determining a target operating state based on a first power availability flag, a second power availability flag, and the current operating state. Specifically, this includes: In this embodiment, the current operating state is a state variable in the state machine representing the current actual operating stage of the static switching switch, including the off state STS_OFF, the first power on state STS_SOURCE_A, the second power on state STS_SOURCE_B, the switching transition state STS_TRANSITION, and the fault state STS_FAULT. The switching start time is the system clock count value recorded when entering the switching transition state, used to calculate the switching duration. The switching time threshold is the maximum allowed switching time, for example, 1ms by default, which can be configured to 1-10ms according to the parameter transfer_time. The target power on state is the on state corresponding to the target power supply that should be connected after the switching: when switching from the first power supply to the second power supply, it is the target second power supply on state STS_SOURCE_B; when switching from the second power supply to the first power supply, it is the target first power supply on state STS_SOURCE_A. The power priority is the configured first power supply priority or second power supply priority rule; for example, source_priority equal to PRIORITY_A indicates first power supply priority.
[0041] S410, Obtain the current operating state of the static transfer switch. The current operating state includes one of the following: off state, first power on state, second power on state, switching transition state, and fault state. Specifically, obtain the current operating state `current_state`. Initially, it is `STS_OFF` upon power-on; during normal operation, if the first power supply is connected and there is no abnormality, then `current_state` equals `STS_SOURCE_A`; if the second power supply is connected, then `current_state` equals `STS_SOURCE_B`.
[0042] S420, if both the first power supply available flag and the second power supply available flag are not true, the disconnected state is determined as the target working state; if both the first power supply available flag a_available and the second power supply available flag b_available are 0, that is, both power supplies are unavailable, then regardless of the current state, the target working state is determined as the disconnected state STS_OFF, corresponding to the extreme scenario of simultaneous failure of both power supplies.
[0043] S430, if the current operating state is the first power-on state, and the first power availability flag is false while the second power availability flag is true, obtain the switching start time and determine the switching transition state as the target operating state. In this step, if the current operating state is the first power-on state, i.e., current_state equals STS_SOURCE_A, and a_available equals 0 and b_available equals 1, it indicates that the first power supply is currently unavailable while the second power supply is available. At this time, a switch from the first power supply to the second power supply needs to be performed. In this embodiment, the current count value of the system clock is obtained as the switching start time, and the target operating state is determined as the switching transition state STS_TRANSITION.
[0044] S440, if the current operating state is the second power supply on state, and the second power supply availability flag is false and the first power supply availability flag is true, obtain the switching start time and determine the switching transition state as the target operating state. That is, if the current operating state is the second power supply on state, and b_available equals 0 and a_available equals 1, then obtain the switching start time and determine the target operating state as the switching transition state, indicating that a switching start command from the second power supply to the first power supply needs to be generated.
[0045] S450, if the current operating state is a transitional state, obtain the current time and the transition start time, calculate their time difference, and compare the time difference with a preset transition time threshold to obtain a comparison result. If the current operating state is a transitional state STS_TRANSITION, obtain the current system clock value, subtract it from the previously recorded transition start time to obtain the time difference, and compare this time difference with a preset transition time threshold to obtain a comparison result.
[0046] For example, if the current working state is a transitional state, the current time GetSystemTick and the transition start time transfer_timer are obtained, the time difference Δt = GetSystemTick - transfer_timer is calculated, and Δt is compared with a preset transition time threshold transfer_time to obtain the comparison result. For example, if transfer_time is equal to 1ms, the transition window is considered to have expired when Δt > 1ms.
[0047] S460 verifies the switching result based on the comparison result. If the verification is successful, the target power-on state is determined as the target working state. If the verification fails, the fault state is determined as the target working state.
[0048] Specifically, if the comparison result shows that the time difference exceeds the switching time threshold, the switching success verification logic is invoked. If the verification is successful, the target power supply connection state is determined as the target operating state; for example, after successfully switching from the first power supply to the second power supply, the target state is STS_SOURCE_B. If the verification fails, the fault state STS_FAULT is determined as the target operating state, and a full disconnect command is generated. For example, the switching result is verified based on the above comparison result. If the time difference exceeds 1ms, the switching window is considered to have expired. At this time, it is checked whether the target power supply is successfully connected and whether the voltage is stable. If the verification is successful, the target operating state is updated to the target power supply connection state; for example, after successfully switching from A to B, the target state is STS_SOURCE_B. If the verification fails, for example, the target power supply fails to connect or the voltage fluctuates too much, the target operating state is determined as the fault state STS_FAULT.
[0049] S470, if the current working state is disconnected or faulty, the target working state is determined by the available high-priority power supply being turned on, based on the preset power priority and the first power supply availability flag and the second power supply availability flag.
[0050] For example, if the current operating state is STS_OFF or STS_FAULT, the target operating state is determined by connecting the available high-priority power supply according to the preset power priority and the first and second power supply availability flags. For instance, if the first power supply has priority and a_available equals 1, the target state is STS_SOURCE_A; if the first power supply is unavailable but the second power supply is available, the target state is STS_SOURCE_B. If there is no switching trigger condition, the instruction CONTROL_HOLD_CURRENT to maintain the current state is output. Thus, by decomposing the switching process according to different scenarios and combining timing timeout judgment and fault handling, it is beneficial to reduce state disorder during the switching process, achieve seamless switching to a certain extent, and improve the system's fault tolerance.
[0051] In some embodiments, the step S440, which verifies the switching result based on the comparison result, specifically includes: In this embodiment, the output voltage of the switching power supply refers to the output voltage of the target switching power supply, i.e., the output voltage of another power supply that is about to be connected or has already been connected, during the switching process. Rated range refers to the allowable stable range of the target power supply's output voltage, for example, 90%-110% of the rated 220V, i.e., 198V-242V. Fluctuation rate refers to the degree of fluctuation of the output voltage relative to the rated value or average value, for example, less than 5%. Successful verification means that the target power supply has been successfully connected and the output voltage is within the rated range, and the fluctuation meets the requirements; failed verification means that the target power supply has not been connected, the output voltage is not within the rated range, or the fluctuation is too large.
[0052] S441, when the comparison result shows that the time difference exceeds the preset switching time threshold, the output voltage of the switching power supply is acquired and it is determined whether it is within the rated range. For example, if transfer_time equals 1ms and the actual switching time reaches 1.2ms, verification is triggered, and the output voltage of the target switching power supply is acquired. The controller determines the target switching power supply according to the switching direction: when switching from the first power supply to the second power supply, the target switching power supply is the second power supply; when switching from the second power supply to the first power supply, the target switching power supply is the first power supply. The output voltage amplitude of the target switching power supply is acquired, and it is determined whether it is within the rated range of 198V-242V, while simultaneously determining whether the voltage fluctuation is less than 5%.
[0053] S442, if yes, then a successful verification result is obtained. For example, if the target switching power supply output voltage is within the rated range and the fluctuation is less than 5%, a successful verification result is obtained. For example, if the second power supply output voltage is detected to be 219V and the waveform is stable, then the verification is determined to be successful, and the target operating state is updated to the second power supply on state STS_SOURCE_B.
[0054] S443, if not, the verification fails. For example, if the target switching power supply output voltage is outside the rated range or fluctuates excessively, such as detecting a second power supply output voltage of 0V or only 150V, the verification fails, the target operating state is determined to be faulty (STS_FAULT), and a fault handling procedure is triggered, such as outputting a full disconnect command and recording a fault timestamp. Optionally, during the verification process, suppression measures data can also be recorded for fault troubleshooting.
[0055] Specifically, when the calculated time difference exceeds a preset switching time threshold, such as 1ms, it is determined to be a switching opportunity, and at this time, it is necessary to verify whether the switching is truly successful. In this embodiment, the target switching power supply has been recorded in step S430 or S440. For example, when switching from A to B, the target switching power supply is the second power supply. Therefore, during verification, the output voltage of the target switching power supply is obtained, and it is determined whether its amplitude is stable within the rated range, such as 90%-110% of the rated 220V, i.e., 198V-242V, and whether the voltage fluctuation is less than the preset fluctuation rate, such as the voltage fluctuation being less than 5%. If the output voltage of the target switching power supply is within the rated range and the voltage is stable, the verification is determined to be successful, and a successful result is obtained. If the output voltage of the target switching power supply is not within the rated range, or the voltage fluctuation is too large, such as a drop or overshoot, the verification is determined to be unsuccessful, a failure result is obtained, and a fault handling process is triggered, such as setting the state machine to STS_FAULT and outputting a full disconnect command.
[0056] In some example embodiments, during the switching process, the switching time threshold is set to 1ms. When the actual switching time is 1.2ms, verification is triggered. If the second power supply output voltage is detected to be 219V and the waveform is stable, the verification is successful; if the second power supply output voltage is detected to be 0V or only 150V, the verification fails. This facilitates the timely detection of switching anomalies and prevents the system from continuing to operate normally in the event of a switching failure, thus improving the reliability and security of the system.
[0057] In some embodiments, step S100, which involves collecting voltage information from a first power source and a second power source to obtain first voltage information and second voltage information, specifically includes: In this embodiment, the preset sampling frequency refers to the number of times the voltage analog signal is sampled per unit time, for example, 10kHz. The voltage analog signal refers to the continuous voltage signal obtained after the power supply voltage is converted by a transformer or voltage divider circuit. The first voltage sampling data and the second voltage sampling data refer to the discrete sampled value sequences obtained by sampling the first and second power supply analog signals. Analog-to-digital conversion refers to the process of quantizing analog sampled values into digital quantities. The first voltage information and the second voltage information refer to the digital voltage parameters obtained after analog-to-digital conversion and parameter extraction, including voltage amplitude, frequency, and phase.
[0058] S110 acquires analog voltage signals from the first and second power supplies at a preset sampling frequency to obtain first voltage sampling data and second voltage sampling data. Specifically, the analog voltage signals from the first and second power supplies are acquired at a sampling frequency of 10kHz. The voltage signals are stepped down to the ADC input range, for example, 0-3.3V, through a voltage transformer or voltage divider resistor. Each sample yields an analog voltage value, which is then sampled, held, and quantized by the ADC module to output a 12-bit digital value. After multiple consecutive samplings, a first voltage sampling data sequence and a second voltage sampling data sequence are formed.
[0059] S120: Analog-to-digital conversion is performed on the first voltage sampling data and the second voltage sampling data respectively to obtain first voltage information and second voltage information. Numerical processing of the above sampling data sequence after analog-to-digital conversion: Voltage amplitude, frequency, and phase angle are extracted from the data using a Fast Fourier Transform to form first voltage information and second voltage information, which is beneficial for obtaining accurate voltage amplitude and frequency data. For example, the first voltage information is obtained as 221V, 50.1Hz, and the second voltage information is obtained as 205V, 49.8Hz.
[0060] In some embodiments, after generating the target operating instruction for the static switching switch according to the target operating state, step S500 further includes: In this embodiment, the target operating instruction refers to the generated command representing an on, off, or switching action. Conversion is the process of converting the command into a hardware-executable level or timing signal. The drive level signal is a voltage or current signal used to drive electronic switching devices such as thyristors and IGBTs to turn on or off, such as a GPIO high or low level. The electronic switching device refers to the device in a static switching switch that performs the on and off actions.
[0061] Converting the target operation instruction to obtain a driving level signal. Specifically, the target operation instruction is converted. The system configures corresponding pins of GPIO in advance as an output mode, and connects with an external driving circuit. When the instruction requires "turning on the first power supply", the GPIO pin corresponding to the first power supply is set to a high level, and the driving circuit outputs a voltage or current signal sufficient to drive the thyristor or IGBT on the first power supply side to turn on, so as to obtain the driving level signal. When the instruction requires "turning off the first power supply", the pin is set to a low level, so that the switch device on the first power supply side is turned off. For a switching instruction CONTROL_INITIATE_TRANSFER_AB, the controller outputs a first power supply turn-off level according to a preset sequence, and then outputs a second power supply turn-on level within a switching window. In an embodiment where synchronous switching is enabled, the second power supply turn-on level may be triggered near a voltage zero-crossing point. For a full turn-off instruction, all switch device driving levels are set to turn-off levels. The static transfer switch is controlled to execute a turn-on, turn-off or switching action according to the driving level signal, so as to realize switching from one power supply to another power supply, full turn-off or maintaining a current state.
[0062] In a specific power supply embodiment, in dual power supply power supply of a data center equipment room, equipment room loads are equipment with high requirements for power supply continuity such as servers and precision air conditioners. The static transfer switch is configured to give priority to the first power supply, that is, source_priority is PRIORITY_A. A voltage threshold range is 198V-242V, a frequency threshold range is 49.5Hz-50.5Hz, a switching time threshold transfer_time is 1ms, synchronous switching enable sync_transfer is 1, and anti-islanding protection enable anti_islanding is 1. After the controller is powered on, a current working state is initialized to an off state STS_OFF.
[0063] Then voltage analog signals of the first power supply and the second power supply are collected. Through ADC analog-to-digital conversion and FFT parameter extraction, first voltage information is obtained as an amplitude of 221V and a frequency of 50.1Hz, and second voltage information is obtained as an amplitude of 205V and a frequency of 49.8Hz. A judgment module compares the first voltage amplitude of 221V with 198V-242V, compares the first frequency of 50.1Hz with 49.5Hz-50.5Hz, both are qualified, and generates first power supply judgment information of "the first power supply is normal". The second voltage amplitude of 205V and the second frequency of 49.8Hz are respectively compared, both are qualified, and second power supply judgment information of "the second power supply is normal" is generated. An analysis module sets a first power supply available flag a_available to 1 and a second power supply available flag b_available to 1 accordingly.
[0064] Since the initial power-on state is STS_OFF, and the first power supply takes priority with a_available set to 1, the target operating state is determined to be the first power supply on state STS_SOURCE_A. The generation module generates the instruction CONTROL_CONNECT_A to turn on the first power supply. This instruction is converted into a drive level signal via GPIO, driving the thyristor on the first power supply side to conduct. The load is then powered by the first power supply, and the static switching switch enters and remains in the STS_SOURCE_A state.
[0065] During operation, the first power supply fails, with the voltage dropping to 150V, exceeding the lower limit of 198V. The first frequency is temporarily set to 50.0Hz. The judgment module generates a "first power supply abnormality" judgment message, and the analysis module sets a_available to 0; the second power supply remains at 205V, 49.8Hz, with b_available equal to 1. The determination module detects that the current operating state is STS_SOURCE_A, and a_available equals 0 and b_available equals 1, determining that a switch from the first power supply to the second power supply is required. The switch start time is recorded, and the target operating state is determined as the switching transition state. The generation module generates the instruction sequence CONTROL_INITIATE_TRANSFER_AB to switch from the first power supply to the second power supply. In the switching transition state, the controller can optionally perform a fast switching process and can perform first-level suppression by adjusting the voltage phase and amplitude to reduce circulating current and electrical surges during switching.
[0066] During the switching transition, the time difference between the current time and the switching start time is continuously calculated. When the time difference exceeds 1ms (e.g., 1.2ms in practice), switching result verification is triggered: the output voltage of the target switching power supply (i.e., the second power supply) is acquired. If the second power supply output voltage is detected to be 219V, within the rated range of 198V-242V, and the voltage fluctuation is less than 5%, the verification is considered successful. The module updates the target operating state to the second power supply on state (STS_SOURCE_B), generates a command to connect and maintain the second power supply, and the load is switched to be powered by the second power supply. If the second power supply output voltage is detected to be 0V or only 150V during verification, the verification is considered a failure. The module determines the target operating state to the fault state (STS_FAULT), generates a full disconnect command (CONTROL_DISCONNECT_ALL), isolates the load from the abnormal power supply, and records the fault timestamp and related data for subsequent troubleshooting.
[0067] If both the first and second power supplies fail during operation, and a_available equals 0 and b_available equals 0, then regardless of the current state, the determination module will set the target operating state to STS_OFF and generate a full disconnect command. If the first power supply becomes available again after the fault is recovered and the first power supply has priority, then the target operating state will be set to STS_SOURCE_A according to priority from the STS_OFF or STS_FAULT state, and the high-priority available power supply will be reconnected.
[0068] In this way, because the judgment process uses both voltage amplitude and frequency parameters simultaneously, compared to open-loop judgment that relies solely on the instantaneous voltage threshold, it helps reduce misjudgments caused by fluctuations in a single parameter. Furthermore, by simultaneously introducing the first power supply availability flag, the second power supply availability flag, and the current operating state of the static switching switch when determining the target operating state, the control shifts from threshold triggering to state-driven, which helps avoid state disorder and malfunctions such as repeatedly triggering switching commands before the switching is complete or outputting connection commands when the switch is already disconnected. Recording the switching start time during the switching transition state and verifying the switching result by comparing the time difference with the switching time threshold helps to promptly detect switching failures and place the system into a fault state, preventing it from continuing to operate in normal mode after a switching failure. The inclusion of fallback logic for disconnection or priority recovery in cases of dual power supply failure and fault states improves fault tolerance and safety in abnormal scenarios. Finally, because the target operating command is ultimately converted into a drive level signal to control the switching device to perform connection, disconnection, or switching actions, state decisions can be implemented in actual switching actions. Therefore, this application helps to improve the certainty of static switching decisions and the reliability of system operation, reduce the risk of power outages, and is suitable for load scenarios such as data centers that have high requirements for switching stability.
[0069] This application also provides a static switching control system, which includes: The acquisition module 100 is used to acquire voltage information of the first power supply and the second power supply to obtain first voltage information and second voltage information. The judgment module 200 is used to judge the first voltage information and the second voltage information according to the preset voltage threshold range and frequency threshold range, respectively, so as to obtain the first power supply judgment information and the second power supply judgment information. The analysis module 300 is used to analyze the first power supply judgment information and the second power supply judgment information to obtain the first power supply availability flag and the second power supply availability flag. The determination module 400 is used to obtain the current working state of the static switching switch and determine the target working state based on the first power availability flag, the second power availability flag and the current working state. The generation module 500 is used to generate the target working instructions for the static switching switch based on the target working state.
[0070] Figure 3 This is a schematic diagram of a static switching switch control device 800 provided in an embodiment of the present invention. The static switching switch control device 800 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 810 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) storing application programs 833 or data 832. The memory 820 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the inner wall quality control device 800. Furthermore, the processor 810 may be configured to communicate with the storage media 830 and execute a series of instruction operations in the storage media 830 on the static switching switch control device 800 to implement the steps of the static switching switch control method provided in the above-described method embodiments.
[0071] The static switching control device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input / output interfaces 860, and / or one or more operating systems 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The static switching switch control device structure shown does not constitute a limitation on static switching switch-based control devices, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0072] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a static switching control method.
[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0074] If the integrated unit is implemented as 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 invention, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0075] The preferred embodiments of the present invention have been described in detail above, but the present disclosure is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of the present disclosure.
Claims
1. A static switching control method, characterized in that: include: Collect voltage information from the first power source and the second power source to obtain first voltage information and second voltage information; Based on the preset voltage threshold range and frequency threshold range, the first voltage information and the second voltage information are judged respectively to obtain the first power supply judgment information and the second power supply judgment information. The first power supply judgment information and the second power supply judgment information are analyzed to obtain the first power supply availability flag and the second power supply availability flag; Obtain the current operating status of the static switching switch, and determine the target operating status based on the first power availability flag, the second power availability flag, and the current operating status; Based on the target operating state, generate the target operating instructions for the static switching switch.
2. The static switching control method according to claim 1, characterized in that: The step of judging the first voltage information and the second voltage information according to the preset voltage threshold range and frequency threshold range respectively to obtain the first power supply judgment information and the second power supply judgment information specifically includes: The first voltage amplitude and the first frequency are extracted from the first voltage information, and the second voltage amplitude and the second frequency are extracted from the second voltage information; The first voltage amplitude is compared with a preset voltage threshold range to obtain a first voltage comparison result; the first frequency is compared with a preset frequency threshold range to obtain a first frequency comparison result. The second voltage amplitude is compared with a preset voltage threshold range to obtain a second voltage comparison result; the second frequency is compared with a preset frequency threshold range to obtain a second frequency comparison result. Based on the first voltage comparison result and the first frequency comparison result, first power supply judgment information is generated, and based on the second voltage comparison result and the second frequency comparison result, second power supply judgment information is generated.
3. The static switching control method according to claim 2, characterized in that: The analysis of the first power supply judgment information and the second power supply judgment information to obtain the first power supply availability flag and the second power supply availability flag specifically includes: When the first power supply determination information is that the first voltage amplitude is within the voltage threshold range and the first frequency is within the frequency threshold range, the first power supply availability flag is set to true; When the second power supply determination information indicates that the second voltage amplitude is within the voltage threshold range and the second frequency is within the frequency threshold range, the second power supply availability flag is set to true.
4. The static switching control method according to claim 3, characterized in that: The process of obtaining the current operating state of the static switching switch, and determining the target operating state based on the first power availability flag, the second power availability flag, and the current operating state, specifically includes: Obtain the current operating state of the static switching switch, wherein the current operating state includes one of the following: disconnected state, first power-on state, second power-on state, switching transition state, and fault state; If both the first power supply available flag and the second power supply available flag are not true, the disconnected state will be determined as the target working state. If the current working state is the first power-on state, and the first power availability flag is false and the second power availability flag is true, obtain the switching start time and determine the switching transition state as the target working state; If the current working state is the second power supply on state, and the second power supply available flag is false and the first power supply available flag is true, obtain the switching start time and determine the switching transition state as the target working state; If the current working state is a switching transition state, obtain the current time and the switching start time and calculate their time difference, and compare the time difference with the preset switching time threshold to obtain the comparison result; The switching result is verified based on the comparison results. If the verification is successful, the target power-on state is determined as the target working state. If the verification fails, the fault state is determined as the target working state. If the current working state is disconnected or faulty, the target working state is determined by the available high-priority power supply based on the preset power priority and the first power supply availability flag and the second power supply availability flag.
5. The static switching control method according to claim 4, characterized in that: The verification of the switching result based on the comparison result specifically includes: When the comparison result shows that the time difference exceeds the preset switching time threshold, the output voltage of the switching power supply is obtained and it is determined whether it is within the rated range. If so, then the verification result is successful; If not, the verification fails.
6. The static switching control method according to claim 1, characterized in that: The process of collecting voltage information from the first power source and the second power source to obtain first voltage information and second voltage information specifically includes: The voltage analog signals of the first power supply and the second power supply are collected at a preset sampling frequency to obtain the first voltage sampling data and the second voltage sampling data. The first voltage sampling data and the second voltage sampling data are respectively converted from analog to digital to obtain the first voltage information and the second voltage information.
7. The static switching control method according to claim 1, characterized in that: After generating the target operating instruction for the static switching switch based on the target operating state, the method further includes: The target operating command is converted to obtain the drive level signal; The static switch is controlled to perform on, off, or switching actions based on the drive level signal.
8. A static switching control system, characterized in that: include: The acquisition module is used to acquire voltage information from the first power supply and the second power supply to obtain first voltage information and second voltage information. The judgment module is used to judge the first voltage information and the second voltage information according to the preset voltage threshold range and frequency threshold range, respectively, so as to obtain the first power supply judgment information and the second power supply judgment information. The analysis module is used to analyze the first power supply judgment information and the second power supply judgment information to obtain the first power supply availability flag and the second power supply availability flag. The determination module is used to obtain the current operating state of the static switching switch and determine the target operating state based on the first power availability flag, the second power availability flag and the current operating state. The generation module is used to generate target operating instructions for static switching switches based on the target operating state.
9. A static switching control device, characterized in that: The static switching control device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the static switching control device to perform the steps of the static switching control method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions that, when executed by a processor, implement the steps of the static switching control method as described in any one of claims 1-7.
