Power supply device, control method and device thereof, storage medium and program product

By using the BP neural network model in the power supply device to predict power supply failures and timely switch the power supply power supply, the problem of fault detection lag of dual power supply device is solved, and the working stability and safety of electrical equipment are improved.

CN119482898APending Publication Date: 2025-02-18GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411644467.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the relevant scheme, there is a lag in the fault detection and switching control of dual-power supply devices, which affects the stability and security of electrical equipment (such as servers).

Method used

By setting up a dual differential voltage sampling circuit, MCU and power management module in the power supply device, using the pre-trained BP neural network model, predicting future voltage conditions based on the input voltage sampling value of the current power supply, and determining whether the power supply is faulty, thereby Switch to another power supply in time.

Benefits of technology

Real-time monitoring and prediction of power supply for electrical equipment (such as servers) is realized, reducing the lag of failover and improving the stability and safety of power supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119482898A_ABST
    Figure CN119482898A_ABST
Patent Text Reader

Abstract

The invention discloses a power supply device and a control method and device thereof, a storage medium and a computer program product. The method comprises the following steps: controlling a switch unit to gate a connection path between a current power supply in dual power supplies and a power supply control unit; acquiring a sampling value of the input voltage of the current power supply; according to the sampling value of the input voltage of the current power supply, utilizing a pre-trained voltage prediction model to predict a predicted value of the input voltage of the current power supply; judging whether the current power supply fails or not according to the predicted value of the input voltage of the current power supply; and if it is judged that the current power supply fails, the switch unit is controlled to gate a connection path between the other power supply in the dual power supplies and the power supply control unit. According to the scheme, when it is predicted that the current power supply will fail in advance based on the input voltage of the current power supply in the dual power supplies, the other power supply is switched to supply power in time, and the working stability and safety of electrical equipment (such as a server) are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of power supply technology, and specifically relates to a control method, device, power supply device, storage medium and computer program product of a power supply device, and more particularly to an input fault prediction and redundant circuit control method, device, server power supply device, storage medium and computer program product of a server power supply device. Background Art

[0002] In order to prevent large-scale downtime, some electrical equipment (such as servers in computer rooms) generally adopts a server power supply device (such as a dual power supply) power supply mode, where one of the dual power supplies is the main power supply and the other is the backup power supply; when the main power supply is abnormal, the backup power supply is quickly switched so that the server power supply device can output continuously and stably to ensure the normal operation of the server without downtime. In order to achieve the switching between the main power supply and the backup power supply, redundant circuits are required to ensure the sequence and switching control of the two power supplies. However, the fault detection and switching control of the dual power supply device in the relevant schemes often have lags, which affects the stability and safety of the operation of electrical equipment (such as servers).

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The object of the present invention is to provide a control method, device, power supply device, storage medium and computer program product for a power supply device, so as to solve the problem that fault detection and switching control of a dual power supply device in related schemes often have lags, affecting the stability and safety of the operation of electrical equipment (such as a server), so as to achieve the effect of switching to another power supply in time when a current power supply fails based on the input voltage of the current power supply in the dual power supply, thereby ensuring the stability and safety of the operation of the electrical equipment (such as a server).

[0005] The present invention provides a control method for a power supply device, which is applied to an electrical device powered by dual power supplies; the dual power supplies are a first power supply and a second power supply that are redundantly set; the power supply device comprises: a first filtering unit, a second filtering unit, a switch unit, and a power supply control unit; after the first power supply is input by the first filtering unit and after the second power supply is input by the second filtering unit, both are under the gating control of the switch unit and supply power to the electrical device through the power supply control unit; the control method for the power supply device comprises: determining one of the first power supply and the second power supply as the current power supply, controlling the switch unit to gating the filter unit corresponding to the current power supply and the power supply control unit; a connection path between the power control unit and the power supply control unit, so as to be powered by the current power supply; obtain a sampled value of the input voltage of the current power supply at the current moment from the current filtering unit; predict the predicted value of the input voltage of the current power supply at a future set moment according to the sampled value of the input voltage of the current power supply, using a pre-trained voltage prediction model; determine whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply; if it is determined that the current power supply is faulty, control the switch unit to select the connection path between the filtering unit corresponding to the other power supply of the first power supply and the second power supply control unit, so as to switch to being powered by the other power supply.

[0006] In some embodiments, the switch unit includes: a first group of single-pole double-throw relays and a second group of single-pole double-throw relays with the same opening and closing functions; wherein the contacts of the first group of single-pole double-throw relays are connected between the first filtering unit and the power supply control unit, and the contacts of the second group of single-pole double-throw relays are connected between the second filtering unit and the power supply control unit.

[0007] In some embodiments, it also includes: collecting historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply as sample data of the dual power supplies; and pre-training a voltage prediction model of the dual power supplies based on a pre-selected BP neural network according to the sample data of the dual power supplies.

[0008] In some embodiments, historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply are collected as sample data of the dual power supplies, including: when a sampling value of the input voltage of the first power supply within a historical period is obtained, the obtained data of the input voltage of the first power supply is saved to form a log; similarly, when a sampling value of the input voltage of the second power supply within a historical period is obtained, the obtained data of the input voltage of the second power supply is saved to form a log, thereby collecting the historical data of the input voltage of the first power supply and the historical data of the input voltage of the second power supply as sample data of the dual power supplies.

[0009] In some embodiments, according to the sample data of the dual power supply, based on the pre-selected BP neural network, the voltage prediction model of the dual power supply is pre-trained, including: after initializing the pre-selected BP neural network, setting the initial value of the weight matrix of the BP neural network, and setting the learning rate of the BP neural network; dividing the sample data of the dual power supply into input samples and output samples, based on the initial value of the weight, the learning rate, and a preset threshold, using the input samples and the output samples to learn and train the BP neural network to obtain an initial prediction model; wherein the input sample is the voltage prediction model of the dual power supply; The input voltage of any power supply in the dual power supply is the value at time t, where t is a time in the historical time period; the output sample is the value of the input voltage of any power supply in the dual power supply at time t+1, recorded as the predicted value of the input voltage of any power supply in the dual power supply at time t+1; the error of the initial prediction model is calculated, and the weight and the threshold are updated based on the error of the initial prediction model and the learning rate; it is iterated in this way until the error of the updated initial prediction model reaches within the set error range, and it is determined that the initial prediction model at this time is the required voltage prediction model, which is used as the voltage prediction model of the dual power supply obtained by pre-training.

[0010] In some embodiments, judging whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply includes: comparing the predicted value of the input voltage of the current power supply with the historical data of the input voltage of the current power supply, determining the degree of fit between the predicted value of the input voltage of the current power supply and the historical data of the input voltage of the current power supply, recorded as the current degree of fit of the input voltage of the current power supply; determining whether the current degree of fit of the input voltage of the current power supply is less than a preset degree of fit threshold; if it is determined that the current degree of fit of the input voltage of the current power supply is less than the preset degree of fit threshold, determining that the current power supply is faulty; if it is determined that the current degree of fit of the input voltage of the current power supply is greater than or equal to the preset degree of fit threshold, determining that the current power supply is not faulty.

[0011] Matching the above method, another aspect of the present invention provides a control device for a power supply device, which is applied to electrical equipment powered by dual power supplies; the dual power supplies are a first power supply and a second power supply that are redundantly set; the power supply device includes: a first filtering unit, a second filtering unit, a switch unit, and a power supply control unit; after the first power supply is input through the first filtering unit and the second power supply is input through the second filtering unit, both are under the gating control of the switch unit and supply power to the electrical equipment through the power supply control unit; the control device for the power supply device includes: a control unit, which is configured to determine one of the first power supply and the second power supply as the current power supply, and control the switch unit to gating the connection path between the filtering unit corresponding to the current power supply and the power supply control unit. , so as to be powered by the current power supply; an acquisition unit is configured to acquire a sampled value of the input voltage of the current power supply at the current moment from the current filtering unit; the control unit is further configured to predict the predicted value of the input voltage of the current power supply at a future set moment according to the sampled value of the input voltage of the current power supply and a pre-trained voltage prediction model; the control unit is further configured to determine whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply; the control unit is further configured to control the switch unit to select a connection path between the filtering unit corresponding to the other power supply of the first power supply and the second power supply and the power supply control unit if it is determined that the current power supply is faulty, so as to switch to power supply by the other power supply.

