Working mode switching method, device and electronic device

By real-time detection and switching of the operating mode of the energy storage flywheel, and determining the charging or discharging mode based on the DC bus voltage and preset threshold, the voltage and current response problems of the energy storage flywheel during state switching are solved, and reliability and quality are improved.

CN113629883BActive Publication Date: 2024-12-24BEIJING HONGHUI INT ENERGY TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111072248.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-14
Publication Date
2024-12-24
Estimated Expiration
2041-09-14

AI Technical Summary

Technical Problem

When the energy storage flywheel switches in the charging and discharging states, the voltage and current response speed and quality are difficult to guarantee, and the jump of the DC bus voltage leads to current impact and malfunction.

Method used

By real-time detection of the DC bus voltage of the energy storage flywheel and determining the current working mode based on the preset charging voltage threshold and discharge voltage threshold, switching of the charging mode and discharge mode is achieved to ensure the response speed and quality of voltage and current.

Benefits of technology

It improves the reliability of charging and discharging states in the energy storage flywheel, ensures the response speed and quality of voltage and current, and avoids current impact and malfunctions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113629883B_ABST
    Figure CN113629883B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for switching working modes, which determine the current working mode of the energy storage flywheel according to the DC bus voltage and the charge and discharge voltage thresholds obtained by real-time detection; the charging voltage threshold is greater than the discharge voltage threshold; the working mode includes the charging mode and the discharge mode; according to the current working mode, the current DC bus voltage of the energy storage flywheel, the charging voltage threshold and the discharge voltage threshold, the current working mode of the energy storage flywheel is switched. In this method, the current working mode of the energy storage flywheel is first determined by the DC bus voltage and the preset charge and discharge voltage thresholds, and then the current working mode is switched according to the current working mode and the current DC bus voltage, so that the energy storage flywheel can quickly perform the discharge mode or the charging mode, thereby improving the reliability of switching the charging state and the discharging state in the energy storage flywheel, and at the same time ensuring the voltage and current response speed and quality of the energy storage flywheel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy storage flywheels, and in particular to a method, device and electronic equipment for switching working modes. Background Art

[0002] Energy storage flywheels are usually suitable for working scenarios where charging and discharging states are frequently switched. The switching of charging and discharging states, especially the switching from charging state to discharging state, requires the voltage and current response speed and quality of the flywheel to be guaranteed. In the related art, the DC bus voltage is usually compared with the charging voltage and the discharging voltage to switch the working state. However, in this method, only when the DC bus voltage is less than the discharge voltage, the flywheel begins to gradually increase the discharge voltage to the flywheel voltage regulation value. The larger DC bus support capacitor not only fails to stabilize the voltage, but also prolongs the voltage rise time. At the same time, due to the voltage jump and the switching of charging and discharging, the polarity and amplitude of the current will also jump, resulting in a large current shock and current adjustment time. In addition, when the city power is restored, the DC bus voltage needs to be greater than the charging voltage before it can switch to the charging state. This requires that the DC bus voltage is greater than the charging voltage, and the charging voltage is greater than the flywheel voltage regulation value, and the difference between the three is relatively large, otherwise it will cause malfunction. Summary of the invention

[0003] In view of this, the object of the present invention is to provide a method, device and electronic device for switching working modes to improve the reliability of switching charging state and discharging state in an energy storage flywheel, while ensuring the voltage and current response speed and quality of the energy storage flywheel.

[0004] In a first aspect, an embodiment of the present invention provides a method for switching a working mode, the method comprising: detecting the DC bus voltage of an energy storage flywheel in real time; determining the current working mode of the energy storage flywheel according to the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold; wherein the charging voltage threshold is greater than the discharging voltage threshold; the working modes include: a charging mode and a discharging mode; switching the current working mode of the energy storage flywheel according to the current working mode, the current DC bus voltage of the energy storage flywheel, the charging voltage threshold, and the discharging voltage threshold.

