Parallel machine synchronization control method based on CAN bus and related equipment

CN122951213APending Publication Date: 2026-10-20MERCER (GUANGDONG) NEW ENERGY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611225385.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]然而,该类方法存在显著缺陷:首先,IO信号为单端电平传输,抗电磁干扰能力弱,在工业现场易受噪声耦合影响,导致接收端误触发或采样失真;其次,长距离布线会引入传播延迟与阻抗不匹配问题,造成同步误差增大;再次,每增加一台从机即需新增一条物理连线,系统扩展性差,印刷电路板布局复杂度与物料清单(Bill of Materials,BOM)成本随之上升;最后,此类方案仅实现单向同步功能,无法支持主从机间的状态反馈与远程配置,限制了系统的智能化水平

Benefits of technology

本申请通过完全摒弃传统的专用IO同步线,仅利用CAN总线物理链路同时实现工频相位同步、载波同步及数据通信,节约了微控制器的通用输入输出引脚资源,省去了光耦隔离器件,降低了印刷电路板布线复杂度与物料清单成本;通过软件过零检测与时间戳机制替代硬件比较器与脉冲信号,配合最高优先级标识符保障同步信号在总线仲裁中优先获得访问权,确保同步信号的实时性与确定性,使同步精度优于传统IO方式的正负1度至正负3度,有效抑制低频环流;通过CAN总线采用差分信号传输,配合硬件循环冗余校验与自动重传机制,有效规避因外部电磁干扰引起的毛刺误判,提升了系统鲁棒性;通过在同一物理链路上实现同步、监控、控制与升级等多功能复用,新增从机仅需接入CAN总线即可自动加入同步网络,无需更改主机硬件连接,便于系统扩展与维护;通过支持从机状态上报与主机远程调控,增强了系统的可观测性与可控性,适用于智能微电网与分布式能源管理场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application discloses a parallel synchronization control method and related equipment based on a CAN bus, relating to the fields of power electronic control and communication technology. The method includes: the master unit acquiring the zero-crossing moment of the output AC voltage at the power frequency as a global time reference; the master unit sending a synchronization frame to the slave unit via the controller local area network (CLAN) bus at the zero-crossing moment, the synchronization frame carrying master unit phase information and carrier synchronization information, with the identifier of the synchronization frame set to the highest priority; the slave unit receiving and parsing the synchronization frame via the CLAN bus; the slave unit calculating the phase deviation based on its local clock and master unit phase information, generating the phase angle compensation amount for the pulse width modulation generator, and fine-tuning the control cycle according to the carrier synchronization information. This application achieves power frequency phase synchronization, carrier synchronization, and bidirectional data communication solely based on the CLAN bus, completely eliminating dedicated input / output synchronization lines, thus improving synchronization accuracy and system anti-interference capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of power electronic control and communication technology, and in particular to a parallel synchronous control method and related equipment based on CAN bus. Background Technology

[0002] With the rapid development of new energy power generation, energy storage systems, high-power uninterruptible power supplies, and photovoltaic grid-connected technologies, multiple inverters are often connected in parallel to improve output capacity and system redundancy. To ensure the stable operation of the parallel system, each inverter unit must maintain a high degree of consistency in voltage amplitude, frequency, and phase. Among these, phase synchronization is a key aspect of suppressing circulating current and ensuring current sharing performance.

[0003] Current mainstream inverter parallel synchronization solutions still largely rely on dedicated input / output (IO) ports to transmit synchronization signals. Even though many products include Controller Area Network (CAN) bus parallel operation, they haven't completely eliminated the need for additional IO ports. Traditional IO synchronization methods typically involve the master inverter generating a pulse signal at the zero-crossing point of its output voltage, which is then sent to each slave inverter after isolation circuitry. The slave inverters then adjust the phase of their own pulse width modulation (PWM) waveform accordingly.