[0012] In some embodiments, the switch unit includes: a first group of single-pole double-throw relays and a second group of single-pole double-throw relays with the same opening and closing functions; wherein the contacts of the first group of single-pole double-throw relays are connected between the first filtering unit and the power supply control unit, and the contacts of the second group of single-pole double-throw relays are connected between the second filtering unit and the power supply control unit.

[0013] In some embodiments, it also includes: the acquisition unit is further configured to collect historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply as sample data of the dual power supplies; the control unit is further configured to pre-train the voltage prediction model of the dual power supplies based on a pre-selected BP neural network according to the sample data of the dual power supplies.

[0014] In some embodiments, the acquisition unit collects historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply as sample data of the dual power supplies, including: when the sampling value of the input voltage of the first power supply within a historical period is obtained, the acquired data of the input voltage of the first power supply is saved to form a log; similarly, when the sampling value of the input voltage of the second power supply within a historical period is obtained, the acquired data of the input voltage of the second power supply is saved to form a log, thereby collecting the historical data of the input voltage of the first power supply and the historical data of the input voltage of the second power supply as sample data of the dual power supplies.

[0015] In some embodiments, the control unit, according to the sample data of the dual power supplies, based on a pre-selected BP neural network, pre-trains to obtain a voltage prediction model of the dual power supplies, including: after initializing the pre-selected BP neural network, setting the initial value of the weight matrix of the BP neural network, and setting the learning rate of the BP neural network; dividing the sample data of the dual power supplies into input samples and output samples, based on the initial value of the weight, the learning rate, and a preset threshold, using the input samples and the output samples to learn and train the BP neural network to obtain an initial prediction model; wherein the input sample is the The value of the input voltage of any one of the dual power supplies at time t, where t is a time in a historical time period; the output sample is the value of the input voltage of any one of the dual power supplies at time t+1, recorded as the predicted value of the input voltage of any one of the dual power supplies at time t+1; the error of the initial prediction model is calculated, and the weight and the threshold are updated based on the error of the initial prediction model and the learning rate; it is iterated in this way until the error of the updated initial prediction model reaches within the set error range, and the initial prediction model is determined to be the required voltage prediction model at this time, as the voltage prediction model of the dual power supply obtained by pre-training.

[0016] In some embodiments, the control unit determines whether the current power supply is faulty based on the predicted value of the input voltage of the current power supply, including: comparing the predicted value of the input voltage of the current power supply with the historical data of the input voltage of the current power supply, determining the degree of fit between the predicted value of the input voltage of the current power supply and the historical data of the input voltage of the current power supply, recorded as the current degree of fit of the input voltage of the current power supply; determining whether the current degree of fit of the input voltage of the current power supply is less than a preset degree of fit threshold; if it is determined that the current degree of fit of the input voltage of the current power supply is less than the preset degree of fit threshold, determining that the current power supply is faulty; if it is determined that the current degree of fit of the input voltage of the current power supply is greater than or equal to the preset degree of fit threshold, determining that the current power supply is not faulty.

[0017] Matching the above device, the present invention further provides a power supply device on the other hand, including: a control device of the power supply device described above.

[0018] In accordance with the above method, the present invention provides a storage medium on the other hand, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the control method of the power supply device described above.

[0019] Matching the above method, the present invention further provides a computer program product on the other hand, including a computer program, which implements the steps of the control method of the power supply device described above when executed by a processor.

[0020] Therefore, the scheme of the present invention is to set a dual differential voltage sampling circuit, an MCU and a power management module through a power supply device for an electrical device (such as a server); wherein the power supply device has dual input ports, dual filtering circuits, switches, and a power supply control unit (such as a PFC circuit, a DC / DC circuit, etc.), the dual input ports are used to access an external dual power supply, and when the electrical device is powered by any one of the dual power supplies, the dual differential voltage sampling circuit samples the input voltage of the current power supply in the dual power supply from the dual filtering circuit respectively, and transmits it to the power pipeline module through the MCU, and the power management module uses the BP neural network obtained in advance to predict the input voltage of the current power supply at a future set time according to the input power of the current power supply at the current moment to obtain a predicted value, and predict whether the current power supply will fail according to the predicted value, and if it is predicted that the current power supply will fail, the MCU controls the switch to switch to another power supply in the dual power supply for power supply; thereby, when the current power supply is predicted to fail based on the input voltage of the current power supply in the dual power supply, it is switched to another power supply in time to ensure the stability and safety of the electrical device (such as a server) working.

[0021] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention.

[0022] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic flow chart of an embodiment of a control method for a power supply device of the present invention;

[0024] Figure 2 A schematic diagram of a flow chart of an embodiment of collecting samples for training to obtain the voltage prediction model of the dual power supply in the method of the present invention;

[0025] Figure 3 A schematic diagram of a flow chart of an embodiment of pre-training the voltage prediction model of the dual power supply in the method of the present invention;

[0026] Figure 4 A schematic diagram of a flow chart of an embodiment of the method of the present invention for determining whether the current power supply is faulty;

[0027] Figure 5A schematic structural diagram of an embodiment of a control device for a power supply device of the present invention;

[0028] Figure 6 It is a schematic diagram of the structure of the dual redundant circuit of the server power supply device;

[0029] Figure 7 is a schematic diagram of the switching state of the switch;

[0030] Figure 8 This is a flow chart of the BP neural network data prediction process.

[0031] In conjunction with the accompanying drawings, the reference numerals in the embodiments of the present invention are as follows:

[0032] 102 - acquisition unit; 104 - control unit. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. 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 making creative work are within the scope of protection of the present invention.

[0034] Considering that in the relevant schemes, the trend of the power supply device of electrical equipment (such as the server power supply device) is that each power module has dual input ports, and the dual power supply is input from the dual input ports and then supplies power to the power conversion circuit after passing through the redundant circuit, and supports dual-mode input of any AC (i.e., alternating current power) and DC (i.e., direct current power) power supply modes, such as AC+AC power supply mode, AC+DC power supply mode, DC+DC power supply mode, etc., which can adapt to the different actual working environments and working requirements of the server room and have higher applicability. In the relevant schemes, there is a lag in the fault and status detection method for the dual power supply, and it is often a period of time after the fault occurs that the fault is detected and the switching action is made. In actual work, this detection and switching method will cause the output voltage of the power supply device to fluctuate violently and peak, and even exceed the rated input voltage of the server, causing an impact on the server and affecting the working stability and life of the server.

[0035] For example: In the relevant scheme, the input end of the power supply device is tested for real-time voltage, and the ADC (i.e., analog signal converted to digital signal) samples and sends it to the digital signal processing (DSP) chip for processing. When the real-time voltage at the input end of the power supply device is detected to be lower than the set voltage value, a switching instruction or a shutdown instruction is issued. Among them, after the voltage sampling circuit, ADC conversion, and then to the DSP chip to judge and issue instructions, this processing flow takes a certain amount of time. Therefore, the entire switching action, from the occurrence of input abnormality to the completion of redundant switching of the power supply device, has a large lag, resulting in violent fluctuations in the input and output voltages of the power supply device during this period. Server operation has very high requirements for the stability of the power supply device.