[0005] Furthermore, the step of real-time detection of the DC bus voltage of the energy storage flywheel includes: collecting the DC bus voltage to be processed; the DC bus voltage to be processed is an analog signal; converting the analog signal into a digital signal to obtain an intermediate DC bus voltage; filtering the intermediate DC bus voltage to obtain the DC bus voltage.

[0006] Furthermore, the step of determining the current working mode of the energy storage flywheel according to the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold includes: if the DC bus voltage is greater than the charging voltage threshold, determining that the current working mode of the energy storage flywheel is the charging mode; if the DC bus voltage is less than the discharging voltage threshold, determining that the current working mode of the energy storage flywheel is the discharging mode.

[0007] Furthermore, the step of switching the current working mode of the energy storage flywheel according to the current working mode, the current DC bus voltage of the energy storage flywheel, the charging voltage threshold, and the discharging voltage threshold includes: determining the comparison result between the current DC bus voltage of the energy storage flywheel and the charging voltage threshold and the discharging voltage threshold according to the current working mode; and switching the current working mode of the energy storage flywheel according to the comparison result.

[0008] Furthermore, according to the current working mode, the step of determining the comparison result between the current DC bus voltage of the energy storage flywheel and the charging voltage threshold and the discharging voltage threshold includes: if the current working mode is the charging mode, determining the comparison result between the current DC bus voltage of the energy storage flywheel and the discharging voltage threshold; if the current working mode is the discharging mode, determining the comparison result between the current DC bus voltage of the energy storage flywheel and the charging voltage threshold.

[0009] Furthermore, according to the comparison result, the step of switching the current working mode of the energy storage flywheel includes: if the current DC bus voltage is greater than or equal to the charging voltage threshold, switching the current working mode of the energy storage flywheel to the charging mode; if the current DC bus voltage is less than or equal to the discharging voltage threshold, switching the current working mode of the energy storage flywheel to the discharging mode.

[0010] Furthermore, the step of determining the current operating mode of the energy storage flywheel based on the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold also includes: if the DC bus voltage is less than the charging voltage threshold and the DC bus voltage is greater than the discharging voltage threshold, determining that the current operating mode of the energy storage flywheel remains unchanged.

[0011] In a second aspect, an embodiment of the present invention provides a device for switching a working mode, the device comprising: a detection device for detecting the DC bus voltage of the energy storage flywheel in real time; a determination device for determining the current working mode of the energy storage flywheel according to the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold; wherein the charging voltage threshold is greater than the discharging voltage threshold; the working modes include: a charging mode and a discharging mode; a switching device for switching the current working mode of the energy storage flywheel according to the current working mode, the current DC bus voltage of the energy storage flywheel, the charging voltage threshold, and the discharging voltage threshold.

[0012] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for switching the working mode of any one of the first aspects.

[0013] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method for switching the working mode of any one of the first aspects.

[0014] The embodiments of the present invention bring the following beneficial effects:

[0015] The embodiment of the present invention provides a method, device and electronic device for switching working modes, which detects the DC bus voltage of the energy storage flywheel; determines the current working mode of the energy storage flywheel according to the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold; wherein the charging voltage threshold is greater than the discharging voltage threshold; the working modes include: charging mode and discharging mode; according to the current working mode, the current DC bus voltage of the energy storage flywheel, the charging voltage threshold, and the discharging voltage threshold, the current working mode of the energy storage flywheel is switched. In this method, the current working mode of the energy storage flywheel is first determined by the DC bus voltage and the preset charging and discharging voltage thresholds, and then the current working mode is switched according to the current working mode and the current DC bus voltage, so that the energy storage flywheel can quickly perform the discharging mode or the charging mode, thereby improving the reliability of switching the charging state and the discharging state in the energy storage flywheel, while ensuring the voltage and current response speed and quality of the energy storage flywheel.

[0016] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A flowchart of a method for switching a working mode provided by an embodiment of the present invention;

