This application relates to the field of energy technologies, and in particular, to a method and system for supplying power to a device, and a related device.
A power system includes power stations and power grids (such as substations and power transmission and distribution lines with various voltages) that transmit electric energy generated by the power stations. The power system is used to supply power to devices. The power grid transmits electric energy based on requirements of devices. Load of the power grid is usually unbalanced. For example, the load of the power grid is high in the daytime, but the load of the power grid is low at night. A power generation capacity of the power station is usually stable and does not fluctuate greatly. Due to the load imbalance of the power grid, a power demand is low during off-peak hours (that is, when the load of the power grid is low), and a redundant power generation capacity of the power station cannot be used; and the power demand is high during peak hours (that is, when the load of the power grid is high), which exceeds a power supply capability of the power station. The power grid increases an electricity price during the peak hours to drive users to reduce consumed electricity during the peak hours, thereby balancing the load of the power grid. This electricity price mode is called a stepwise power tariff.
However, for a scenario in which there are a large quantity of devices in a data center, a power demand is high, and workloads of the devices in different time periods are different. As a result, a power demand of the entire data center fluctuates accordingly. Currently, supplying power to a device is to directly use electric energy sent by a power station by using a power grid. However, the device needs to keep a power supply state all the time regardless of being in an off-peak hour or a peak hour. As a result, power costs of the device are huge.
Therefore, how to adjust a manner of supplying power to a device and reduce power costs of the device becomes an urgent technical problem to be resolved.
This application discloses a method and system for supplying power to a device, and a related device, to select a manner of supplying power to the device based on an electricity price, and reduce power supply costs of the device.
According to a first aspect, this application provides a method for supplying power to a device. The method includes: A power storage device controller predicts power load of the device in an electricity price interval, where the electricity price interval is a continuous time period in which electricity prices are the same. The power storage device controller selects a power supply policy for the device based on the power load of the device in the electricity price interval, a quantity of stored electric charges of a power storage device at a first moment, and an electricity price of an electricity price interval within which the first moment falls. The power storage device controller supplies power to the device based on the selected power supply policy.
Optionally, the power storage device controller may predict only power load of the device in a next electricity price interval adjacent to the current electricity price interval, power load of the device in a next electricity price interval non-adjacent to the current electricity price interval, power load of the device in a plurality of electricity price intervals after the current electricity price interval, or power load of the device in all electricity price intervals after the current electricity price interval.
In the solution provided in this application, the power storage device controller may predict the power load of the device in the electricity price interval, and then select the power supply policy for the device with reference to the quantity of stored electric charges of the power storage device at the first moment and the electricity price of the electricity price interval within which the first moment falls. In this way, power supply costs of the device can be reduced.
In a possible implementation, the power storage device controller calculates a quantity of redundant electric charges of the power storage device based on the power load of the device in the electricity price interval, the quantity of stored electric charges of the power storage device at the first moment, and the electricity price of the electricity price interval within which the first moment falls. The power storage device controller determines a power supply mode for the device based on the quantity of redundant electric charges of the power storage device, where the power supply mode includes any one of selecting a power supply to supply power to the device and selecting the power storage device to supply power to the device.
In the solution provided in this application, the power storage device controller determines the power supply mode for the device by calculating the quantity of redundant electric charges of the power storage device. This can ensure that the manner of supplying power to the device can be selected, and avoid a case in which only the power supply can be selected to supply power to the device.
In another possible implementation, when the quantity of redundant electric charges of the power storage device is less than or equal to a first threshold, the power storage device controller selects the power supply to supply power to the device. When the quantity of redundant electric charges of the power storage device is greater than or equal to a second threshold, the power storage device controller selects the power storage device to supply power to the device.
In the solution provided in this application, the power storage device controller selects the manner of supplying power to the device based on a value relationship between the quantity of redundant electric charges of the power storage device and the first threshold and a value relationship between the quantity of redundant electric charges of the power storage device and the second threshold. This can ensure that the selected manner of supplying power can reduce power supply costs of the device.
In another possible implementation, the power storage device controller calculates a quantity of consumed electric charges of the device in the electricity price interval and a quantity of rechargeable electric charges of the power supply in the electricity price interval based on the power load of the device in the electricity price interval. The power storage device controller obtains a quantity of low-price rechargeable electric charges and a quantity of high-price consumed electric charges through statistics collection based on the quantity of consumed electric charges of the device in the electricity price interval and the quantity of rechargeable electric charges of the power supply in the electricity price interval, where the quantity of low-price rechargeable electric charges is a sum of quantities of rechargeable electric charges of the power supply in an electricity price interval in the electricity price interval of which an electricity price is lower than the electricity price of the electricity price interval within which the first moment falls, and the quantity of high-price consumed electric charges is a sum of quantities of consumed electric charges of the device in an electricity price interval in the electricity price interval of which an electricity price is higher than the electricity price of the electricity price interval within which the first moment falls. The power storage device controller obtains the quantity of redundant electric charges of the power storage device through calculation based on the quantity of stored electric charges of the power storage device at the first moment, the quantity of low-price rechargeable electric charges, and the quantity of high-price consumed electric charges, where the quantity of redundant electric charges of the power storage device is a result of subtracting the quantity of high-price consumed electric charges from a sum of the quantity of stored electric charges of the power storage device at the first moment and the quantity of low-price rechargeable electric charges.
In the solution provided in this application, the power storage device controller obtains the quantity of consumed electric charges of the device in the electricity price interval based on the predicted power load in the interval, and then combines the quantity of rechargeable electric charges of the power supply in the electricity price interval and an initial quantity of stored electric charges of the power storage device to obtain the quantity of redundant electric charges of the power storage device through calculation. In this way, it can be ensured that the power storage device controller can correctly select a power supply policy for the device in a subsequent decision-making process.
In another possible implementation, when the quantity of redundant electric charges of the power storage device is less than or equal to the first threshold, the power storage device controller selects the power supply to supply power to the device and charge the power storage device by the power supply while supplying power to the device, where a charging capacity of the power storage device is an absolute value of the quantity of redundant electric charges. When the quantity of redundant electric charges of the power storage device is greater than or equal to the second threshold, the power storage device controller selects the power storage device to supply power to the device, and when a voltage of the power storage device is less than or equal to a voltage threshold, stops supplying power to the device, and selects the power supply to continue to supply power to the device, where a discharging capacity of the power storage device is the quantity of redundant electric charges.
In the solution provided in this application, the power storage device controller selects a manner of supplying power to the device based on the relationship between the quantity of redundant electric charges of the power storage device and the first threshold and the relationship between the quantity of redundant electric charges of the power storage device and the second threshold, so that the power storage device can flexibly switch between charging and discharging. In this way, power supply costs of the device can be finally reduced.
In another possible implementation, the power storage device controller calculates a charging power based on the quantity of redundant electric charges of the power storage device and duration of the electricity price interval within which the first moment falls. The power storage device controller adjusts a power supply voltage based on the charging power, so that the power supply voltage is higher than the voltage of the power storage device, and the power supply charges the power storage device.
In the solution provided in this application, the power storage device controller calculates the charging power, to adjust the power supply voltage to be higher than the voltage of the power storage device, so as to complete charging of the power storage device. In this way, it can be ensured that a charging process of the power storage device is simple and efficient, and charging efficiency of the power storage device is improved.
In another possible implementation, the power storage device controller calculates a discharging power based on the quantity of redundant electric charges of the power storage device and duration of the electricity price interval within which the first moment falls. The power storage device controller adjusts a power supply voltage based on the discharging power, so that the power supply voltage is lower than the voltage of the power storage device, and the power storage device supplies power to the device.
In the solution provided in this application, the power storage device controller calculates the discharging power, to adjust the power supply voltage to be lower than the voltage of the power storage device, so that the power storage device supplies power to the device. In this way, it can be ensured that a discharge process of the power storage device is simple and efficient, and discharge efficiency of the power storage device is improved.
In another possible implementation, the power storage device controller obtains a current of the power storage device. The power storage device controller determines, based on the obtained current of the power storage device, whether to adjust the charging power or the discharging power. The power storage device controller adjusts a current limiting coefficient of the power supply and/or a current limiting coefficient of the power storage device when determining to adjust the charging power or the discharging power.
In the solution provided in this application, the power storage device controller obtains the current of the power storage device, calculates the charging power or the discharging power of the power storage device, and determines whether the charging power or the discharging power of the power storage device is consistent with the expected charging power or the expected determined discharging power. When inconsistent, the current limiting coefficient of the power supply or the current limiting coefficient of the power storage device is adjusted to increase a value of the current passing through the power storage device or decrease a value of the current passing through the power storage device, so as to ensure that the power storage device can be charged or discharged smoothly as expected.
In another possible implementation, the power storage device controller determines an initial power prediction model, where the initial power prediction model includes a deep learning model. The power storage device controller obtains historical power load data of the device, where the historical power load data includes power load of the device recorded before the first moment. The power storage device controller trains the initial power prediction model by using the historical power load data.
In the solution provided in this application, the power storage device controller trains the initial power prediction model by using the historical power load data of the device as sample data, so that the trained power prediction model has a capability of predicting the power load of the device in the electricity price interval. In this way, accuracy of obtaining the power load of the device in the electricity price interval by the power storage device controller and accuracy of the selected power supply policy for the device can be improved.
According to a second aspect, this application provides a power supply control apparatus. The power supply control apparatus includes: a power prediction module, configured to predict power load of a device in an electricity price interval, where the electricity price interval is a continuous time period in which electricity prices are the same; a processing module, configured to select a power supply policy for the device based on the power load of the device in the electricity price interval, a quantity of stored electric charges of a power storage device at a first moment, and an electricity price of an electricity price interval within which the first moment falls; and a communication module, configured to send a power supply command to a power supply or the power storage device, so that the power supply or the power storage device supplies power to the device.
In a possible implementation, the processing module is further configured to: calculate a quantity of redundant electric charges of the power storage device based on the power load of the device in the electricity price interval, the quantity of stored electric charges of the power storage device at the first moment, and the electricity price of the electricity price interval within which the first moment falls; and select a power supply mode based on the quantity of redundant electric charges of the power storage device, where the power supply mode includes any one of selecting the power supply to supply power to the device and selecting the power storage device to supply power to the device.
In another possible implementation, the processing module is further configured to: when the quantity of redundant electric charges of the power storage device is less than or equal to a first threshold, select the power supply to supply power to the device; and when the quantity of redundant electric charges of the power storage device is greater than or equal to a second threshold, select the power storage device to supply power to the device.
In another possible implementation, the processing module is further configured to: calculate a quantity of consumed electric charges of the device in the electricity price interval and a quantity of rechargeable electric charges of the power supply in the electricity price interval based on the power load of the device in the electricity price interval; obtain a quantity of low-price rechargeable electric charges and a quantity of high-price consumed electric charges through statistics collection based on the quantity of consumed electric charges of the device in the electricity price interval and the quantity of rechargeable electric charges of the power supply in the electricity price interval, where the quantity of low-price rechargeable electric charges is a sum of quantities of rechargeable electric charges of the power supply in an electricity price interval in the electricity price interval of which an electricity price is lower than the electricity price of the electricity price interval within which the first moment falls, and the quantity of high-price consumed electric charges is a sum of quantities of consumed electric charges of the device in an electricity price interval in the electricity price interval of which an electricity price is higher than the electricity price of the electricity price interval within which the first moment falls; and obtain the quantity of redundant electric charges of the power storage device through calculation based on the quantity of stored electric charges of the power storage device at the first moment, the quantity of low-price rechargeable electric charges, and the quantity of high-price consumed electric charges, where the quantity of redundant electric charges of the power storage device is a result of subtracting the quantity of high-price consumed electric charges from a sum of the quantity of stored electric charges of the power storage device at the first moment and the quantity of low-price rechargeable electric charges.
In another possible implementation, the processing module is further configured to: when the quantity of redundant electric charges of the power storage device is less than or equal to a first threshold, select the power supply to supply power to the device and charge the power storage device by the power supply while supplying power to the device, where a charging capacity of the power storage device is an absolute value of the quantity of redundant electric charges; and when the quantity of redundant electric charges of the power storage device is greater than or equal to a second threshold, select the power storage device to supply power to the device, and when a voltage of the power storage device is less than or equal to a voltage threshold, stop supplying power to the device, and select the power supply to continue to supply power to the device, where a discharging capacity of the power storage device is the quantity of redundant electric charges.
In another possible implementation, the processing module is specifically configured to: calculate a charging power based on the quantity of redundant electric charges of the power storage device and duration of the electricity price interval within which the first moment falls; and adjust a power supply voltage based on the charging power, so that the power supply voltage is higher than the voltage of the power storage device, and the power supply charges the power storage device.
In another possible implementation, the processing module is specifically configured to: calculate a discharging power based on the quantity of redundant electric charges of the power storage device and duration of the electricity price interval within which the first moment falls; and adjust a power supply voltage based on the discharging power, so that the power supply voltage is lower than the voltage of the power storage device, and the power storage device supplies power to the device.
In another possible implementation, the processing module is further configured to: obtain a current of the power storage device; determine, based on the obtained current of the power storage device, whether to adjust the charging power or the discharging power; and adjust a current limiting coefficient of the power supply and/or a current limiting coefficient of the power storage device when determining to adjust the charging power or the discharging power.
In another possible implementation, the processing module is further configured to: determine an initial power prediction model, where the initial power prediction model includes a deep learning model; obtain historical power load data of the device, where the historical power load data includes power load of the device recorded before the first moment; and train the initial power prediction model by using the historical power load data.
According to a third aspect, this application provides a computing device. The computing device includes a processor and a memory, the memory is configured to store program code, and the processor executes the program code in the memory to implement operation steps of the method according to any one of the first aspect and the implementations of the first aspect.
According to a fourth aspect, this application provides a system for supplying power to a device, including a power module management apparatus, a power storage device, and a power sourcing equipment control apparatus. The power sourcing equipment control apparatus is configured to predict power load of an electric device in an electricity price interval, where the electricity price interval is a continuous time period in which electricity prices are the same; and select a power supply policy for the electric device based on the power load of the electric device in the electricity price interval, a quantity of stored electric charges of the power storage device at a first moment, and an electricity price of an electricity price interval within which the first moment falls. The power storage device is configured to store electric energy and supply power to the electric device. The power module management apparatus is configured to supply power to the electric device and charge the power storage device.
According to a fifth aspect, this application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor performs operation steps of the method for supplying power to the device according to any one of the first aspect and the implementations of the first aspect.
According to a sixth aspect, this application provides a computer program product. The computer program product includes instructions, and when the computer program product is executed by a computer, the computer is enabled to perform a procedure of the method for supplying power to the device according to any one of the first aspect and the implementations of the first aspect.
In this application, on the basis of the implementations according to the foregoing aspects, the implementations may be further combined to provide more implementations.
The following describes the technical solutions in embodiments of this application with reference to the accompanying drawings.
Some terms and related technologies in this application are first described, to facilitate understanding by a person skilled in the art.
A quantity of electric charges (quantity of electric charges) indicates a quantity of electric charges carried by an object, generally with a symbol of Q and a unit of Coulomb (C). The quantity of electric charges may also refer to a quantity of electric energy required by an electric device, and in this case, it is also referred to as electric energy or electric power.
Electric energy (electric energy) refers to a capability of using electricity to work in various forms (that is, generate energy). The unit of the electric energy is kWh (kW*h).
A free charge in a conductor moves regularly in a direction under an action of an electric field force to form a current. A quantity of electric charges passing through any cross section of the conductor in a unit time is called current intensity, which is called current for short. The symbol is I and the unit is ampere (A).
Electric power (electric power) refers to work done by current in a unit time, and is used to indicate a speed of consuming electric energy. The symbol is P, and the unit is watt (W). The formula for calculating the electric power is as follows: P=W/t, indicating the electric energy consumed in a unit time.
A large amount of electric energy needs to be consumed to keep a data center running at all times. Because a device in the data center, for example, a computing device, a network device, or a storage device, needs to keep a power supply state at all times to ensure that a service can be normally provided externally, large electricity costs are generated during peak hours. To reduce an electric energy requirement of the data center for a power grid during the peak hours and reduce electricity costs of the data center, this application provides a method for supplying power to a device, to change a manner of supplying power to the device, reduce the electric energy requirement of the device for the power grid during the peak hours, and effectively reduce power supply costs of the device.
The communication module 1130 in the power storage device control apparatus 110 may be a communication port, be formed by a transceiver or a transceiver-related circuit component, be configured to receive power load data sent by the power management software deployed by the power module management apparatus in the power module management apparatus pool 130 and data related to the power storage device in the power storage device resource pool 120 (for example, a quantity of stored electric charges of the power storage device), and store the data in the data storage module 1140. The data storage module 1140 may be an on-chip random access memory (random access memory, RAM) or a dynamic random access memory (dynamic random access memory, DRAM) in a server. The power prediction module 1110 may be an on-chip arithmetic logic unit (arithmetic logic unit, ALU) or a generic array logic (generic array logic) chip in a server, and is configured to predict a power load curve of a device in the electric device group 140 in a future time period (for example, one day) based on the power load data stored in the data storage module 1140. The power supply mode decision module 1120 may be formed by a processor or a processor-related circuit component, be configured to select a power supply policy for the electric device group 140 based on the power load curve predicted by the power prediction module 1110, an electricity price curve stored in the data storage module 1140, and the quantity of stored electric charges of the power storage device, obtain a charging/discharging capacity and a charging/discharging power of the power storage device through calculation, and finally send the charging/discharging capacity and the charging/discharging power that are obtained through calculation to the power management software in the power module management apparatus by using the communication module 1130, to complete charging and discharging of the power storage device.
It can be seen that, in this application, the device in the electric device group 140 may supply power by using the power module in the power module management apparatus pool 130, or may supply power by using the power storage device in the power storage device resource pool 120, and the power module may charge the power storage device. Therefore, the power storage device control apparatus 110 delivers a charging command to the power module during off-peak hours, so that the power module charges the power storage device when the electricity price is low, and then supplies power to the device in the electric device group 140 during peak hours by using the electric energy stored in the power storage device. This decreases a power demand of the device on the power module during peak hours, reduces power consumption of the power module when the electricity price is high, thereby reducing power supply costs of the device.
It should be noted that, after a basic power facility of the data center is established, a maximum output power is set. The maximum output power is used to ensure a power supply requirement of a device in the data center. However, because a quantity or load of devices in a working state is different, generally, the power supply requirement of the device does not exceed the maximum power. In this case, surplus power other than power that meets the power supply requirement of the device may be used to charge the power storage device.
With reference to the system architecture shown in
S201: A power storage device controller obtains power load of the device in an electricity price interval through prediction by using a power prediction model.
Specifically, the power storage device controller may be deployed on any server or computing device that has computing and communication capabilities. The power storage device controller may be the power storage device control apparatus 110 shown in
It should be understood that an electricity price refers to a price of using electric energy, and may be manually set. The electricity price is not always the same, but stepwise changes. That is, electricity prices corresponding to different time periods are different. For example, from 11:00 p.m. to 7:00 a.m., there are a small number of electricity users, load is light, and the electricity price is low. From 9:00 a.m. to 6:00 p.m., there are a large number of electricity users, load is heavy, and the electricity price is high. The electricity price interval in this application is a continuous time period in which electricity prices are the same, for example, from 11:00 p.m. to 7:00 a.m. described above.
The power storage device controller needs to periodically read the electricity price curve. A reading period of the electricity price curve may be set based on an actual requirement, for example, may be set to one hour. The power storage device controller obtains, based on the electricity price curve, an electricity price of an electricity price interval within which a current reading moment (namely, a first moment) falls, and then determines whether the electricity price at the current reading moment is the same as an electricity price of an electricity price interval within which a reading moment (a second moment) of a previous period falls, namely, a moment that is one period duration (one hour) earlier than the current reading moment. For example, it is assumed that the reading period is one hour, the power storage device controller reads the electricity price curve at 9:00 a.m., to obtain an electricity price in an electricity price interval within which 9:00 a.m. falls, and then determines whether the electricity price is the same as an electricity price in an electricity price interval within which a reading moment of a previous period (namely, 8:00 a.m.) falls. If electricity prices are the same, it indicates that no electricity price inflection point is generated, that is, the electricity price interval within which the first moment falls and the electricity price interval within which the second moment falls are a same electricity price interval. In this case, the power supply mode for the device does not need to be adjusted. Alternatively, if electricity prices are different, it indicates that an electricity price inflection point is generated, that is, the electricity price interval within which the first moment falls and the electricity price interval within which the second moment falls are different electricity price intervals. In this case, a power supply policy needs to be re-determined, and the power storage device controller needs to be triggered to predict power load of the device in a future electricity price interval by using the power prediction model, and further determine, based on a prediction result, whether the power supply policy of the device needs to be adjusted.
In a possible embodiment, when the power storage device controller performs prediction by using the power prediction model, only power load of the device in a next electricity price interval (for example, a next electricity price interval adjacent to the current electricity price interval, or a next electricity price interval not adjacent to the current electricity price interval) of the electricity price interval within which the current reading moment falls may be predicted, power load of the device in a plurality of electricity price intervals after the electricity price interval within which the current reading moment falls may be predicted, or power load of the device in all electricity price intervals after the electricity price interval within which the current reading moment falls may be predicted. This is not limited in this application. For ease of description, this application is described by using an example in which the power storage device controller predicts power load in all electricity price intervals at a time.
Further, before performing prediction, the power storage device controller needs to sample historical power load (for example, power load in a latest week) of the device. A sampling periodicity of the historical power load may be set based on an actual requirement. For example, the sampling periodicity may be set to 10 seconds, that is, the power load of the device is collected every 10 seconds, and collected data is stored. After collecting sufficient historical power load data, the power storage device controller may obtain power load of the device in each future electricity price interval through prediction based on the collected historical power load data. Optionally, the power storage device controller may also divide different time periods based on electricity price intervals, and separately sample power load of each time period.
Optionally, the power storage device controller may predict the power load of the device by using a preset algorithm. The preset algorithm is used to analyze the used data based on a time sequence, to obtain a result that meets a specific characteristic. The preset algorithm includes an extreme gradient boosting (eXtreme gradient boosting, XGBoost) algorithm, a random forest algorithm, a neural network algorithm, or another algorithm that performs prediction by using a time sequence to predict the power load of the device.
For example, the power storage device controller may predict the power load of the device by using a back-propagation (back-propagation, BP) neural network. The BP network continuously corrects a network weight and a threshold by training sample data, so that an error function decreases in a negative gradient direction to finally be close to an expected output. The following specifically describes a training process of the BP network.
Then, the collected historical power load data is normalized as the sample data, and then input to the input layer. After processing, the input layer transmits the processed data to the hidden layer. The hidden layer performs further processing (convolution calculation) on the processed data, and transmits a processing result to the output layer. The output layer updates and adjusts a parameter in the network by using a back-propagation algorithm based on a loss function as a target function. The foregoing processes are iteratively performed until a value of the loss function converges. In this case, BP network training is completed, and the BP network has a capability of predicting power load of the device. The power storage device controller may predict, by using the trained BP network, power load of the device in each future electricity price interval. In a training process, an S-shaped transfer function may be selected for the network transfer function, for example
and the error function is
where Ti is an expected output, and Oi is a calculation output of the network. Based on the error function, the error function E is minimized by continuously adjusting a network weight and a threshold, and training is finally completed.
It should be noted that the power storage device controller may simultaneously predict future power load of the device by using a plurality of prediction algorithms, for example, simultaneously perform prediction by using the XGBoost algorithm, the random forest algorithm, and the neural network algorithm, then compare prediction results of the algorithms, and finally select a most accurate and realistic prediction algorithm. A prediction result of this algorithm is used as a final output result.
S202: The power storage device controller obtains a quantity of redundant electric charges of the power storage device through calculation based on the power load of the device in the electricity price interval, the quantity of stored electric charges of the power storage device at the first moment, and the electricity price of the electricity price interval within which the first moment falls.
Specifically, after obtaining the power load of the device in the electricity price interval based on step S201, the power storage device controller may obtain a quantity of consumed electric charges of the device in the electricity price interval through calculation. It should be understood that a quantity of consumed electric charges of the device in an electricity price interval is an integral of power load of the device in the electricity price interval in a time period corresponding to the electricity price interval. For example, if the electricity price interval is from 7:00 a.m. to 8:00 a.m., and the power load of the device in the time period is 10 kilowatts (kW), the quantity of consumed electric charges of the device in the electricity price interval is 10 kilowatt hours (kW*h).
The power storage device controller further calculates a quantity of rechargeable electric charges of a power module in the electricity price interval, namely, a quantity of electric charges provided by surplus power of the power module in addition to power that meets a power supply requirement of the device when a maximum output power is set. The power module may be a power module in the power module management apparatus pool 130 shown in
After calculating the quantity of consumed electric charges of the device in the electricity price interval and the quantity of rechargeable electric charges of the power supply in the electricity price interval, the power storage device controller obtains a quantity of low-price rechargeable electric charges and a quantity of high-price consumed electric charges through statistics collection. The quantity of low-price rechargeable electric charges is a sum of quantities of rechargeable electric charges of the power module in all electricity price intervals of which an electricity price is lower than the electricity price of the electricity price interval within which the current reading moment (the first moment) falls. The quantity of high-price consumed electric charges is a sum of quantities of consumed electric charges of the device in all electricity price intervals of which an electricity price is higher than the electricity price of the electricity price interval within which the current reading moment falls. After obtaining the quantity of low-price rechargeable electric charges and the quantity of high-price consumed electric charges through statistics collection, the power storage device controller may obtain the quantity of redundant electric charges of the power storage device through calculation. The quantity of redundant electric charges of the power storage device is a result of subtracting the quantity of high-price consumed electric charges from a sum of the quantity of stored electric charges of the power storage device at the current reading moment and the quantity of low-price rechargeable electric charges.
S203: The power storage device controller selects a power supply policy for the device based on the quantity of redundant electric charges of the power storage device obtained through calculation.
Specifically, the power storage device controller decides on a charging and discharging status of the power storage device based on a result of the quantity of redundant electric charges of the power storage device obtained through calculation, and further determines the power supply policy for the device. When the quantity of redundant electric charges of the power storage device obtained through calculation is less than a first threshold, the power module is selected to supply power to the device and charge the power storage device by the power module while supplying power to the device. A charging capacity of the power storage device is an absolute value of the quantity of redundant electric charges. When the quantity of redundant electric charges of the power storage device obtained through calculation is greater than or equal to a second threshold, the power storage device is selected to supply power to the device. A discharging capacity of the power storage device is the quantity of redundant electric charges.
Optionally, the first threshold and the second threshold may be set to a same value, for example, both are set to 0, or may be set to different values. For example, the first threshold is set to 0.1, and the second threshold is set to 0.5.
It should be noted that, because the quantity of redundant electric charges of the power storage device is a result of subtracting the quantity of high-price consumed electric charges from the sum of the quantity of stored electric charges of the power storage device at the current moment and the quantity of low-price rechargeable electric charges of the power storage device. An example in which both the first threshold and the second threshold are set to 0 is used for description. If the quantity of redundant electric charges is less than 0, it indicates that in an electricity price interval after the electricity price interval within which the current moment falls, a sum of the quantity of low-price rechargeable electric charges of the power module and the quantity of stored electric charges in the power storage device at the current moment still cannot meet the quantity of high-price consumed electric charges of the device. Therefore, the power storage device controller selects the power module to supply power to the device and charge the power storage device while supplying power, so that the power storage device stores, in the electricity price interval within which the current moment falls, electric energy charged by the power module. In this way, the stored electric energy is provided for the device for use in a subsequent electricity price interval with a high electricity price, and the quantity of high-price consumed electric charges of the device is reduced. The charging capacity of the power storage device is an absolute value of the quantity of redundant electric charges. Similarly, if the quantity of redundant electric charges is greater than 0, it indicates that in the electricity price interval after the electricity price interval within which the current moment falls, the sum of the quantity of low-price rechargeable electric charges of the power module and the quantity of stored electric charges in the power storage device at the current moment already exceeds the quantity of high-price consumed electric charges of the device. Therefore, the power storage device controller selects the power storage device to supply power to the device, so that the power storage device releases, within the electricity price interval within which the current moment falls, the stored electric energy for use by the device, thereby reducing electric energy of the power module used by the device within the electricity price interval within which the current moment falls. The discharging capacity of the power storage device is the quantity of redundant electric charges.
It should be noted that a capability of storing the electric energy by the power storage device is limited. When the power storage device controller selects the power storage device to supply power to the device, the electric energy stored in the power storage device is continuously consumed. As a result, a voltage of the power storage device continuously decreases. When the electric energy stored in the power storage device is exhausted, that is, when the voltage of the power storage device is less than or equal to a voltage threshold, the power storage device stops supplying power to the device. In this case, to ensure that the device is not powered off, the power module needs to be used to continue to supply power to the device. It should be understood that the voltage of the power storage device is related to the quantity of stored electric charges in the power storage device. When the quantity of stored electric charges in the power storage device reaches a maximum value, the voltage of the power storage device also reaches a maximum value, which is generally 52 volts. When the electric energy stored in the power storage device is exhausted, the voltage of the power storage device reaches a minimum value, which is generally 48 volts. In this state, the power storage device does not continue to discharge. Otherwise, the power storage device may be damaged.
In a possible implementation, the power storage device controller calculates a charging power based on the quantity of redundant electric charges of the power storage device and duration of the electricity price interval within which the current reading moment falls; and adjusts a power supply voltage based on the charging power obtained through calculation, so that the power supply voltage is higher than the voltage of the power storage device, and charges the power storage device.
Specifically, the power storage device controller divides the absolute value of the quantity of redundant electric charges of the power storage device obtained through calculation by the duration of the electricity price interval within which the current reading moment falls, to obtain the charging power, and then adjusts the power supply voltage, so that the power supply voltage is higher than the voltage of the power storage device. This ensures that the power module charges the power storage device while supplying power to the device, so that the power storage device stores electric energy whose current electricity price is low.
In another possible implementation, the power storage device controller calculates a discharging power based on the quantity of redundant electric charges of the power storage device and the duration of the electricity price interval within which the current reading moment falls; and adjusts a power supply voltage based on the discharging power obtained through calculation, so that the power supply voltage is lower than the voltage of the power storage device. This ensures that the power storage device supplies power to the device.
Specifically, the power storage device controller divides the absolute value of the quantity of redundant electric charges of the power storage device obtained through calculation by the duration of the electricity price interval within which the current reading moment falls, to obtain the discharging power, and then adjusts the power supply voltage, so that the power supply voltage is lower than the voltage of the power storage device. This ensures that the power storage device supplies power to the device, and the device does not use the electric energy provided by the power module before the electric energy stored in the power storage device is exhausted.
S204: The power storage device controller supplies power to the device based on the obtained power supply policy.
Specifically, after determining the power supply policy for the device, the power storage device controller sends a corresponding instruction to the power module management apparatus, so that the power module or the power storage device supplies power to the device. For example, when determining to select the power module to supply power to the device, the power storage device controller delivers an instruction for increasing the power supply voltage to the power module management apparatus, so that the power module management apparatus increases the power supply voltage based on the instruction, to ensure that the power supply voltage is higher than the voltage of the power storage device, and the power module supplies power to the device and charges the power storage device at the same time. When determining to select the power storage device to supply power to the device, the power storage device controller delivers an instruction for reducing the power supply voltage to the power module management apparatus, so that the power module management apparatus reduces the power supply voltage based on the instruction, to ensure that the power supply voltage is lower than the voltage of the power storage device, and the power storage device supplies power to the device.
It can be learned that the power storage device controller implements charging and discharging processes of the power storage device by controlling the power supply voltage. The power storage device is completely passive, and does not need to directly receive an instruction sent by the power storage device controller. The power storage device may complete a process of charging or supplying power to the device by making a corresponding conversion based on a change of the power supply voltage.
In a possible implementation, the power storage device controller obtains a current of the power storage device, and determines, based on the obtained current of the power storage device, whether to adjust the charging power or the discharging power.
Specifically, in a process in which the power module supplies power to the device or in a process in which the power storage device supplies power to the device, the power storage device controller may periodically query the current of the current power storage device, or the power storage device periodically reports the current of the power storage device. A query periodicity or a report periodicity may be set based on an actual requirement, for example, may be set to 5 seconds.
After obtaining the current current of the power storage device, the power storage device controller calculates the charging power or the discharging power of the current power storage device based on a charging voltage or a discharging voltage and a power calculation formula, that is, P=I*U, and then, determines whether the power storage device is charged or discharges based on the expected determined charging power or discharging power. If the current charging power or discharging power of the power storage device obtained through calculation deviates from the expectation, the power storage device controller needs to readjust the charging power or discharging power, to ensure that the power storage device can be smoothly charged or discharge as expected.
Optionally, the power storage device controller adjusts a current limiting coefficient of the power module or a current limiting coefficient of the power storage device, to adjust the charging power or discharging power of the power storage device.
Specifically, when the power module charges the power storage device, if the charging power obtained by the power storage device controller through calculation based on the currently obtained current of the power storage device is less than the expected determined charging power (that is, a charging rate of the power storage device is lower than an expected rate), the power storage device controller may adjust the current limiting coefficient of the power supply or the current limiting coefficient of the power storage device, to increase a value of the current passing through the power storage device, thereby increasing the charging power and ensuring that the power storage device can be smoothly charged as expected. Similarly, if the charging power obtained by the power storage device controller through calculation based on the currently obtained current of the power storage device is greater than the expected determined discharging power (that is, the charging rate of the power storage device is higher than the expected rate), the power storage device controller may also adjust the current limiting coefficient of the power supply or the current limiting coefficient of the power storage device, to reduce the value of the current passing through the power storage device, thereby reducing the charging power and ensuring that the power storage device can be charged smoothly as expected.
Similarly, when the power storage device supplies power to the device, if the discharging power obtained by the power storage device controller through calculation based on the currently obtained current of the power storage device is less than the expected determined discharging power (that is, a discharge rate of the power storage device is lower than an expected rate), the power storage device controller may adjust the current limiting coefficient of the power storage device, to increase a value of the current output by the power storage device, thereby increasing the discharging power and ensuring that the power storage device can discharge smoothly as expected. Similarly, if the discharging power obtained by the power storage device controller through calculation based on the currently obtained current of the power storage device is greater than the expected determined discharging power (that is, the discharge rate of the power storage device is higher than the expected rate), the power storage device controller adjusts the current limiting coefficient of the power storage device, to reduce the value of the current output by the power storage device, thereby reducing the discharging power and ensuring that the power storage device can discharge smoothly as expected.
To further describe a process of determining the power supply policy for the device, refer to
It is assumed that in the first electricity price interval, an electricity price is p1, an initial quantity of stored electric charges of the power storage device at the moment is s1, and both a quantity of low-price rechargeable electric charges and a quantity of high-price consumed electric charges at the moment are set to 0. To determine a policy currently used to supply power to the device, the power storage device controller traverses all subsequent electricity price intervals starting from the second electricity price interval. If the second electricity price interval is currently traversed and an electricity price p2 is less than p1, a quantity of low-price rechargeable electric charges L is updated and adjusted to A2, and subsequent electricity price intervals continue to be traversed. If a third electricity price interval is currently traversed, and an electricity price p3 is greater than p1, a quantity of high-price consumed electric charges H is updated and adjusted to B3, and the quantity of redundant electric charges R=s1+L−H of the power storage device is calculated, that is, a difference between a sum of the initial quantity of stored electric charges and the quantity of low-price rechargeable electric charges (namely, the quantity of rechargeable electric charges in the second electricity price interval) of the power storage device and the quantity of high-price consumed electric charges (namely, a quantity of consumed electric charges in the third electricity price interval) is calculated. If the difference is less than 0, it indicates that a requirement of the quantity of consumed electric charges in the third electricity price interval is not met. In this case, in the first electricity price interval, the power module should be selected to supply power to the device and charge the power storage device at the same time. If the value is greater than 0, it indicates that redundant electric energy exists, and the power storage device should be selected to supply power to the device. After the traversal is completed, for each electricity price interval with an electricity price higher than the current electricity price p1, a corresponding quantity of redundant electric charges R of the power storage device may be obtained through calculation, and a minimum value is selected from all the calculated quantities of redundant electric charges obtained through calculation of the power storage device. If the minimum value is less than 0, the power module is selected to supply power to the device and charge the power storage device at the same time, where a charged capacity is an absolute value of the minimum value. If the minimum value is greater than 0, the power storage device is selected to supply power to the device, so that the power storage device releases a quantity of stored electric charges, where the quantity of released electric charges is the minimum value.
It may be understood that, only an example in which the first electricity price interval is a start electricity price interval is used for description. The start electricity price interval may be any electricity price interval, and a decision-making process thereof is similar to that described above. For brevity, details are not described herein again.
It should be noted that, for ease of description, the foregoing method embodiments are described as a series of action combinations. However, a person skilled in the art should understand that the present invention is not limited by the described action sequence. In addition, a person skilled in the art should also understand that embodiments described in this specification are all preferred embodiments, and the actions mentioned are not necessarily required for the present invention. Another appropriate step combination that a person skilled in the art can think of based on the content described above also falls within the protection scope of the present invention.
The methods in embodiments of this application are described in detail above. For ease of better implementing the solutions in embodiments of this application, correspondingly related devices used to cooperate in implementing the solutions are further provided below.
The power prediction module 510 is configured to predict power load of a device in an electricity price interval, where the electricity price interval is a continuous time period in which electricity prices are the same.
The processing module 520 is configured to select a power supply policy for the device based on the power load of the device in the electricity price interval, a quantity of stored electric charges of a power storage device at a first moment, and an electricity price of an electricity price interval within which the first moment falls.
The communication module 530 is configured to send a power supply command to a power supply or the power storage device, so that the power supply or the power storage device supplies power to the device.
Specifically, the power prediction module 510 is configured to perform step S201, and optionally perform an optional method in step S201. The processing module 520 is configured to perform step S202 and step S203, and optionally perform an optional method in step S202 and step S203. The communication module 530 is configured to perform step S204, and optionally perform an optional method in step S204. The three modules may communicate data to each other through a communication channel. It should be understood that the modules included in the power supply control apparatus 500 may be software modules, or may be hardware modules, or some of the modules are software modules and some of the modules are hardware modules.
It should be understood that the power prediction module 510 and the processing module 520 in this embodiment of this application may be implemented by a processor or a processor-related circuit component, and the communication module may be implemented by a transceiver or a transceiver-related circuit component.
It should be noted that the structure of the power supply control apparatus is merely used as an example, and should not constitute a specific limitation. The modules in the power supply control apparatus may be added, removed, or combined as required. In addition, operations and/or functions of the modules in the power supply control apparatus are intended to implement corresponding procedures of the method described in
The computing device 600 may be the power storage device control apparatus in
The processor 610 may include one or more general-purpose processors, for example, a central processing unit (central processing unit, CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD), or a combination thereof. The PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field programmable logic gate array (FPGA), a generic array logic (generic array logic, GAL), or any combination thereof.
The bus 640 may be a peripheral component interconnect (peripheral component interconnect, PCI) bus, an extended industry standard architecture (extended industry standard architecture, EISA) bus, or the like. The bus 640 may be classified into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used to represent the bus in
The memory 630 may include a volatile memory (volatile memory) such as a random access memory (random access memory, RAM); or the memory 630 may include a non-volatile memory (non-volatile memory) such as a read-only memory (read-only memory, ROM), a flash memory (flash memory), a hard disk drive (hard disk drive, HDD), or a solid-state drive (solid-state drive, SSD); or the memory 630 may include a combination of the foregoing types.
It should be noted that the computing device 600 may correspond to the power storage device controller in the foregoing method embodiments. The memory 630 stores program code corresponding to each module of the power supply control apparatus 500. The processor 610 executes the program code to implement functions of each module of the power supply control apparatus 500. That is, the method in S201 to S204 is performed.
This application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, some or all of the steps recorded in any one of the foregoing method embodiments may be implemented.
An embodiment of the present invention further provides a computer program, and the computer program includes instructions. When the computer program is executed by a computer, the computer is enabled to perform some or all steps of any method for provisioning a region resource.
All or some of the foregoing embodiments may be implemented using software, hardware, firmware, or any combination thereof. When the software is used to implement embodiments, all or some of the foregoing embodiments may be implemented in a form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or some of the procedures or functions according to embodiments of this application are generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable apparatuses. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line (DSL)) or wireless (for example, infrared, radio, or microwave) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state drive (SSD).
The foregoing descriptions are merely specific implementations of this application. Any variation or replacement readily figured out by a person skilled in the art based on the specific implementations provided in this application shall fall within the protection scope of this application.
Number | Date | Country | Kind |
---|---|---|---|
202010615072.2 | Jun 2020 | CN | national |
This application is a continuation of International Application No. PCT/CN2021/088668, filed on Apr. 21, 2021, which claims priority to Chinese Patent Application No. 202010615072.2 filed on Jun. 30, 2020. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2021/088668 | Apr 2021 | US |
Child | 18147389 | US |