[0036] Some schemes disclose a method for designing a dual-power redundant circuit for a domain controller. When one power supply fails, the other power supply can take over seamlessly, so that the domain controller can continue to work. The two inputs of the main power supply and the auxiliary power supply will not be turned on at the same time. When the voltages of the main power supply and the auxiliary power supply are equal, the two will not be turned on at the same time to power the SOC system (i.e., system on chip). The main power supply is used for power supply, and the main power supply and the auxiliary power supply have a master-slave relationship. When the main power supply circuit or the auxiliary power supply circuit fails, the input and output switches are controlled to switch the available power supply. However, this scheme is not suitable for the dual-mode input of the server power supply device, and the voltage detection method used in the related scheme to compare the voltage value takes a lot of time, and the switching speed is slow, the circuit is complex, and it cannot provide reference data for the cause of the power supply failure.

[0037] Therefore, the scheme of the present invention proposes a control method for a power supply device, specifically a control method for input fault prediction and redundant circuit of a server power supply device. For the dual-mode input of the server power supply device, the state parameters of the two-way input power supply are collected and sent to the power management module. The BP (Back Propagation) neural network is used to analyze and predict the state of the two-way power supply system. According to the predicted fault, a redundant switch is quickly made, which can achieve a rapid response to the fault, reduce the time from power supply abnormality to redundant switching, and make the power input and output voltage of the electrical equipment more stable. Among them, the BP neural network is a multi-layer feedforward network trained by the error back propagation algorithm.

[0038] According to an embodiment of the present invention, a control method for a power supply device is provided, such as Figure 1A flow chart of an embodiment of the method of the present invention is shown. The control method of the power supply device is applied to electrical equipment powered by dual power supplies; the dual power supplies are a redundantly set first power supply and a second power supply, the first power supply and the second power supply can both be an externally input first power supply and an externally input second power supply, the first power supply and the second power supply can also be the first power supply and the second power supply of the power supply device itself; the power supply device includes: a first filtering unit (such as filtering circuit 1), a second filtering unit (such as filtering circuit 2), a switching unit, and a power supply control unit 104 (such as a PFC circuit, a DC / DC circuit, etc.); after the first power supply is input by the first filtering unit and the second power supply is input by the second filtering unit, both are under the gating control of the switching unit, and the electrical equipment is powered through the power supply control unit 104. In the scheme of the present invention, Figure 1 As shown, the control method of the power supply device includes: steps S110 to S150.

[0039] At step S110, one of the first power supply and the second power supply is determined as the current power supply, and the switch unit is controlled to select the connection path between the filter unit corresponding to the current power supply and the power supply control unit 104, so that the current power supply supplies power. Specifically, one of the first power supply and the second power supply is determined as the current power supply, and a filter unit corresponding to the first filter unit and the second filter unit and the current power supply is recorded as the current filter unit, and the switch unit is controlled to select the current filter unit corresponding to the current power supply in the first filter unit and the second filter unit, so that the current filter unit is connected to the power supply control unit 104, so that the current power supply supplies power to the electrical device through the power supply control unit 104.

[0040] In step S120, a sampling value of the input voltage of the current power supply at the current moment is obtained from the current filtering unit.

[0041] At step S130, based on the sampled value of the input voltage of the current power supply, a voltage prediction model obtained by pre-training is used to predict the predicted value of the input voltage of the current power supply at a future set time. The predicted value of the input voltage of the current power supply refers to the input voltage of the current power supply within a future set period of time.

[0042] In step S140, it is determined whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply.

[0043] At step S150, if it is determined that the current power supply fails, the switch unit is controlled to enable the connection path between the filter unit corresponding to the other power supply of the first power supply and the second power supply and the power supply control unit 104, so as to switch to the other power supply. Specifically, the switch unit is controlled to enable the other filter unit corresponding to the other power supply of the first power supply and the second power supply in the first filter unit and the second filter unit, so that the other filter unit is connected to the power supply control unit 104, so that the other power supply supplies power to the electrical device through the power supply control unit 104. Of course, if it is determined that the current power supply does not fail, the switch unit is controlled to maintain the current enabling state.

[0044] Figure 6 This is a schematic diagram of the structure of the dual redundant circuit of the server power supply device. Figure 6 As shown, the dual redundant circuit of the server power supply device includes: an input end of a first power supply (such as input 1), an input end of a second power supply (such as input 2), an output end, a filter circuit 1, a filter circuit 2, a differential voltage sampling circuit 1, a differential voltage sampling circuit 2, a switch, a power factor correction (Power Factor Correction, PFC) circuit, a DC / DC circuit (i.e., a DC to DC circuit), a microcontroller unit 104 (Microcontroller Unit, MCU), and a power management module.

[0045] Among them, the input terminal 1 is connected to the first input terminal of the switch after passing through the filter circuit 1, and the input terminal 2 is connected to the second input terminal of the switch after passing through the filter circuit 2; the output terminal of the switch is connected to the output terminal after passing through the PFC circuit and the DC / DC circuit. The differential voltage sampling circuit 1 samples the input voltage of the first power supply from the filter circuit 1 and outputs it to the first input terminal of the MCU, and the differential voltage sampling circuit 2 samples the input voltage of the first power supply from the filter circuit 2 and outputs it to the second input terminal of the MCU, and the output terminal of the MCU is output to the power management module, and the output terminal of the power management module is fed back to the third input terminal of the MCU, and the output terminal of the MCU is connected to the control terminal of the switch.

[0046] exist Figure 6 In the example shown, the input end of the server power supply device is powered by two circuits, which can be AC ​​or DC (such as AC+AC, AC+DC, DC+DC), each with a first-level filtering circuit. After filtering, the voltage signals of the two circuits are differentially sampled and amplified and sent to the MCU. The MCU can control the switch switching to realize redundant switching of the two power supplies.

[0047] In the scheme of the present invention, a reliable and fast solution is provided for redundant switching of dual-input server power supply devices, thereby avoiding large-scale downtime in server rooms and causing data loss, and providing reference data support for staff's subsequent maintenance of the server power supply system.

[0048] The input fault prediction and redundant circuit control scheme of the server power supply device provided by the solution of the present invention provides a reliable and fast redundant switching circuit for the dual-mode input of the server power supply device. Specifically, the state parameters of the two input power supplies are collected and sent to the power management module, and the pre-trained voltage prediction model is used to analyze and predict the state of the two power supply systems. According to the predicted fault, redundant switching is quickly made to make the power supply takeover more continuous and the power output performance more stable.

[0049] In some embodiments, the switch unit includes: a first group of single-pole double-throw relays and a second group of single-pole double-throw relays with the same opening and closing functions; wherein the contacts of the first group of single-pole double-throw relays are connected between the first filtering unit and the power supply control unit 104, and the contacts of the second group of single-pole double-throw relays are connected between the second filtering unit and the power supply control unit 104.

[0050] Figure 7 Schematic diagram of the switching state of the switch. Figure 7 The figure shows a two-way switch circuit, where the live wire L1 and the neutral wire N1 are input 1, and the live wire L2 and the neutral wire N2 are input 2. Figure 7 The relay shown is a single-pole double-throw relay with two groups of open and close functions, with four channels (i.e., the live wire L1 of the first channel, the live wire L2 of the second channel, the neutral wire L1 of the third channel, and the neutral wire L2 of the fourth channel). The live wire L1 of the first channel and the neutral wire L1 of the third channel are the first group, and the live wire L2 of the second channel and the neutral wire L2 of the fourth channel are the second group. The MCU sends a control signal to the control terminal K1 of the first group or the control terminal K2 of the second group to control the closing position of the relay (i.e., the first group is closed or the second group is closed). The output end of the relay is connected to D+ and D-, and D+ and D- are the positive and negative poles of one output. The first group and the second group of the relay share one output. The contacts of the relay switch one of the two inputs to the output so that one of the two inputs is connected, and the other of the two inputs is disconnected.