[0020] Figure 2 A main program flow chart of a method for switching working modes provided by an embodiment of the present invention;

[0021] Figure 3 A flow chart for detecting a DC bus voltage provided by an embodiment of the present invention;

[0022] Figure 4 A timer interrupt flow chart of a method for switching a working mode provided by an embodiment of the present invention;

[0023] Figure 5 A schematic diagram of the structure of a working mode switching device provided by an embodiment of the present invention;

[0024] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] Energy storage flywheels are usually suitable for working scenarios where charging and discharging states are frequently switched. The switching between charging and discharging states, especially the switching from charging state to discharging state, requires ensuring the voltage and current response speed and quality of the flywheel.

[0027] In the related art, the DC bus voltage is usually compared with the charging voltage and the discharging voltage to switch the working state. However, in this method, only when the DC bus voltage is less than the discharge voltage, the flywheel begins to gradually increase the discharge voltage to the flywheel voltage regulation value. The larger DC bus support capacitor not only fails to stabilize the voltage, but also prolongs the voltage rise time, which is generally in milliseconds or even tens of milliseconds. At the same time, due to the voltage jump and the switching of charge and discharge, the polarity and amplitude of the current will also jump, resulting in a large current shock and current adjustment time. In addition, when the city power is restored, the DC bus voltage must be greater than the charging voltage before it can switch to the charging state. This requires that the DC bus voltage is greater than the charging voltage, and the charging voltage is greater than the flywheel voltage regulation value, and the difference between the three is relatively large, otherwise it will cause malfunction.

[0028] Based on this, an embodiment of the present invention provides a method, device and electronic device for switching working modes. This technology can be applied to energy storage flywheels, and in particular, can be applied to controllers of energy storage flywheels.

[0029] To facilitate understanding of this embodiment, a method for switching working modes disclosed in an embodiment of the present invention is first introduced in detail. The method is applied to a digital signal controller, such as a TI series DSP (Digital Signal Process) chip TMS320F28335 digital signal controller. Figure 1 As shown, the method comprises the following steps:

[0030] Step S102, real-time detection of the DC bus voltage of the energy storage flywheel;

[0031] The voltage detection of the energy storage flywheel charge-discharge switching is one of the key technologies of the entire system. It is the guarantee for the energy storage flywheel to switch reliably from charging mode to discharging mode, or from discharging mode to charging mode. Therefore, the energy storage flywheel charge-discharge switching control must complete accurate DC bus voltage detection.

[0032] Since the DC bus voltage is an analog signal, it is easily interfered by the high-power electromagnetic signal of the flywheel motor, so the signal needs to be amplified, filtered, conditioned, etc. during signal detection. Specifically, the flywheel DC bus voltage value can be analyzed by reading the data of the AD (analog-to-digital conversion) channel in the digital signal controller.

[0033] First, the system is initialized, including timer interrupt, I / O configuration, AD interrupt, etc., and interrupts are enabled in time-sharing mode. AD interrupts are mainly used by the program to collect analog voltage signals at a certain frequency and detect the DC bus voltage value in real time.

[0034] Step S104, determining the current working mode of the energy storage flywheel according to the DC bus voltage, the preset charging voltage threshold and the preset discharging voltage threshold; wherein the charging voltage threshold is greater than the discharging voltage threshold; the working modes include: charging mode and discharging mode;

[0035] The above preset charging voltage threshold and the preset discharging voltage threshold can usually be set according to the energy storage flywheel itself, actual needs and actual scenarios. In order to ensure uninterrupted power supply to the load, the above charging voltage threshold is set to be greater than the discharging voltage threshold. For example, the charging voltage threshold is 500V and the discharging voltage threshold is 400V.