[0004] However, this type of method has significant drawbacks: First, the IO signal is transmitted at a single-ended level, which has weak resistance to electromagnetic interference and is easily affected by noise coupling in industrial environments, leading to false triggering or sampling distortion at the receiving end; second, long-distance cabling introduces propagation delay and impedance mismatch, resulting in increased synchronization errors; third, each additional slave device requires an additional physical connection, resulting in poor system scalability and increased complexity of printed circuit board layout and bill of materials (BOM) costs; finally, this type of solution only achieves unidirectional synchronization and cannot support status feedback and remote configuration between master and slave devices, limiting the level of system intelligence. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a parallel synchronization control method and related equipment based on CAN bus, which aims to completely eliminate the traditional dedicated IO synchronization line and use only the CAN bus physical link to simultaneously realize power frequency phase synchronization, carrier synchronization and bidirectional data communication, so as to meet the needs of modern power electronic systems for high reliability, low cost and integration.

[0006] On the one hand, embodiments of this application provide a parallel synchronization control method based on a CAN bus, the method comprising the following steps: The host obtains the zero-crossing moment of the output AC voltage at the power frequency as the global time reference; The host sends a synchronization frame to the slave via the CAN bus at the zero crossing of the power frequency. The synchronization frame carries host phase information and carrier synchronization information, and the identifier of the synchronization frame is set to the highest priority. The slave device receives the synchronization frame via the CAN bus and parses the synchronization frame to obtain the master phase information and the carrier synchronization information. The slave device calculates the phase deviation between its local phase and the master reference phase based on its local clock and the master phase information. It generates a phase angle compensation amount for the PWM generator based on the phase deviation and fine-tunes the control cycle based on the carrier synchronization information so that the slave device's output voltage phase tracks the master device.

[0007] Optionally, the host obtains the zero-crossing time of the output AC voltage at the power frequency as a global time reference, including: The host computer samples and outputs AC voltage signals through an analog-to-digital converter (ADC) module; The host computer executes a phase-locked loop (PLL) algorithm on the output AC voltage signal to identify the precise moment when the sine wave crosses zero from negative to positive as the power frequency zero-crossing moment.

[0008] Optionally, the host sends a synchronization frame to the slave via the CAN bus at the zero-crossing time of the power frequency, including: The host determines the zero-crossing time of the power frequency in a high-frequency interrupt triggered by enhanced pulse width modulation (ePWM); The host encapsulates the host phase information and the carrier synchronization information in the data field of a standard format controller local area network data frame; The host computer broadcasts the synchronization frame to the CAN bus via the built-in controller LAN controller.

[0009] Optionally, the slave device receives the synchronization frame via the CAN bus and parses the synchronization frame to obtain the master phase information and the carrier synchronization information, including: The slave device listens to the CAN bus via a controller area network transceiver; The slave device receives the synchronization frame with the highest priority identifier; The slave device extracts the host phase information and carrier synchronization information from the synchronization frame.

[0010] Optionally, the slave device calculates the phase deviation between its local phase and the master reference phase based on its local clock and the master phase information, generates a phase angle compensation amount for the PWM generator based on the phase deviation, and fine-tunes the control cycle based on the carrier synchronization information, including: The slave device calculates the phase deviation between the local phase and the host reference phase using the local clock; The slave device generates a compensation amount to correct the phase angle of the PWM generator based on the phase deviation; The slave device fine-tunes the control cycle based on the carrier synchronization information; The slave device writes the compensation amount into the pulse width modulation register so that the slave device output voltage phase dynamically tracks and locks onto the master device.

[0011] Optionally, the method further includes: The slave device transmits its operating status, fault flags, and self-test results back to the master device. The host performs intelligent decision-making based on the data returned by the slave, and the intelligent decision-making includes automatically disconnecting faulty modules or dynamically adjusting the current sharing strategy.

[0012] Optionally, the method further includes: The host broadcasts configuration data to the slave device so that the slave device can update its operating parameters according to the configuration data.

[0013] Optionally, the method further includes: In scenarios involving current sharing control, carrier phase alignment, or batch firmware updates, the CAN bus is reused to transmit control commands or data packets.

[0014] On the other hand, embodiments of this application provide a parallel synchronization control device based on a CAN bus, applied to a slave device, including: The synchronization frame receiving module is used to receive synchronization frames sent by the host via the CAN bus, and parse the synchronization frames to obtain host phase information and carrier synchronization information; The phase deviation calculation module is used to calculate the phase deviation between the local phase of the slave device and the reference phase of the master device based on the local clock and the master phase information; The PWM adjustment module is used to generate the phase angle compensation amount of the PWM generator according to the phase deviation, and to fine-tune the control cycle according to the carrier synchronization information so that the slave output voltage phase tracks the master.