[0051] See also Figure 6 and Figure 7In the example shown, input 1 and input 2 are the main power supply circuit and the auxiliary power supply circuit respectively, so input 1 is powered first and the first group of relays is closed in advance; when input 1 fails and input 2 needs to be switched, the second group of relays is closed, and input 2 is connected to the server power supply device and supplies power; when the input 1 fault is eliminated and the normal power supply state is restored, the MCU controls the first group of relays to close and restore power to the main power supply circuit. Figure 7 The switching circuit shown only requires a set of four-way switching relays and only two control signals, so the switching circuit and control are simpler and more reliable.

[0052] In the solution of the present invention, a group of four conversion relays are used as a redundant switching circuit, which solves the problem of complex switching circuits and difficult control, and achieves the effects of simple control, high speed, simple circuit and small size.

[0053] In some embodiments, in the solution of the present invention, the control method of the power supply device further includes: a process of collecting samples for training to obtain a voltage prediction model of the dual power supply.

[0054] Combine the following Figure 2 The flowchart of an embodiment of collecting samples for training to obtain the voltage prediction model of the dual power supply in the method of the present invention further illustrates the specific process of collecting samples for training to obtain the voltage prediction model of the dual power supply, including: step S210 to step S220.

[0055] Step S210 , collecting historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply as sample data of the dual power supply.

[0056] Step S220 , pre-training a voltage prediction model of the dual power supply based on the pre-selected BP neural network according to the sample data of the dual power supply.

[0057] The solution of the present invention provides a reliable and fast redundant switching circuit for the dual-mode input of the server power supply device. Specifically, the state parameters of the two-way input power supply are collected and sent to the power management module. The BP neural network is used to analyze and predict the state of the two-way power supply system. According to the predicted fault, redundant switching is quickly performed to make the power supply takeover more continuous and the power output performance more stable.

[0058] In some embodiments, in step S210, historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply are collected as sample data of the dual power supplies, including: when a sampling value of the input voltage of the first power supply within a historical period of time is obtained, the obtained data of the input voltage of the first power supply is saved to form a log; similarly, when a sampling value of the input voltage of the second power supply within a historical period of time is obtained, the obtained data of the input voltage of the second power supply is saved to form a log, thereby collecting the historical data of the input voltage of the first power supply and the historical data of the input voltage of the second power supply as sample data of the dual power supplies.

[0059] See also Figure 6 In the example shown, the voltage signals sampled by the differential voltage sampling circuit 1 and the differential voltage sampling circuit 2 are sent to the power management module via the MCU, and the data is saved as a log to facilitate fault analysis and power supply maintenance.

[0060] Among them, the log refers to the data information such as the detection voltage, time, circuit switching instructions, output voltage, etc. of the time period recorded and stored in the power management module when the power supply abnormality is detected, such as being stored in the memory inside the power management module in chronological order. In this way, it is convenient for maintenance and technical personnel to view the power supply abnormality information, study and analyze the causes of the input power supply abnormality, improve the power supply circuit and mode, etc., and improve the stability of the power supply. In the scheme of the present invention, the input status data is detected and the data is compiled into a log, which solves the problem of maintenance personnel finding and analyzing the cause of the fault and provides reference data support for the subsequent maintenance of the power supply system.

[0061] In the solution of the present invention, in order to avoid server downtime, the power supply device supports dual-mode input, detects the status of two power supply inputs, is responsible for power supply input management and switching, realizes continuous and stable power supply of the server power supply device, and records fault data to facilitate staff to analyze the cause of the fault and provide data reference for the maintenance of the server power supply device.

[0062] In some implementations, the specific process of pre-training the voltage prediction model of the dual power supply based on the pre-selected BP neural network according to the sample data of the dual power supply in step S220 is described in the following exemplary embodiment.

[0063] Combine the following Figure 3 The flowchart of an embodiment of pre-training the voltage prediction model of the dual power supply in the method of the present invention further illustrates the specific process of pre-training the voltage prediction model of the dual power supply in step S220, including: steps S310 to S340.

[0064] Step S310, after initializing the pre-selected BP neural network, setting the initial value of the weight of the weight matrix of the BP neural network, and setting the learning rate of the BP neural network.

[0065] Step S320, dividing the sample data of the dual power supplies into input samples and output samples, based on the initial value of the weight, the learning rate, and the preset threshold, using the input samples and the output samples to learn and train the BP neural network to obtain an initial prediction model; wherein, the input sample is the value of the input voltage of any power supply in the dual power supplies at time t, t is a moment in a historical time period; the output sample is the value of the input voltage of any power supply in the dual power supplies at time t+1, recorded as the predicted value of the input voltage of any power supply in the dual power supplies at time t+1.

[0066] Step S330, calculating the error of the initial prediction model, and updating the weight and the threshold based on the error of the initial prediction model and the learning rate.

[0067] Step S340, iterate in this way until the error of the updated initial prediction model reaches a set error range, and determine that the initial prediction model at this time is the required voltage prediction model, which is used as the voltage prediction model of the dual power supply obtained by pre-training.

[0068] See also Figure 6 In the example shown, the power management module performs BP neural network processing on the collected samples. Figure 8 Figure 1 is a flow chart of the BP neural network data prediction process. Figure 8 As shown in the figure, the BP neural network data prediction process includes:

[0069] Step 1: Initialize the BP neural network, set the initial weight of the weight matrix to a random value with a normal distribution between 0.5 and 1, and set the learning rate (i.e., learning rate) η to 0.1, and then execute step 2.

[0070] Step 2: Input the sample group parameters, and calculate the output y of the hidden layer from the input sample, hidden layer threshold, input layer and hidden layer weights. i , the specific calculation formula is formula (1), and then execute step 3.

[0071]

[0072] Among them, x j is the input sample, n is the number of nodes in the input layer, n1 is the number of nodes in the hidden layer, m is the number of output nodes, w ij is the connection coefficient weight, θ i is the threshold value, fi is the transfer function.

[0073] Step 3: After the output layer output is calculated, the hidden layer output y is calculated i , threshold β i , weights ij , get the output value z predicted by BP neural network i , the specific calculation formula is formula (2), and then execute step 4.

[0074]

[0075] Among them, n1 is the number of nodes in the hidden layer, m is the number of output nodes, and s ij is the connection coefficient weight, β i is the threshold value, g i is the transfer function.

[0076] Step 4: Calculate the error e(t). The specific calculation formula is formula (3), and then execute step 5.

[0077] e(t)=d(t)-y(t) (3).

[0078] Among them, d(t) is the actual output of the BP neural network, y(t) is the ideal output of the BP neural network, and e(t) is the error of the tth iteration.

[0079] Step 5: Update the threshold value. Update the threshold value θ by the error e(t) predicted by the BP neural network. i , β i , the specific calculation formula is formula (4) and formula (5), and then execute step 6.

[0080]

[0081] β i(t+1) =β i(t) +e i(t) i=1,2,...,m (5).

[0082] Among them, θ i(t) , β i(t) is the t-th threshold, θ i(t+1) , β i(t+1) is the threshold value for the t+1th time, η is the learning rate, y i is the output of the hidden layer, n1 is the number of nodes in the hidden layer, m is the number of output nodes, s ij is the connection coefficient weight, e i(t) is the t-th error (i.e. the error of the t-th time series).

[0083] Step 6: Update the weights. Update the weights w by the neural network prediction error e(t)ij 、s ij :The specific calculation formula is formula (6) and formula (7), and then execute step 7.

[0084]

[0085] s ij(t+1) =s ij(t) +η·y j ·e i(t) i=1,2,...,n1,j=1,2,...,m (7).

[0086] Among them, ω ij(t) 、s ij(t) is the t-th weight, ω ij(t+1) 、s ij(t+1) is the weight of the t+1th time, η is the learning rate, x j is the input sample, y i is the output of the hidden layer, n1 is the number of nodes in the hidden layer, m is the number of output nodes, e i(t) is the t-th error.