[0036] Generally, when the AC power is present, the DC bus voltage of the energy storage flywheel remains at a high value, which is greater than the charging voltage threshold. When the AC power drops, the DC bus voltage of the energy storage flywheel continues to decrease and is less than the set discharge voltage threshold. At this time, the flywheel battery is required to supply power (i.e. discharge) and keep the DC bus voltage constant, thereby ensuring uninterrupted power supply to the load.

[0037] Specifically, the current working mode of the energy storage flywheel can be determined according to the difference between the DC bus voltage and a preset charging voltage threshold and a preset discharging voltage threshold.

[0038] Step S106, switching the current working mode of the energy storage flywheel according to the current working mode, the current DC bus voltage of the energy storage flywheel, the charging voltage threshold, and the discharging voltage threshold.

[0039] Specifically, after the current working mode of the energy storage flywheel is determined, the DC bus voltage may also change as the energy storage flywheel works, so it is necessary to determine the working mode that needs to be switched according to the current DC bus voltage of the energy storage flywheel, which usually includes switching from charging mode to discharging mode, and switching from discharging mode to charging mode.

[0040] Among them, when the energy storage flywheel performs the charge and discharge mode switching control, it first determines the current working mode. The discharge state is determined only in the charging mode, and the charging state is determined only in the discharge mode, so as to avoid repeated program operation. Generally speaking, one to three voltage tests are required to determine the working mode to be switched based on the DC bus voltage. For example, the mode switching can be performed when any one of the three conditions is met, or the mode switching can be performed only when all three conditions are met. The specific strategy can be set according to the actual situation.

[0041] The embodiment of the present invention provides a method for switching working modes, which detects the DC bus voltage of the energy storage flywheel; determines the current working mode of the energy storage flywheel according to the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold; wherein the charging voltage threshold is greater than the discharging voltage threshold; the working modes include: charging mode and discharging mode; according to the current working mode, the current DC bus voltage of the energy storage flywheel, the charging voltage threshold, and the discharging voltage threshold, the current working mode of the energy storage flywheel is switched. In this method, the current working mode of the energy storage flywheel is first determined by the DC bus voltage and the preset charging and discharging voltage thresholds, and then the current working mode is switched according to the current working mode and the current DC bus voltage, so that the energy storage flywheel can quickly perform the discharging mode or the charging mode, thereby improving the reliability of switching the charging state and the discharging state in the energy storage flywheel, while ensuring the voltage and current response speed and quality of the energy storage flywheel.

[0042] A possible implementation method of the above-mentioned step of real-time detection of the DC bus voltage of the energy storage flywheel is as follows: collecting the DC bus voltage to be processed; the DC bus voltage to be processed is an analog signal; converting the analog signal into a digital signal to obtain an intermediate DC bus voltage; filtering the intermediate DC bus voltage to obtain the DC bus voltage.

[0043] The above-mentioned DC bus voltage to be processed is an analog signal, which is easily interfered by the high-power electromagnetic signal of the flywheel motor. Therefore, when collecting signals, it is necessary to amplify, filter, and condition the signals. The filter includes hardware filtering and software filtering. The hardware filtering includes first-order RC filter, second-order active filter, etc., and the software filtering includes de-wilding value filtering, weighted average filtering, sliding average filtering, and low-pass filtering. The selection of these filters needs to be based on the actual situation and combined with the system cutoff frequency. Then the analog signal is converted into a digital signal to obtain the intermediate DC bus voltage; then the intermediate DC bus voltage can be filtered again to obtain the DC bus voltage.

[0044] The following describes how to determine the current working mode of the energy storage flywheel, specifically including: if the DC bus voltage is greater than the charging voltage threshold, determining that the current working mode of the energy storage flywheel is the charging mode; if the DC bus voltage is less than the discharging voltage threshold, determining that the current working mode of the energy storage flywheel is the discharging mode.

[0045] In addition, the above-mentioned step of determining the current working mode of the energy storage flywheel based on the DC bus voltage, the preset charging voltage threshold and the preset discharging voltage threshold also includes: if the DC bus voltage is less than the charging voltage threshold and the DC bus voltage is greater than the discharging voltage threshold, determining that the current working mode of the energy storage flywheel remains unchanged.

