Carrier synchronization control method, device, equipment and medium
By adopting a carrier synchronization control method in the energy storage system, the carrier start point of the slave is calculated and adjusted to achieve synchronization with the host, the problems of carrier phase shift and high-frequency circulation in the prior art are solved, reducing costs and improving system stability and efficiency.
Patent Information
- Application Number
- CN202411923728.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-28
AI Technical Summary
In the existing energy storage system, due to the deviation of the crystal oscillators of each PCS, the carrier phase shift is caused, high-frequency circulation is generated, and losses is increased, which affects reliability and efficiency. At the same time, the existing solutions increase cost and hardware complexity.
By using a carrier synchronization control method in the energy storage system, the time stamp of the carrier start point of the slave is recorded, the host broadcast message reception situation is judged, the time deviation between the carrier start points is calculated, and the slave start point of the carrier is adjusted to achieve synchronization, avoiding the need to increase the isolation transformer or parallel line.
Carrier synchronization of energy storage systems is realized, system costs are reduced, stability and efficiency are improved, and abnormal system operation is avoided due to host failure.
Smart Images

Figure CN119728374A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of energy storage converter control, and in particular to a carrier synchronization control method, device, equipment and medium. Background Art
[0002] With the extensive application of energy storage systems, the demand for the capacity of energy storage systems is gradually increasing. In order to expand the capacity, the method of connecting multiple PCS (Power Conversion System) in parallel is often adopted. However, due to the deviation of the crystal oscillator of each PCS, the carrier generated by the PCS in the energy storage system will also have periodic phase shift, which will lead to high-frequency circulating current between the PCS, increase the loss of the energy storage system, and affect the reliability and efficiency of the energy storage system. Therefore, in order to achieve carrier synchronization, in the prior art, the high-frequency circulating current between the PCS can be suppressed by adding an isolation transformer on the AC side of the PCS, or by adding a parallel line in the energy storage system, setting one of the PCS as the host, and transmitting the host's carrier signal to all slaves through the parallel line, so that the slave can adjust its own carrier based on the host's carrier signal to achieve carrier synchronization between the host and the slave.
[0003] However, the above two solutions require additional isolation transformers on the one hand, and additional hardware circuits and wiring are required to add parallel lines on the other hand. Therefore, the above two solutions both increase the cost of the energy storage system, and when the parallel lines are used, the entire energy storage system may not operate normally due to the failure of the host.
[0004] Therefore, how to reduce the cost and improve the stability of the energy storage system is an urgent problem to be solved. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a carrier synchronization control method for reducing costs and improving the stability of energy storage systems. The specific scheme is as follows:
[0006] In a first aspect, the present application provides a carrier synchronization control method, which is applied to a slave, wherein a system where a host and a plurality of the slaves are located is a parallel system, and both the host and the slaves are energy storage converters, and the method comprises:
[0007] Record the first timestamp corresponding to the starting point of the slave carrier of this machine;
[0008] Determine whether a first broadcast message sent by the host at the starting point of the host carrier is obtained within a first preset time;
[0009] If the first broadcast message is not received within the first preset time, it is determined that the host fails, and whether the local machine meets the preset conditions is determined. If the preset conditions are met, the local machine is switched to be the new host of the system;
[0010] If the first broadcast message is obtained within the first preset time, determining the time when the acquisition of the first broadcast message is completed as a second timestamp;
[0011] Based on the second preset time, the first timestamp and the second timestamp, calculating the time deviation between the starting point of the slave carrier of the local machine and the starting point of the master carrier; wherein the second preset time is the fixed time required to complete the acquisition of the first broadcast message;
[0012] Based on the time deviation, the starting point of the slave carrier of the local machine is adjusted to be synchronized with the starting point of the master carrier.
[0013] Optionally, after the step of determining the acquisition time of the first broadcast message as the second timestamp, the method further includes:
[0014] Processing the first broadcast message; obtaining status information of the host;
[0015] Determining whether the status information is fault information;
[0016] If it is fault information, it is determined that the host fails, and whether the local machine meets the preset conditions. If so, the local machine is switched to be the new host of the system;
[0017] If it is not fault information, the process proceeds to the step of calculating the time deviation between the starting point of the local slave carrier and the starting point of the master carrier based on the second preset time, the first timestamp and the second timestamp.
[0018] Optionally, the energy storage converter includes: an editable logic module and a CAN communication module; wherein the editable logic module is used to tailor the arbitration and retransmission mechanism in the CAN communication module.
[0019] Optionally, after obtaining the first broadcast message, the method further includes:
[0020] Obtaining a count value of a counter and the number of the energy storage converters in the system; wherein the counter is included in the first broadcast message;
[0021] Calculating the ratio of the count value to the number, and determining a remainder;
[0022] Determining whether the remainder is equal to the communication address number of the slave;
[0023] If so, a second broadcast message is fed back to the host; wherein the second broadcast message includes the communication address number and operating status of the local machine.
[0024] Optionally, the determining whether the machine meets a preset condition includes:
[0025] Within a third preset time, obtaining and processing the second broadcast messages sent by a number of other slaves to obtain a number of the communication address numbers and a number of the operating states; wherein the communication address numbers and the operating states correspond one to one;
[0026] Determine whether there is a target communication address number smaller than the communication address number of the local device among the plurality of communication address numbers;
[0027] If the target communication address number does not exist, the local machine is switched to be the host of the system;
[0028] If the target communication address number exists, it is determined whether the running state corresponding to the target communication address number is a fault state. If it is a fault state, the local machine is switched to be a new host of the system.
[0029] Optionally, the calculating, based on the second preset time, the first timestamp, and the second timestamp, a time deviation between a starting point of a slave carrier wave of the local device and a starting point of a master carrier wave includes:
[0030] Calculate and obtain a first difference between the first timestamp and the second timestamp;
[0031] A second difference between the first difference and the second preset time is calculated, and the second difference is determined as the time deviation.
[0032] In a second aspect, the present application provides a carrier synchronization control method, which is applied to a host, wherein the system in which the host and several slaves are located is a parallel system, and both the host and the slaves are energy storage converters, and the method comprises:
[0033] At the starting point of the host carrier, a first broadcast message is sent to the slave, so that the slave records the first timestamp corresponding to the starting point of the slave carrier of the local machine; it is determined whether the first broadcast message is obtained within a first preset time; if the first broadcast message is not obtained within the first preset time, it is determined that the host fails, and it is determined whether the local machine meets the preset conditions. If so, the local machine is switched to be the new host of the system; if the first broadcast message is obtained within the first preset time, the acquisition time of the first broadcast message is determined to be a second timestamp; based on the second preset time, the first timestamp and the second timestamp, the time deviation between the starting point of the slave carrier of the local machine and the starting point of the host carrier is calculated; wherein the second preset time is a fixed time required to process the first broadcast message; based on the time deviation, the starting point of the slave carrier of the local machine is adjusted to be synchronized with the starting point of the host carrier.
[0034] In a third aspect, the present application provides a carrier synchronization control device, including:
[0035] A first time recording module, used to record a first timestamp corresponding to a starting point of a slave carrier of the local machine;
[0036] A fault judgment module, used for judging whether a first broadcast message sent by the host at a starting point of a host carrier is obtained within a first preset time;
[0037] a host selection module, configured to determine that the host fails if the first broadcast message is not received within the first preset time, and to judge whether the host satisfies a preset condition, and if so, to switch the host to be a new host of the system;
[0038] A second time recording module, configured to determine the acquisition time of the first broadcast message as a second timestamp if the first broadcast message is obtained within the first preset time;
[0039] a deviation calculation module, configured to calculate a time deviation between a carrier start point of the local device and a carrier start point of the host device based on the second preset time, the first timestamp, and the second timestamp; wherein the second preset time is a fixed time required to process the first broadcast message;
[0040] The starting point adjustment module is used to adjust the carrier starting point of the local device to be synchronized with the carrier starting point of the host based on the time deviation.
[0041] In a fifth aspect, the present application provides an electronic device, including:
[0042] Memory, used to store computer programs;
[0043] The processor is used to execute the computer program to implement the above-mentioned carrier synchronization control method.
[0044] In a sixth aspect, the present application provides a computer-readable storage medium, characterized in that it is used to store a computer program; wherein, when the computer program is executed by a processor, the above-mentioned carrier synchronization control method is implemented.
[0045] In the present application, at the starting point of the slave carrier of the local machine, the slave records the corresponding time as the first timestamp. If the slave does not obtain the first broadcast message sent by the host at the starting point of the host carrier within the first preset time, it means that the host has a fault, and then the slave that meets the preset conditions in the energy storage system will apply to become the new host; if the slave obtains the first broadcast message within the first preset time, the time of obtaining the first broadcast message is used as the second timestamp, and based on the second preset time, the first timestamp and the second timestamp, the time deviation between the starting point of the slave carrier of the local machine and the starting point of the carrier of the host is calculated, so that the slave can adjust the starting point of the slave carrier of the local machine based on the obtained time deviation to achieve carrier synchronization. It can be obtained from the above that the slave obtains the first broadcast message sent by the host at the starting point of the carrier through the inherent communication bus between the energy storage converters, determines the time of obtaining the first broadcast message as the first timestamp, and processes the first broadcast message within the second preset time. Since the transmission speed of the communication bus between the energy storage converters is very fast, the transmission time can be directly ignored. Therefore, the second timestamp can be directly used as the time corresponding to the carrier starting point of the host. Through the second timestamp, the second preset time and the first timestamp corresponding to the carrier starting point of the slave, the time deviation between the carrier starting point of the slave and the carrier starting point of the host can be directly calculated, and the carrier starting point of the slave can be adjusted based on the time deviation to achieve carrier synchronization of the energy storage system. At this time, carrier synchronization is achieved through the inherent communication structure in the energy storage system, so there is no need to add an isolation transformer or parallel line, which greatly reduces the cost of the energy storage system. At the same time, because the slave can judge whether the host fails based on whether the first broadcast message is received within the first preset time, and selects a slave that meets the preset conditions as the new host when the host fails, it avoids the abnormal operation of the energy storage system due to the failure of the host. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0047] Figure 1A schematic diagram of a carrier synchronization control method disclosed in the present application;
[0048] Figure 2 A system architecture diagram of a parallel system energy storage converter provided in this application;
[0049] Figure 3 A schematic diagram of a time deviation calculation method provided in this application;
[0050] Figure 4 A schematic diagram of a specific carrier synchronization control method disclosed in this application;
[0051] Figure 5 A structural schematic diagram of a carrier synchronization control device disclosed in this application;
[0052] Figure 6 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] With the extensive application of energy storage systems, the demand for the capacity of energy storage systems is gradually increasing. In order to expand the capacity, the method of connecting multiple PCS (Power Conversion System) in parallel is often adopted. However, due to the deviation of the crystal oscillator of each PCS, the carrier generated by the PCS in the energy storage system will also have periodic phase shift, which will lead to high-frequency circulating current between the PCS, increase the loss of the energy storage system, and affect the reliability and efficiency of the energy storage system. Therefore, in order to achieve carrier synchronization, in the prior art, the high-frequency circulating current between the PCS can be suppressed by adding an isolation transformer on the AC side of the PCS, or by adding a parallel line in the energy storage system, setting one of the PCS as the host, and transmitting the host's carrier signal to all slaves through the parallel line, so that the slave can adjust its own carrier based on the host's carrier signal to achieve carrier synchronization between the host and the slave.
[0055] However, the above two solutions require additional isolation transformers on the one hand, and additional hardware circuits and wiring are required to add parallel lines on the other hand. Therefore, the above two solutions both increase the cost of the energy storage system, and when the parallel lines are used, the entire energy storage system may not operate normally due to the failure of the host.
[0056] Therefore, how to reduce the cost and improve the stability of the energy storage system is an urgent problem to be solved.
[0057] To solve the above problems, see Figure 1 As shown, an embodiment of the present invention discloses a carrier synchronization control method, which is applied to a slave, a system where a host and a plurality of slaves are located is a parallel system, and both the host and the slaves are energy storage converters, and the method includes:
[0058] Step S11, recording a first timestamp corresponding to the starting point of the slave carrier of the local machine;
[0059] In this embodiment, at the starting point of the slave carrier of the local machine, the slave machine needs to record the time as the first timestamp. It is understandable that in order to store the first timestamp, a timestamp register needs to be set in the energy storage converter, and the timestamp register can be called by other parts in the energy storage converter to obtain the time size corresponding to the starting point of the slave carrier of the slave machine by reading and processing the timestamp register.
[0060] It is understandable that there are many ways to record time. In a specific implementation, one or more timer chips can be specially set in the energy storage converter. When the carrier signal starts to be generated, that is, the starting point of the slave carrier of the local machine, the timer circuit starts timing at the same time, and the starting time of its timing is the time corresponding to the starting point of the slave carrier, and the time is stored in the timestamp register as the first timestamp.
[0061] In another specific implementation, an interrupt can be triggered when the carrier signal changes state, i.e., at the carrier starting point, and the time corresponding to the slave carrier starting point of the slave can be recorded in the interrupt service program, and the time can also be stored as the first timestamp in the timestamp register.
[0062] Step S12, determining whether a first broadcast message sent by the host at the starting point of the host carrier is obtained within a first preset time;
[0063] In this embodiment, the slave continuously monitors whether the first broadcast message sent by the host at the starting point of the host carrier is received within the first preset time. It is understandable that the energy storage converters can communicate directly through the inherent communication interface. In order to achieve high-speed communication, the CAN (Controller Area Network) interface commonly used on the energy storage converter can be used for communication.
[0064] It should be noted that conventional CAN communication has mechanisms such as priority arbitration and retransmission, which cause the signals of nodes with lower priority to be temporarily or permanently blocked. Therefore, if it is directly adopted, the communication time may be unstable.
[0065] Among them, the priority arbitration mechanism is used to solve the problem of conflicts when multiple nodes send data at the same time. Specifically, when multiple nodes start to send data at the same time, the identifier can be compared to determine which node can continue to send. The smaller the value of the identifier, the higher the priority. For example, in the standard CAN 2.0A, the identifier length is 11 bits. During the arbitration process, each node monitors the level on the bus while sending the identifier. If a node sends a recessive bit and detects a dominant bit on the bus, then the node knows that a node with a higher priority is sending data, and it will immediately stop sending the current frame and wait until the bus is idle before trying to send again.
[0066] The retransmission mechanism is to ensure reliable data transmission. When a node sends data, if it does not receive a confirmation response from the receiving node within the specified time, the confirmation response is a dominant bit. The sending node will think that there is an error in data transmission and automatically retransmit the data frame. The above specified time is the ACK (Acknowledge character) slot time. For example, after sending a frame of data, the sending node will check whether there is a dominant bit on the bus within the ACK slot time. If no dominant bit is detected, the retransmission process will be triggered.
[0067] In addition, since CAN communication also requires the cooperation of software, in a complex system, CAN communication tasks usually compete with other tasks for processor resources. If the task scheduling algorithm used by the system is not optimized enough, or the task priority setting is unreasonable, it may cause the CAN communication task to be delayed, making the software processing time uncertain. Therefore, directly using conventional CAN communication can still achieve carrier synchronization, but the carrier synchronization accuracy is not high enough.
[0068] In order to improve the accuracy of carrier synchronization, in this embodiment, the energy storage converter may include: an editable logic module and a CAN communication module; wherein the editable logic module is used to tailor the arbitration and retransmission mechanism in the CAN communication module. The original priority arbitration and retransmission mechanism in the CAN communication module can be tailored through FPGA (Field Programmable Gate Array, editable logic module). It should be noted that, if Figure 2As shown, in the parallel system, each energy storage converter is connected through the CAN communication module on the PCS control board to form a CAN communication network. Each energy storage converter includes a switch tube and a PCS control board. The PCS control board includes a DSP (Digital Signal Processor), an FPGA, and a CAN communication module, and the CAN communication module is a customized CAN communication module cut out based on the FPGA. In addition, the DSP on the PCS control board can control the FPGA to perform corresponding operations in the form of interrupts, and receive data in the FPGA through parallel lines for processing. At the same time, the DSP can also control the switch of the IGBT in the energy storage converter through PWM signals, thereby adjusting the output voltage, output frequency, and output power of the energy storage converter.
[0069] Furthermore, in order to cut the priority arbitration mechanism, in one specific implementation, for a CAN communication module customized based on Verilog or VHDL, the arbitration-related logic part can be directly skipped through logic gate circuits or by modifying configuration registers; in another specific implementation, a CAN communication module based on an IP core finds the register bit related to the arbitration function and sets it to 0 to cut the priority arbitration mechanism.
[0070] Furthermore, in order to tailor the retransmission mechanism, in a specific implementation, for a CAN communication module customized based on Verilog or VHDL, a retransmission counter for recording the number of retransmissions and a retransmission timer for determining when the next retransmission will be performed are identified, and the retransmission mechanism can be tailored by setting the enable signal of the retransmission counter to zero and stopping the retransmission timer. In another specific implementation, for a CAN communication module based on an IP core, the retransmission mechanism can be tailored by finding the register bit for retransmission control in the document and setting it to 0.
[0071] In addition, the parallel processing architecture and hardware logic design of FPGA can also achieve fixed data processing time. Specifically, the parallel processing architecture of FPGA can perform multiple independent operations at the same time, that is, when receiving multiple data, the processing of each data does not interfere with each other, so the data processing time can be fixed. In addition, the hardware logic design of FPGA can also achieve fixed data processing time, such as reasonably setting the clock frequency and the flow path of data between registers through the register of FPGA to achieve a fixed data processing cycle.
[0072] It is understandable that in order to ensure smooth communication, before performing the first carrier synchronization operation, the energy storage inverter needs to be initialized, that is, the master-slave status and communication address number are set through debugging software or touch screen, and the communication address numbers corresponding to the host and each slave are ensured to be different.
[0073] Step S13: if the first broadcast message is not received within the first preset time, it is determined that the host fails, and whether the host meets the preset conditions is determined. If the preset conditions are met, the host is switched to be the new host of the system;
[0074] In this embodiment, if the slave does not receive the first broadcast message sent by the master within the first preset time, it can be determined that the master has failed. In order to ensure the normal operation of the system, a slave that meets the preset conditions will become the new master of the system.
[0075] In order to determine that the slave needs to be converted into a new slave of the system, the above-mentioned preset condition can be a slave with the smallest communication address number that is operating normally in the system. It can be understood that since the communication address numbers corresponding to the slaves are different, the uniqueness of the selection can be guaranteed by selecting the slave with the smallest communication address number in the communication system to be converted into a new master.
[0076] Step S14: if the first broadcast message is obtained within the first preset time, determining the acquisition time of the first broadcast message as the second timestamp;
[0077] In this embodiment, if the slave obtains the first broadcast message within the first preset time, the obtaining time is recorded as the second timestamp.
[0078] In this embodiment, the first broadcast message is processed; the status information of the host is obtained; it is determined whether the status information is fault information; if it is fault information, it is determined that the host is faulty, and it is determined whether the local machine meets the preset conditions. If so, the local machine is switched to be the new host of the system; if it is not fault information, the step of calculating the time deviation between the starting point of the local slave carrier and the starting point of the host carrier based on the second preset time, the first timestamp and the second timestamp is entered. It should be noted that even if the first broadcast message sent by the host is received, there is a possibility that a module other than the communication module of the host is faulty, and the first broadcast message contains the status information of the host, so it is also possible to further determine whether the host has found a fault based on the status information in the first broadcast message.
[0079] In addition, in order to feed back the status of the slave to the host in time and prevent congestion in the communication bus, in this implementation, after obtaining the first broadcast message, it is also necessary to obtain the count value of the counter and the number of energy storage converters in the system; wherein the counter and the number are both included in the first broadcast message; calculate the ratio of the count value to the number, determine the remainder; determine whether the remainder is equal to the communication address number of the slave; if so, feed back the second broadcast message to the host; wherein the second broadcast message includes the communication address number and the operating status of the local machine. It can be understood that because the slave has a different communication address number, the count value of the counter is increased by one each time the host sends a first broadcast signal. Therefore, by comparing whether the communication address number of the slave itself is equal to the remainder calculated based on the count value of the counter and the number of energy storage converters in the system, it can be ensured that each time the host sends a first broadcast message, the only slave in the system that meets the above conditions can feed back the second broadcast message to the host, so as to timely feed back the status of the slave and prevent congestion in the communication bus.
[0080] It should be noted that before the system is put into operation, it is necessary to initialize the system. In addition to configuring the master-slave state and communication address number of each energy storage inverter in the system through the debugging software or the touch screen, the number of energy storage inverters in the system can be directly preset in the energy storage inverter, so that each energy storage inverter can directly call the number, which is convenient for subsequent calculations. In addition, since the number of energy storage inverters in the system is a value preset in the energy storage inverter, the failure of the energy storage inverter in the system will not affect the order in which the slaves feedback the second broadcast message.
[0081] Step S15, based on the second preset time, the first timestamp and the second timestamp, calculating the time deviation between the starting point of the slave carrier and the starting point of the master carrier of the local machine; wherein the second preset time is a fixed time required to process the first broadcast message;
[0082] In this embodiment, the time deviation between the carrier start point of the slave and the carrier start point of the master can be calculated through the second preset time, the first timestamp and the second timestamp.
[0083] In order to determine the time deviation between the starting point of the slave carrier and the starting point of the host carrier of the slave, in this embodiment, the first difference between the first timestamp and the second timestamp is calculated; the second difference between the first difference and the second preset time is calculated, and the second difference is determined as the time deviation. It can be understood that since it takes a fixed time for the slave to complete the reception of the first broadcast message, when determining the time deviation between the starting point of the slave carrier and the starting point of the host carrier, it is also necessary to subtract the fixed time required to complete the reception. Figure 3As shown, the first timestamp corresponding to the completion of the reception of the first broadcast message by the slave is T1, the second timestamp of the slave carrier starting point is T2, and the inherent time required to complete the acquisition of the first broadcast message is T0. It can be understood that at this time, the time deviation between the starting point of the slave carrier and the starting point of the host carrier is T1-T2-T0.
[0084] Step S16: Based on the time deviation, adjust the starting point of the slave carrier of the local device to be synchronized with the starting point of the master carrier.
[0085] In this embodiment, after obtaining the time deviation between the slave carrier start point and the master carrier start point of the local machine, the slave machine can adjust its own carrier start point based on the time deviation to achieve carrier synchronization between the slave machine and the master machine.
[0086] It is understandable that if Figure 3 As shown, when the time deviation T1-T2-T0 obtained according to the above calculation method is a positive number, it means that the slave carrier starting point of the slave lags behind the host carrier starting point by T1-T2-T0, and the slave carrier starting point of the slave needs to be adjusted forward by T1-T2-T0; if the above calculation result T1-T2-T0 is a negative number, it means that the slave carrier starting point of the slave is ahead of the host carrier starting point by |T1-T2-T0|, and the slave carrier starting point of the slave needs to be adjusted backward by |T1-T2-T0|.
[0087] As can be seen from the above, the slave obtains the first broadcast message sent by the host at the carrier starting point through the inherent communication bus between the energy storage converters, and determines the time of obtaining the first broadcast message as the first timestamp. Since the transmission and processing time of the first broadcast message is fixed, the host carrier starting point can be calculated according to the second preset time and the second timestamp, and then the time corresponding to the host carrier starting point and the first timestamp corresponding to the slave carrier starting point are calculated to obtain the time deviation between the carrier starting point of the slave and the carrier starting point of the host, and the carrier starting point of the slave is adjusted based on the time deviation to achieve carrier synchronization of the energy storage system. At this time, carrier synchronization is achieved through the inherent communication structure in the energy storage system, so there is no need to add an isolation transformer or parallel line, which greatly reduces the cost of the energy storage system. At the same time, because the slave can judge whether the host fails based on whether the first broadcast message is received within the first preset time, and selects a slave that meets the preset conditions as the new host when the host fails, it avoids the abnormal operation of the energy storage system caused by the host failure.
[0088] refer to Figure 4 As shown, in order to ensure that the system continues to operate normally when a host fails, the embodiment of the present application further provides a specific carrier synchronization control method, which is applied to the slave and may include:
[0089] Step S21, within a third preset time, obtaining and processing a second broadcast message sent by a plurality of other slaves to obtain a plurality of communication address numbers and a plurality of operating states; wherein the communication address numbers and the operating states correspond one to one;
[0090] In this embodiment, within the third preset time after determining that the host fails, the slave will continue to receive second broadcast messages sent by other hosts in the system, and obtain the communication address number and operating status of other slaves based on the obtained second broadcast messages.
[0091] It is understandable that the slaves sequentially feed back the second broadcast message containing their own communication address number and operating status to the host through the communication network. At this time, not only the host can receive the second broadcast message, but other slaves can also selectively obtain it.
[0092] Step S22, determining whether there is a target communication address number smaller than the communication address number of the local device among the plurality of communication address numbers; if there is no target communication address number, jumping to step S24;
[0093] In this embodiment, it is first necessary to determine whether there are other slaves with a communication address number smaller than that of the local machine. If not, it can be determined that the local machine needs to change its master state and become a new master in the system.
[0094] Step S23: If the target communication address number exists, determine whether the running state corresponding to the target communication address number is a fault state. If it is a fault state, jump to step S24;
[0095] In this embodiment, it is determined whether the slaves whose communication address numbers are smaller than the communication address number of the local machine are in normal working state. If the above slaves are all in fault state, it is necessary to switch the host state of the local machine to become a new slave in the system.
[0096] Step S24, switching this machine to be the new host of the system.
[0097] In this embodiment, when it is determined that the local machine is the device with the smallest communication address number that is operating normally in the system, it will adjust its own state to the master state. It can be understood that in order to complete the master switch, the FPGA in the slave machine needs to send a request to the DSP to apply to become the master. After receiving the request, the DSP performs the operation of switching the master and sends the master configuration to the FPGA, so that when the DSP interrupts the FPGA, the corresponding operation of the FPGA changes to complete the master switch.
[0098] From the above, it can be concluded that the slave can continuously obtain the second broadcast message sent by other slaves within a fixed time after determining that the host fails, that is, within the third preset time, to obtain the corresponding communication address number and operating status, and compare it with the communication address number of the local machine in turn to determine whether the local machine is the device with the smallest communication address number in normal operation in the system. If so, the local machine is converted to a new master. Since the device with the smallest communication address number in normal operation in the system is unique, and the communication speed between energy storage converters is extremely fast, the time for each slave to obtain the relevant information of other slaves and compare them is extremely short, which can ensure that the system continues to operate normally when the host fails.
[0099] Furthermore, an embodiment of the present application also provides a carrier synchronization control method, which is applied to a host, wherein a system where the host and a plurality of slaves are located is a parallel system, and both the host and the slaves are energy storage converters, and the method includes:
[0100] Step S31, at the starting point of the host carrier, send a first broadcast message to the slave, so that the slave records the first timestamp corresponding to the starting point of the slave carrier of the local machine; determine whether the first broadcast message is obtained within the first preset time; if the first broadcast message is not obtained within the first preset time, determine that the host fails, and determine whether the local machine meets the preset conditions. If so, switch the local machine to be the new host of the system; if the first broadcast message is obtained within the first preset time, determine the acquisition time of the first broadcast message as the second timestamp; based on the second preset time, the first timestamp and the second timestamp, calculate the time deviation between the starting point of the slave carrier of the local machine and the starting point of the host carrier; wherein the second preset time is the fixed time required to process the first broadcast message; based on the time deviation, adjust the starting point of the slave carrier of the local machine to be synchronized with the starting point of the host carrier.
[0101] Among them, the specific implementation process of each of the above steps can refer to the corresponding content disclosed in the above embodiments, which will not be repeated here.
[0102] As can be seen from the above, the slave obtains the first broadcast message sent by the host at the carrier starting point through the inherent communication bus between the energy storage converters, determines the time of obtaining the first broadcast message as the first timestamp, and processes the first broadcast message within the second preset time. Since the transmission speed of the communication bus between the energy storage converters is very fast, the transmission time can be directly ignored, so the second timestamp can be directly used as the time corresponding to the carrier starting point of the host. Through the second timestamp, the second preset time and the first timestamp corresponding to the carrier starting point of the slave, the time deviation between the carrier starting point of the slave and the carrier starting point of the host can be directly calculated, and the carrier starting point of the slave is adjusted based on the time deviation to achieve carrier synchronization of the energy storage system. At this time, carrier synchronization is achieved through the inherent communication structure in the energy storage system, so there is no need to add an isolation transformer or a parallel line, which greatly reduces the cost of the energy storage system. At the same time, because the slave can judge whether the host fails according to whether the first broadcast message is received within the first preset time, and selects the slave that meets the preset conditions as the new host when the host fails, it avoids the abnormal operation of the energy storage system caused by the host failure.
[0103] Accordingly, see Figure 5 As shown, the embodiment of the present application also provides a carrier synchronization control device, which may include:
[0104] A first time recording module 11, used to record a first timestamp corresponding to a starting point of a slave carrier of the local machine;
[0105] A fault judgment module 12 is used to judge whether a first broadcast message sent by the host at a host carrier starting point is obtained within a first preset time;
[0106] The host election module 13 is used to determine that the host fails if the first broadcast message is not received within the first preset time, and to judge whether the host meets the preset conditions. If so, the host is switched to be the new host of the system;
[0107] A second time recording module 14, configured to determine the acquisition time of the first broadcast message as a second timestamp if the first broadcast message is obtained within the first preset time;
[0108] The deviation calculation module 15 is used to calculate the time deviation between the carrier start point of the local device and the carrier start point of the host based on the second preset time, the first timestamp and the second timestamp; wherein the second preset time is a fixed time required to process the first broadcast message;
[0109] The starting point adjustment module 16 is used to adjust the carrier starting point of the local device to be synchronized with the carrier starting point of the host device based on the time deviation.
[0110] Among them, the specific working process of each of the above modules can refer to the corresponding content disclosed in the aforementioned embodiments, and will not be elaborated here.
[0111] As can be seen from the above, the slave obtains the first broadcast message sent by the host at the carrier starting point through the inherent communication bus between the energy storage converters, determines the time of obtaining the first broadcast message as the first timestamp, and processes the first broadcast message within the second preset time. Since the transmission speed of the communication bus between the energy storage converters is very fast, the transmission time can be directly ignored, so the second timestamp can be directly used as the time corresponding to the carrier starting point of the host. Through the second timestamp, the second preset time and the first timestamp corresponding to the carrier starting point of the slave, the time deviation between the carrier starting point of the slave and the carrier starting point of the host can be directly calculated, and the carrier starting point of the slave is adjusted based on the time deviation to achieve carrier synchronization of the energy storage system. At this time, carrier synchronization is achieved through the inherent communication structure in the energy storage system, so there is no need to add an isolation transformer or a parallel line, which greatly reduces the cost of the energy storage system. At the same time, because the slave can judge whether the host fails according to whether the first broadcast message is received within the first preset time, and selects the slave that meets the preset conditions as the new host when the host fails, it avoids the abnormal operation of the energy storage system caused by the host failure.
[0112] In a specific implementation, after the second time recording module 14, it also includes:
[0113] A message processing unit, configured to process the first broadcast message within the second preset time; and obtain the status information of the host;
[0114] A fault judgment unit, used to judge whether the state information is fault information;
[0115] A host election unit is used to determine that the host has a fault if the fault information is faulty, and to judge whether the host meets a preset condition, and if so, to switch the host to be a new host of the system;
[0116] The deviation calculation unit is used to enter the step of calculating the time deviation between the starting point of the local slave carrier and the starting point of the master carrier based on the second preset time, the first timestamp and the second timestamp if it is not fault information.
[0117] In a specific implementation, after the second time recording module 14, it also includes:
[0118] A parameter acquisition unit, used to acquire a count value of a counter and the number of the energy storage converters in the system; wherein the counter is included in the first broadcast message;
[0119] Specifically, the energy storage converter includes: an editable logic module and a CAN communication module; wherein the editable logic module is used to tailor the arbitration and retransmission mechanisms in the CAN communication module.
[0120] a remainder determination unit, used to calculate the ratio of the count value to the number, and determine the remainder;
[0121] A remainder judgment unit, used to judge whether the remainder is equal to the communication address number of the slave;
[0122] A message feedback unit is used to feed back a second broadcast message to the host if so; wherein the second broadcast message includes the communication address number and operating status of the local machine.
[0123] In a specific implementation, the host election module 13 includes:
[0124] A message acquisition unit, used for acquiring and processing the second broadcast messages sent by a plurality of other slaves within a third preset time, so as to acquire a plurality of the communication address numbers and a plurality of the operating states; wherein the communication address numbers and the operating states correspond one to one;
[0125] A number determination unit, used for determining whether there is a target communication address number smaller than the communication address number of the local device among the communication address numbers;
[0126] A first host switching unit, configured to switch the local computer to be the host of the system if the target communication address number does not exist;
[0127] The second host switching unit is used to determine whether the operating state corresponding to the target communication address number is a fault state if the target communication address number exists, and if it is a fault state, switch the local machine to be a new host of the system.
[0128] In a specific implementation, the deviation calculation module 15 includes:
[0129] A first difference obtaining unit, configured to calculate and obtain a first difference between the first timestamp and the second timestamp;
[0130] A second difference acquisition unit is used to calculate a second difference between the first difference and the second preset time, and determine the second difference as the time deviation.
[0131] Furthermore, the present application also discloses an electronic device. Figure 6It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the carrier synchronization control method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0132] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0133] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0134] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the carrier synchronization control method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0135] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the carrier synchronization control method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.
[0136] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0137] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0138] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0139] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0140] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A carrier synchronization control method, characterized in that: Applied to a slave, a system where a host and a plurality of the slaves are located is a parallel system, and both the host and the slaves are energy storage converters, and the method comprises: Record the first timestamp corresponding to the starting point of the slave carrier of this machine; Determine whether a first broadcast message sent by the host at the starting point of the host carrier is obtained within a first preset time; If the first broadcast message is not received within the first preset time, it is determined that the host fails, and whether the local machine meets the preset conditions is determined. If the preset conditions are met, the local machine is switched to be the new host of the system; If the first broadcast message is obtained within the first preset time, determining the time when the acquisition of the first broadcast message is completed as a second timestamp; Based on the second preset time, the first timestamp and the second timestamp, calculating the time deviation between the starting point of the slave carrier of the local machine and the starting point of the master carrier; wherein the second preset time is the fixed time required to complete the acquisition of the first broadcast message; Based on the time deviation, the starting point of the slave carrier of the local machine is adjusted to be synchronized with the starting point of the master carrier.
2. The carrier synchronization control method according to claim 1, characterized in that: After the step of determining that the acquisition time of the first broadcast message is the second timestamp, the method further includes: Processing the first broadcast message; obtaining status information of the host; Determining whether the status information is fault information; If it is fault information, it is determined that the host fails, and whether the local machine meets the preset conditions. If so, the local machine is switched to be the new host of the system; If it is not fault information, the process proceeds to the step of calculating the time deviation between the starting point of the local slave carrier and the starting point of the master carrier based on the second preset time, the first timestamp and the second timestamp.
3. The carrier synchronization control method according to claim 1, characterized in that: The energy storage converter comprises: an editable logic module and a CAN communication module; wherein the editable logic module is used to tailor the arbitration and retransmission mechanisms in the CAN communication module.
4. The carrier synchronization control method according to claim 1, characterized in that: After acquiring the first broadcast message, the method further includes: Obtaining a count value of a counter and the number of the energy storage converters in the system; wherein the counter is included in the first broadcast message; Calculating the ratio of the count value to the number, and determining a remainder; Determining whether the remainder is equal to the communication address number of the slave; If so, a second broadcast message is fed back to the host; wherein the second broadcast message includes the communication address number and operating status of the local machine.
5. The carrier synchronization control method according to claim 4, characterized in that: The step of judging whether the machine meets the preset conditions includes: Within a third preset time, obtaining and processing the second broadcast messages sent by a number of other slaves to obtain a number of the communication address numbers and a number of the operating states; wherein the communication address numbers and the operating states correspond one to one; Determine whether there is a target communication address number smaller than the communication address number of the local device among the plurality of communication address numbers; If the target communication address number does not exist, the local machine is switched to be the host of the system; If the target communication address number exists, it is determined whether the running state corresponding to the target communication address number is a fault state. If it is a fault state, the local machine is switched to be a new host of the system.
6. The carrier synchronization control method according to any one of claims 1 to 5, characterized in that: The calculating, based on the second preset time, the first timestamp and the second timestamp, a time deviation between a starting point of a slave carrier wave of the local machine and a starting point of the master carrier wave comprises: Calculate and obtain a first difference between the first timestamp and the second timestamp; A second difference between the first difference and the second preset time is calculated, and the second difference is determined as the time deviation.
7. A carrier synchronization control method, characterized in that: Applied to a host, the system where the host and several slaves are located is a parallel system, and both the host and the slaves are energy storage converters, the method includes: At the starting point of the host carrier, a first broadcast message is sent to the slave, so that the slave records the first timestamp corresponding to the starting point of the slave carrier of the local machine; it is determined whether the first broadcast message is obtained within a first preset time; if the first broadcast message is not obtained within the first preset time, it is determined that the host fails, and it is determined whether the local machine meets the preset conditions. If so, the local machine is switched to be the new host of the system; if the first broadcast message is obtained within the first preset time, the acquisition time of the first broadcast message is determined to be a second timestamp; based on the second preset time, the first timestamp and the second timestamp, the time deviation between the starting point of the slave carrier of the local machine and the starting point of the host carrier is calculated; wherein the second preset time is a fixed time required to process the first broadcast message; based on the time deviation, the starting point of the slave carrier of the local machine is adjusted to be synchronized with the starting point of the host carrier.
8. A carrier synchronization control device, characterized in that: include: A first time recording module, used to record a first timestamp corresponding to a starting point of a slave carrier of the local machine; A fault judgment module, used for judging whether a first broadcast message sent by the host at a starting point of a host carrier is obtained within a first preset time; a host selection module, configured to determine that the host fails if the first broadcast message is not received within the first preset time, and to judge whether the host satisfies a preset condition, and if so, to switch the host to be a new host of the system; A second time recording module, configured to determine the acquisition time of the first broadcast message as a second timestamp if the first broadcast message is obtained within the first preset time; a deviation calculation module, configured to calculate a time deviation between a carrier start point of the local device and a carrier start point of the host device based on the second preset time, the first timestamp, and the second timestamp; wherein the second preset time is a fixed time required to process the first broadcast message; The starting point adjustment module is used to adjust the carrier starting point of the local device to be synchronized with the carrier starting point of the host based on the time deviation.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the carrier synchronization control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the carrier synchronization control method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Inverter parallel system based on CAN (controller area network) bus and carrier synchronization method of inverter parallel system
CN104950765A
Method for transmitting process data between master driver and slave driver based on CAN bus
CN113259217A
Carrier synchronization control method and device of parallel energy storage converter
CN115313820A
Cited By
Inverter carrier synchronization system
CN120825041A