[0087] Step 7: Continuously iterate to obtain the predicted output value that meets the error requirements.

[0088] See also Figure 6 In the example shown, the power management module performs BP neural network analysis on the collected sample data, performs iterative training and learning on past data, and corrects weights and thresholds; the error of the initial iterative prediction of the BP neural network is relatively large. By learning the collected sample data of the actual power supply conditions, the weights and thresholds of the current prediction model are corrected to make the current predicted data consistent with the actual conditions and more accurate.

[0089] The real-time data is predicted and analyzed, and the power supply status is judged to be normal according to the predicted value. If the prediction result determines that the power supply status is about to be abnormal, the power management module sends a redundant switching instruction to the MCU, and the MCU controls the switch to switch the auxiliary power supply circuit. That is, before the current power supply circuit fails and causes power outage or abnormal power supply voltage, the auxiliary power supply circuit is quickly switched to make the input of the server power supply device continuous and the output stable, and reduce the fluctuation intensity and spikes of the output voltage and current during the power outage switching power supply in the redundant switching mode of the relevant scheme, thereby reducing the damage and adverse effects on the server and the power supply. The prediction model processes a time series data of the current detection voltage, for example: the voltage v1 at the previous moment and the voltage v2 at the current moment. The voltage v3 at the next moment can be calculated by the following equation. The predicted value is a series of voltage values ​​that will occur at the next moment, which has not yet occurred at the next moment, but is calculated based on a series of collected samples.

[0090] The fault and status detection methods in related schemes have hysteresis and slow switching speed, resulting in large output voltage fluctuations and peak values, which are not conducive to the working stability and life of the server. In the scheme of the present invention, after two-way voltage detection, the neural network model, namely the BP neural network, predicts the two-way input power supply status, which solves the problem of redundant switching lag in real-time detection in related schemes, can achieve rapid response to faults, reduce the time from power supply anomaly to redundant switching, and make the power input and output voltage of electrical equipment more stable.

[0091] In some implementations, the specific process of determining whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply in step S140 is described in the following exemplary embodiment.

[0092] Combine the following Figure 4 The flowchart of an embodiment of determining whether the current power supply is faulty in the method of the present invention further illustrates the specific process of determining whether the current power supply is faulty in step S140, including: steps S410 to S440.

[0093] Step S410: Compare the predicted value of the input voltage of the current power supply with the historical data of the input voltage of the current power supply, determine the degree of fit between the predicted value of the input voltage of the current power supply and the historical data of the input voltage of the current power supply, and record it as the current degree of fit of the input voltage of the current power supply.

[0094] Step S420, determining whether the current fitness of the input voltage of the current power supply is less than a preset fitness threshold.

[0095] Step S430: If it is determined that the current fitness of the input voltage of the current power supply is less than a preset fitness threshold, it is determined that the current power supply is faulty.

[0096] Step S440: If it is determined that the current fitness of the input voltage of the current power supply is greater than or equal to a preset fitness threshold, it is determined that the current power supply is not faulty.

[0097] In the scheme of the present invention, see Figure 6In the example shown, the power management module processes the collected samples through BP neural network. After obtaining the predicted value, the predicted value is compared with the recorded past input sample parameter characteristics to determine the fit: when the fit is less than the threshold, it can be determined that the input is abnormal, that is, a redundant switching instruction is sent; when the fit is within a reasonable range, it can be determined that the input is normal and can be used as the power input power supply of the server power supply device. The predicted value is a voltage value, and the past input sample parameter is also a sample voltage parameter value. The past input sample parameter characteristics refer to the voltage curve characteristics of normal operation under the input, such as AC effective value, frequency, ripple, harmonics, etc. The predicted value is compared with the recorded past input sample parameter characteristics to determine the fit, specifically using the mean square error equation to make a numerical judgment of the fit.

[0098] Among them, the goodness of fit is usually evaluated by regression analysis. In regression analysis, the mean square error (MSE) represents the average square error between the predicted value and the sampled value. The smaller the MSE, the better the fit. The fit refers to the degree of match between a model or method and the actual data or actual situation.

[0099] In the solution of the present invention, a power supply device supports dual input power supply modes, such as AC+AC power supply mode, AC+DC power supply mode, DC+DC power supply mode, etc. After sampling the input voltage, the fault is predicted through the BP neural network, and the fault can be discovered in advance. The redundant switching instruction is sent through the power management module, and the MCU controls the relay to switch the power supply, thereby increasing the switching speed, making the power supply more stable, and reducing the input voltage fluctuation and peak value supplied to the server.

[0100] According to the technical solution of the present embodiment, a dual differential voltage sampling circuit, an MCU and a power management module are provided through a power supply device for an electrical device (such as a server); wherein the power supply device has dual input ports, dual filtering circuits, switches, and a power supply control unit 104 (such as a PFC circuit, a DC / DC circuit, etc.), wherein the dual input ports are used to access an external dual power supply, and when the electrical device is powered by any one of the dual power supplies, the dual differential voltage sampling circuit samples the input voltage of the current power supply in the dual power supply from the dual filtering circuit respectively, and transmits it to the power pipeline module through the MCU, and the power management module uses the BP neural network obtained in advance to predict the input voltage of the current power supply at a future set time according to the input power of the current power supply at the current moment to obtain a predicted value, and predicts whether the current power supply will fail according to the predicted value, and if it is predicted that the current power supply will fail, the MCU controls the switch to switch to another power supply in the dual power supply for power supply; thereby, when the current power supply fails based on the input voltage of the current power supply in the dual power supply, it is switched to another power supply in time to ensure the stability and safety of the electrical device (such as a server) working.

[0101] According to an embodiment of the present invention, a control device for a power supply device corresponding to the control method for a power supply device is also provided. Figure 5 The structure diagram of an embodiment of the device of the present invention is shown. The control device of the power supply device is applied to electrical equipment powered by dual power supplies; the dual power supplies are a redundantly set first power supply and a second power supply, the first power supply and the second power supply can both be an externally input first power supply and an externally input second power supply, the first power supply and the second power supply can also be the first power supply and the second power supply of the power supply device itself; the power supply device includes: a first filtering unit (such as filtering circuit 1), a second filtering unit (such as filtering circuit 2), a switching unit, and a power supply control unit 104 (such as a PFC circuit, a DC / DC circuit, etc.); after the first power supply is input by the first filtering unit, and after the second power supply is input by the second filtering unit, both are under the gating control of the switching unit, and the power supply control unit 104 supplies power to the electrical equipment. In the scheme of the present invention, Figure 5 As shown, the control device of the power supply device includes: an acquisition unit 102 (such as a unit for acquiring sampling values ​​from the differential voltage sampling circuit 1 and the differential voltage sampling circuit 2), and a control unit 104 (such as an MCU and a power management module).

[0102] The control unit 104 is configured to determine one of the first power supply and the second power supply as the current power supply, and control the switch unit to select the connection path between the filter unit corresponding to the current power supply and the power supply control unit 104, so that the current power supply supplies power. Specifically, the control unit 104 is specifically configured to determine one of the first power supply and the second power supply as the current power supply, record the first filter unit and the second filter unit and a filter unit corresponding to the current power supply as the current filter unit, and control the switch unit to select the current filter unit corresponding to the current power supply in the first filter unit and the second filter unit, so that the current filter unit is connected to the power supply control unit 104, so that the current power supply supplies power to the electrical device through the power supply control unit 104. The specific functions and processing of the control unit 104 refer to step S110.

[0103] The acquisition unit 102 is configured to acquire the sampling value of the input voltage of the current power supply at the current moment from the current filtering unit. The specific function and processing of the acquisition unit 102 refer to step S120.