[0046] For example, if the DC bus voltage is 600V, which is greater than the charging voltage threshold of 500V, the current working mode of the energy storage flywheel is determined to be the charging mode; if the DC bus voltage is 300V, which is less than the discharging voltage threshold of 400V, the current working mode of the energy storage flywheel is determined to be the discharging mode. If the DC bus voltage is 450V, which is less than the charging voltage threshold of 500V, and the DC bus voltage is 450V, which is greater than the discharging voltage threshold of 400V, the current working mode of the energy storage flywheel is determined to be unchanged.

[0047] The following describes how to switch the current working mode, including:

[0048] (1) according to the current working mode, determining the comparison result between the current DC bus voltage of the energy storage flywheel and the charging voltage threshold and the discharging voltage threshold;

[0049] Specifically, according to the charging mode and the discharging mode, a threshold value is selected for comparison. A possible implementation method is: if the current working mode is the charging mode, the comparison result between the current DC bus voltage of the energy storage flywheel and the discharge voltage threshold is determined; if the current working mode is the discharge mode, the comparison result between the current DC bus voltage of the energy storage flywheel and the charging voltage threshold is determined.

[0050] If the current working mode is the charging mode, determine whether the current DC bus voltage of the energy storage flywheel is less than the discharge voltage threshold. If the current working mode is the discharge mode, determine whether the current DC bus voltage of the energy storage flywheel is greater than the charging voltage threshold.

[0051] (2) According to the comparison result, the current working mode of the energy storage flywheel is switched.

[0052] A possible implementation method is: if the current DC bus voltage is greater than or equal to the charging voltage threshold, the current operating mode of the energy storage flywheel is switched to the charging mode; if the current DC bus voltage is less than or equal to the discharging voltage threshold, the current operating mode of the energy storage flywheel is switched to the discharging mode.

[0053] Specifically, the timer interrupt is used to periodically detect the DC bus voltage value and compare it with the charge and discharge voltage threshold. When the DC bus voltage measurement value is less than or equal to the discharge voltage threshold, the energy storage flywheel immediately switches the charging mode to the discharge mode, and the corresponding variable is set to 1. When the DC bus voltage measurement value is greater than or equal to the charging voltage threshold, the energy storage flywheel immediately switches the discharge mode to the charging mode, and the corresponding variable is reset and the variable is set to 1.

[0054] See also Figure 2 The main program flow chart shown in the figure shows that the system is powered on and completes initialization reset and register initialization; then the timer timing interrupt waits for the main control system instruction. After receiving the main control system startup instruction, the controller turns on the AD interrupt and timer interrupt, enters the main loop, and waits for the interrupt; see Figure 3 As shown in the DC bus voltage detection flow chart, after entering the AD interrupt entry, first determine whether the main control system has an instruction. If there is, read the AD channel data, perform formaldehyde and analysis on the DC bus voltage to obtain the final DC bus voltage, then reset the AD interrupt variable, enter the AD interrupt entry again, and detect the DC bus voltage in real time or periodically. Figure 4As shown, the timer interrupt is entered, and the timer interrupt function is used to judge that if the current system working mode is in the discharge state, the measured DC bus voltage value is compared with the charging voltage value threshold. If the DC bus voltage is higher than or equal to the charging voltage threshold, the system switches to the charging mode, and the working mode variable is set to -1. If the current system working mode is not in the discharge state but in the charging state, the measured DC bus voltage value is compared with the discharge voltage value. If the DC bus voltage is lower than or equal to the discharge voltage, the system switches to the discharge mode, and the working mode variable is set to 1.

