A software online upgrade control circuit, method and inverter system
Through the use of dual MCU architecture and AND gate units, the inverter system is continuously loaded during software upgrade, simplifying control logic and reducing costs.
Patent Information
- Application Number
- CN202411037894.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-07-31
AI Technical Summary
In the software upgrade process of the inverter system, the load is powered off, and the control circuit logic is complex and the cost is high.
Adopting a dual MCU architecture, MCU1 is responsible for relay control during normal operation, and MCU2 controls the relay group separately when MCU1 is upgraded to ensure constant power of the load; logical simplification and cost reduction are achieved through the AND gate unit and the blocking circuit.
When MCU1 is upgraded, the load does not lose power, the control circuit structure is simple and the cost is low.
Smart Images

Figure CN118920585B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of new energy power generation, and particularly to a software online upgrade control circuit, method, and inverter system. Background Art
[0002] When the MCU for program upgrade in a photovoltaic energy storage system is reset, it is often necessary to maintain the control of the relay between the power grid and the load, so as to achieve uninterrupted power supply to the load during program upgrade and ensure that the load is not affected by the program upgrade.
[0003] In the prior art, there are various ways to ensure that the load does not lose power during program upgrade. For example, the invention patent with the patent number CN117559659A discloses a control circuit for an inverter load-side relay. Specifically, the control chip 1 and the control chip 2 perform operations through the NOT gate chip U1 and the OR gate chip to obtain the control state of the relay. When there is no fault and a program needs to be upgraded (only one controller program is upgraded at a time), the relay remains closed. This invention requires the use of two logic chips, and the provided control circuit logic is complex, resulting in complex operations and high costs during actual use.
[0004] Another example is that the invention patent with the patent number CN117595481A discloses an OTA upgrade control circuit, control method, and inverter device. Specifically, the high and low levels output by each control circuit and drive circuit are used to control the state of the relay. When one of the DSP chips is performing OTA upgrade, the other chip can maintain the suction of the two relays to avoid the situation of load power loss. This invention requires additional dedicated OTA IO signals of the DSP chip to achieve the technical effect of load power loss prevention, and the versatility is poor. Summary of the Invention
[0005] One of the purposes of this 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 art.
[0006] To achieve the above purpose, the technical solution adopted in this application is: A software online upgrade control circuit includes MCU1, MCU2, and a relay control circuit; the MCU1 and the MCU2 communicate with each other and are respectively electrically connected to the input end of the relay control circuit, and the output end of the relay control circuit is controllably connected to the relay group of the inverter system; when the MCU1 is operating 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 undergoing isolated upgrade, the MCU2 is adapted to separately control the relay group 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 input end of each of the first AND gate units, the MCU2 is electrically connected to all input ends of each of the first AND gate units, and the output end of the first AND gate unit is controllably connected to the corresponding relay; when the MCU1 operates normally, the first AND gate unit sends an enabling signal for controlling closing to the relay through the high-level signals sent by the MCU1 and the MCU2; when the MCU1 is being upgraded, it is isolated from the first AND gate unit, and the first AND gate unit sends an enabling signal for controlling closing to the relay through the high-level signal sent by the MCU2.
[0008] Preferably, the first AND gate unit has two input ends. The MCU1 is adapted to send control signal one to the first input end of the first AND gate unit through a first one-way branch; the MCU2 is adapted to send a status mode signal to the first input end of the first AND gate unit through a second one-way branch, and the MCU2 is adapted to send control signal two to the second input end of the first AND gate unit through a third one-way branch; when the MCU1 operates normally, both control signal one and control signal two are high level, and the status mode signal is low level; when the MCU1 is being upgraded, control signal one is low level, and both the status mode signal and control signal two are high level.
[0009] Preferably, the status mode signal is used to reflect the operating mode of the MCU1, and control signal two is the maintenance and fault detection signal of the relay; when a fault occurs in the power grid or the inverter, control signal two is 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 adapted to block the wave of the inverter through the signals output by the MCU1 and the MCU2 when the MCU1 is being 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 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 is operating 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 generation; when the MCU1 is being 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.
[0012] A software online upgrade control method using the above software online upgrade control circuit includes the following steps: sending a software upgrade preparation instruction to the MCU1 to make the MCU1 enter the program upgrade preparation stage and back up the software program; controlling 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 signals 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; verifying 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 needs to roll back to the original program version of the backup or enter the fault recovery mode.
[0013] Preferably, the control of the working mode 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 control of the relay suction state; if the inverter is in the off-grid mode, further judging whether the inverter meets the grid connection requirements; for the inverter that meets the grid connection requirements, switching to the grid-connected mode, and for the inverter that does not meet the grid connection requirements, maintaining the control of the relay to keep the off-grid mode.
[0014] Preferably, a backup module is set for the original program storage of the MCU1; the backup module is set in the flash storage area of the MCU1, and / or an auxiliary storage module communicatively connected to the MCU1 is set as the backup module.
[0015] An inverter system includes a program upgrade architecture for implementing the above software online upgrade control method.
[0016] Compared with the prior art, the beneficial effect of this application lies in:
[0017] When upgrading MCU1, MCU2 can keep the load powered on; and when MCU1 is upgraded, PWM will block the wave to protect the inverter; the overall control circuit structure is simple and the cost is low. Description of the Drawings
[0018] Figure 1 It is a schematic diagram of the topological structure of the software online upgrade control circuit of the present application.
[0019] Figure 2 It is a schematic diagram of the working process of the software online upgrade control method of the present application.
[0020] Figure 3 It is a schematic diagram of the structure of the inverter system of the present application. Detailed Embodiments
[0021] Next, in combination with the detailed embodiments, the present application will be further described. It should be noted that, on the premise of no conflict, the following-described embodiments or technical features can be arbitrarily combined to form new embodiments.
[0022] In the description of the present application, it should be noted that for the orientation terms, if there are terms such as "center", "horizontal", "vertical", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc., indicating the orientation and position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application 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 cannot be understood as limiting the specific protection scope 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 do not have to be used to describe a specific order or sequence.
[0024] The terms "including" and "having" in the description and claims of the present application and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0025] For the convenience of understanding the following content, the structure of a traditional inverter system can be briefly described first. The inverter system can include a power generation system, an energy storage system, a UPS system, etc.; that is, the technical solution of the present application can be implemented in a pre-power generation system, an energy storage system, a UPS system, etc. For the convenience of understanding, the following will be described through a photovoltaic energy storage system. As Figure 3 shown, the traditional photovoltaic energy storage system mainly includes a PV unit, an energy storage unit, a DC / DC unit, a bidirectional DC / DC, and a DC / AC unit (inverter). The PV unit and the energy storage unit are respectively connected to the corresponding DC / DC units 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 at the same time, the load is also connected in parallel to the output side of the DC / AC unit through a control switch. In the art, a relay is a commonly used control switch, and the relays installed on the positive and negative buses between the power grid and the DC / AC unit and the relays installed on the positive and negative buses between the load and the DC / AC unit can respectively form corresponding relay groups. When the inverter system is connected to the grid, the inverter system can supply power to the load through the closing of the relay group; when the inverter system is off-grid, if the load wants to continue to work, the power grid can supply power to the load through the closing of the relay group.
[0026] One aspect of the present application provides a software online upgrade control circuit, as Figure 1 shown, and a preferred embodiment thereof includes an MCU1, an MCU2, and a relay control circuit. MCU1 and MCU2 communicate with each other and are respectively electrically connected to the input end of the relay control circuit. The output end of the relay control circuit is connected to the relay group of the inverter system for control. When MCU1 is working normally, the relay control circuit controls the relay group mainly through MCU1. At this time, MCU2 is used to cooperate with MCU1 to control the relay group so that the inverter system can perform normal grid connection 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. At this time, MCU2 can independently control the relay group through the relay control circuit, so as to ensure that the load can continue to work without power interruption during the upgrade of MCU1.
[0027] It should be known that based on the above circuit structure, this embodiment mainly provides a dual-MCU switching control architecture; among them, MCU1 is the main processor, mainly used to control the relay group when the inverter system is working normally, and MCU2 is the slave processor, which only replaces MCU1 to control the relay group to maintain the load without power interruption when MCU1 is upgraded; compared with the traditional method, the overall control circuit structure of this embodiment is simple and the cost is low.
[0028] It should also be known that, as can be seen from the foregoing, there are multiple sets of relay groups; for example, one set of relays is provided at the output terminals of the power grid and the inverter, and also at the output terminals of the load and the inverter, that is, the number of sets of relay groups is two. Generally speaking, in order to ensure the grid connection safety of the inverter system, multiple sets of relays need to be connected in series between the power grid and the output terminal of the inverter; for a specific example, as Figure 3 shown, two sets of relays are connected in series between the power grid and the output terminal of the inverter, so the number of sets of relay groups included in the inverter system is three. For the convenience of subsequent description, these three sets of relays can be marked; the relay groups connected between the power grid and the output terminal of the inverter are respectively marked as k1 and k2, and the relay group connected between the load and the output terminal of the inverter is marked as k3.
[0029] In this embodiment, there are various specific structures of the relay control circuit that can achieve continuous power supply to the load during the upgrade of MCU1. For the convenience of understanding, one of the structures will be described in detail below. As Figure 1 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 terminals of each first AND gate unit, MCU2 can be electrically connected to all the input terminals of each first AND gate unit, and the output terminal of the first AND gate unit can be connected to the corresponding relay for control. When MCU1 is operating normally, MCU1 and MCU2 can simultaneously send high-level signals to the input terminals of the first AND gate unit, so that the first AND gate unit sends a high-level enable signal for controlling closing to the relay through the high-level signals sent by MCU1 and MCU2, thereby maintaining the continuous suction of the relay to ensure that the load can continue to operate without power interruption. When MCU1 is being upgraded, MCU1 can be isolated from the first AND gate unit; at the same time, MCU2 can simultaneously send high-level signals to the input terminals of the first AND gate unit, so that the first AND gate unit continues to send a high-level enable signal for controlling closing to the relay through the high-level signals sent by MCU2, thereby maintaining the continuous closing of the relay to ensure that the load continues to operate without power interruption.
[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 that it outputs a high level only when all inputs are high. The number of input terminals of the first AND gate unit is related to the number of control sources participating 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 various specific connection methods between MCU2 and the first AND gate unit. For the convenience of understanding, two specific examples will be described in detail below.
[0031] Example 1: The MCU1 can be electrically connected to the first input terminals of the first AND gate units through the first unidirectional branch, so that the MCU1 can send control signals to the first input terminals of the first AND gate units through the first unidirectional branch. The MCU2 can be electrically connected to both input terminals of each first AND gate unit through the second unidirectional branch, so that the MCU2 can send control signals to the two input terminals of the first AND gate unit simultaneously through the second unidirectional branch. When the MCU1 is operating normally, the control signals sent by the MCU1 and the MUC2 are both high levels, then the first AND gate unit can output an enabling signal with a high level to control each relay to maintain closure to ensure the normal grid connection operation of the inverter system. When the MCU1 is being upgraded, the MCU1 will send a control signal with a low level. At this time, the first unidirectional branch will be cut off, isolating the MCU1 from the first AND gate unit; at the same time, the MCU2 continues to send a control signal with a high level to the input terminal of the first AND gate unit, so that the first AND gate unit can still output an enabling signal with a high level to control each relay to maintain closure to ensure that the load can operate normally without power interruption.
[0032] Example 2: As Figure 1 shown, the MCU1 can be electrically connected to the first input terminals of the first AND gate units through the first unidirectional branch, so that the MCU1 can send a first control signal to the first input terminals of the first AND gate units through the first unidirectional branch. The MCU2 can be electrically connected to the first input terminals of the first AND gate units through the second unidirectional branch, so that the MCU2 can send a status mode signal to the first input terminals of the first AND gate units through the second unidirectional branch; the MCU2 can also be electrically connected to the second input terminals of the first AND gate units through the third unidirectional branch, so that the MCU2 can send a second control signal to the second input terminals of the first AND gate units through the third unidirectional branch. When the MCU1 is operating normally, the first control signal and the second control signal sent by the MCU1 and the MCU2 are both high levels, and at the same time, the status mode signal sent by the MCU2 is a low level, causing the second unidirectional branch to be cut off to avoid interfering with the first control signal; then the first AND gate unit can output an enabling signal with a high level to control each relay to maintain closure to ensure the normal grid connection operation of the inverter system. When the MCU1 is being upgraded, the first control signal sent by the MCU1 is a low level, causing the first unidirectional branch to be cut off, thereby isolating the MCU1 from the first AND gate unit. At the same time, both the status mode signal and the second control signal sent by the MCU2 are high levels, so that the first AND gate unit can still output an enabling signal with a high level to control each relay to maintain closure to ensure that the load can operate normally without power interruption.
[0033] It can be understood that the above two examples can both meet the actual needs of this application; for Example 1, it can be applied to scenarios where the MCU2 does not need to be upgraded; if the MCU2 also needs to be upgraded later, then Example 2 above can be adopted. In this embodiment, the specific connection method between the MUC2 and the first AND gate unit preferably adopts Example 2 above. The specific structures of the first unidirectional branch, the second unidirectional branch, and the third unidirectional branch are well-known techniques in the art, and generally, diodes can be used to achieve the unidirectional transmission of high-level signals. For the convenience of understanding, the following will use Figure 3 the inverter system shown as an example for detailed description.
[0034] Specifically, as Figure 1 shown, based on Figure 3 the relay groups k1 to k3 in, the number of the first AND gate units is three, which are respectively AND1, AND2, and AND3. 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. The MCU1 can be connected to the first input terminal of the first AND gate unit AND1 through the first unidirectional branch including the diode D6, the MCU1 can be connected to the first input terminal of the first AND gate unit AND2 through the first unidirectional branch including the diode D5, and the MCU1 can be connected to the first input terminal of the first AND gate unit AND3 through the first unidirectional branch including the diode D4. The MCU1 can respectively send the control signals Relay_IO_DSP1, Relay_IO_DSP2, and Relay_IO_DSP3, that is, the first control signal, to the first AND gate units AND1, AND2, and AND3 through the respective first unidirectional branches. The MCU2 can be respectively connected to the first input terminals of the first AND gate units AND1, AND2, and AND3 through the second unidirectional branch including the diode D1, and the MCU2 can also be respectively connected to the second input terminals of the first AND gate units AND1, AND2, and AND3 through the third unidirectional branch including the diode D3; the MCU2 can send the status mode signal Up date_status_DSP2 to each of the first AND gate units AND1, AND2, and AND3 through the second unidirectional branch, and the MCU2 can send the control signal Relay_ctrl_DSP2, that is, the second control signal, to each of the first AND gate units AND1, AND2, and AND3 through the third unidirectional branch.
[0035] When the MCU1 starts up normally and online upgrade is not required, the program directly jumps 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 the MCU1 are all high levels, putting the MCU1 in the control state. At the same time, the control signal Relay_ctrl_DSP2 output by the MCU2 is high level, and the status mode signal Update_status_DSP2 output is low level, so 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 the MCU1 and the control signal Relay_ctrl_DSP2 output by the MCU2, so as to realize the suction state control of the relay groups k1 to k3.
[0036] When the MCU1 is upgraded, the MCU1 can transfer the upgrade information to the MCU2, causing the MCU2 to enter the control mode. The status mode signal Update_status_DSP2 and the control signal Relay_ctrl_DSP2 output by the MCU2 entering the control mode are both high levels. At this time, the control signals Relay_IO_DSP1, Relay_IO_DSP2, and Relay_IO_DSP3 output by the MCU1 are all low levels, causing the diodes D4 to D6 to be cut off to avoid interfering with the status mode signal Update_status_DSP2. Furthermore, 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 status mode signal Update_status_DSP2 and the control signal Relay_ctrl_DSP2 output by the MCU2, so as to keep the relay groups k1 to k3 continuously sucked in, thereby maintaining the power supply of the load during the upgrade process of the MCU1.
[0037] It should be noted 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 at a low level; when MCU1 is being upgraded, the status mode signal Update_status_DSP2 is at a high level. The control signal Relay_ctrl_DSP2 output by MCU2 is the maintenance and fault detection signal of the relay; during the normal operation and upgrade process of MCU1, the control signal Relay_ctrl_DSP2 is at a high level; when a fault occurs in the power grid or the inverter, the inverter system needs to be off-grid, and at this time, the control signal Relay_ctrl_DSP2 can be at a low level, so that 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 group k1 to k3 to disconnect.
[0038] It should also be noted that during the upgrade process of MCU1, in order to ensure the safety of the inverter system, the inverter will be in a blocked state without wave output at this time. Specifically, the software online upgrade control circuit of the present application further includes a blocking circuit, and the blocking circuit can block the wave of the inverter through the control signals output by MCU1 and MCU2 when MCU1 is upgraded.
[0039] In this embodiment, there are various specific structures of the blocking circuit that can block the wave of the inverter. For the convenience of understanding, one of the structures will be described in detail below. As Figure 1 shown, the blocking circuit includes a protection circuit and a second AND gate unit. The second AND gate unit has three input terminals. The protection circuit is electrically connected to the IO port of MCU1 through the input terminal, 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; thus, the second AND gate unit can jointly determine whether the inverter performs PWM wave output according to the three signals at the input terminals.
[0040] When the MCU1 is working normally, the signals PWM_LOCK_HD, PWM_DSP1, and PWM_LOCK_DSP2 are all high levels. Consequently, the second AND gate unit can output a high-level enable signal to drive the inverter to perform PWM waveform generation. When the MCU1 is being upgraded, the signal PWM_DSP1 sent by the PWM port of the MCU1 is at a low level. As a result, the second AND gate unit outputs a low level to control the inverter to perform a protection wave-blocking operation where no PWM waveform is generated. If a fault occurs in the power grid or the inverter, the signal PWM_LOCK_DSP2 sent by the MCU2 can be at a low level. Thus, the second AND gate unit can also output a low level to control the inverter to perform the protection wave-blocking operation where no PWM waveform is generated.
[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, 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 input terminals are at high levels.
[0042] Another aspect of this application provides a software online upgrade control method using the above software online upgrade control circuit; as Figure 2 shown, one preferred embodiment includes the following steps: Sending a software upgrade preparation instruction to the MCU1, causing the MCU1 to enter the program upgrade preparation stage and perform a software program backup. Controlling the working mode of the inverter so that the inverter can operate in the grid-connected mode for subsequent steps. The MCU1 and MCU2 send the output level signals to the relay control circuit to obtain the control signals for the relay group. The MCU1 receives a new software program upgrade package and performs a software upgrade; verifying 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 needs to roll back to the original program version of the backup or enter the fault recovery mode. In the upgrade state of the MCU1, under the control of the MCU2, the relay control circuit controls the relay group k1, k2, and k3 to be energized respectively through the output control signals Relay_ctrl_k1, Relay_ct rl_k2, and Relay_ctrl_k3, so that the connection between the power grid and the load is not disconnected. After the MCU1 is successfully upgraded, the MCU1 can enter the control state, and at this time, the MCU2 can exit the control state, that is, the status mode signal Update_status_DSP2 is at a low level.
[0043] It should be noted that when the MCU1 performs a program upgrade, while backing up the original program, the MCU1 must always retain the access right to the original program, so as to ensure that the MCU1 can immediately stop the upgrade and return to the original program state in case of problems during the upgrade process. During the process of the 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 communicatively connected to the MCU1 can be set as the backup module to perform the backup storage of the original program. Of course, if the memory of the flash storage area of the MCU1 is sufficient, the corresponding backup module can also be obtained by partitioning the flash storage area of the MCU1 to achieve the backup storage of the original program.
[0044] In this embodiment, as Figure 2 shown, the control of the working mode 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 control of the relay suction 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, performing the maintenance control of the relay to maintain the off-grid mode.
[0045] Another aspect of the present application provides an inverter system, as Figure 2 and Figure 3 shown, and one of the preferred embodiments thereof includes a program upgrade architecture for implementing the above software online upgrade control method. The program upgrade architecture includes a processor, 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, etc. by taking power from the power grid; the upgrade of the MCU1 can be set in the HMI interface, that is, the HMI interface is communicatively connected to the MCU1, the MCU1 and the MCU2 are communicatively connected, the MCU1 can output control signals Relay_IO_DSP1, Relay_IO_DSP2, and Relay_IO_DSP3 to the relay control circuit, the 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 the MCU1 is upgraded.
[0046] For the convenience of understanding, the following will use the Figure 3 shown inverter system to describe in detail the specific working process of the entire program upgrade architecture.
[0047] As Figure 2 and Figure 3As shown, upgrade the MCU1 in the HMI interface, and the communication module transmits information to the MCU1; after receiving the upgrade program preparation instruction, the MCU1 enters the program upgrade preparation and backs up the software program. Specifically, after the MCU1 receives the program upgrade preparation instruction, it first judges the working mode of the current inverter. If the inverter is in the grid-connected mode, it starts to execute the maintenance control of the relay suction state; if the inverter is in the off-grid mode, it needs to further judge whether the current inverter meets the grid connection requirements, such as whether the bus voltage meets the grid connection voltage requirements, etc.; if the inverter meets the grid connection requirements, the inverter can be switched to the grid-connected mode and then execute the maintenance control of the relay suction state. If the grid connection requirements are not met, the off-grid mode is maintained and the relay is controlled to maintain the current state. The maintenance control of the relay suction state can refer to the working process of the above software online upgrade control circuit
[0048] After judging the working mode of the current inverter and the inverter is already in the grid-connected mode; the MCU1 can transmit information to the MCU2, and at this time the MCU2 can enter the control mode; then the output levels of the MCU1 and MCU2 are sent to the relay control circuit to obtain the control signal for the relay group, that is, the signals Relay_IO_DSP1, Relay_IO_DSP2, and Relay_IO_DSP3 output by the MCU1 at this time are low-level signals; the 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 through the relay control circuit can respectively control the corresponding relay groups to remain closed to maintain the load powered on. The MCU2 transmits the preparation information for completing the control of the relay suction to the MCU1, and the MCU1 then transmits it to the HMI interface. The HMI interface can issue an upgrade instruction to the MCU1, and the MCU1 enters the upgrade state to obtain the software upgrade package for upgrade. After the upgrade is completed, the MCU1 automatically verifies the integrity and correctness of the new program. The verification of the new program can include running a self-check program, checking whether key functions are working properly, etc. If the verification fails, the MCU1 needs to roll back to the original program version of the backup or enter the fault recovery mode. In the upgrade state of the MCU1, 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 be suction-controlled to keep the connection between the power grid and the load disconnected. After the MCU1 is upgraded successfully, it can enter the control mode. After a period of time, the signal Update_status_DSP2 output by the MCU2 is pulled low, causing the MCU2 to exit the control state.
[0049] The basic principles, main features and advantages of the present application have been described above. Those skilled in the art should understand that the present application is not limited by the above embodiments. What is described in the above embodiments and the specification is only the principle of the present application. Without departing from the spirit and scope of the present application, various changes and improvements will occur to the present application, and these changes and improvements all fall within the scope of the present application claimed. The scope of protection required by the present application is defined by the appended claims and their equivalents.
Claims
1. A software online upgrade control circuit, characterized in that It includes MCU1, MCU2 and a 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 connected to the relay group of the inverter system for control; When the MCU1 works 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 independently controlling the relay group through the relay control circuit; 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 first AND gate unit, the MCU2 is electrically connected to all the input ends of each first AND gate unit, and the output end of the first AND gate unit is connected to the corresponding relay for control; When the MCU1 works normally, the first AND gate unit sends an enabling signal for controlling closing to the relay through the high-level signals sent by the MCU1 and the MCU2; When the MCU1 is upgraded and isolated from the first AND gate unit, the first AND gate unit sends an enabling signal for controlling closing to the relay through the high-level signal sent by the MCU2; The software online upgrade control circuit further includes a blocking circuit, and the blocking circuit is suitable for blocking the wave of the inverter through the signals output by the MCU1 and the MCU2 when the MCU1 is upgraded; The blocking circuit includes: 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 the three input ends of the second AND gate unit; the output end of the second AND gate unit is connected to the inverter for control; When the MCU1 works 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.
2. The software online upgrade control circuit according to claim 1, characterized in that The first AND gate unit has two input ends; the MCU1 sends control signal one to the first input end of the first AND gate unit through a first one-way branch; The MCU2 sends a status mode signal to the first input end of the first AND gate unit through a second one-way branch, and the MCU2 sends control signal two to the second input end of the first AND gate unit through a third one-way branch; When the MCU1 works normally, both control signal one and control signal two are high level, and the status mode signal is low level; when the MCU1 is upgraded, control signal one is low level, and both the status mode signal and control signal two are high level.
3. The software online upgrade control circuit according to claim 2, characterized in that, The state mode signal is used to reflect the working mode of the MCU1, and the second control signal is the 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.
4. A software online upgrade control method using the software online upgrade control circuit according to any one of claims 1-3, characterized in that, It includes the following steps: Send a software upgrade preparation instruction to the MCU1, so that the MCU1 enters the program upgrade preparation stage 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 signals to the relay control circuit to obtain the control signals 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 original program version of the backup or enters the fault recovery mode.
5. The software online upgrade control method according to claim 4, characterized in that, The control of the working mode of the inverter includes the following process: Judge the current working mode of the inverter; If the inverter is in the grid-connected mode, perform the maintenance control of the relay suction state; If the inverter is in the off-grid mode, further judge whether the inverter meets the grid connection requirements; For the inverter that meets the grid connection requirements, switch to the grid-connected mode, and for the inverter that does not meet the grid connection requirements, perform the maintenance control of the relay to maintain the off-grid mode.
6. The software online upgrade control method according to claim 4, characterized in that Set a backup module for the original program storage of the MCU1; the backup module is set in the flash storage area of the MCU1, and / or an auxiliary storage module communicatively connected to the MCU1 is set as the backup module.
7. An inverter system, characterized in that, It includes a program upgrade architecture for implementing the software online upgrade control method according to any one of claims 4-6.
Citation Information
Patent Citations
Control circuit for inverter load side relay
CN117559659A
OTA upgrade control circuit, control method and inversion equipment
CN117595481A
Method and device for controlling mainboard of double CPU system
CN101714109A
Double-MCU control system and automobile
CN114655142A
OTA software upgrading control method and system suitable for redundant backup controller
CN117472403A