[0015] On the other hand, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a computer program or instructions, and the computer program or instructions, when executed by the processor, implement the above-described method.

[0016] On the other hand, embodiments of this application provide a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the above-described method.

[0017] The embodiments of this application include the following beneficial effects: This application completely eliminates the traditional dedicated IO synchronization line, simultaneously achieving power frequency phase synchronization, carrier synchronization, and data communication using only the CAN bus physical link. This saves on the microcontroller's general-purpose input / output pin resources, eliminates optocoupler isolation devices, and reduces printed circuit board wiring complexity and bill of materials costs. By replacing hardware comparators and pulse signals with software zero-crossing detection and timestamp mechanisms, coupled with a highest-priority identifier, the synchronization signal is guaranteed priority access in bus arbitration, ensuring the real-time and deterministic nature of the synchronization signal. This results in synchronization accuracy superior to ±1 to ±3 degrees of traditional IO methods, effectively suppressing low-frequency circulating currents. The use of differential signal transmission via the CAN bus, combined with hardware cyclic redundancy check and automatic retransmission mechanisms, effectively avoids glitches and misjudgments caused by external electromagnetic interference, improving system robustness. By achieving multi-functional multiplexing of synchronization, monitoring, control, and upgrades on the same physical link, new slave devices only need to be connected to the CAN bus to automatically join the synchronization network without changing the host hardware connection, facilitating system expansion and maintenance. Support for slave status reporting and remote host control enhances system observability and controllability, making it suitable for smart microgrids and distributed energy management scenarios. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the steps of a parallel synchronization control method based on a CAN bus provided in an embodiment of this application. Figure 2 This is a diagram of the parallel synchronization system architecture provided in the embodiments of this application; Figure 3 This is a communication timing diagram provided in an embodiment of this application; Figure 4 This is a structural block diagram of a parallel synchronous control device based on a CAN bus provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0021] It should be noted that although the device diagram shows a modular division and the flowchart illustrates a logical order, in some cases, the steps shown or described may be performed in a different order than the modular division in the device or the order shown in the flowchart. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.

[0022] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.

[0023] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0024] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0025] like Figure 1 and Figure 2 As shown, Figure 1 A parallel synchronization control method based on a CAN bus is provided for embodiments of this application. The method includes the following steps: S100, the host obtains the zero-crossing moment of the output AC voltage at the power frequency as the global time reference; S200, the host sends a synchronization frame to the slave via the CAN bus at the zero crossing of the power frequency. The synchronization frame carries host phase information and carrier synchronization information, and the identifier of the synchronization frame is set to the highest priority. S300, the slave device receives the synchronization frame through the CAN bus and parses the synchronization frame to obtain the master phase information and the carrier synchronization information; S400, the slave device calculates the phase deviation between the local phase of the slave device and the reference phase of the master device based on the local clock and the phase information of the master device, generates the phase angle compensation amount of the PWM generator based on the phase deviation, and fine-tunes the control cycle based on the carrier synchronization information so that the phase of the output voltage of the slave device tracks the master device.

[0026] This application proposes a parallel synchronization control method and related equipment based on CAN bus. By completely eliminating the traditional dedicated IO synchronization line, it simultaneously achieves power frequency phase synchronization, carrier synchronization, and bidirectional data interaction using only the physical link of the CAN bus. By having the master send a high-priority synchronization frame at the zero-crossing moment of the power frequency, and the slave parses it, calculates the phase deviation, and adjusts the PWM register, precise phase synchronization between the master and slave is achieved. Through the bidirectional communication support of the CAN bus, the user can achieve data synchronization broadcast to the slave by modifying only the master. The slave sends back the operating status, fault flags, and self-test results to the master, and the master can make intelligent decisions based on the feedback from the slave.