[0055] In the above method, the TI series DSP chip TMS320F28335 digital signal controller is fully utilized to realize the flywheel DC bus voltage detection function, and the flywheel working mode is judged according to the DC bus voltage measurement value and the set charge and discharge voltage threshold, and then the flywheel switching mode is judged according to the current DC bus voltage measurement value and the set charge and discharge voltage threshold, so that the energy storage flywheel can quickly perform the discharge mode or the charging mode, which improves the reliability of switching the charging state and the discharging state in the energy storage flywheel, and at the same time ensures the voltage and current response speed and quality of the energy storage flywheel.

[0056] Corresponding to the above method embodiment, the embodiment of the present invention further provides a device for switching a working mode, such as Figure 5 As shown, the device comprises:

[0057] A detection device 51, used for real-time detection of the DC bus voltage of the energy storage flywheel;

[0058] The determining device 52 is used to determine the current working mode of the energy storage flywheel according to the DC bus voltage, the preset charging voltage threshold and the preset discharging voltage threshold; wherein the charging voltage threshold is greater than the discharging voltage threshold; the working modes include: charging mode and discharging mode;

[0059] The switching device 53 is used to switch the current working mode of the energy storage flywheel according to the current working mode, the current DC bus voltage of the energy storage flywheel, the charging voltage threshold, and the discharging voltage threshold.

[0060] The embodiment of the present invention provides a switching device for a working mode, which detects the DC bus voltage of an energy storage flywheel; determines the current working mode of the energy storage flywheel according to the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold; wherein the charging voltage threshold is greater than the discharging voltage threshold; the working modes include: charging mode and discharging mode; according to the current working mode, the current DC bus voltage of the energy storage flywheel, the charging voltage threshold, and the discharging voltage threshold, the current working mode of the energy storage flywheel is switched. In this method, the current working mode of the energy storage flywheel is first determined by the DC bus voltage and the preset charging and discharging voltage thresholds, and then the current working mode is switched according to the current working mode and the current DC bus voltage, so that the energy storage flywheel can quickly perform the discharging mode or the charging mode, thereby improving the reliability of switching the charging state and the discharging state in the energy storage flywheel, while ensuring the voltage and current response speed and quality of the energy storage flywheel.

[0061] Furthermore, the detection device module is also used to: collect the DC bus voltage to be processed; the DC bus voltage to be processed is an analog signal; convert the analog signal into a digital signal to obtain an intermediate DC bus voltage; filter the intermediate DC bus voltage to obtain the DC bus voltage.

[0062] Furthermore, the above-mentioned determination module is also used to: if the DC bus voltage is greater than the charging voltage threshold, determine that the current working mode of the energy storage flywheel is the charging mode; if the DC bus voltage is less than the discharging voltage threshold, determine that the current working mode of the energy storage flywheel is the discharging mode.

[0063] Furthermore, the switching module is also used to: determine the comparison result between the current DC bus voltage of the energy storage flywheel and the charging voltage threshold and the discharging voltage threshold according to the current working mode; and switch the current working mode of the energy storage flywheel according to the comparison result.

[0064] Furthermore, the switching module is also used to: if the current working mode is the charging mode, determine the comparison result between the current DC bus voltage of the energy storage flywheel and the discharge voltage threshold; if the current working mode is the discharge mode, determine the comparison result between the current DC bus voltage of the energy storage flywheel and the charging voltage threshold.

[0065] Furthermore, the switching module is also used to: if the current DC bus voltage is greater than or equal to the charging voltage threshold, switch the current working mode of the energy storage flywheel to the charging mode; if the current DC bus voltage is less than or equal to the discharging voltage threshold, switch the current working mode of the energy storage flywheel to the discharging mode.

[0066] Furthermore, the above-mentioned determination module is also used for: if the DC bus voltage is less than the charging voltage threshold and the DC bus voltage is greater than the discharging voltage threshold, determining that the current working mode of the energy storage flywheel remains unchanged.

[0067] The working mode switching device provided in the embodiment of the present invention has the same technical features as the working mode switching method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0068] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned working mode switching method.