[0104] The control unit 104 is further configured to predict the predicted value of the input voltage of the current power supply at a future set time according to the sampled value of the input voltage of the current power supply and using a pre-trained voltage prediction model; wherein the predicted value of the input voltage of the current power supply refers to the input voltage of the current power supply within a future set period. The specific functions and processing of the control unit 104 are also referred to step S130.

[0105] The control unit 104 is further configured to determine whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply. The specific functions and processing of the control unit 104 are also shown in step S140.

[0106] The control unit 104 is also configured to control the switch unit to select the connection path between the filter unit corresponding to the other power supply of the first power supply and the second power supply and the power supply control unit 104, so as to switch to the power supply of the other power supply. Specifically, the control unit 104 is also configured to control the switch unit to select the other filter unit corresponding to the other power supply of the first power supply and the second power supply in the first filter unit and the second filter unit, so that the other filter unit is connected to the power supply control unit 104, so that the other power supply supplies power to the electrical device through the power supply control unit 104. Of course, the control unit 104 is also configured to control the switch unit to maintain the current selection state if it is determined that the current power supply is not faulty. The specific functions and processing of the control unit 104 can also be found in step S150.

[0107] Figure 6 This is a schematic diagram of the structure of the dual redundant circuit of the server power supply device. Figure 6 As shown, the dual redundant circuit of the server power supply device includes: an input end of a first power supply (such as input 1), an input end of a second power supply (such as input 2), an output end, a filter circuit 1, a filter circuit 2, a differential voltage sampling circuit 1, a differential voltage sampling circuit 2, a switch, a power factor correction (Power Factor Correction, PFC) circuit, a DC / DC circuit (i.e., a DC to DC circuit), a microcontroller unit 104 (Microcontroller Unit, MCU), and a power management module.

[0108] Among them, the input terminal 1 is connected to the first input terminal of the switch after passing through the filter circuit 1, and the input terminal 2 is connected to the second input terminal of the switch after passing through the filter circuit 2; the output terminal of the switch is connected to the output terminal after passing through the PFC circuit and the DC / DC circuit. The differential voltage sampling circuit 1 samples the input voltage of the first power supply from the filter circuit 1 and outputs it to the first input terminal of the MCU, and the differential voltage sampling circuit 2 samples the input voltage of the first power supply from the filter circuit 2 and outputs it to the second input terminal of the MCU, and the output terminal of the MCU is output to the power management module, and the output terminal of the power management module is fed back to the third input terminal of the MCU, and the output terminal of the MCU is connected to the control terminal of the switch.

[0109] exist Figure 6 In the example shown, the input end of the server power supply device is powered by two circuits, which can be AC ​​or DC (such as AC+AC, AC+DC, DC+DC), each with a first-level filtering circuit. After filtering, the voltage signals of the two circuits are differentially sampled and amplified and sent to the MCU. The MCU can control the switch switching to realize redundant switching of the two power supplies.

[0110] In the scheme of the present invention, a reliable and fast solution is provided for redundant switching of dual-input server power supply devices, thereby avoiding large-scale downtime in server rooms and causing data loss, and providing reference data support for staff's subsequent maintenance of the server power supply system.

[0111] The input fault prediction and redundant circuit control scheme of the server power supply device provided by the solution of the present invention provides a reliable and fast redundant switching circuit for the dual-mode input of the server power supply device. Specifically, the state parameters of the two input power supplies are collected and sent to the power management module, and the pre-trained voltage prediction model is used to analyze and predict the state of the two power supply systems. According to the predicted fault, redundant switching is quickly made to make the power supply takeover more continuous and the power output performance more stable.

[0112] In some embodiments, the switch unit includes: a first group of single-pole double-throw relays and a second group of single-pole double-throw relays with the same opening and closing functions; wherein the contacts of the first group of single-pole double-throw relays are connected between the first filtering unit and the power supply control unit 104, and the contacts of the second group of single-pole double-throw relays are connected between the second filtering unit and the power supply control unit 104.

[0113] Figure 7 Schematic diagram of the switching state of the switch. Figure 7 The figure shows a two-way switch circuit, where the live wire L1 and the neutral wire N1 are input 1, and the live wire L2 and the neutral wire N2 are input 2. Figure 7The relay shown is a single-pole double-throw relay with two groups of open and close functions, with four paths (i.e., the live wire L1 of the first path, the live wire L2 of the second path, the neutral wire L1 of the third path, and the neutral wire L2 of the fourth path). The live wire L1 of the first path and the neutral wire L1 of the third path are the first group, and the live wire L2 of the second path and the neutral wire L2 of the fourth path are the second group. The MCU sends a control signal to the control terminal K1 of the first group or the control terminal K2 of the second group to control the closing position of the relay (i.e., the first group is closed or the second group is closed). The output end of the relay has two paths, i.e., D+ path and D- path. The D+ path is connected to the control knife of the first group, and the D- path is connected to the control knife of the second group.

[0114] See also Figure 6 and Figure 7 In the example shown, input 1 and input 2 are the main power supply circuit and the auxiliary power supply circuit respectively, so input 1 is powered first and the first group of relays is closed in advance; when input 1 fails and input 2 needs to be switched, the second group of relays is closed, and input 2 is connected to the server power supply device and supplies power; when the input 1 fault is eliminated and the normal power supply state is restored, the MCU controls the first group of relays to close and restore power to the main power supply circuit. Figure 7 The switching circuit shown only requires a set of four-way switching relays and only two control signals, so the switching circuit and control are simpler and more reliable.

[0115] In the solution of the present invention, a group of four conversion relays are used as a redundant switching circuit, which solves the problem of complex switching circuits and difficult control, and achieves the effects of simple control, high speed, simple circuit and small size.

[0116] In some implementations, the control device of the power supply device described in the solution of the present invention further includes: a process of collecting samples for training to obtain a voltage prediction model of the dual power supply, specifically as follows:

[0117] The acquisition unit 102 is further configured to collect historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply as sample data of the dual power supplies. The specific functions and processing of the acquisition unit 102 are also shown in step S210.

[0118] The control unit 104 is further configured to pre-train and obtain a voltage prediction model of the dual power supply based on the sample data of the dual power supply and a pre-selected BP neural network. The specific functions and processing of the control unit 104 are also shown in step S220.

[0119] The solution of the present invention provides a reliable and fast redundant switching circuit for the dual-mode input of the server power supply device. Specifically, the state parameters of the two-way input power supply are collected and sent to the power management module. The BP neural network is used to analyze and predict the state of the two-way power supply system. According to the predicted fault, redundant switching is quickly performed to make the power supply takeover more continuous and the power output performance more stable.

[0120] In some implementations, the acquisition unit 102 collects historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply as sample data of the dual power supplies, including:

[0121] The acquisition unit 102 is also specifically configured to save the acquired data of the input voltage of the first power supply to form a log when the sampling value of the input voltage of the first power supply within a historical period is acquired; similarly, when the sampling value of the input voltage of the second power supply within a historical period is acquired, the acquired data of the input voltage of the second power supply is saved to form a log, thereby collecting the historical data of the input voltage of the first power supply and the historical data of the input voltage of the second power supply as sample data of the dual power supplies.

[0122] See also Figure 6 In the example shown, the voltage signals sampled by the differential voltage sampling circuit 1 and the differential voltage sampling circuit 2 are sent to the power management module via the MCU, and the data is saved as a log to facilitate fault analysis and power supply maintenance.

[0123] Among them, the log refers to the data information such as the detection voltage, time, circuit switching instructions, output voltage, etc. of the time period recorded and stored in the power management module when the power supply abnormality is detected, such as being stored in the memory inside the power management module in chronological order. In this way, it is convenient for maintenance and technical personnel to view the power supply abnormality information, study and analyze the causes of the input power supply abnormality, improve the power supply circuit and mode, etc., and improve the stability of the power supply. In the scheme of the present invention, the input status data is detected and the data is compiled into a log, which solves the problem of maintenance personnel finding and analyzing the cause of the fault and provides reference data support for the subsequent maintenance of the power supply system.