[0027] The following is a detailed description of the parallel synchronization control method based on CAN bus proposed in this application: In this embodiment, a parallel synchronization system is first constructed, and the system architecture is as follows: Figure 2 As shown, the system includes one master and multiple slaves, connected via a CAN bus. Both the master and slaves are digital signal processors (DSPs) containing ADC modules, ePWM modules, and CAN controllers. This system is applicable to scenarios such as parallel connection of high-power uninterruptible power supplies, grid connection of energy storage systems, and parallel connection of photovoltaic inverters.

[0028] refer to Figure 3 In some embodiments, in step S100, the host obtains the zero-crossing time of the output AC voltage at the power frequency as a global time reference, including: S110, the host computer samples its output AC voltage signal in real time through the ADC module; S120, the host executes a phase-locked loop algorithm in the software to identify the precise timestamp when the sine wave crosses zero from negative to positive.

[0029] Specifically, the host computer uses the DSP's built-in ADC module to discretely sample the output AC voltage at a fixed sampling frequency to obtain a digital voltage sequence. The host computer then executes a phase-locked loop (PLL) algorithm in software to perform phase tracking and frequency locking on the digital voltage sequence, accurately identifying the moment when the sine wave crosses zero from negative to positive, and recording this moment as a global time reference. This process is entirely implemented in software, eliminating the need for additional hardware comparator circuitry. This avoids detection errors caused by temperature drift and noise threshold variations in hardware comparators, and also eliminates the need for zero-crossing comparators and corresponding isolation circuits, reducing hardware costs.

[0030] In some embodiments, in step S200, the host sends a synchronization frame to the slave via the CAN bus at the zero-crossing time of the power frequency, including: S210, the host determines the zero-crossing time of the power frequency in the high-frequency interrupt triggered by ePWM; S220, the host encapsulates the host phase information and the carrier synchronization information in the data field of a standard format CAN data frame, and sets the identifier of the frame to the highest priority; S230, the host broadcasts the synchronization frame to the CAN bus through the DSP's built-in CAN controller.

[0031] Specifically, in the high-frequency interrupt service routine triggered by the ePWM module, the host queries the zero-crossing flag output by the phase-locked loop algorithm. When the zero-crossing moment of the power frequency is detected, the host immediately encapsulates the current host phase angle and carrier synchronization count in the data field of a standard format CAN data frame. The host sets the identifier of this synchronization frame to the highest priority, such as 0x000, to ensure that it has priority in obtaining bus access rights in CAN bus arbitration and avoids synchronization frame transmission delays due to bus congestion. The host broadcasts the synchronization frame to the CAN bus at a baud rate of 1 megabits per second through the DSP's built-in CAN controller, and all slave devices can receive the frame. By multiplexing the synchronization signal and communication signal on the same bus and using the highest priority identifier to ensure the real-time performance and determinism of the synchronization frame, the dependence on dedicated IO synchronization lines is completely eliminated, simplifying hardware connections.

[0032] In some embodiments, in step S300, the slave device receives the synchronization frame via the CAN bus, parses the synchronization frame to obtain the master phase information and the carrier synchronization information, including: S310, the slave device listens to the bus via a CAN transceiver; S320, the slave device receives a synchronization frame with the highest priority identifier; S330, the slave device extracts the host phase information and carrier synchronization information from the synchronization frame.

[0033] Specifically, each slave device continuously monitors the CAN bus via its own CAN transceiver. When a synchronization frame with the highest priority identifier appears on the bus, the slave device's CAN controller receives the frame and triggers a receive interrupt. In the interrupt service routine, the slave device parses the data fields of the synchronization frame, extracting the master phase information and carrier synchronization count sent by the master. Because the CAN bus uses differential signal transmission, coupled with hardware cyclic redundancy check and automatic retransmission mechanisms, the synchronization data received by the slave device has extremely high anti-interference reliability, effectively avoiding the glitches and misjudgments caused by electromagnetic interference in traditional single-ended I / O signals.

