Software online upgrading control circuit and method and inverter system
Through the coordinated control of the relay between MCU1 and MCU2, the photovoltaic energy storage system is realized to be constantly loaded during program upgrade, solving the problems of complex and high cost in the existing technology, and adopting a simple control circuit structure.
Patent Information
- Application Number
- CN202411037894.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-31
AI Technical Summary
The existing photovoltaic energy storage systems are difficult to effectively maintain the continuous power of the load during program upgrades, and the control circuit logic is complex and costly.
A software online upgrade control circuit is adopted, which communicates with each other through MCU1 and MCU2, and is connected to the relay control circuit respectively. When MCU1 works normally, the relay is controlled by MCU1, and when upgrading, the MCU2 is controlled separately to ensure that the load is constantly powered, and the upgrade is through the blocking circuit. Protect the inverter during the process.
It realizes that the load is constantly powered when MCU1 is upgraded, the control circuit structure is simple and the cost is low, avoiding the problems of complex logic and high cost.
Smart Images

Figure CN118920585A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of renewable energy power generation technology, and in particular to a software online upgrade control circuit, method and inverter system. Background Art
[0002] When the photovoltaic energy storage system resets the MCU for program upgrade, it is often necessary to maintain control of the relay between the grid and the load, so as to achieve uninterrupted power supply to the load during the program upgrade to ensure that the load is not affected by the program upgrade.
[0003] There are many ways to ensure that the load is powered on during program upgrades in the prior art. For example, the invention patent with patent number CN117559659A discloses a control circuit for a relay on the load side of an inverter. Specifically, the control state of the relay is obtained by controlling chip 1 and control chip 2 through the operation of the NOT gate chip U1 and the OR gate chip. When there is no fault and the program needs to be upgraded (only one controller program is upgraded at a time), the relay maintains a closed state. The invention requires the use of two logic chips, and the control circuit logic provided is complex, which makes the operation complex and the cost high during actual use.
[0004] For example, the invention patent with patent number CN117595481A discloses an OTA upgrade control circuit, control method and inverter device, which specifically controls the state of the relay through the high and low levels output by each control circuit and drive circuit. When one of the DSP chips is upgraded by OTA, the other chip can maintain the attraction of the two relays to avoid the situation where the load loses power. This invention needs to increase the OTA special IO signal of the DSP chip to achieve the technical effect of not losing power to the load, and its versatility is poor. Summary of the invention
[0005] One of the purposes of the present application is to provide an inverter system that implements a software online upgrade control method through a software online upgrade control circuit, which can solve at least one defect in the background technology.
[0006] In order to achieve one of the above-mentioned purposes, the technical solution adopted in the present application is: a software online upgrade control circuit, including MCU1, MCU2 and a relay control circuit; the MCU1 and the MCU2 communicate with each other and are electrically connected to the input end of the relay control circuit respectively, and the output end of the relay control circuit is controlled and connected to the relay group of the inverter system; when the MCU1 is working normally, the MCU1 controls the relay group through the relay control circuit, and the MCU2 is used to cooperate with the MCU1; when the MCU1 is isolated and upgraded, the MCU2 is suitable for controlling the relay group alone through the relay control circuit.
[0007] Preferably, the relay group includes a plurality of relays, and the relay control circuit includes a plurality of first AND gate units; the MCU1 is electrically connected to one of the input ends of each of the first AND gate units, the MCU2 is electrically connected to all the input ends of each of the first AND gate units, and the output end of the first AND gate unit is control-connected to the corresponding relay; when the MCU1 works normally, the first AND gate unit sends an enable signal for controlling closure to the relay through the high-level signal sent by the MCU1 and the MCU2; when the MCU1 is upgraded, it is isolated from the first AND gate unit, and the first AND gate unit sends an enable signal for controlling closure to the relay through the high-level signal sent by the MCU2.
[0008] Preferably, the first AND gate unit has two input terminals, and the MCU1 is suitable for sending a control signal one to the first input terminal of the first AND gate unit through a first unidirectional branch; the MCU2 is suitable for sending a status mode signal to the first input terminal of the first AND gate unit through a second unidirectional branch, and the MCU2 is suitable for sending a control signal two to the second input terminal of the first AND gate unit through a third unidirectional branch; when the MCU1 works normally, the control signal one and the control signal two are both high level, and the status mode signal is low level; when the MCU1 is upgraded, the control signal one is low level, and the status mode signal and the control signal two are both high level.
[0009] Preferably, the status mode signal is used to reflect the working mode of the MCU1, and the control signal 2 is a maintenance and fault detection signal of the relay; when a fault occurs in the power grid or the inverter, the control signal 2 is at a low level so that the first AND gate unit disconnects the relay.
[0010] Preferably, the software online upgrade control circuit further includes a blocking circuit, and the blocking circuit is suitable for blocking the inverter through the signals output by the MCU1 and the MCU2 when the MCU1 is upgraded.
[0011] Preferably, the blocking circuit includes a protection circuit and a second AND gate unit; the protection circuit is connected to the IO port of the MCU1; the protection circuit, the PWM port of the MCU1 and the MCU2 are respectively connected to the three input ends of the second AND gate unit; the output end of the second AND gate unit is connected to the inverter control; when the MCU1 is working normally, the input ends of the second AND gate unit are all high level, so that the second AND gate unit sends a high level PWM control signal to the inverter for wave generation; when the MCU1 is upgraded, the MCU1 is suitable for sending a low level signal to the second AND gate unit, so that the second AND gate unit outputs a low level to control the inverter not to generate waves.
[0012] A software online upgrade control method using the above-mentioned software online upgrade control circuit comprises the following steps: sending a software upgrade preparation instruction to the MCU1, so that the MCU1 enters the program upgrade preparation stage and performs a software program backup; controlling the working mode of the inverter so that the inverter can work in a grid-connected mode to perform subsequent steps; the MCU1 and the MCU2 send the output level signal to the relay control circuit to obtain the control signal of the relay group; the MCU1 receives a new software program upgrade package and performs a software upgrade; the integrity and correctness of the upgraded new program are verified; if the verification is successful, the MCU1 enters a control state, and the MCU2 exits the control state; if the verification fails, the MCU1 needs to roll back to the backed-up original program version or enter a fault recovery mode.
[0013] Preferably, the working mode control of the inverter includes the following process: judging the current working mode of the inverter; if the inverter is in the grid-connected mode, maintaining the relay energized state; if the inverter is in the off-grid mode, further judging whether the inverter meets the grid-connected requirements; for the inverter that meets the grid-connected requirements, switching to the grid-connected mode, and for the inverter that does not meet the grid-connected requirements, maintaining the relay to maintain the off-grid mode.
[0014] Preferably, a backup module is provided for the original program storage of the MCU1; the backup module is provided in a flash storage area of the MCU1, and / or an auxiliary storage module communicatively connected to the MCU1 is provided as the backup module.
[0015] An inverter system includes a program upgrade architecture for implementing the above-mentioned software online upgrade control method.
[0016] Compared with the prior art, the beneficial effects of this application are:
[0017] When MCU1 is upgraded, MCU2 can maintain the load without power failure; and when MCU1 is upgraded, PWM will block the wave to protect the inverter; the overall control circuit structure is simple and low in cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a schematic diagram of the topological structure of the software online upgrade control circuit of this application.
[0019] Figure 2 The following is a schematic diagram of the workflow of the software online upgrade control method of the present application.
[0020] Figure 3 Schematic diagram of the structure of the inverter system of the present application. DETAILED DESCRIPTION
[0021] Below, the present application is further described in conjunction with specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.
[0022] In the description of the present application, it should be noted that directional words, such as the terms "center", "lateral", "longitudinal", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", etc., indicating directions and positional relationships are based on the directions or positional relationships shown in the accompanying drawings, which are only for the convenience of narrating the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and cannot be understood as limiting the specific scope of protection of the present application.
[0023] It should be noted that the terms "first", "second", etc. in the description and claims of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0024] The terms "including" and "having" and any variations thereof in the specification and claims of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0025] In order to facilitate the understanding of the following content, we can first briefly describe the structure of the traditional inverter system. The inverter system can include a power generation system, an energy storage system, and a UPS system, etc.; that is, the technical solution of the present application can implement a pre-power generation system, an energy storage system, and a UPS system, etc. For the sake of easy understanding, the following will be described through a photovoltaic energy storage system. Figure 3 As shown, the traditional photovoltaic energy storage system mainly includes PV units, energy storage units, DC / DC units, bidirectional DC / DC and DC / AC units (inverters). The PV unit and the energy storage unit are respectively connected to the corresponding DC / DC unit and the bidirectional DC / DC unit and then connected in parallel to the input side bus of the DC / AC unit. The output end of the DC / AC unit is connected to the power grid through a control switch, and the load is also connected in parallel to the output side of the DC / AC unit through a control switch. In this field, relays are commonly used control switches, and the relays installed on the positive and negative busbars between the power grid and the DC / AC unit and the relays installed on the positive and negative busbars between the load and the DC / AC unit can form corresponding relay groups respectively. When the inverter system is connected to the grid, the inverter system can supply power to the load by closing the relay group; when the inverter system is off-grid, if the load wants to continue working, the grid can supply power to the load by closing the relay group.
[0026] One aspect of the present application provides a software online upgrade control circuit, such as Figure 1 As shown, one of the preferred embodiments includes MCU1, MCU2 and a relay control circuit. MCU1 and MCU2 communicate with each other and are electrically connected to the input end of the relay control circuit respectively, and the output end of the relay control circuit is controlled and connected to the relay group of the inverter system. When MCU1 is working normally, the control of the relay group by the relay control circuit is mainly realized by MCU1, and at this time MCU2 is used to coordinate MCU1 to control the relay group so that the inverter system can perform normal grid-connected work. When MCU1 needs to be upgraded, MCU1 can disconnect the control of the relay group, that is, MCU1 is isolated from the relay control circuit, and at this time MCU2 can control the relay group alone through the relay control circuit, thereby ensuring that the load can continue to work without power failure when MCU1 is upgraded.
[0027] It should be known that, based on the above-mentioned circuit structure, this embodiment mainly provides a dual MCU switching control architecture; wherein, MCU1 is a main processor, mainly used to control the relay group when the inverter system is working normally, and MCU2 is a slave processor, which only replaces MCU1 to control the relay group to maintain the load from power failure when MCU1 is upgraded; compared with the traditional method, the overall control circuit structure of this embodiment is simple and low-cost.
[0028] It should also be known that, from the above content, there are multiple relay groups; for example, the output end of the power grid and the inverter and the output end of the load and the inverter are each provided with a group of relays, that is, the number of relay groups is two. Generally speaking, in order to ensure the grid connection safety of the inverter system, the output end of the power grid and the inverter needs to be connected in series with multiple groups of relays; a specific example is, Figure 3 As shown, two groups of relays are connected in series between the power grid and the output end of the inverter, and the number of relay groups included in the inverter system is three. In order to facilitate the description of the subsequent content, the three groups of relays can be marked; the relay groups connected between the power grid and the output end of the inverter are marked as k1 and k2 respectively, and the relay group connected between the load and the output end of the inverter is marked as k3.
[0029] In this embodiment, there are multiple specific structures of the relay control circuit that can realize the load power-off when the MCU1 is upgraded. For the sake of easy understanding, one of the structures will be described in detail below. Figure 1 As shown, the relay control circuit includes a plurality of first AND gate units corresponding to the number of relays. MCU1 can be electrically connected to one of the input ends of each first AND gate unit, MCU2 can be electrically connected to all the input ends of each first AND gate unit, and the output end of the first AND gate unit can be control-connected to the corresponding relay. When MCU1 is working normally, MCU1 and MCU2 can simultaneously send a high-level signal to the input end of the first AND gate unit, so that the first AND gate unit sends a high-level enable signal for controlling closure to the relay through the high-level signal sent by MCU1 and MCU2, thereby maintaining the continued attraction of the relay to ensure that the load can continue to work without power failure. When MCU1 is upgraded, MCU1 can be isolated from the first AND gate unit; at the same time, MCU2 can simultaneously send a high-level signal to the input end of the first AND gate unit, so that the first AND gate unit continues to send a high-level enable signal for controlling closure to the relay through the high-level signal sent by MCU2, thereby maintaining the continued closure of the relay to ensure that the load can continue to work without power failure.
[0030] It should be known that the specific structure and working principle of the first AND gate unit are well known to those skilled in the art, so they will not be elaborated in detail here; the working logic of the AND gate unit is to output a high level only when all inputs are at a high level. The number of input terminals of the first AND gate unit is related to the number of control sources involved in the control of the relay group; in this embodiment, since the relay group is mainly controlled by MCU1 and MCU2, the number of input terminals of the first AND gate unit is two, namely the first input terminal and the second input terminal. There are many specific connection methods for MCU2 and the first AND gate unit. For the convenience of understanding, two specific examples will be used for detailed description below.
[0031] Example 1: MCU1 can be electrically connected to the first input end of each first AND gate unit through the first unidirectional branch, so that MCU1 can send a control signal to the first input end of the first AND gate unit through the first unidirectional branch. MCU2 can be electrically connected to both input ends of each first AND gate unit through the second unidirectional branch at the same time, so that MCU2 can send a control signal to both input ends of the first AND gate unit through the second unidirectional branch at the same time. When MCU1 is working normally, the control signals sent by MCU1 and MUC2 are both high level, then the first AND gate unit can output a high level enable signal to control each relay to remain closed to ensure the normal grid-connected operation of the inverter system. When MCU1 is upgraded, MCU1 will send a low level control signal, at which time the first unidirectional branch will be cut off, so that MCU1 is isolated from the first AND gate unit; at the same time, MCU2 continues to send a high level control signal to the input end of the first AND gate unit, so that the first AND gate unit can still output a high level enable signal to control each relay to remain closed to ensure that the load can work normally without power failure.
[0032] Example 2: If Figure 1 As shown, MCU1 can be electrically connected to the first input end of each first AND gate unit through the first unidirectional branch, so that MCU1 can send control signal 1 to the first input end of the first AND gate unit through the first unidirectional branch. MCU2 can be electrically connected to the first input end of each first AND gate unit through the second unidirectional branch, so that MCU2 can send a state mode signal to the first input end of the first AND gate unit through the second unidirectional branch; MCU2 can also be electrically connected to the second input end of each first AND gate unit through the third unidirectional branch, so that MCU2 can send control signal 2 to the second input end of the first AND gate unit through the third unidirectional branch. When MCU1 is working normally, the control signal 1 and the control signal 2 sent by MCU1 and MCU2 are both high level, and the state mode signal sent by MCU2 is low level, so that the second unidirectional branch is cut off to avoid interference with the control signal 1; then the first AND gate unit can output a high level enable signal to control each relay to remain closed to ensure the normal grid-connected operation of the inverter system. When MCU1 is upgraded, the control signal 1 sent by MCU1 is at a low level, so that the first unidirectional branch is cut off, thereby isolating MCU1 from the first AND gate unit. At the same time, the state mode signal and control signal 2 sent by MCU2 are both at a high level, so that the first AND gate unit can still output a high-level enable signal to control each relay to remain closed to ensure that the load can operate normally without power failure.
[0033] It can be understood that both of the above two examples can meet the actual needs of this application; for example one, it can be applied to the scenario where MCU2 does not need to be upgraded; if MCU2 also needs to be upgraded later, the above example two can be used. In this embodiment, the specific connection method between MUC2 and the first AND gate unit preferably adopts the above example two. The specific structure of the first unidirectional branch, the second unidirectional branch and the third unidirectional branch is a well-known technology in the art, and generally a diode can be used to realize the unidirectional transmission of high-level signals. For ease of understanding, the following will be described in detail. Figure 3 The inverter system shown is taken as an example for detailed description.
[0034] Specifically, Figure 1 As shown, based on Figure 3 In the relay groups k1 to k3, the number of the first AND gate units is three, respectively AND1, AND2 and AND3, and the three first AND gate units can respectively control the corresponding relay groups through the output control signals Relay_ctrl_k1, Relay_ctrl_k2 and Relay_ctrl_k3. MCU1 can be connected to the first input end of the first AND gate unit AND1 through the first unidirectional branch including the diode D6, MCU1 can be connected to the first input end of the first AND gate unit AND2 through the first unidirectional branch including the diode D5, and MCU1 can be connected to the first input end of the first AND gate unit AND3 through the first unidirectional branch including the diode D4. MCU1 can send control signals Relay_IO_DSP1, Relay_IO_DSP2 and Relay_IO_DSP3, i.e., control signal 1, to the first AND gate units AND1, AND2 and AND3 respectively through each first unidirectional branch. MCU2 can be connected to the first input ends of the first AND gate units AND1, AND2 and AND3 respectively through a second unidirectional branch including a diode D1, and MCU2 can also be connected to the second input ends of the first AND gate units AND1, AND2 and AND3 respectively through a third unidirectional branch including a diode D3; MCU2 can send a status mode signal Update_status_DSP2 to each of the first AND gate units AND1, AND2 and AND3 through the second unidirectional branch, and MCU2 can send a control signal Relay_ctrl_DSP2, i.e., control signal two, to each of the first AND gate units AND1, AND2 and AND3 through the third unidirectional branch.
[0035] When MCU1 starts normally and does not need to be upgraded online, the program jumps directly from the bootloader program to the main application program; at this time, the control signals Relay_IO_DSP1, Relay_IO_DSP2 and Relay_IO_DSP3 output by MCU1 are all high level, so that MCU1 is in control state. At the same time, the control signal Relay_ctrl_DSP2 output by MCU2 is high level, and the output status mode signal Update_status_DSP2 is low level, then the diode D1 is cut off. At this time, the first AND gate units AND1, AND2 and AND3 respectively obtain the high level control signals Relay_ctrl_k1, Relay_ctrl_k2 and Relay_ctrl_k3 corresponding to the relay groups k1 to k3 according to the control signals Relay_IO_DSP1, Relay_IO_DSP2 and Relay_IO_DSP3 output by MCU1, and the control signal Relay_ctrl_DSP2 output by MCU2, so as to realize the pull-in state control of the relay groups k1 to k3.
[0036] When MCU1 is upgraded, MCU1 can transmit the upgrade information to MCU2, so that MCU2 enters the control mode. The state mode signal Update_status_DSP2 and the control signal Relay_ctrl_DSP2 output by MCU2 entering the control mode are both high level; at this time, the control signals Relay_IO_DSP1, Relay_IO_DSP2 and Relay_IO_DSP3 output by MCU1 are all low level, so that diodes D4 to D6 are all cut off to avoid interference with the state mode signal Update_status_DSP2. Then, the first AND gate units AND1, AND2 and AND3 respectively obtain the high level control signals Relay_ctrl_k1, Relay_ctrl_k2 and Relay_ctrl_k3 corresponding to the relay groups k1 to k3 according to the state mode signal Update_status_DSP2 and the control signal Relay_ctrl_DSP2 output by MCU2, so as to keep the relay groups k1 to k3 continuously attracted, thereby maintaining the load without power failure during the upgrade process of MCU1.
[0037] It should be known that the status mode signal Update_status_DSP2 output by MCU2 is used to reflect the working mode status of MCU1; when MCU1 is working normally, the status mode signal Update_status_DSP2 is low level; when MCU1 is upgraded, the status mode signal Update_status_DSP2 is high level. The control signal Relay_ctrl_DSP2 output by MCU2 is the maintenance and fault detection signal of the relay; during the normal working and upgrading process of MCU1, the control signal Relay_ctrl_DSP2 is high level; and when the grid or inverter fails, the inverter system needs to be disconnected from the grid, at this time, the control signal Relay_ctrl_DSP2 can be low level, and then the first AND gate units AND1, AND2 and AND3 all output low level control signals Relay_ctrl_k1, Relay_ctrl_k2 and Relay_ctrl_k3 to control the relay groups k1 to k3 to be disconnected.
[0038] It should also be known that during the upgrade of MCU1, in order to ensure the safety of the inverter system, the inverter will be in a non-wave blocking state. Specifically, the software online upgrade control circuit of the present application also includes a blocking circuit, which can block the inverter through the control signal output by MCU1 and MCU2 when MCU1 is upgraded.
[0039] In this embodiment, there are multiple specific structures of the blocking circuit that can achieve blocking of the inverter. For ease of understanding, one of the structures will be described in detail below. Figure 1 As shown, the blocking circuit includes a protection circuit and a second AND gate unit. The second AND gate unit has three input terminals, and the protection circuit is electrically connected to the IO port of MCU1 through the input terminals, and the output terminal of the protection circuit is connected to one of the input terminals of the second AND gate unit; at the same time, the PWM port of MCU1 and MCU2 are respectively connected to the remaining two input terminals of the second AND gate unit; the output terminal of the second AND gate unit is connected to the inverter for control. MCU1 can send a signal ADC_Alarm to the protection circuit, so that the protection circuit can send a signal PWM_LOCK_HD to the second AND gate unit according to the received signal; at the same time, MCU1 can send a signal PWM_DSP1 to the second AND gate unit through the PWM port, and MCU2 can send a signal PWM_LOCK_DSP2 to the second AND gate unit; and then the second AND gate unit can jointly determine whether the inverter performs PWM wave generation according to the three signals at the input terminals.
[0040] When MCU1 is working normally, the signals PWM_LOCK_HD, PWM_DSP1 and PWM_LOCK_DSP2 are all high level, and then the second AND gate unit can output a high level enable signal to drive the inverter to perform PWM wave. When MCU1 is upgraded, the signal PWM_DSP1 sent by the PWM port of MCU1 is low level, and then the second AND gate unit outputs a low level to control the inverter to perform PWM non-wave protection sealing. If the power grid or inverter fails, the signal PWM_LOCK_DSP2 sent by MCU2 can be low level, and then the second AND gate unit can also output a low level to control the inverter to perform PWM non-wave protection sealing.
[0041] It should be known that the specific structure and working principle of the second AND gate unit are well known to those skilled in the art, and therefore will not be elaborated in detail here; the working logic of the AND gate unit is to output a high level only when all input terminals are at a high level.
[0042] Another aspect of the present application provides a software online upgrade control method using the above-mentioned software online upgrade control circuit; Figure 2 As shown, one of the preferred embodiments includes the following steps: sending a software upgrade preparation instruction to MCU1, so that MCU1 enters the program upgrade preparation stage and performs software program backup. Control the working mode of the inverter so that the inverter can work in the grid-connected mode to perform subsequent steps. MCU1 and MCU2 send the output level signal to the relay control circuit to obtain the control signal of the relay group. MCU1 receives the new software program upgrade package and performs software upgrade; the integrity and correctness of the upgraded new program are verified. If the verification is successful, MCU1 enters the control state and MCU2 exits the control state; if the verification fails, MCU1 needs to roll back to the backed-up original program version or enter the fault recovery mode. In the upgraded state of MCU1, the relay control circuit, under the control of MCU2, respectively controls the relay groups k1, k2 and k3 through the output control signals Relay_ctrl_k1, Relay_ctrl_k2 and Relay_ctrl_k3, so that the connection between the power grid and the load is not disconnected. After MCU1 is successfully upgraded, MCU1 may enter the control state, and MCU2 may exit the control state at this time, that is, the status mode signal Update_status_DSP2 is at a low level.
[0043] It should be known that when MCU1 is performing a program upgrade, it is necessary to always retain MCU1's access rights to the original program while backing up the original program. This ensures that MCU1 can immediately stop the upgrade and restore to the original program state when a problem occurs during the upgrade process. During the process of MCU1 performing a program upgrade, a backup module can be set to back up the original program; for the setting of the backup module, an auxiliary storage module that is connected to MCU1 in communication can be set as a backup module to perform backup storage of the original program. Of course, if the flash storage area of MCU1 has sufficient memory, the corresponding backup module can also be obtained by partitioning the flash storage area of MCU1 to achieve backup storage of the original program.
[0044] In this embodiment, Figure 2 As shown, the working mode control of the inverter includes the following processes: judging the current working mode of the inverter; if the inverter is in the grid-connected mode, maintaining the relay energized state; if the inverter is in the off-grid mode, further judging whether the inverter meets the grid-connected requirements; switching the inverter that meets the grid-connected requirements to the grid-connected mode, and maintaining the relay to keep the off-grid mode for the inverter that does not meet the grid-connected requirements.
[0045] Another aspect of the present application provides an inverter system, such as Figure 2 and Figure 3 As shown, one of the preferred embodiments includes a program upgrade architecture for implementing the above-mentioned software online upgrade control method. The program upgrade architecture includes a processor, and the processor includes MCU1 and MCU2, etc., and also includes a communication module (CAN), a power module, an auxiliary storage module, a relay control circuit and a relay group. The power module can supply power to the MCU, the communication module and the auxiliary storage module by taking power from the power grid; the upgrade of MCU1 can be set in the HMI interface, that is, the HMI interface is connected to MCU1 for communication, MCU1 and MCU2 are connected for communication, MCU1 can output control signals Relay_IO_DSP1, Relay_IO_DSP2 and Relay_IO_DSP3 to the relay control circuit, MCU2 can output a status mode signal Update_status_DSP2 and a control signal Relay_ctrl_DSP2 to the relay control circuit, and the auxiliary storage module can be used to back up and store the original program when MCU1 is upgraded.
[0046] For ease of understanding, the following Figure 3 The inverter system shown provides a detailed description of the specific working process of the entire program upgrade architecture.
[0047] like Figure 2 and Figure 3As shown, the upgrade of MCU1 is set in the HMI interface, and the communication module transmits information to MCU1; after receiving the upgrade program preparation instruction, MCU1 enters the program upgrade preparation and performs software program backup. Specifically, after MCU1 receives the program upgrade preparation instruction, it first determines the current working mode of the inverter. If the inverter is in the grid-connected mode, it starts to execute the maintenance control of the relay energized state; if the inverter is in the off-grid mode, it is necessary to further determine whether the current inverter meets the grid-connected requirements, such as whether the bus voltage meets the grid-connected voltage requirements, etc.; if the inverter meets the grid-connected requirements, the inverter can be switched to the grid-connected mode, and then the maintenance control of the relay energized state is executed. If the grid-connected requirements are not met, the off-grid mode is maintained to control the relay to maintain the current state. For the maintenance control of the relay energized state, reference can be made to the working process of the above-mentioned software online upgrade control circuit.
[0048] After the current inverter working mode is determined and the inverter is already in grid-connected mode, MCU1 can pass information to MCU2, and MCU2 can enter control mode. The output levels of MCU1 and MCU2 are sent to the relay control circuit to obtain control signals for the relay group, that is, the signals Relay_IO_DSP1, Relay_IO_DSP2, and Relay_IO_DSP3 output by MCU1 are low-level signals. MCU2 enters the control state, and the output signals Update_status_DSP2 and Relay_ctrl_DSP2 are high-level. The relay control signals Relay_ctrl_k1, Relay_ctrl_k2, and Relay_ctrl_k3 obtained by the relay control circuit can respectively control the corresponding relay groups to remain closed to maintain the load without power failure. MCU2 passes the preparation information for completing the control relay closure to MCU1, and MCU1 passes it to the HMI interface. The HMI interface can issue MCU1 upgrade instructions, and MCU1 enters the upgrade state to obtain the software upgrade package for upgrade. After the upgrade is completed, MCU1 automatically verifies the integrity and correctness of the new program. The verification of the new program may include running a self-test program, checking whether key functions are working properly, etc. If the verification fails, MCU1 needs to roll back to the backed-up original program version or enter fault recovery mode. In the upgraded state of MCU U1, the control signals Relay_ctrl_k1, Relay_ctrl_k2 and Relay_ctrl_k3 output by the relay control circuit respectively control the relay groups k1, k2 and k3 to keep the connection between the power grid and the load. After the MCU1 is successfully upgraded, it can enter the control mode. After a period of time, the signal Update_status_DSP2 output by MCU2 is pulled low, causing MCU2 to exit the control state.
[0049] The above describes the basic principles, main features and advantages of the present application. Those skilled in the art should understand that the present application is not limited by the above embodiments, and the above embodiments and the specification only describe the principles of the present application. The present application may have various changes and improvements without departing from the spirit and scope of the present application, and these changes and improvements fall within the scope of the present application for which protection is sought. The scope of protection claimed by the present application is defined by the attached claims and their equivalents.
Claims
1. A software online upgrade control circuit, characterized in that: Including MCU1, MCU2 and relay control circuit; The MCU1 and the MCU2 communicate with each other and are respectively connected to the input end of the relay control circuit, and the output end of the relay control circuit is controlled and connected to the relay group of the inverter system; When the MCU1 is working normally, the MCU1 controls the relay group through the relay control circuit, and the MCU2 is used to cooperate with the MCU1; When the MCU1 is isolated and upgraded, the MCU2 is suitable for controlling the relay group through the relay control circuit alone.
2. The software online upgrade control circuit according to claim 1, characterized in that: The relay group includes a plurality of relays, and the relay control circuit includes a plurality of first AND gate units; The MCU1 is electrically connected to one of the input ends of each of the first AND gate units, the MCU2 is electrically connected to all the input ends of each of the first AND gate units, and the output end of the first AND gate unit is control-connected to the corresponding relay; When the MCU1 is working normally, the first AND gate unit sends an enable signal for controlling closing to the relay through the high level signal sent by the MCU1 and the MCU2; The MCU1 is isolated from the first AND gate unit when being upgraded, and the first AND gate unit sends an enabling signal for controlling closing to the relay through a high level signal sent by the MCU2.
3. The software online upgrade control circuit according to claim 2, characterized in that: The first AND gate unit has two input terminals; the MCU1 sends a control signal 1 to the first input terminal of the first AND gate unit through a first unidirectional branch; The MCU2 sends a state mode signal to the first input terminal of the first AND gate unit through the second unidirectional branch, and the MCU2 sends a control signal 2 to the second input terminal of the first AND gate unit through the third unidirectional branch; When the MCU1 is working normally, the control signal 1 and the control signal 2 are both high level, and the state mode signal is low level; when the MCU1 is upgraded, the control signal 1 is low level, and the state mode signal and the control signal 2 are both high level.
4. The software online upgrade control circuit according to claim 3, characterized in that: The state mode signal is used to reflect the working mode of the MCU1, and the second control signal is a maintenance and fault detection signal of the relay; When a fault occurs in the power grid or the inverter, the second control signal is at a low level, so that the first AND gate unit disconnects the relay.
5. The software online upgrade control circuit according to any one of claims 1 to 4, characterized in that: The software online upgrade control circuit further includes a blocking circuit, which is suitable for blocking the inverter through the signals output by the MCU1 and the MCU2 when the MCU1 is upgraded.
6. The software online upgrade control circuit according to claim 5, characterized in that: The blocking circuit comprises: A protection circuit; the protection circuit is connected to the IO port of the MCU1; and A second AND gate unit; the protection circuit, the PWM port of the MCU1 and the MCU2 are respectively connected to three input terminals of the second AND gate unit; the output terminal of the second AND gate unit is connected to the inverter control; When the MCU1 works normally, the input terminals of the second AND gate unit are all at high level, so that the second AND gate unit sends a high level PWM control signal to the inverter for wave transmission; When the MCU1 is upgraded, the MCU1 is adapted to send a low level signal to the second AND gate unit, so that the second AND gate unit outputs a low level to control the inverter not to generate waves.
7. A software online upgrade control method using the software online upgrade control circuit according to any one of claims 1 to 6, characterized in that: The steps include: Sending a software upgrade preparation instruction to the MCU1, so that the MCU1 enters the program upgrade preparation phase and performs program backup; Control the working mode of the inverter so that the inverter can work in the grid-connected mode for subsequent steps; The MCU1 and the MCU2 send the output level signal to the relay control circuit to obtain the control signal of the relay group; The MCU1 receives a new software program upgrade package and performs software upgrade; Verify the integrity and correctness of the upgraded new program; if the verification is successful, the MCU1 enters the control state and the MCU2 exits the control state; If the verification fails, the MCU1 rolls back to the backed-up original program version or enters a fault recovery mode.
8. The software online upgrade control method according to claim 7, characterized in that: The working mode control of the inverter includes the following processes: Determine the current working mode of the inverter; If the inverter is in grid-connected mode, the relay energized state is maintained and controlled; If the inverter is in off-grid mode, further determine whether the inverter meets the grid-connected requirements; The inverters that meet the grid-connected requirements are switched to the grid-connected mode, and the inverters that do not meet the grid-connected requirements are maintained by controlling the relays to maintain the off-grid mode.
9. The software online upgrade control method according to claim 7, characterized in that: A backup module is provided for the original program storage of the MCU1; the backup module is provided in a flash storage area of the MCU1, and / or an auxiliary storage module in communication connection with the MCU1 is provided as the backup module.
10. An inverter system, characterized in that: It includes a program upgrade architecture for implementing the software online upgrade control method described in any one of claims 7 to 9.
Citation Information
Patent Citations
Method and device for controlling mainboard of double CPU system
CN101714109A
Middle and high voltage frequency conversion speed regulation double CPU control system and control method thereof
CN105356820A
Double-MCU control system and automobile
CN114655142A
Vehicle-mounted charging pile online upgrading method based on mobile communication and Bluetooth communication
CN115996222A
OTA software upgrading control method and system suitable for redundant backup controller
CN117472403A
