Control method and control device of micro-grid system and micro-grid system
By setting up multiple working modes in the microgrid system, dynamically adjusting the charging and discharging operations of the energy storage device, the problem of low flexibility between peak shaving, peak cutting and valley filling and photovoltaic absorption is solved, and the full utilization of photovoltaic power and the improvement of grid stability is achieved.
Patent Information
- Application Number
- CN202510359735.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-07-18
AI Technical Summary
The existing microgrid systems have low flexibility in coordinating the relationship between peak regulating, peak shaving and valley filling and photovoltaic absorption, resulting in lower photovoltaic system utilization, insufficient grid stability and increased electricity bills.
By setting up a variety of working modes in the microgrid system, including peak shaving mode, photovoltaic absorption mode and peak shaving and valley filling mode, the working parameters of the device are obtained and the charging and discharging operations of the energy storage device are dynamically adjusted to achieve full utilization of photovoltaic power and grid stability.
It improves the working flexibility of the energy storage device, ensures the effective utilization of photovoltaic power, reduces grid load fluctuations, reduces electricity bill costs, and improves the operating stability of the power grid.
Smart Images

Figure CN120341932A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of microgrid systems, and particularly to a control method, a control device and a microgrid system for a microgrid system. Background Art
[0002] In the prior art, if a certain factory area wants to install an energy storage device for peak shaving and valley filling applications to achieve peak-valley arbitrage, it will most likely encounter the problem of photovoltaic power consumption. At the same time, the energy storage device needs to increase its output during peak load periods to reduce the factory's demand for power from the grid during peak periods, improve energy utilization efficiency, and support the stable operation of the grid. However, how to coordinate the relationship between peak regulation, peak shaving and valley filling, and photovoltaic power consumption is still quite difficult in the current industry. Some current control systems cannot effectively solve this problem, that is, the current microgrid system still has the problem of low flexibility. Summary of the Invention
[0003] The main object of the present invention is to provide a control method, a control device and a microgrid system for a microgrid system, aiming to improve the flexibility of the operation of the energy storage device in the microgrid system.
[0004] To achieve the above object, a control method for a microgrid system provided by the present invention, the microgrid system includes a plurality of devices, and the plurality of devices at least include: a photovoltaic device, an energy storage device, a load, a gateway meter and an AC bus; the AC bus is respectively electrically connected to the photovoltaic device, the energy storage device, the load and the power grid; the gateway meter is used to detect the grid input power; the control method of the microgrid system includes:
[0005] Based on the working modes of the microgrid system, obtain the working parameters of the corresponding devices in the working modes;
[0006] Based on the working parameters, determine the working states of the corresponding devices, and control the energy storage device to perform corresponding charge and discharge actions based on the working states;
[0007] Wherein, the working modes executed by the microgrid system include a peak regulation mode, a photovoltaic power consumption mode, and a peak shaving and valley filling mode.
[0008] In an embodiment, the obtaining the working parameters of the corresponding target devices among the plurality of devices based on the working modes of the microgrid system includes:
[0009] When it is confirmed that the working modes include a peak regulation mode, a photovoltaic power consumption mode, and a peak shaving and valley filling mode, obtain the grid input power detected by the gateway meter;
[0010] The determining the working states of the corresponding devices based on the working parameters includes:
[0011] When the peak shaving setting threshold is less than the grid input power, it is determined that the output power of the photovoltaic device is less than the power consumption of the load.
[0012] When the peak shaving setting threshold is greater than or equal to the grid input power, obtain the output power of the photovoltaic device and the power consumption of the load, and based on the magnitude relationship between the output power of the photovoltaic device and the power consumption of the load, confirm the working state of the corresponding device in the peak shaving and valley filling mode.
[0013] In one embodiment, when it is determined that the output power of the photovoltaic device is less than the power consumption of the load, the controlling the energy storage device to perform corresponding charge and discharge actions based on the working state includes:
[0014] When it is confirmed that the energy storage device is in the charging state, obtain the charge and discharge power of the energy storage device.
[0015] Subtract the sum of the grid input power and the charge and discharge power of the energy storage device from the peak shaving setting threshold to obtain a first difference.
[0016] Based on the minimum value of the first difference and the maximum charge and discharge power of the energy storage device, control the energy storage device to stop charging or discharging.
[0017] When it is confirmed that the energy storage device is in the discharging state or the standby state, obtain the charge and discharge power of the energy storage device and the maximum discharge power of the battery.
[0018] Subtract the sum of the grid input power and the charge and discharge power of the energy storage device from the peak shaving setting threshold to obtain a first difference.
[0019] Based on the minimum value of the first difference, the maximum charge and discharge power of the energy storage device, and the maximum discharge power of the battery, control the energy storage device to discharge.
[0020] In one embodiment, the energy storage device includes a battery. Based on the magnitude relationship between the output power of the photovoltaic device and the power consumption of the load, confirming the working state of the corresponding device in the peak shaving and valley filling mode, and controlling the energy storage device to perform corresponding charge and discharge actions based on the working state includes:
[0021] When the output power of the photovoltaic device is greater than the power consumption of the load, and the energy storage device is in the state of obtaining electric energy from the grid or in standby, obtain the maximum charge and discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value.
[0022] Subtract the sum of the peak shaving setting threshold and the output power of the photovoltaic device from the power consumption of the load to obtain a second difference.
[0023] Control the charging of the energy storage device based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling set value.
[0024] When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is discharging to the power grid, obtain the maximum charge-discharge power of the energy storage device and the maximum charging power of the battery.
[0025] Control the charging of the energy storage device based on the minimum value among the difference between the output power of the photovoltaic device and the power consumption of the load, the maximum charge-discharge power, and the maximum charging power of the battery.
[0026] When the output power of the photovoltaic device is less than or equal to the power consumption of the load and the energy storage device is obtaining electrical energy from the power grid or on standby, obtain the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling set value.
[0027] Subtract the sum of the peak shaving set threshold and the output power of the photovoltaic device from the power consumption of the load to obtain a second difference.
[0028] Control the charging of the energy storage device based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling set value.
[0029] In one embodiment, the controlling the charging of the energy storage device based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling set value includes:
[0030] When the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling set value is negative, obtain the maximum discharge power of the battery.
[0031] Control the discharging of the energy storage device based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, and the maximum discharge power of the battery.
[0032] In one embodiment, the when the output power of the photovoltaic device is less than or equal to the power consumption of the load includes:
[0033] When the energy storage device is discharging to the power grid, obtain the maximum discharge power of the battery and the peak shaving and valley filling set value.
[0034] Control the discharging of the energy storage device based on the minimum value among the difference between the power consumption of the load and the output power of the photovoltaic device and the maximum discharge power of the battery.
[0035] When the difference between the power consumption of the load and the output power of the photovoltaic device is 0, the energy storage device is controlled to discharge based on the minimum value of the maximum discharge power of the battery and the peak shaving and valley filling setting value.
[0036] In one embodiment, the energy storage device includes a battery. The obtaining of the working parameters of the corresponding target device among the multiple devices based on the working modes of the microgrid system includes:
[0037] When it is confirmed that the working modes include a peak regulation mode and a peak shaving and valley filling mode, the grid input power detected by the gateway meter is obtained;
[0038] The determining of the working state of the corresponding device based on the working parameters and the controlling of the energy storage device to perform corresponding charge and discharge actions based on the working state include:
[0039] When the peak regulation setting threshold is less than the grid input power, the working state of the energy storage device is determined;
[0040] When it is confirmed that the energy storage device is obtaining electric energy from the grid, the charge and discharge power of the energy storage device is obtained;
[0041] The difference between the sum of the grid input power and the charge and discharge power of the energy storage device and the peak regulation setting threshold is calculated to obtain a first difference;
[0042] Based on the minimum value of the first difference and the maximum charge and discharge power of the energy storage device, the energy storage device is controlled to stop charging or discharging;
[0043] When it is confirmed that the energy storage device is in a discharging state or a standby state, the charge and discharge power of the energy storage device and the maximum discharge power of the battery are obtained;
[0044] The difference between the sum of the grid input power and the charge and discharge power of the energy storage device and the peak regulation setting threshold is calculated to obtain a first difference;
[0045] Based on the minimum value of the first difference, the maximum charge and discharge power of the energy storage device, and the maximum discharge power of the battery, the energy storage device is controlled to discharge;
[0046] When the peak regulation setting threshold is greater than or equal to the grid input power, the working state of the energy storage device is determined;
[0047] When it is confirmed that the energy storage device is obtaining electric energy from the grid or in a standby state, the output power of the photovoltaic device, the maximum charge and discharge power of the energy storage device, the maximum charge power of the battery, and the peak shaving and valley filling setting value are obtained;
[0048] The difference between the sum of the peak regulation setting threshold and the output power of the photovoltaic device and the power consumption of the load is calculated to obtain a second difference;
[0049] Control the energy storage device to charge based on the minimum value among the second difference, the maximum charge and discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling set value.
[0050] When it is confirmed that the energy storage device is in the charge and discharge state, obtain the output power of the photovoltaic device, the maximum discharge power of the battery, and the peak shaving and valley filling set value.
[0051] Control the energy storage device to discharge to the load based on the minimum value between the difference between the power consumption of the load and the output power of the photovoltaic device and the maximum discharge power of the battery.
[0052] In one embodiment, the energy storage device includes a battery. The obtaining of the working parameters of the corresponding target device among the multiple devices based on the working modes of the microgrid system includes:
[0053] When it is confirmed that the working modes include the photovoltaic accommodation mode and the peak shaving and valley filling mode, obtain the grid input power detected by the gateway meter, the output power of the photovoltaic device, and the power consumption of the load.
[0054] The determining of the working state of the corresponding device based on the working parameters and the controlling of the energy storage device to perform the corresponding charge and discharge actions based on the working state include:
[0055] When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is in the state of obtaining electric energy from the grid or standby, obtain the peak shaving and valley filling set value, the maximum charge and discharge power of the energy storage device, and the maximum charging power of the battery.
[0056] Control the energy storage device to charge based on the minimum value among the maximum value between the difference between the output power of the photovoltaic device and the power consumption of the load and the peak shaving and valley filling set value, the maximum charge and discharge power of the energy storage device, and the maximum charging power of the battery.
[0057] When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is in the state of discharging to the grid, control the energy storage device to charge based on the minimum value between the difference between the output power of the photovoltaic device and the power consumption of the load and the maximum charge and discharge power of the energy storage device, and the maximum charging power of the battery.
[0058] When the output power of the photovoltaic device is less than or equal to the power consumption of the load and the energy storage device is in the state of obtaining electric energy from the grid or standby, obtain the peak shaving and valley filling set value, the maximum charge and discharge power of the energy storage device, and the maximum charging power of the battery.
[0059] Charge based on the minimum value among the peak shaving and valley filling set value, the maximum charge and discharge power of the energy storage device, and the maximum charging power of the battery.
[0060] When the output power of the photovoltaic device is less than or equal to the power consumption of the load and the energy storage device is discharging to the power grid, obtain the peak shaving and valley filling set value and the maximum discharge power of the battery.
[0061] Based on the minimum value among the difference between the power consumption of the load and the output power of the photovoltaic device, the peak shaving and valley filling set value, and the maximum discharge power of the battery, control the energy storage device to discharge.
[0062] The present invention also provides a control device, which includes: a memory, a processor, and a control program of the microgrid system stored on the memory and running on the processor. The control program is configured to implement the steps of the control method of the microgrid system as described in any one of the above.
[0063] The present invention also provides a microgrid system, which includes multiple devices. The multiple devices at least include: a photovoltaic device, an energy storage device, a load, a gateway meter, an AC bus, and the control device as described above;
[0064] Wherein, the AC bus is electrically connected to the photovoltaic device, the energy storage device, the load, and the power grid respectively; the gateway meter is used to detect the power input from the power grid.
[0065] The technical solution of the present invention first confirms the working modes available in the microgrid system, such as the peak shaving mode, the photovoltaic accommodation mode, and the peak shaving and valley filling mode, etc., and obtains the working parameters of the corresponding devices through the working modes available in the microgrid system. For example, when implementing the photovoltaic accommodation mode, it is necessary to obtain the output power of the photovoltaic device to make full use of the output power of the photovoltaic device. By obtaining the working parameters of the corresponding devices, it is possible to confirm whether the supply-demand relationship between the photovoltaic device and the load is satisfied, and it is also possible to confirm the relationship between the power input from the power grid and the peak shaving set threshold, so that the energy storage device obtains electrical energy from the photovoltaic device, or outputs electrical energy to the load, so as to make full use of the electrical energy output by the photovoltaic device, or maintain the stability of the power grid. Therefore, in this way, the flexibility of the operation of the energy storage device in the microgrid system can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0067] Figure 1 It is a schematic flowchart of the control method of the microgrid system of the present invention;
[0068] Figure 2 Schematic flowchart of an embodiment of the control method for the microgrid system of the present invention;
[0069] Figure 3 Schematic flowchart of another embodiment of the control method for the microgrid system of the present invention;
[0070] Figure 4 Schematic flowchart of yet another embodiment of the control method for the microgrid system of the present invention;
[0071] Figure 5 Schematic structural diagram of the microgrid system of the present invention.
[0072] The realization of the object, functional characteristics and advantages of the present invention will be further described in conjunction with the embodiments with reference to the accompanying drawings. Detailed implementation manners
[0073] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0074] It should be noted that all directional indications (such as up, down, left, right, front, back,...) in the embodiments of the present invention are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.
[0075] In addition, the descriptions involving "first", "second", etc. in the present invention are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between various embodiments may be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention.
[0076] In the prior art, if a certain factory area wants to install an energy storage device for peak shaving and valley filling applications to achieve peak-valley arbitrage, it will most likely encounter the problem of PV power consumption. At the same time, the energy storage device needs to increase its output during peak loads to reduce the factory's demand for power from the grid during peak periods, improve energy utilization efficiency, and support the stable operation of the grid. However, regarding how to coordinate the relationship among peak regulation, peak shaving and valley filling, and PV power consumption, it is still quite difficult in the current industry. Some current control systems cannot effectively solve this problem, that is, the current microgrid system still has the problem of low flexibility. Specifically, it can be manifested as follows: only one of the peak regulation, peak shaving and valley filling, and PV power consumption modes can be selected for execution, and they cannot run simultaneously; when only the peak shaving and valley filling strategy is executed, it will cause the utilization rate of the PV system to decrease or even result in curtailment of PV power; it cannot dynamically adjust the power charge and discharge during load fluctuations and can only charge or discharge at a fixed power, resulting in more power being taken from the grid and increasing costs; or it is easy to flow back to the grid, causing an impact on the public grid, and users will also be fined by the power grid company; when the PV power is large and the load power is small, it cannot increase the charging power in real time to absorb the excess PV power, etc.
[0077] Therefore, referring to Figure 1 and Figure 5 , the present invention proposes a control method for a microgrid system. The microgrid system includes multiple devices, and the multiple devices at least include: a PV device, an energy storage device, a load, a gateway meter, and an AC bus; the AC bus is electrically connected to the PV device, the energy storage device, the load, and the power grid respectively; the gateway meter is used to detect the grid input power; the control method for the microgrid system includes:
[0078] Step S100: Based on the working modes available in the microgrid system, obtain the working parameters of the devices corresponding to the working modes.
[0079] Step S200: Based on the working parameters, determine the working states of the corresponding devices, and control the energy storage device to perform corresponding charge and discharge actions based on the working states.
[0080] Among them, the working modes executed by the microgrid system include a peak regulation mode, a PV power consumption mode, and a peak shaving and valley filling mode.
[0081] In this embodiment, the PV device may include PV modules and a PV inverter, so that the DC power generated by the PV modules through light energy conversion is further converted into AC power and output to the AC bus; the energy storage device may include a battery and an energy storage converter, so that the DC power output by the energy storage device is converted into AC power to the AC power grid, and the AC power output by the AC power grid is converted into DC power to the battery to achieve charging; the load may include electrical equipment such as user loads.
[0082] It should be understood that the peak shaving mode is mainly to address the problem of overloaded grid loads during peak electricity demand periods. By adjusting the power generation or consumption mode, the power supply and demand are balanced, avoiding power supply shortages or grid failures caused by excessive loads. The PV accommodation mode focuses on how to maximize the use of electrical energy generated by PV power generation. The goal is to reduce or even eliminate the phenomenon of curtailment of PV power, that is, the situation where PV power generation cannot be effectively utilized due to various reasons. The peak shaving and valley filling mode is a technical means to smooth the grid load curve. By transferring part of the peak load to the valley period, the burden on the grid during peak periods is reduced, and the operating efficiency of the entire grid is improved.
[0083] In this embodiment, the operating modes that the microgrid system has must include the peak shaving and valley filling mode. Therefore, the operating modes that the microgrid system can have can be divided into three types: including the peak shaving mode, the PV accommodation mode, and the peak shaving and valley filling mode; including the peak shaving mode and the peak shaving and valley filling mode; including the PV accommodation mode and the peak shaving and valley filling mode. Among them, the control device will obtain the operating parameters of the corresponding devices according to the operating modes that the microgrid system has. For example, when the microgrid system only has the peak shaving mode and the peak shaving and valley filling mode, the control device will not obtain the output power of the PV device; when the microgrid system only has the PV accommodation mode and the peak shaving and valley filling mode, the control device will not obtain the grid input power. Therefore, the control device will first judge the operating modes that the microgrid system has, and then obtain the operating parameters of the devices required in the corresponding operating modes to execute the corresponding operating methods.
[0084] In this embodiment, the control device will determine the working state of the corresponding device according to the obtained working parameters. For example, by obtaining the grid input power and the peak shaving setting threshold, the control device can judge the relationship between the output power of the photovoltaic device in the microgrid system and the power consumption required by the load. It should be understood that the peak shaving setting threshold is a preset value of the electrical energy that the microgrid system can obtain from the grid at the corresponding time node, so as to prevent the microgrid system from drawing too much power from the grid at the corresponding time node, resulting in fluctuations in the grid due to excessive load. Therefore, the peak shaving setting threshold is a fluctuating value and is a positive value. Among them, the output power of the photovoltaic device will give priority to supplying power to the load. Therefore, when the grid input power is greater than the peak shaving setting threshold, it indicates that the output power of the photovoltaic device cannot meet the power consumption demand of the load, and power needs to be drawn from the grid to meet the power consumption demand of the load. At this time, the control device will control the energy storage device to discharge, or increase the output power of the energy storage device, so as to meet the power consumption demand of the load while avoiding drawing too much power from the grid. When the grid input power is less than the peak shaving setting threshold, it is necessary to further judge the output power of the photovoltaic device and the power consumption of the load. Therefore, when the grid input power is less than the peak shaving setting threshold, the power consumption required by the load may also come from the grid or the energy storage device. At this time, the control device will further confirm the charge and discharge state of the energy storage device by judging the output power of the photovoltaic device and the power consumption of the load.
[0085] By confirming the working modes available in the microgrid system, such as the peak shaving mode, the photovoltaic accommodation mode, and the peak clipping and valley filling mode, etc., and obtaining the working parameters of the corresponding devices through the working modes available in the microgrid system. For example, when implementing the photovoltaic accommodation mode, it is necessary to obtain the output power of the photovoltaic device to achieve the full utilization of the output power of the photovoltaic device. By obtaining the working parameters of the corresponding devices, it is possible to confirm whether the supply-demand relationship between the photovoltaic device and the load is satisfied, and it is also possible to confirm the relationship between the grid input power and the peak shaving setting threshold, so that the energy storage device obtains electrical energy from the photovoltaic device, or outputs electrical energy to the load, so as to make full use of the electrical energy output by the photovoltaic device, or maintain the stability of the grid. Therefore, through this method, the flexibility of the operation of the energy storage device in the microgrid system can be effectively improved.
[0086] Reference Figure 2 , in an embodiment of the present invention, the obtaining the working parameters of the corresponding target device among the multiple devices based on the working modes available in the microgrid system includes:
[0087] Step S110: When it is confirmed that the working mode includes the peak shaving mode, the photovoltaic accommodation mode, and the peak clipping and valley filling mode, obtain the grid input power detected by the gateway meter;
[0088] The determining the working state of the corresponding device based on the working parameters includes:
[0089] Step S210: When the peak shaving set threshold is less than the grid input power, determine that the output power of the photovoltaic device is less than the power consumption of the load.
[0090] Step S220: When the peak shaving set threshold is greater than or equal to the grid input power, obtain the output power of the photovoltaic device and the power consumption of the load, and based on the magnitude relationship between the output power of the photovoltaic device and the power consumption of the load, confirm the working state of the corresponding device in the peak shaving and valley filling mode.
[0091] In this embodiment, the control device has confirmed that the working modes of the microgrid system include a peak shaving mode, a photovoltaic power consumption mode, and a peak shaving and valley filling mode. Therefore, the control device will obtain the output power of the photovoltaic device, the power consumption of the load, the charge and discharge power of the energy storage device, the peak shaving set threshold, the grid input power, the maximum charge and discharge power of the energy storage device, the peak shaving and valley filling set value, the maximum charging power of the battery, and the minimum charging power of the battery, etc. The control device will first obtain the grid input power detected by the gateway meter and the pre-set peak shaving set threshold.
[0092] In this embodiment, when the peak shaving set threshold is less than the grid input power, it indicates that the output power of the photovoltaic device cannot meet the power consumption of the load, that is, it is determined that the output power of the photovoltaic device is less than the power consumption of the load.
[0093] In this embodiment, when the peak shaving set threshold is greater than or equal to the grid input power, it is necessary to further obtain the output power of the photovoltaic device and the power consumption of the load to confirm the relationship between the output power of the photovoltaic device and the power consumption of the load. Because, when the peak shaving set threshold is greater than or equal to the grid input power, the power consumption of the load can come from the photovoltaic device, the energy storage device, and the grid. Therefore, it is necessary for the control device to directly obtain the output power of the photovoltaic device and the power consumption of the load, so as to further judge the working states of the energy storage device and the grid.
[0094] Optionally, refer to Figure 3 , when it is determined that the output power of the photovoltaic device is less than the power consumption of the load, the controlling the energy storage device to perform corresponding charge and discharge actions based on the working state includes:
[0095] Step S211: When it is confirmed that the energy storage device is in a charging state, obtain the charge and discharge power of the energy storage device;
[0096] Step S212: Subtract the sum of the grid input power and the charge and discharge power of the energy storage device from the peak shaving set threshold to obtain a first difference;
[0097] Step S213: Based on the minimum value of the first difference and the maximum charge-discharge power of the energy storage device, control the energy storage device to stop charging or discharging;
[0098] Step S214: When it is confirmed that the energy storage device is in the discharging state or the standby state, obtain the charge-discharge power of the energy storage device and the maximum discharge power of the battery;
[0099] Step S215: Subtract the peak shaving set threshold from the sum of the grid input power and the charge-discharge power of the energy storage device to obtain a first difference;
[0100] Step S216: Based on the minimum value of the first difference, the maximum charge-discharge power of the energy storage device, and the maximum discharge power of the battery, control the energy storage device to discharge.
[0101] In this embodiment, when it is confirmed that the energy storage device is in the charging state, obtain the charge-discharge power of the energy storage device, and subtract the peak shaving set threshold from the sum of the grid input power and the charge-discharge power of the energy storage device to obtain a first difference. Based on the minimum value of the first difference and the maximum charge-discharge power of the energy storage device, control the energy storage device to stop charging or discharging. For example, when the output power of the photovoltaic device is 100KW, the power consumption of the load is 400KW, the charge-discharge power of the energy storage device is -100KW, the grid input power is 400KW, and the peak shaving set threshold is 300KW, the first difference is 0. Among them, the maximum charge-discharge power of the energy storage device is 1000KW, and the charge-discharge power of the energy storage device being -100KW means the charging power of the energy storage device is 100KW. At this time, the control device will control the energy storage device to stop charging. It can be understood that the power consumption of the load is 400KW, 100KW comes from the photovoltaic device, and 300KW comes from the grid. Therefore, the power taken from the grid by the microgrid system will not be greater than the peak shaving set threshold.
[0102] In this embodiment, when it is confirmed that the energy storage device is in the discharging state or the standby state, the charging and discharging power of the energy storage device and the maximum discharging power of the battery are obtained. The difference between the sum of the grid input power and the charging and discharging power of the energy storage device and the peak shaving setting threshold is calculated to obtain a first difference. Based on the minimum value among the first difference, the maximum charging and discharging power of the energy storage device, and the maximum discharging power of the battery, the energy storage device is controlled to discharge. For example, when the output power of the photovoltaic device is 100 KW, the power consumption of the load is 600 KW, the charging and discharging power of the energy storage device is 100 KW, the grid input power is 400 KW, and the peak shaving setting threshold is 300 KW, the first difference is 200 KW. Among them, the maximum charging and discharging power of the energy storage device is 1000 KW, and the charging and discharging power of the energy storage device being 100 KW means the discharging power of the energy storage device is 100 KW. At this time, the control device will control the energy storage device to discharge at 200 KW. It can be understood that the power consumption of the load is 600 KW, 100 KW comes from the photovoltaic device, 300 KW comes from the grid, and 200 KW comes from the energy storage device. Therefore, the power taken from the grid by the microgrid system will not be greater than the peak shaving setting threshold, thus effectively maintaining the stability of the grid.
[0103] Optionally, referring to Figure 4 , the energy storage device includes a battery. Based on the magnitude relationship between the output power of the photovoltaic device and the power consumption of the load, the working state of the corresponding device in the peak shaving and valley filling mode is confirmed, and based on the working state, controlling the energy storage device to perform corresponding charging and discharging actions includes:
[0104] Step S221: When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is in the state of obtaining electric energy from the grid or in standby, obtain the maximum charging and discharging power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value;
[0105] Step S222: Calculate the difference between the sum of the peak shaving setting threshold and the output power of the photovoltaic device and the power consumption of the load to obtain a second difference;
[0106] Step S223: Based on the minimum value among the second difference, the maximum charging and discharging power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value, control the energy storage device to charge;
[0107] Step S224: When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is in the state of discharging to the grid, obtain the maximum charging and discharging power of the energy storage device and the maximum charging power of the battery;
[0108] Step S225: Based on the minimum value among the difference between the output power of the photovoltaic device and the power consumption of the load, the maximum charging and discharging power, and the maximum charging power of the battery, control the energy storage device to charge;
[0109] Step S226: When the output power of the photovoltaic device is less than or equal to the power consumption of the load and the energy storage device is in the state of obtaining electric energy from the power grid or standby, obtain the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value;
[0110] Step S227: Subtract the sum of the peak shaving setting threshold and the output power of the photovoltaic device from the power consumption of the load to obtain a second difference;
[0111] Step S228: Control the energy storage device to charge based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value.
[0112] In this embodiment, the peak shaving setting threshold is greater than or equal to the grid input power. Therefore, the power grid will be under stable operating conditions. Under the condition that the power grid will be under stable operating conditions, the control device will further consider the issues of photovoltaic power consumption and peak shaving and valley filling. The control device will first obtain the output power of the photovoltaic device and the power consumption of the load, and further judge the current working state of the microgrid system by judging the magnitude relationship between the two.
[0113] When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is in the state of obtaining electric energy from the power grid or standby, obtain the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value. Subtract the sum of the peak shaving setting threshold and the output power of the photovoltaic device from the power consumption of the load to obtain a second difference. Control the energy storage device to charge based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value. For example, when the output power of the photovoltaic device is 300 KW, the power consumption of the load is 200 KW, the charge-discharge power of the energy storage device is 100 KW, the peak shaving setting threshold is 300 KW, the maximum charge-discharge power of the energy storage device is 500 KW, the maximum charging power of the battery is 960 KW, and the peak shaving and valley filling setting value is 500 KW, the second difference is 400 KW. At this time, the control device will control the energy storage device to discharge at 400 KW. Among them, the adjusted charging power of the energy storage device is 400 KW, 100 KW comes from the photovoltaic device, and 300 KW comes from the power grid. Through this method, it is effectively ensured that the energy storage device can obtain electric energy from the power grid as much as possible on the premise of ensuring the stability of the power grid to achieve peak-valley arbitrage.
[0114] When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is discharging to the power grid, obtain the maximum charge-discharge power of the energy storage device and the maximum charging power of the battery; control the charging of the energy storage device based on the minimum value among the difference between the output power of the photovoltaic device and the power consumption of the load, the maximum charge-discharge power, and the maximum charging power of the battery. For example, when the output power of the photovoltaic device is 300KW, the power consumption of the load is 200KW, the charge-discharge power of the energy storage device is 100KW, the peak shaving setting threshold is 300KW, the maximum charge-discharge power of the energy storage device is 500KW, and the maximum charging power of the battery is 960KW, the difference between the output power of the photovoltaic device and the power consumption of the load is 100KW. At this time, the control device will control the energy storage device to charge at 100KW. Among them, the adjusted charging power of the energy storage device is 100KW, and this 100KW comes from the photovoltaic device. Through this method, it is effectively ensured that the electric energy generated by the photovoltaic device is effectively utilized and the electric energy generated by the photovoltaic device will not be wasted.
[0115] When the output power of the photovoltaic device is less than or equal to the power consumption of the load and the energy storage device is obtaining electric energy from the power grid or on standby, obtain the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value; subtract the sum of the peak shaving setting threshold and the output power of the photovoltaic device from the power consumption of the load to obtain a second difference; control the charging of the energy storage device based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value. For example, when the output power of the photovoltaic device is 300KW, the power consumption of the load is 400KW, the charge-discharge power of the energy storage device is 100KW, the peak shaving setting threshold is 300KW, the maximum charge-discharge power of the energy storage device is 500KW, the maximum charging power of the battery is 960KW, and the peak shaving and valley filling setting value is 500KW, the second difference is 200KW. At this time, the control device will control the energy storage device to charge at 200KW. Among them, the adjusted charging power of the energy storage device is 200KW, and this 200KW comes from the power grid. Through this method, it is effectively ensured that the energy storage device itself has sufficient power and obtains electric energy during the valley electricity for peak shaving and valley filling to save the electricity cost.
[0116] In an embodiment of the present invention, the controlling the charging of the energy storage device based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value includes:
[0117] When the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum charging power of the battery, and the peak shaving and valley filling setting value is negative, obtain the maximum discharge power of the battery;
[0118] Control the energy storage device to discharge based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, and the maximum discharge power of the battery.
[0119] In this embodiment, the output power of the photovoltaic device is 200 KW, the power consumption of the load is 500 KW, the charge-discharge power of the energy storage device is 100 KW, the peak shaving setting threshold is 200 KW, the maximum charge-discharge power of the energy storage device is 500 KW, the maximum charge power of the battery is 960 KW, and when the peak shaving and valley filling setting value is 500 KW, the second difference is -100 KW. At this time, the control device will obtain the maximum discharge power of the battery, and the maximum discharge power of the battery is 960 KW. Furthermore, the control device will control the energy storage device to discharge at 100 KW. At this time, the power consumption of the load of 500 KW comes from 200 KW output by the photovoltaic device, 100 KW output by the energy storage device, and 200 KW from the power grid respectively. In this way, it effectively ensures the stable operation of the power grid and fully utilizes the output power of the photovoltaic equipment under the condition of meeting the power consumption demand of the load.
[0120] In an embodiment of the present invention, the output power of the photovoltaic device being less than or equal to the power consumption of the load includes:
[0121] When the energy storage device is discharging to the power grid, obtain the maximum discharge power of the battery and the peak shaving and valley filling setting value;
[0122] Control the energy storage device to discharge based on the minimum value between the difference between the power consumption of the load and the output power of the photovoltaic device and the maximum discharge power of the battery;
[0123] When the difference between the power consumption of the load and the output power of the photovoltaic device is 0, control the energy storage device to discharge based on the minimum value between the maximum discharge power of the battery and the peak shaving and valley filling setting value.
[0124] In this embodiment, the output power of the photovoltaic device is less than or equal to the power consumption of the load, and the energy storage device is discharging to the power grid. Assume that the output power of the photovoltaic device is 200 KW, the power consumption of the load is 300 KW, the maximum discharge power of the battery is 960 KW, the peak shaving and valley filling setting value is 300 KW, and the minimum value between the difference between the power consumption of the load and the output power of the photovoltaic device and the maximum discharge power of the battery is 100 KW, that is, the control device will control the energy storage device to discharge at 100 KW. When the difference between the power consumption of the load and the output power of the photovoltaic device is 0, that is, the power consumption of the load is equal to the output power of the photovoltaic device. Assume that the output power of the photovoltaic device is 200 KW, the power consumption of the load is 200 KW, the maximum discharge power of the battery is 960 KW, and the peak shaving and valley filling setting value is 300 KW, the control device will control the energy storage device to discharge to the power grid at 300 KW.
[0125] In an embodiment of the present invention, the energy storage device includes a battery. Obtaining the working parameters of the corresponding target device among a plurality of the devices based on the working modes of the microgrid system includes:
[0126] In the case where it is confirmed that the working modes include a peak shaving mode and a valley filling mode, obtaining the grid input power detected by the gateway meter;
[0127] Determining the working state of the corresponding device based on the working parameters, and controlling the energy storage device to perform corresponding charge and discharge actions based on the working state includes:
[0128] In the case where the peak shaving set threshold is less than the grid input power, determining the working state of the energy storage device;
[0129] In the case where it is confirmed that the energy storage device is obtaining electric energy from the grid, obtaining the charge and discharge power of the energy storage device;
[0130] Taking the difference between the sum of the grid input power and the charge and discharge power of the energy storage device and the peak shaving set threshold to obtain a first difference;
[0131] Based on the minimum value of the first difference and the maximum charge and discharge power of the energy storage device, controlling the energy storage device to stop charging or discharging;
[0132] In the case where it is confirmed that the energy storage device is in a discharge state or a standby state, obtaining the charge and discharge power of the energy storage device and the maximum discharge power of the battery;
[0133] Taking the difference between the sum of the grid input power and the charge and discharge power of the energy storage device and the peak shaving set threshold to obtain a first difference;
[0134] Based on the minimum value of the first difference, the maximum charge and discharge power of the energy storage device, and the maximum discharge power of the battery, controlling the energy storage device to discharge;
[0135] In the case where the peak shaving set threshold is greater than or equal to the grid input power, determining the working state of the energy storage device;
[0136] In the case where it is confirmed that the energy storage device is obtaining electric energy from the grid or in a standby state, obtaining the output power of the photovoltaic device, the maximum charge and discharge power of the energy storage device, the maximum charge power of the battery, and the valley filling set value;
[0137] Taking the difference between the sum of the peak shaving set threshold and the output power of the photovoltaic device and the power consumption of the load to obtain a second difference;
[0138] Based on the minimum value of the second difference, the maximum charge and discharge power of the energy storage device, the maximum charge power of the battery, and the valley filling set value, controlling the energy storage device to charge;
[0139] When it is confirmed that the energy storage device is in the charge and discharge state, obtain the output power of the photovoltaic device, the maximum discharge power of the battery, and the peak shaving and valley filling set value;
[0140] Based on the minimum value of the difference between the power consumption of the load and the output power of the photovoltaic device and the maximum discharge power of the battery, control the energy storage device to discharge to the load.
[0141] In this embodiment, its working principle can refer to the above embodiment. It should be noted that in this embodiment, the working modes of the microgrid system only include the peak shaving mode and the peak shaving and valley filling mode. Therefore, in this embodiment, it will no longer be considered whether the electric energy output by the photovoltaic device is completely consumed, but only whether the electric energy required by the load will affect the stability of the grid operation and the electricity price at different time periods of the grid, that is, peak shaving and valley filling.
[0142] In an embodiment of the present invention, the energy storage device includes a battery, and the obtaining of the working parameters of the corresponding target device in multiple such devices based on the working modes of the microgrid system includes:
[0143] When it is confirmed that the working mode includes the photovoltaic accommodation mode and the peak shaving and valley filling mode, obtain the grid input power detected by the gateway meter, the output power of the photovoltaic device, and the power consumption of the load;
[0144] The determining of the working state of the corresponding device based on the working parameters and the controlling of the energy storage device to perform corresponding charge and discharge actions based on the working state include:
[0145] When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is in the state of obtaining electric energy from the grid or standby, obtain the peak shaving and valley filling set value, the maximum charge and discharge power of the energy storage device, and the maximum charging power of the battery;
[0146] Based on the minimum value of the maximum value between the difference between the output power of the photovoltaic device and the power consumption of the load and the peak shaving and valley filling set value and the maximum charge and discharge power of the energy storage device and the maximum charging power of the battery, control the energy storage device to charge;
[0147] When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is in the state of discharging to the grid, based on the minimum value between the difference between the output power of the photovoltaic device and the power consumption of the load and the maximum charge and discharge power of the energy storage device and the maximum charging power of the battery, control the energy storage device to charge;
[0148] When the output power of the photovoltaic device is less than or equal to the power consumption of the load, and the energy storage device is in a state of obtaining electric energy from the power grid or standby, obtain the peak shaving and valley filling setting value, the maximum charge-discharge power of the energy storage device, and the maximum charging power of the battery;
[0149] Charge based on the minimum value among the peak shaving and valley filling setting value, the maximum charge-discharge power of the energy storage device, and the maximum charging power of the battery;
[0150] When the output power of the photovoltaic device is less than or equal to the power consumption of the load, and the energy storage device is discharging to the power grid, obtain the peak shaving and valley filling setting value and the maximum discharge power of the battery;
[0151] Control the energy storage device to discharge based on the minimum value between the difference between the power consumption of the load and the output power of the photovoltaic device, the peak shaving and valley filling setting value, and the maximum discharge power of the battery.
[0152] In this embodiment, its working principle can refer to the above embodiment. It should be noted that in this embodiment, the working modes of the microgrid system only include the photovoltaic accommodation mode and the peak shaving and valley filling mode. Therefore, in this embodiment, it will no longer consider whether the electric energy required by the load will affect the stability of the power grid, but only consider whether the electric energy output by the photovoltaic equipment can be fully utilized, and the electricity prices at different time periods of the power grid, that is, peak shaving and valley filling.
[0153] In addition, in an embodiment of the present invention, the energy storage device can also be set with a maximum electricity quantity and a minimum electricity quantity. When the electricity quantity in the energy storage device reaches, for example, 95%, the control device will no longer control the energy storage device to continue charging; when the electricity quantity in the energy storage device drops to 5%, the control device will no longer control the energy storage device to continue discharging to ensure the normal use of the energy storage device.
[0154] The present invention also proposes a control device, the control device includes: a memory, a processor, and a control program of the microgrid system stored on the memory and running on the processor, the control program is configured to implement the steps of the control method of the microgrid system as described in any one of the above. It should be noted that since the control device of the present invention is based on the above control method of the microgrid system, therefore, the embodiments of the control device of the present invention include all the technical solutions of all the embodiments of the above control method of the microgrid system, and the achieved technical effects are also exactly the same, which will not be elaborated here.
[0155] The present invention also provides a microgrid system, which includes a plurality of devices. The plurality of devices at least include: a photovoltaic device, an energy storage device, a load, a gateway meter, an AC bus, and the control device as described above. Among them, the AC bus is electrically connected to the photovoltaic device, the energy storage device, the load, and the power grid respectively. The gateway meter is used to detect the grid input power. It should be noted that since the microgrid system of the present invention is based on the above control device, the embodiments of the microgrid system of the present invention include all the technical solutions of all the embodiments of the above control device, and the achieved technical effects are also exactly the same, which will not be elaborated here.
[0156] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structural transformation made under the inventive concept of the present invention by using the content of the specification and drawings of the present invention, or direct / indirect application in other related technical fields is included in the patent protection scope of the present invention.
Claims
1. A control method for a microgrid system, characterized in that, The microgrid system includes multiple devices, and the multiple devices at least include: a photovoltaic device, an energy storage device, a load, a gateway meter, and an AC bus; the AC bus is electrically connected to the photovoltaic device, the energy storage device, the load, and the power grid respectively; the gateway meter is used to detect the grid input power; the control method of the microgrid system includes: Based on the operating modes available to the microgrid system, obtain the operating parameters of the devices corresponding to the operating modes. Based on the operating parameters, determine the operating states of the corresponding devices, and control the energy storage device to perform corresponding charge and discharge actions based on the operating states. Among them, the operating modes executed by the microgrid system include a peak shaving mode, a photovoltaic power consumption mode, and a peak clipping and valley filling mode.
2. The control method of the microgrid system according to claim 1, characterized in that The obtaining of the operating parameters of the corresponding target device among the multiple devices based on the operating modes available to the microgrid system includes: When it is confirmed that the operating modes include the peak shaving mode, the photovoltaic power consumption mode, and the peak clipping and valley filling mode, obtain the grid input power detected by the gateway meter. The determining of the operating states of the corresponding devices based on the operating parameters includes: When the peak shaving set threshold is less than the grid input power, determine that the output power of the photovoltaic device is less than the power consumption of the load. When the peak shaving set threshold is greater than or equal to the grid input power, obtain the output power of the photovoltaic device and the power consumption of the load, and based on the magnitude relationship between the output power of the photovoltaic device and the power consumption of the load, confirm the operating states of the corresponding devices in the peak clipping and valley filling mode.
3. The control method of the microgrid system according to claim 2, characterized in that, When it is determined that the output power of the photovoltaic device is less than the power consumption of the load, the controlling of the energy storage device to perform corresponding charge and discharge actions based on the operating states includes: When it is confirmed that the energy storage device is in a charging state, obtain the charge and discharge power of the energy storage device. Subtract the sum of the grid input power and the charge and discharge power of the energy storage device from the peak shaving set threshold to obtain a first difference. Based on the minimum value of the first difference and the maximum charge and discharge power of the energy storage device, control the energy storage device to stop charging or discharging. When it is confirmed that the energy storage device is in a discharging state or a standby state, obtain the charge and discharge power of the energy storage device and the maximum discharge power of the battery. Subtract the sum of the grid input power and the charge and discharge power of the energy storage device from the peak shaving set threshold to obtain a first difference. Based on the minimum value of the first difference, the maximum charge and discharge power of the energy storage device, and the maximum discharge power of the battery, control the energy storage device to discharge.
4. The control method of the microgrid system according to claim 3, characterized in that, The energy storage device includes a battery. The confirming of the operating states of the corresponding devices in the peak clipping and valley filling mode based on the magnitude relationship between the output power of the photovoltaic device and the power consumption of the load, and the controlling of the energy storage device to perform corresponding charge and discharge actions based on the operating states includes: When the output power of the photovoltaic device is greater than the power consumption of the load, and the energy storage device is in a state of obtaining electrical energy from the grid or in a standby state, obtain the maximum charge and discharge power of the energy storage device, the maximum charging power of the battery, and the peak clipping and valley filling set value. Subtract the sum of the peak shaving set threshold and the output power of the photovoltaic device from the power consumption of the load to obtain a second difference; Based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum battery charging power, and the peak shaving and valley filling set value, control the charging of the energy storage device; When the output power of the photovoltaic device is greater than the power consumption of the load and the energy storage device is discharging to the power grid, obtain the maximum charge-discharge power of the energy storage device and the maximum battery charging power; Based on the minimum value among the difference between the output power of the photovoltaic device and the power consumption of the load, the maximum charge-discharge power, and the maximum battery charging power, control the charging of the energy storage device; When the output power of the photovoltaic device is less than or equal to the power consumption of the load and the energy storage device is obtaining electrical energy from the power grid or on standby, obtain the maximum charge-discharge power of the energy storage device, the maximum battery charging power, and the peak shaving and valley filling set value; Subtract the sum of the peak shaving set threshold and the output power of the photovoltaic device from the power consumption of the load to obtain a second difference; Based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum battery charging power, and the peak shaving and valley filling set value, control the charging of the energy storage device.
5. The control method of the microgrid system according to claim 4, characterized in that, The controlling the charging of the energy storage device based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum battery charging power, and the peak shaving and valley filling set value includes: When the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, the maximum battery charging power, and the peak shaving and valley filling set value is negative, obtain the maximum battery discharge power; Based on the minimum value among the second difference, the maximum charge-discharge power of the energy storage device, and the maximum battery discharge power, control the discharging of the energy storage device.
6. The control method of the microgrid system according to claim 4, wherein The case where the output power of the photovoltaic device is less than or equal to the power consumption of the load includes: When the energy storage device is discharging to the power grid, obtain the maximum battery discharge power and the peak shaving and valley filling set value; Based on the minimum value among the difference between the power consumption of the load and the output power of the photovoltaic device and the maximum battery discharge power, control the discharging of the energy storage device; When the difference between the power consumption of the load and the output power of the photovoltaic device is 0, based on the minimum value among the maximum battery discharge power and the peak shaving and valley filling set value, control the discharging of the energy storage device.
7. The control method of the microgrid system according to claim 1, characterized in that The energy storage device includes a battery. The obtaining the working parameters of the corresponding target device among the multiple devices based on the working modes of the microgrid system includes: When it is confirmed that the working modes include the peak shaving mode and the peak shaving and valley filling mode, obtain the grid input power detected by the gateway meter; The determining the working state of the corresponding device based on the working parameters and controlling the energy storage device to perform the corresponding charge and discharge actions based on the working state includes: When the peak shaving set threshold is less than the grid input power, determine the working state of the energy storage device; When it is confirmed that the energy storage device is obtaining electrical energy from the power grid, obtain the charge-discharge power of the energy storage device; Subtract the sum of the grid input power and the charge-discharge power of the energy storage device from the peak shaving set threshold to obtain a first difference; Based on the minimum value of the first difference and the maximum charge-discharge power of the energy storage device, control the energy storage device to stop charging or discharging; When it is confirmed that the energy storage device is in the discharging state or the standby state, obtain the charge-discharge power of the energy storage device and the maximum discharge power of the battery; Subtract the peak shaving set threshold from the sum of the grid input power and the charge-discharge power of the energy storage device to obtain a first difference; Based on the minimum value of the first difference, the maximum charge-discharge power of the energy storage device, and the maximum discharge power of the battery, control the energy storage device to discharge; When the peak shaving set threshold is greater than or equal to the grid input power, determine the working state of the energy storage device; When it is confirmed that the energy storage device is obtaining electric energy from the grid or in the standby state, obtain the output power of the photovoltaic device, the maximum charge-discharge power of the energy storage device, the maximum charge power of the battery, and the peak shaving and valley filling set value; Subtract the power consumption of the load from the sum of the peak shaving set threshold and the output power of the photovoltaic device to obtain a second difference; Based on the minimum value of the second difference, the maximum charge-discharge power of the energy storage device, the maximum charge power of the battery, and the peak shaving and valley filling set value, control the energy storage device to charge; When it is confirmed that the energy storage device is in the discharging state, obtain the output power of the photovoltaic device, the maximum discharge power of the battery, and the peak shaving and valley filling set value; Based on the minimum value of the difference between the power consumption of the load and the output power of the photovoltaic device and the maximum discharge power of the battery, control the energy storage device to discharge to the load.
8. The control method of the microgrid system according to claim 1, characterized in that, The energy storage device includes a battery. Based on the working modes of the microgrid system, obtaining the working parameters of the corresponding target device among the multiple devices includes: When it is confirmed that the working modes include the photovoltaic accommodation mode and the peak shaving and valley filling mode, obtain the grid input power detected by the gateway meter, the output power of the photovoltaic device, and the power consumption of the load; Based on the working parameters, determining the working state of the corresponding device, and based on the working state, controlling the energy storage device to perform corresponding charge and discharge actions includes: When the output power of the photovoltaic device is greater than the power consumption of the load, and the energy storage device is obtaining electric energy from the grid or in the standby state, obtain the peak shaving and valley filling set value, the maximum charge-discharge power of the energy storage device, and the maximum charge power of the battery; Based on the minimum value of the maximum value between the difference between the output power of the photovoltaic device and the power consumption of the load and the peak shaving and valley filling set value, the maximum charge-discharge power of the energy storage device, and the maximum charge power of the battery, control the energy storage device to charge; When the output power of the photovoltaic device is greater than the power consumption of the load, and the energy storage device is discharging to the grid, based on the minimum value of the difference between the output power of the photovoltaic device and the power consumption of the load and the maximum charge-discharge power of the energy storage device, the maximum charge power of the battery, control the energy storage device to charge; When the output power of the photovoltaic device is less than or equal to the power consumption of the load, and the energy storage device is obtaining electric energy from the grid or in the standby state, obtain the peak shaving and valley filling set value, the maximum charge-discharge power of the energy storage device, and the maximum charge power of the battery; Charge based on the minimum value among the peak shaving and valley filling set value, the maximum charge and discharge power of the energy storage device, and the maximum charging power of the battery. When the output power of the photovoltaic device is less than or equal to the power consumption of the load and the energy storage device is discharging to the power grid, obtain the peak shaving and valley filling set value and the maximum discharge power of the battery. Based on the minimum value between the difference between the power consumption of the load and the output power of the photovoltaic device, the peak shaving and valley filling set value, and the maximum discharge power of the battery, control the energy storage device to discharge.
9. A control device, characterized in that, The control device includes: a memory, a processor, and a control program of the microgrid system stored on the memory and running on the processor. The control program is configured to implement the steps of the control method of the microgrid system according to any one of claims 1-8.
10. A microgrid system, characterized in that, The microgrid system includes multiple devices, and the multiple devices at least include: a photovoltaic device, an energy storage device, a load, a gateway meter, an AC bus, and the control device according to claim 9. Wherein, the AC bus is electrically connected to the photovoltaic device, the energy storage device, the load, and the power grid respectively; the gateway meter is used to detect the grid input power.