[0034] In some embodiments, in step S400, the slave device calculates the phase deviation between its local phase and the master reference phase based on its local clock and the master phase information, generates a phase angle compensation amount for the PWM generator based on the phase deviation, and fine-tunes the control cycle based on the carrier synchronization information, including: S410, the slave device, in conjunction with the system clock of the local DSP, calculates the deviation Δθ between the current local phase and the host reference phase; S420, the slave device generates a compensation amount for correcting the phase angle of the PWM generator based on the phase deviation; S430, the slave device fine-tunes the control cycle based on the carrier synchronization information; S440, the slave device writes the compensation amount into the ePWM time base phase register or comparison value register so that the slave device output voltage phase dynamically tracks and locks to the master device.

[0035] Specifically, the slave device, in conjunction with the system clock of its local DSP, compares the current local phase with the master reference phase obtained in step S330 to calculate the precise phase deviation Δθ. Based on this phase deviation, the slave device generates a compensation amount to correct the phase angle of the ePWM generator using a proportional-integral or feedforward compensation algorithm. Simultaneously, the slave device fine-tunes its control cycle based on the carrier synchronization count in the synchronization frame, achieving carrier-level synchronization. The slave device writes the calculated compensation amount into the ePWM's Time Base Phase (TBPHS) register or Compare A / Compare B (CMPA / CMPB) register, adjusting the phase angle of the PWM waveform to dynamically track and lock the slave's output voltage phase to the master. This closed-loop compensation mechanism achieves a synchronization accuracy better than ±0.5 degrees, far exceeding the ±1 to ±3 degrees of traditional IO methods, effectively suppressing low-frequency circulating currents between parallel systems.

[0036] In some embodiments, the method further includes: S500, the slave device transmits its operating status, fault flags, and self-test results back to the master device; the master device implements intelligent decision-making based on the data transmitted back by the slave device, the intelligent decision-making including automatically disconnecting faulty modules or dynamically adjusting the current sharing strategy; the master device broadcasts configuration data to the slave device so that the slave device updates its operating parameters according to the configuration data.

[0037] Specifically, in addition to power frequency synchronization and carrier synchronization, the CAN bus can also support other data synchronization between master and slave devices. This allows users to broadcast data synchronization to slave devices simply by modifying the master device. Slave devices then send back operating status, fault flags, and self-test results to the master device. The master device can make intelligent decisions based on the feedback from the slave devices, such as automatically disconnecting faulty modules and dynamically adjusting current sharing strategies. The master device can also broadcast configuration data to slave devices, which then update their own operating parameters, enabling remote configuration and firmware upgrades. By achieving multiplexing of functions such as synchronization, monitoring, control, and upgrades on the same physical link, the number of cables is reduced, system integration is improved, and plug-and-play expansion is supported. New slave devices only need to be connected to the CAN bus to automatically join the synchronization network without changing the master device hardware connection, facilitating system expansion and maintenance.

[0038] In some embodiments, the method further includes: S600 reuses the CAN bus to transmit control commands or data packets in scenarios such as current sharing control, carrier phase alignment, or firmware batch updates.

[0039] Specifically, this synchronization mechanism exhibits excellent reusability. In current sharing control scenarios, the master unit can broadcast current distribution coefficients to each slave unit via the CAN bus, allowing the slave units to adjust their output current reference values ​​accordingly, thus achieving current sharing control in the parallel system. In carrier phase alignment scenarios, the master unit can coordinate the carrier phases of each slave unit using carrier synchronization information in the synchronization frame, eliminating high-frequency beat noise between carriers. In firmware batch update scenarios, the master unit can distribute firmware data packets to all slave units via the CAN bus, and the slave units can complete the firmware upgrade upon receiving the packets. By reusing the CAN bus to transmit the aforementioned control commands or data packets, no additional communication links are required, further enhancing the versatility and economy of the overall control architecture.

[0040] See Figure 4 This application provides a parallel synchronization control device based on a CAN bus, applied to a slave device, comprising: The synchronization frame receiving module is used to receive synchronization frames sent by the host via the CAN bus, and parse the synchronization frames to obtain host phase information and carrier synchronization information; The phase deviation calculation module is used to calculate the phase deviation between the local phase of the slave device and the reference phase of the master device based on the local clock and the master phase information; The PWM adjustment module is used to generate the phase angle compensation amount of the PWM generator according to the phase deviation, and to fine-tune the control cycle according to the carrier synchronization information so that the slave output voltage phase tracks the master.