[0069] See also Figure 6 As shown, the electronic device includes a processor 100 and a memory 101, wherein the memory 101 stores machine executable instructions that can be executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the above-mentioned working mode switching method.

[0070] Further, Figure 6 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .

[0071] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0072] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.

[0073] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned working mode switching method.

[0074] The computer program product of the working mode switching method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the method described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0075] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0076] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0077] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0078] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0079] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for switching a working mode, characterized in that: The method comprises: Real-time detection of the DC bus voltage of the energy storage flywheel; wherein the AD interrupt is used to collect analog voltage signals at a certain frequency and detect the DC bus voltage in real time; Determining the current working mode of the energy storage flywheel according to the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold, including: if the DC bus voltage is less than the charging voltage threshold and the DC bus voltage is greater than the discharging voltage threshold, determining that the current working mode of the energy storage flywheel remains unchanged; wherein the charging voltage threshold is greater than the discharging voltage threshold; the working modes include: charging mode and discharging mode; If the current working mode is the charging mode, determining a comparison result between the current DC bus voltage of the energy storage flywheel and the discharge voltage threshold; If the current working mode is the discharge mode, determine the comparison result between the current DC bus voltage of the energy storage flywheel and the charging voltage threshold; wherein the timer interrupt is used to regularly detect the current DC bus voltage and the charging voltage threshold, and compare the current DC bus voltage with the discharge voltage threshold; According to the comparison result, the current working mode of the energy storage flywheel is switched.

2. The method according to claim 1, characterized in that: The step of detecting the DC bus voltage of the energy storage flywheel in real time comprises: Collecting the DC bus voltage to be processed in real time; wherein the DC bus voltage to be processed is an analog signal; converting the analog signal into a digital signal to obtain an intermediate DC bus voltage; The intermediate DC bus voltage is filtered to obtain the DC bus voltage.

3. The method according to claim 1, characterized in that The step of determining the current working mode of the energy storage flywheel according to the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold comprises: If the DC bus voltage is greater than the charging voltage threshold, determining that the current working mode of the energy storage flywheel is a charging mode; If the DC bus voltage is less than the discharge voltage threshold, it is determined that the current operating mode of the energy storage flywheel is a discharge mode.

4. The method according to claim 1, characterized in that: According to the comparison result, the step of switching the current working mode of the energy storage flywheel comprises: If the current DC bus voltage is greater than or equal to the charging voltage threshold, switching the current working mode of the energy storage flywheel to the charging mode; If the current DC bus voltage is less than or equal to the discharge voltage threshold, the current operating mode of the energy storage flywheel is switched to the discharge mode.

5. A device for switching a working mode, characterized in that: The device comprises: A detection device is used to detect the DC bus voltage of the energy storage flywheel in real time; wherein the AD interrupt is used to collect analog voltage signals at a certain frequency and detect the DC bus voltage in real time; A determination device, used to determine the current working mode of the energy storage flywheel according to the DC bus voltage, a preset charging voltage threshold and a preset discharging voltage threshold, specifically used to: if the DC bus voltage is less than the charging voltage threshold, and the DC bus voltage is greater than the discharging voltage threshold, determine that the current working mode of the energy storage flywheel remains unchanged; wherein the charging voltage threshold is greater than the discharging voltage threshold; the working modes include: charging mode and discharging mode; The switching device is specifically used to: if the current working mode is the charging mode, determine the comparison result between the current DC bus voltage of the energy storage flywheel and the discharge voltage threshold; if the current working mode is the discharge mode, determine the comparison result between the current DC bus voltage of the energy storage flywheel and the charging voltage threshold; wherein the timer interrupt is used to regularly detect the current DC bus voltage and the charging voltage threshold, and the current DC bus voltage and the discharge voltage threshold; according to the comparison result, the current working mode of the energy storage flywheel is switched.

6. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the working mode switching method described in any one of claims 1 to 4.

7. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the working mode switching method described in any one of claims 1 to 4.