[0124] In the solution of the present invention, in order to avoid server downtime, the power supply device supports dual-mode input, detects the status of two power supply inputs, is responsible for power supply input management and switching, realizes continuous and stable power supply of the server power supply device, and records fault data to facilitate staff to analyze the cause of the fault and provide data reference for the maintenance of the server power supply device.

[0125] In some implementations, the control unit 104 pre-trains the voltage prediction model of the dual power supply based on the sample data of the dual power supply and a pre-selected BP neural network, including:

[0126] The control unit 104 is further configured to initialize the pre-selected BP neural network, set the initial value of the weight matrix of the BP neural network, and set the learning rate of the BP neural network. The specific functions and processing of the control unit 104 are also shown in step S310.

[0127] The control unit 104 is further configured to divide the sample data of the dual power supply into input samples and output samples, and based on the initial value of the weight, the learning rate, and the preset threshold, use the input samples and the output samples to learn and train the BP neural network to obtain an initial prediction model; wherein the input sample is the value of the input voltage of any power supply in the dual power supply at time t, t being a time in a historical time period; the output sample is the value of the input voltage of any power supply in the dual power supply at time t+1, recorded as the predicted value of the input voltage of any power supply in the dual power supply at time t+1. The specific functions and processing of the control unit 104 can also be found in step S320.

[0128] The control unit 104 is further configured to calculate an error of the initial prediction model, and update the weight and the threshold based on the error of the initial prediction model and the learning rate;

[0129] The control unit 104 is further configured to iterate in this way until the error of the updated initial prediction model reaches a set error range, and determine that the initial prediction model at this time is the required voltage prediction model as the voltage prediction model of the dual power supply obtained by pre-training. The specific functions and processing of the control unit 104 are also shown in step S330.

[0130] See also Figure 6 In the example shown, the power management module performs BP neural network processing on the collected samples. Figure 8 Figure 1 is a flow chart of the BP neural network data prediction process. Figure 8 As shown in the figure, the BP neural network data prediction process includes:

[0131] Step 1: Initialize the BP neural network, set the initial weight of the weight matrix to a random value with a normal distribution between 0.5 and 1, and set the learning rate (i.e., learning rate) η to 0.1, and then execute step 2.

[0132] Step 2: Input the sample group parameters, and calculate the output y of the hidden layer from the input sample, hidden layer threshold, input layer and hidden layer weights. i , the specific calculation formula is formula (1), and then execute step 3.

[0133]

[0134] Among them, x j is the input sample, n is the number of nodes in the input layer, n1 is the number of nodes in the hidden layer, m is the number of output nodes, w ij is the connection coefficient weight, θ i is the threshold value, f i is the transfer function.

[0135] Step 3: After the output layer output is calculated, the hidden layer output y is calculated i , threshold β i , weights ij , get the output value z predicted by BP neural network i , the specific calculation formula is formula (2), and then execute step 4.

[0136]

[0137] Among them, n1 is the number of nodes in the hidden layer, m is the number of output nodes, and s ij is the connection coefficient weight, β i is the threshold value, g i is the transfer function.

[0138] Step 4: Calculate the error e(t). The specific calculation formula is formula (3), and then execute step 5.

[0139] e(t)=d(t)-y(t) (3).

[0140] Among them, d(t) is the actual output of the BP neural network, y(t) is the ideal output of the BP neural network, and e(t) is the error of the tth iteration.

[0141] Step 5: Update the threshold value. Update the threshold value θ by the error e(t) predicted by the BP neural network. i , β i , the specific calculation formula is formula (4) and formula (5), and then execute step 6.

[0142]

[0143] β i(t+1) =β i(t) +e i(t) i=1,2,...,m (5).

[0144] Among them, θi(t) , β i(t) is the t-th threshold, θ i(t+1) , β i(t+1) is the threshold value for the t+1th time, η is the learning rate, y i is the output of the hidden layer, n1 is the number of nodes in the hidden layer, m is the number of output nodes, s ij is the connection coefficient weight, e i(t) is the t-th error.

[0145] Step 6: Update the weights. Update the weights w by the neural network prediction error e(t) ij 、s ij :The specific calculation formula is formula (6) and formula (7), and then execute step 7.

[0146]

[0147] s ij(t+1) =s ij(t) +η·y j ·e i( t) i=1,2,...,n1,j=1,2,...,m (7).

[0148] Among them, ω ij(t) 、s ij(t) is the t-th weight, ω ij(t+1) 、s ij(t+1) is the weight of the t+1th time, η is the learning rate, x j is the input sample, y i is the output of the hidden layer, n1 is the number of nodes in the hidden layer, m is the number of output nodes, e i(t) is the t-th error.

[0149] Step 7: Continuously iterate to obtain the predicted output value that meets the error requirements.

[0150] See also Figure 6 In the example shown, the power management module performs BP neural network analysis on the collected sample data, performs iterative training and learning on past data, and corrects weights and thresholds; the error of the initial iterative prediction of the BP neural network is relatively large. By learning the collected sample data of the actual power supply conditions, the weights and thresholds of the current prediction model are corrected to make the current predicted data consistent with the actual conditions and more accurate.

[0151] The real-time data is predicted and analyzed, and the power supply status is judged to be normal according to the predicted value. If the prediction result determines that the power supply status is about to be abnormal, the power management module sends a redundant switching instruction to the MCU, and the MCU controls the switch to switch the auxiliary power supply circuit. That is, before the current power supply circuit fails and causes power outage or abnormal power supply voltage, the auxiliary power supply circuit is quickly switched to make the input of the server power supply device continuous and the output stable, and reduce the fluctuation intensity and spikes of the output voltage and current during the power outage switching power supply in the redundant switching mode of the relevant scheme, thereby reducing the damage and adverse effects on the server and the power supply. The prediction model processes a time series data of the current detection voltage, for example: the voltage v1 at the previous moment and the voltage v2 at the current moment. The voltage v3 at the next moment can be calculated by the following equation. The predicted value is a series of voltage values ​​that will occur at the next moment, which has not yet occurred at the next moment, but is calculated based on a series of collected samples.

[0152] The fault and status detection methods in related schemes have hysteresis and slow switching speed, resulting in large output voltage fluctuations and peak values, which are not conducive to the working stability and life of the server. In the scheme of the present invention, after two-way voltage detection, the neural network model, namely the BP neural network, predicts the two-way input power supply status, which solves the problem of redundant switching lag in real-time detection in related schemes, can achieve rapid response to faults, reduce the time from power supply anomaly to redundant switching, and make the power input and output voltage of electrical equipment more stable.

[0153] In some implementations, the control unit 104 determines whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply, including:

[0154] The control unit 104 is further configured to compare the predicted value of the input voltage of the current power supply with the historical data of the input voltage of the current power supply, determine the fit between the predicted value of the input voltage of the current power supply and the historical data of the input voltage of the current power supply, and record it as the current fit of the input voltage of the current power supply. The specific functions and processing of the control unit 104 are also referred to step S410.

[0155] The control unit 104 is further configured to determine whether the current fitness of the input voltage of the current power supply is less than a preset fitness threshold. The specific functions and processing of the control unit 104 are also shown in step S420.

[0156] The control unit 104 is further configured to determine that the current power supply is faulty if it is determined that the current fitness of the input voltage of the current power supply is less than a preset fitness threshold. The specific functions and processing of the control unit 104 are also shown in step S430.

[0157] The control unit 104 is further configured to determine that the current power supply is not faulty if the current fitness of the input voltage of the current power supply is greater than or equal to a preset fitness threshold. The specific functions and processing of the control unit 104 are also shown in step S440.