[0041] As can be seen, the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented in this device embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments. For example, the synchronization frame receiving module performs the operation corresponding to step S300, the phase deviation calculation module performs the operation of calculating the phase deviation in step S400, and the PWM adjustment module performs the operation of generating compensation amount, fine-tuning control cycle, and writing to register in step S400.

[0042] See Figure 5 This application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program or instructions, and the computer program or instructions, when executed by the processor, implement the method described in any of the above-mentioned embodiments.

[0043] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0044] It should be understood that, in this invention, the terms “comprising” and “having”, 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 is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.

[0045] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0046] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0047] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0048] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0049] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present invention should be within the scope of the claims of the present invention.

Claims

1. A parallel synchronization control method based on CAN bus, characterized in that, The method includes the following steps: The host obtains the zero-crossing moment of the output AC voltage at the power frequency as the global time reference; The host sends a synchronization frame to the slave via the CAN bus at the zero crossing of the power frequency. The synchronization frame carries host phase information and carrier synchronization information, and the identifier of the synchronization frame is set to the highest priority. The slave device receives the synchronization frame via the CAN bus and parses the synchronization frame to obtain the master phase information and the carrier synchronization information. The slave device calculates the phase deviation between its local phase and the master reference phase based on its local clock and the master phase information. It generates a phase angle compensation amount for the PWM generator based on the phase deviation and fine-tunes the control cycle based on the carrier synchronization information so that the slave device's output voltage phase tracks the master device.

2. The method according to claim 1, characterized in that, The host obtains the zero-crossing moment of the output AC voltage at the power frequency as a global time reference, including: The host computer samples and outputs AC voltage signals through an analog-to-digital converter module; The host computer executes a phase-locked loop algorithm on the output AC voltage signal to identify the precise moment when the sine wave crosses zero from negative to positive as the power frequency zero-crossing moment.

3. The method according to claim 1, characterized in that, The master unit sends a synchronization frame to the slave unit via the CAN bus at the zero-crossing time of the power frequency, including: The host determines the zero-crossing time of the power frequency in a high-frequency interrupt triggered by pulse width modulation; The host encapsulates the host phase information and the carrier synchronization information in the data field of a standard format controller local area network data frame; The host computer broadcasts the synchronization frame to the CAN bus via the built-in controller LAN controller.

4. The method according to claim 1, characterized in that, The slave device receives the synchronization frame via the CAN bus, parses the synchronization frame to obtain the master phase information and the carrier synchronization information, including: The slave device listens to the CAN bus via a controller area network transceiver; The slave device receives the synchronization frame with the highest priority identifier; The slave device extracts the host phase information and carrier synchronization information from the synchronization frame.

5. The method according to claim 1, characterized in that, The slave device calculates the phase deviation between its local phase and the master reference phase based on its local clock and the master phase information, generates a phase angle compensation amount for the PWM generator based on the phase deviation, and fine-tunes the control cycle based on the carrier synchronization information, including: The slave device calculates the phase deviation between the local phase and the host reference phase using the local clock; The slave device generates a compensation amount to correct the phase angle of the PWM generator based on the phase deviation; The slave device fine-tunes the control cycle based on the carrier synchronization information; The slave device writes the compensation amount into the pulse width modulation register so that the slave device output voltage phase dynamically tracks and locks onto the master device.

6. The method according to claim 1, characterized in that, The method further includes: The slave device transmits its operating status, fault flags, and self-test results back to the master device. The host performs intelligent decision-making based on the data returned by the slave, and the intelligent decision-making includes automatically disconnecting faulty modules or dynamically adjusting the current sharing strategy.

7. The method according to claim 6, characterized in that, The method further includes: The host broadcasts configuration data to the slave device so that the slave device can update its operating parameters according to the configuration data.

8. The method according to claim 1, characterized in that, The method further includes: In scenarios involving current sharing control, carrier phase alignment, or batch firmware updates, the CAN bus is reused to transmit control commands or data packets.

9. An electronic device comprising a processor and a memory, wherein the memory stores computer programs or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the method of any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the method of any one of claims 1 to 8.