[0158] In the scheme of the present invention, see Figure 6 In the example shown, the power management module performs BP neural network processing on the collected samples. After obtaining the predicted value, the predicted value is compared with the recorded parameter characteristics of the past input samples to determine the fit: when the fit is less than the threshold, it can be determined that the input is abnormal, that is, a redundant switching instruction is sent; when the fit is within a reasonable range, it can be determined that the input is normal and can be used as the power input power supply of the server power supply device.

[0159] Among them, the goodness of fit is usually evaluated by regression analysis. In regression analysis, the mean square error (MSE) represents the average square error between the predicted value and the sampled value. The smaller the MSE, the better the fit. The fit refers to the degree of match between a model or method and the actual data or actual situation.

[0160] In the solution of the present invention, a power supply device supports dual input power supply modes, such as AC+AC power supply mode, AC+DC power supply mode, DC+DC power supply mode, etc. After sampling the input voltage, the fault is predicted through the BP neural network, and the fault can be discovered in advance. The redundant switching instruction is sent through the power management module, and the MCU controls the relay to switch the power supply, thereby increasing the switching speed, making the power supply more stable, and reducing the input voltage fluctuation and peak value supplied to the server.

[0161] Since the processing and functions implemented by the device of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned method, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.

[0162] According to an embodiment of the present invention, a power supply device corresponding to the control device of the power supply device is also provided. The power supply device may include: the control device of the power supply device described above.

[0163] Since the processing and functions implemented by the power supply device of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned devices, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.

[0164] According to an embodiment of the present invention, a computer program product corresponding to a power supply device is also provided, comprising a computer program, which implements the steps of the above-mentioned power supply device control method when executed by a processor.

[0165] Since the processing and functions implemented by the product of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned power supply device, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments and will not be repeated here.

[0166] According to an embodiment of the present invention, a storage medium corresponding to the control method of the power supply device is also provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the control method of the power supply device described above.

[0167] Since the processing and functions implemented by the storage medium of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned method, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.

[0168] In summary, it is easy for those skilled in the art to understand that, under the premise of no conflict, the above-mentioned advantageous methods can be freely combined and superimposed.

[0169] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.

Claims

1. A control method for a power supply device, characterized in that: Applicable to an electrical device powered by dual power supplies; the dual power supplies are a first power supply and a second power supply that are redundantly set; the power supply device comprises: a first filtering unit, a second filtering unit, a switch unit, and a power supply control unit; after the first power supply is input by the first filtering unit and the second power supply is input by the second filtering unit, both are controlled by the switch unit and the power supply control unit supplies power to the electrical device; the control method of the power supply device comprises: Determine one of the first power supply and the second power supply as a current power supply, and control the switch unit to switch on a connection path between the filter unit corresponding to the current power supply and the power supply control unit so that power is supplied by the current power supply; Acquire a sampling value of the input voltage of the current power supply at the current moment from the current filtering unit; According to the sampled value of the input voltage of the current power supply, using a pre-trained voltage prediction model, predicting a predicted value of the input voltage of the current power supply at a set time in the future; Determining whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply; If it is determined that the current power supply fails, the switch unit is controlled to switch on a connection path between the filter unit corresponding to the other power supply of the first power supply and the second power supply and the power supply control unit to switch to the other power supply.

2. The control method of the power supply device according to claim 1, characterized in that: The switch unit includes: a first group of single-pole double-throw relays and a second group of single-pole double-throw relays with the same opening and closing functions; wherein the contacts of the first group of single-pole double-throw relays are connected between the first filtering unit and the power supply control unit, and the contacts of the second group of single-pole double-throw relays are connected between the second filtering unit and the power supply control unit.

3. The control method of the power supply device according to claim 1 or 2, characterized in that: Also includes: Collecting historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply as sample data of the dual power supply; According to the sample data of the dual power supplies, based on a pre-selected BP neural network, a voltage prediction model of the dual power supplies is pre-trained.

4. The control method of the power supply device according to claim 3, characterized in that: Collecting historical data of the input voltage of the first power supply and historical data of the input voltage of the second power supply as sample data of the dual power supplies includes: When the sampling value of the input voltage of the first power supply within a historical period is obtained, the data of the input voltage of the first power supply is saved to form a log; similarly, when the sampling value of the input voltage of the second power supply within a historical period is obtained, the data of the input voltage of the second power supply is saved to form a log, thereby collecting the historical data of the input voltage of the first power supply and the historical data of the input voltage of the second power supply as sample data of the dual power supplies.

5. The control method of the power supply device according to claim 3, characterized in that: According to the sample data of the dual power supply, based on the pre-selected BP neural network, the voltage prediction model of the dual power supply is pre-trained, including: After initializing the pre-selected BP neural network, setting the initial value of the weight of the weight matrix of the BP neural network and setting the learning rate of the BP neural network; The sample data of the dual power supplies are divided into input samples and output samples, and based on the initial value of the weight, the learning rate, and the preset threshold, the BP neural network is studied and trained using the input samples and the output samples to obtain an initial prediction model; wherein the input sample is the value of the input voltage of any power supply in the dual power supplies at time t, where t is a time in a historical time period; the output sample is the value of the input voltage of any power supply in the dual power supplies at time t+1, which is recorded as the predicted value of the input voltage of any power supply in the dual power supplies at time t+1; Calculating an error of the initial prediction model, and updating the weight and the threshold based on the error of the initial prediction model and the learning rate; This iteration is performed until the error of the updated initial prediction model reaches within the set error range, and the initial prediction model at this time is determined to be the required voltage prediction model, which is used as the voltage prediction model of the dual power supply obtained by pre-training.

6. The control method of a power supply device according to any one of claims 1 to 5, characterized in that: Judging whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply includes: Comparing the predicted value of the input voltage of the current power supply with the historical data of the input voltage of the current power supply, determining the degree of fit between the predicted value of the input voltage of the current power supply and the historical data of the input voltage of the current power supply, recorded as the current degree of fit of the input voltage of the current power supply; Determining whether a current fitness of the input voltage of the current power supply is less than a preset fitness threshold; If it is determined that the current fitness of the input voltage of the current power supply is less than a preset fitness threshold, then determining that the current power supply is faulty; If it is determined that the current fitness of the input voltage of the current power supply is greater than or equal to a preset fitness threshold, it is determined that the current power supply is not faulty.

7. A control device for a power supply device, characterized in that: Applicable to an electrical device powered by dual power supplies; the dual power supplies are a first power supply and a second power supply that are redundantly set; the power supply device comprises: a first filtering unit, a second filtering unit, a switch unit, and a power supply control unit; after the first power supply is input by the first filtering unit and the second power supply is input by the second filtering unit, both are controlled by the switch unit and the power supply control unit supplies power to the electrical device; the control device of the power supply device comprises: a control unit configured to determine one of the first power supply and the second power supply as a current power supply, and control the switch unit to switch on a connection path between the filter unit corresponding to the current power supply and the power supply control unit, so that power is supplied by the current power supply; an acquisition unit, configured to acquire a sampled value of the input voltage of the current power supply at a current moment from the current filtering unit; The control unit is further configured to predict a predicted value of the input voltage of the current power supply at a set time in the future by using a pre-trained voltage prediction model according to a sampled value of the input voltage of the current power supply; The control unit is further configured to determine whether the current power supply is faulty according to the predicted value of the input voltage of the current power supply; The control unit is further configured to control the switch unit to switch on a connection path between the filter unit corresponding to the other power supply of the first power supply and the second power supply and the power supply control unit if it is determined that the current power supply fails, so as to switch to power supply by the other power supply.

8. A power supply device, characterized in that: include: The control device of the power supply device as claimed in claim 7.

9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the control method of the power supply device according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the control method of the power supply device according to any one of claims 1 to 6 are implemented.