A distributed communication system and method
By employing a reference clock signal and preset time partitioning in the distributed communication system, the problems of blocking and time deviation caused by independent clocks of communication modules are solved, thus achieving reliable and accurate communication.
Patent Information
- Application Number
- CN202510494538.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-04-21
AI Technical Summary
In distributed systems, the independent system clocks of multiple communication modules can cause communication blockages and time skews, resulting in data loss and serial number disconnection.
A single communication module is used as the reference clock signal source. The reference clock signal is synchronously forwarded through a clock distribution module. Each communication module sends signals within a preset time partition to avoid simultaneous transmission.
To prevent communication bus blockage, ensure the accuracy and reliability of communication cycles, and avoid data loss.
Smart Images

Figure CN120017443B_ABST
Abstract
Description
Technical Field
[0001] This disclosure belongs to the field of communication technology, and in particular relates to a distributed communication system and method. Background Technology
[0002] like Figure 1 As shown, in a distributed system where multiple communication modules communicate via a bus, data is transmitted through the same bus. Each communication module initializes the system clock and configures its task cycle, transmitting data through the bus according to the configured task cycle.
[0003] Continue to refer to Figure 1 This communication method has obvious drawbacks. First, since each communication module has an independent system clock, during the operation of multiple communication modules, there may be situations where two or more communication modules send data through the bus at the same time. This may trigger communication blocking on the bus, causing communication module transmission timeouts or retransmission failures, which in turn leads to the failure of the current task cycle, loss of communication data, and disconnection of the communication sequence number. Second, since the system clock of each communication module comes from the crystal oscillation signal, the crystal oscillator has temperature drift error. As time accumulates, the error of the communication module's system clock becomes larger and larger, resulting in a larger and larger absolute time deviation of the task cycle. When the cycle deviation accumulates to a certain extent (for example, the cycle time delay is greater than 1 millisecond), the transmission misses the absolute time of the task cycle (for example, the tolerance time deviation threshold is ±1 millisecond). Although the time deviation can be compensated for by software through algorithms, the current task cycle has already failed to transmit, communication data is lost, and the communication sequence number is disconnected. Summary of the Invention
[0004] To address the aforementioned issues, this disclosure provides a distributed communication system and method. It employs a single communication module as the source of a reference clock signal, configures preset time partitions for all communication modules electrically connected to the same communication bus, and, based on the reference clock signal, each communication module sends a signal to the communication bus within its corresponding preset time partition. This avoids multiple communication modules simultaneously sending signals to the communication bus.
[0005] This invention is achieved through the following technical solution:
[0006] In a first aspect, embodiments of this disclosure provide a distributed communication system, the system including a clock distribution module, a communication bus, and a plurality of communication modules electrically connected to the communication bus in a preset order;
[0007] The first communication module, electrically connected to the communication bus in the preset order, is electrically connected to the input terminal of the clock distribution module and sends a reference clock signal to the clock distribution module; all other communication modules, excluding the first communication module, electrically connected to the communication bus in the preset order, are electrically connected to the output terminal of the clock distribution module and receive the reference clock signal synchronously forwarded by the clock distribution module; wherein,
[0008] The communication module determines the corresponding preset time partition based on the reference clock signal, and sends an output signal to the communication bus in the corresponding preset time partition; the communication module sets the corresponding preset time partitions in the preset order, and the preset time partitions corresponding to each communication module do not overlap.
[0009] Furthermore,
[0010] The reference clock signal is a square wave pulse signal, and the preset time partition includes multiple consecutive square wave pulses.
[0011] Furthermore,
[0012] The first communication module, which is electrically connected to the communication bus in a preset order, sends the square wave pulse signal to the clock distribution module; the communication module includes a pulse generation unit.
[0013] The pulse generating unit is electrically connected to the input terminal of the clock distribution module. The pulse generating unit sends the generated square wave pulse signal to the clock distribution module and counts the square wave pulse signal while generating it.
[0014] Furthermore,
[0015] All communication modules, except the first one, which are electrically connected to the communication bus in a preset order, receive the square wave pulse signal forwarded by the clock distribution module; each communication module includes a pulse counting unit.
[0016] The pulse counting unit is electrically connected to the output terminal of the clock distribution module and counts the received square wave pulse signals.
[0017] Furthermore,
[0018] The communication module includes a periodic verification unit and a signal transmission unit; the periodic verification unit and the signal transmission unit are electrically connected, and the signal transmission unit is electrically connected to the communication bus;
[0019] The periodic verification unit determines the preset time partition corresponding to the communication module based on the counting result of the square wave pulse signal by the pulse generation unit or the pulse counting unit, and controls the signal sending unit to send an output signal to the communication bus in the preset time partition corresponding to the communication module.
[0020] Furthermore,
[0021] Each preset time partition includes the same number of square wave pulses.
[0022] Furthermore,
[0023] The number of communication modules electrically connected to the same communication bus shall not exceed the ratio of the smallest communication cycle among the communication modules to the duration of the preset time partition.
[0024] Secondly, based on the same inventive concept, embodiments of this disclosure also provide a distributed communication method, the method comprising:
[0025] The first communication module, which is electrically connected to the communication bus in a preset order, sends a reference clock signal to the clock distribution module; all other communication modules, except the first communication module, which are electrically connected to the communication bus in the preset order, receive the reference clock signal synchronously forwarded by the clock distribution module.
[0026] The communication module determines the corresponding preset time partition based on the reference clock signal, and sends an output signal to the communication bus in the corresponding preset time partition; wherein, the communication module sets the corresponding preset time partitions in the preset order, and the preset time partitions corresponding to each communication module do not overlap.
[0027] Furthermore,
[0028] The reference clock signal is a square wave pulse signal, and the preset time partition includes multiple consecutive square wave pulses.
[0029] Furthermore,
[0030] The pulse generation unit sends the generated square wave pulse signal to the clock distribution module, and counts the square wave pulse signal while generating it.
[0031] Furthermore,
[0032] The pulse counting unit receives the square wave pulse signal sent by the clock distribution module and counts the received square wave pulse signal.
[0033] Furthermore,
[0034] The periodic verification unit determines the preset time partition corresponding to the communication module based on the counting result of the square wave pulse signal by the pulse generation unit or the pulse counting unit, and sends the output signal to the communication bus by the control signal sending unit in the preset time partition corresponding to the communication module.
[0035] Compared with the prior art, this disclosure has the following advantages:
[0036] 1. Each communication module sends a signal to the communication bus in its corresponding preset time partition to prevent two or more communication modules from sending signals to the communication bus at the same time, which could cause communication blockage on the communication bus.
[0037] 2. Each communication module sends signals to the communication bus in its corresponding preset time partition and reasonably controls the number of communication modules connected to the communication bus, thus ensuring the accuracy of the communication cycle of the communication modules.
[0038] Other features and advantages of this disclosure will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 A block diagram of a distributed communication system in the prior art;
[0041] Figure 2 A block diagram of a distributed communication system provided in this disclosure embodiment;
[0042] Figure 3 This is a schematic diagram of a distributed communication system provided in an embodiment of the present disclosure;
[0043] Figure 4 Another block diagram of a distributed communication system provided in the embodiments of this disclosure;
[0044] Figure 5 This is a schematic diagram illustrating the correspondence between a communication module and a square wave pulse signal, provided in an embodiment of this disclosure.
[0045] Figure 6 This is a schematic diagram illustrating the correspondence between a communication module and a preset time partition, provided in an embodiment of the present disclosure.
[0046] Figure 7 This is a schematic diagram illustrating the correspondence between a communication module and a preset time partition, as provided in another embodiment of this disclosure. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0048] Firstly, Figure 2 A block diagram of a distributed communication system provided in this disclosure embodiment, such as Figure 2 As shown, this disclosure provides a distributed communication system, which includes a clock distribution module, a communication bus, and multiple communication modules electrically connected to the communication bus in a preset order.
[0049] The first communication module, electrically connected to the communication bus in a preset order, is electrically connected to the input terminal of the clock distribution module and sends a reference clock signal to the clock distribution module. All other communication modules, excluding the first one, are electrically connected to the communication bus in a preset order and are electrically connected to the output terminal of the clock distribution module to receive the reference clock signal synchronously forwarded by the clock distribution module. Each communication module determines its corresponding preset time partition based on the reference clock signal and sends an output signal to the communication bus within that preset time partition. The communication modules are set to their corresponding preset time partitions in a preset order, with no overlap between the preset time partitions. Each communication module corresponds to one preset time partition, and the preset time partitions for each communication module have no overlap. The communication module sends its output signal only within its corresponding preset time partition, preventing two or more communication modules from simultaneously sending output signals and causing communication bus congestion.
[0050] In this embodiment, the preset order can be determined based on the unique identifier generated when the communication module is electrically connected to the communication bus, or it can be determined based on the order in which the communication modules are electrically connected to the communication bus. For example, the preset order of each communication module can be determined based on the unique address assigned to each communication module electrically connected to the same communication bus; or, the preset order of multiple communication modules can be determined based on information such as the device ID and serial number of the communication module; or, the preset order of each communication module can be determined based on the order in which each communication module is electrically connected to the same communication bus. The specific method for determining the preset order needs to be selected based on the protocol, model, and type of the communication module, as well as the protocol, model, and type of the communication bus.
[0051] Understandable, such as Figure 3As shown, the clock distribution module receives the reference clock signal sent by the first communication module electrically connected to the communication bus in a preset order, and synchronously forwards the received reference clock signal to all other communication modules. During this process, the clock distribution module does not need to generate a new clock signal, but only needs to synchronously forward the reference clock signal sent by the first communication module.
[0052] In some examples, the reference clock signal is a square wave pulse signal, and a preset time partition includes multiple consecutive square wave pulses. Given that the signal period and frequency of the square wave pulse signal are known, the preset time partition can be determined by counting the number of square wave pulses in the signal. When counting the square wave pulse signal, a complete square wave pulse is counted once, and the counting can be performed by detecting the rising edge, as a square wave pulse has only one rising edge.
[0053] Understandably, the number of square wave pulses included in the preset time partitions corresponding to each communication module is the same. When the amount of communication data of a communication module is large, the preset time partition can be lengthened, that is, the number of square wave pulses corresponding to the preset time partition can be increased.
[0054] In some examples, the first communication module, electrically connected to the communication bus in a preset order, sends a square wave pulse signal to the clock distribution module. The communication module includes a pulse generation unit, a period check unit, and a signal transmission unit. The pulse generation unit is electrically connected to the input of the clock distribution module, and sends the generated square wave pulse signal to the clock distribution module while simultaneously counting the square wave pulse signal. The period check unit and the signal transmission unit are electrically connected, and the signal transmission unit is electrically connected to the communication bus. Based on the counting result of the square wave pulse signal by the pulse generation unit, the period check unit determines the preset time partition corresponding to the communication module, and controls the signal transmission unit to send an output signal to the communication bus within the preset time partition corresponding to the communication module.
[0055] In some examples, all communication modules except the first one, which are electrically connected to the communication bus in a preset order, receive square wave pulse signals forwarded by the clock distribution module. Each communication module includes a pulse counting unit, a period checking unit, and a signal transmitting unit. The pulse counting unit is electrically connected to the output of the clock distribution module and counts the received square wave pulse signals. The period checking unit is electrically connected to the signal transmitting unit, which is in turn electrically connected to the communication bus. Based on the counting result of the pulse counting unit, the period checking unit determines the preset time partition corresponding to the communication module and controls the signal transmitting unit to send an output signal to the communication bus within that preset time partition.
[0056] It should be understood that the communication module can simultaneously set the pulse generation unit and the pulse counting unit to replace the first communication module in a preset order among multiple communication modules.
[0057] In some examples, the communication bus is a differential bus, including a transmit signal line and a receive signal line; the communication module also includes a signal receiving unit, the signal transmitting unit is electrically connected to the transmit signal line, and the signal receiving unit is electrically connected to the receive signal line; in the preset time partition corresponding to the communication module, the signal transmitting unit sends the output signal to the transmit signal line.
[0058] In this embodiment, the communication bus can be a CAN (Controller Area Network) bus, which theoretically supports 110 communication modules, or an MVB (Multifunction Vehicle Bus), which theoretically supports 4096 communication modules. In actual deployment, the maximum number of communication modules connected to the communication bus is related to the communication cycle of the communication modules. To prevent two or more communication modules from sending signals through the communication bus in the same preset time partition, there is an upper limit to the number of communication modules connected to the same communication bus. Since communication modules have communication cycles—that is, communication modules may send signals again after a certain interval—the number of communication modules electrically connected to the same communication bus should not exceed the ratio of the smallest communication cycle of each communication module to the duration of the preset time partition, thereby avoiding two or more communication modules sending signals through the communication bus in the same preset time partition.
[0059] The distributed communication system provided in this disclosure prevents two or more communication modules from simultaneously sending signals to the communication bus, thus avoiding communication blockage, by having each communication module send signals to the communication bus in a corresponding preset time partition; and by reasonably controlling the number of communication modules connected to the communication bus, the accuracy of the communication cycle of the communication modules is ensured.
[0060] Example 1:
[0061] In this embodiment of the disclosure, multiple communication modules electrically connected to the same communication bus determine a preset order for each communication module based on its unique address, device ID, serial number, and other information.
[0062] In the embodiments disclosed herein, such as Figure 4 As shown, the distributed communication system includes n communication modules, where n is a positive integer, and the n communication modules are electrically connected to the same communication bus. The communication modules are represented by communication module 1 to communication module n and their corresponding numbers. Communication module 1 is the first communication module electrically connected to the communication bus in a preset order.
[0063] In the embodiments disclosed herein, such as Figure 5 As shown, the signal period of the square wave pulse signal is 100 microseconds, the signal frequency is 10000 Hz, and each preset time partition is 1 millisecond, that is, each preset time partition corresponds to 10 square wave pulses.
[0064] In this embodiment, all communication modules have the same communication period of 50 milliseconds. When the communication periods of all communication modules electrically connected to the same communication bus are the same, the number of communication modules connected to the same communication bus is no greater than the ratio of the communication period of each communication module to the preset time partition duration. Since the communication period of each communication module is 50 milliseconds and the preset time partition duration is 1 millisecond, the number of communication modules electrically connected to the same communication bus is no greater than 50, where n is a positive integer less than or equal to 50. The maximum number of communication modules electrically connected to the same communication bus can be the theoretical maximum number of communication modules. However, communication modules have periodic characteristics; they send output signals according to a certain period. Therefore, to prevent communication modules electrically connected to the same communication bus from simultaneously sending output signals in a preset time partition, causing communication bus congestion, it is necessary to set the maximum number of communication modules electrically connected to the communication bus based on the communication period of each communication module.
[0065] Continue to refer to Figure 4 Communication module 1 includes a pulse generating unit. While sending the generated square wave pulse signal to the clock distribution module, the pulse generating unit in communication module 1 also begins counting the square wave pulse signal. Communication modules 2 to n each include a pulse counting unit. The pulse counting unit is electrically connected to the output terminal of the clock distribution module. Upon receiving the square wave pulse signal forwarded by the clock distribution module, the pulse counting unit begins counting the square wave pulse signal.
[0066] Continue to refer to Figure 4 Communication modules 1 to n further include a periodicity check unit and a signal transmission unit; the periodicity check unit and the signal transmission unit are electrically connected, and the signal transmission unit is electrically connected to the communication bus; the periodicity check unit determines the preset time partition corresponding to the communication module based on the counting result of the square wave pulse signal by the pulse generation unit or the pulse counting unit, and controls the signal transmission unit to send an output signal to the communication bus in the preset time partition corresponding to the communication module.
[0067] In the embodiments disclosed herein, such as Figure 5As shown, the preset time partitions corresponding to the communication modules are determined by counting square wave pulse signals. Taking the square wave pulse signal in this embodiment of the present disclosure as having a signal period of 100 microseconds, a signal frequency of 10000 Hz, and each preset time partition being 1 millisecond as an example; one preset time partition corresponds to 10 square wave pulses. The pulse generating unit of communication module 1 counts the square wave pulse signal. The 1st to 10th square wave pulses determined by the count correspond to the preset time partitions of communication module 1. Within the range of the 1st to 10th square wave pulses, communication module 1 can send an output signal to the communication bus. The pulse counting unit of communication module 2 counts the square wave pulse signal. The 11th to 20th square wave pulses determined by the count correspond to the preset time partitions of communication module 2. Within the range of the 11th to 20th square wave pulses, communication module 2 can send an output signal to the communication bus. The subsequent communication modules 3 to n follow the same pattern, and will not be described in detail here.
[0068] Continue to refer to Figure 4 The communication bus is a differential bus, including a transmit signal line and a receive signal line; the communication module includes a signal transmitting unit and a signal receiving unit. The signal transmitting unit is electrically connected to the transmit signal line to enable the communication module to transmit signals to the outside, and the signal receiving unit is electrically connected to the receive signal line to enable the communication module to receive external signals.
[0069] In the embodiments disclosed herein, such as Figure 6As shown, the communication modules all have the same communication period of 50 milliseconds. The following explanation uses preset time partitions to describe the periodic communication of the communication modules. Communication module 1 sends its first output signal to the communication bus simultaneously with generating a square wave pulse signal. The preset time partition for communication module 1 is from millisecond 0 to millisecond 1, i.e., from the first to the tenth square wave pulse. The preset time partition for communication module 2 is from millisecond 1 to millisecond 2, i.e., from the eleventh to the twentieth square wave pulse; and so on for subsequent communication modules 3 to n, where n is a positive integer less than or equal to 50. Each communication module has a communication period of 50 milliseconds. After 50 milliseconds of sending its first output signal to the communication bus, each communication module will send its second output signal. Communication module 1 starts timing from millisecond 0. After 50 milliseconds, communication module 1 will send its second output signal to the communication bus. At this time, the preset time partition for communication module 1 is from millisecond 50 to millisecond 51. Communication module 2 starts timing from the 1st millisecond. After 50 milliseconds, communication module 2 will send an output signal to the communication bus for the second time. At this time, the preset time partition corresponding to communication module 2 is from the 51st millisecond to the 52nd millisecond. The same applies to subsequent communication modules 3 to n, and so on. It will not be described in detail here. n is a positive integer less than or equal to 50.
[0070] Understandably, after each communication module completes a communication cycle or after sending an output signal to the communication bus, the pulse generation module and the pulse counting module can perform a count initialization to clear the previous count of square wave pulses.
[0071] Example 2:
[0072] In this embodiment of the disclosure, multiple communication modules electrically connected to the same communication bus determine a preset order for each communication module based on its unique address, device ID, serial number, and other information.
[0073] In the embodiments disclosed herein, such as Figure 4 As shown, the distributed communication system includes n communication modules, where n is a positive integer, and the n communication modules are electrically connected to the same communication bus. The communication modules are represented by communication module 1 to communication module n and their corresponding numbers. Communication module 1 is the first communication module electrically connected to the communication bus in a preset order.
[0074] In the embodiments disclosed herein, such as Figure 5 As shown, the signal period of the square wave pulse signal is 100 microseconds, the signal frequency is 10000 Hz, and each preset time partition is 1 millisecond, that is, each preset time partition corresponds to 10 square wave pulses.
[0075] In this embodiment of the disclosure, the communication cycles of each communication module are different, and the number of communication modules connected to the same communication bus is not greater than the ratio of the smallest communication cycle of each communication module to the preset time partition duration.
[0076] For example, the communication cycle of a communication module may include 10 milliseconds and 20 milliseconds, with a preset time partition duration of 1 millisecond. Therefore, the number of communication modules electrically connected to the same communication bus cannot exceed 10, where n is a positive integer less than or equal to 10. The maximum number of communication modules electrically connected to the same communication bus can be the theoretical maximum number of communication modules. However, communication modules have a periodic characteristic, sending output signals according to a certain period. Therefore, to prevent communication modules electrically connected to the same communication bus from simultaneously sending output signals within a preset time partition, causing communication bus congestion, it is necessary to set the maximum number of communication modules electrically connected to the communication bus based on the communication cycle of the communication modules.
[0077] Continue to refer to Figure 4 Communication module 1 includes a pulse generating unit. While sending the generated square wave pulse signal to the clock distribution module, the pulse generating unit in communication module 1 also begins counting the square wave pulse signal. Communication modules 2 to n each include a pulse counting unit. The pulse counting unit is electrically connected to the output terminal of the clock distribution module. Upon receiving the square wave pulse signal forwarded by the clock distribution module, the pulse counting unit begins counting the square wave pulse signal.
[0078] Continue to refer to Figure 4 The communication modules 1 to n include a periodic verification unit and a signal transmission unit; the periodic verification unit and the signal transmission unit are electrically connected, and the signal transmission unit is electrically connected to the communication bus; the periodic verification unit determines the preset time partition corresponding to the communication module based on the counting result of the square wave pulse signal by the pulse generation unit or the pulse counting unit, and controls the signal transmission unit to send an output signal to the communication bus in the preset time partition corresponding to the communication module.
[0079] In the embodiments disclosed herein, such as Figure 5As shown, the preset time partitions corresponding to the communication modules are determined by counting square wave pulse signals. Taking the square wave pulse signal in this embodiment of the present disclosure as having a signal period of 100 microseconds, a signal frequency of 10000 Hz, and each preset time partition being 1 millisecond as an example; one preset time partition corresponds to 10 square wave pulses. The pulse generating unit of communication module 1 counts the square wave pulse signal. The 1st to 10th square wave pulses determined by the count correspond to the preset time partitions of communication module 1. Within the range of the 1st to 10th square wave pulses, communication module 1 can send an output signal to the communication bus. The pulse counting unit of communication module 2 counts the square wave pulse signal. The 11th to 20th square wave pulses determined by the count correspond to the preset time partitions of communication module 2. Within the range of the 11th to 20th square wave pulses, communication module 2 can send an output signal to the communication bus. The subsequent communication modules 3 to n follow the same pattern, and will not be described in detail here.
[0080] Continue to refer to Figure 4 The communication bus is a differential bus, including a transmit signal line and a receive signal line; the communication module includes a signal transmitting unit and a signal receiving unit. The signal transmitting unit is electrically connected to the transmit signal line to enable the communication module to transmit signals to the outside, and the signal receiving unit is electrically connected to the receive signal line to enable the communication module to receive external signals.
[0081] In the embodiments disclosed herein, such as Figure 7As shown, the communication period of communication module 1 is 10 milliseconds, and the communication period of communication module 2 is 20 milliseconds. The following explanation uses preset time partitions to describe the periodic communication of the communication modules. Communication module 1 sends its first output signal to the communication bus simultaneously with generating a square wave pulse signal. The preset time partition for communication module 1 is from millisecond 0 to millisecond 1, that is, from the first to the tenth square wave pulse. The preset time partition for communication module 2 is from millisecond 1 to millisecond 2, that is, from the eleventh to the twentieth square wave pulse; and so on for subsequent communication modules 3 to n, where n is a positive integer less than or equal to 10. The communication period of communication module 1 is 10 milliseconds. Communication module 1 starts timing from millisecond 0. After 10 milliseconds, communication module 1 will send its second output signal to the communication bus. At this time, the preset time partition for communication module 1 is from millisecond 10 to millisecond 11. Communication module 2 has a communication cycle of 20 milliseconds. It starts timing from the 1st millisecond. After 20 milliseconds, communication module 2 will send an output signal to the communication bus for the second time. At this time, the preset time partition for communication module 2 is from the 21st to the 22nd millisecond. Before communication module 2 sends its second output signal to the communication bus, communication module 1 starts timing from the 10th millisecond. After 10 milliseconds, communication module 1 will send its third output signal to the communication bus. At this time, the preset time partition for communication module 1 is from the 20th to the 21st millisecond. The timing of communication module 1's third output signal transmission to the communication bus and the timing of communication module 2's second output signal transmission to the communication bus are precisely avoided, preventing communication line congestion.
[0082] Understandably, after each communication module completes a communication cycle or after sending an output signal to the communication bus, the pulse generation module and the pulse counting module can perform a count initialization to clear the previous count of square wave pulses.
[0083] Furthermore, among multiple communication modules electrically connected to the same communication bus, the communication cycles of each communication module can include two or more types. By reasonably dividing the preset time partitions, it can be achieved that only one communication module sends an output signal to the communication bus at the same time. For example, the number of communication modules electrically connected to the same communication bus can be appropriately reduced.
[0084] Preferably, when deploying or configuring communication modules, the communication cycle of each communication module connected to the same communication bus is an integer multiple of the minimum communication cycle of each module. For example, if a communication module has communication cycles of 10 milliseconds and 20 milliseconds, the maximum number of communication modules connected to the same communication bus is 10; or, for another example, if a communication module has communication cycles of 5 milliseconds, 10 milliseconds, and 15 milliseconds, the maximum number of communication modules connected to the same communication bus is 5. This ensures that no two or more communication modules electrically connected to the same communication bus will simultaneously send output signals to the communication bus, and maximizes the number of electrically connected communication modules on the same communication bus.
[0085] Secondly, based on the same inventive concept, this disclosure also provides a distributed communication method, which includes:
[0086] S1: The first communication module, which is electrically connected to the communication bus in a preset order, sends a reference clock signal to the clock distribution module; all other communication modules, except the first communication module, which are electrically connected to the communication bus in a preset order, receive the reference clock signal synchronously forwarded by the clock distribution module.
[0087] S2: The communication module determines the corresponding preset time partition based on the reference clock signal, and sends an output signal to the communication bus in the corresponding preset time partition; wherein, the communication module sets the corresponding preset time partition in a preset order, and the preset time partitions corresponding to each communication module do not overlap.
[0088] Specifically, the reference clock signal is a square wave pulse signal, and the preset time partition includes multiple consecutive square wave pulses.
[0089] In some examples, distributed communication methods also include:
[0090] S11: The pulse generation unit sends the generated square wave pulse signal to the clock distribution module, and counts the square wave pulse signal while generating it.
[0091] Specifically, the first communication module, which is electrically connected to the communication bus in a preset order, sends a square wave pulse signal to the clock distribution module. The first communication module includes a pulse generation unit. The pulse generation unit sends the generated square wave pulse signal to the clock distribution module and counts the square wave pulse signal while generating it.
[0092] In some examples, distributed communication methods also include:
[0093] S12: The pulse counting unit receives the square wave pulse signal sent by the clock distribution module and counts the received square wave pulse signal.
[0094] Specifically, all communication modules except the first communication module, which are electrically connected to the communication bus in a preset order, receive square wave pulse signals forwarded by the clock distribution module; all communication modules except the first communication module include a pulse counting unit; the pulse counting unit receives square wave pulse signals sent by the clock distribution module and counts the received square wave pulse signals.
[0095] In some examples, a distributed communication method also includes:
[0096] S21: The periodic verification unit determines the preset time partition corresponding to the communication module based on the counting result of the square wave pulse signal by the pulse generation unit or the pulse counting unit, and sends the output signal to the communication bus by the control signal sending unit in the preset time partition corresponding to the communication module.
[0097] Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A distributed communication system, characterized in that, The system includes a clock distribution module, a communication bus, and multiple communication modules electrically connected to the communication bus in a preset order. The first communication module, electrically connected to the communication bus in the preset order, is electrically connected to the input terminal of the clock distribution module and sends a reference clock signal to the clock distribution module; all other communication modules, excluding the first communication module, electrically connected to the communication bus in the preset order, are electrically connected to the output terminal of the clock distribution module and receive the reference clock signal sent by the first communication module, which is synchronously forwarded by the clock distribution module; wherein, The communication module determines the corresponding preset time partition based on the reference clock signal, and sends an output signal to the communication bus in the corresponding preset time partition; the communication module sets the corresponding preset time partitions in the preset order, and the preset time partitions corresponding to each communication module do not overlap; The preset order is determined based on the unique identifier generated when the communication module is electrically connected to the communication bus, or based on the order in which the communication module is electrically connected to the communication bus. The number of communication modules electrically connected to the same communication bus is not greater than the ratio of the smallest communication cycle of each communication module to the duration of the preset time partition. The communication cycles of each communication module are the same, and the communication modules send output signals according to the communication cycle.
2. The system according to claim 1, characterized in that, The reference clock signal is a square wave pulse signal, and the preset time partition includes multiple consecutive square wave pulses.
3. The system according to claim 2, characterized in that, The first communication module, which is electrically connected to the communication bus in a preset order, sends the square wave pulse signal to the clock distribution module. The communication module includes a pulse generation unit; The pulse generating unit is electrically connected to the input terminal of the clock distribution module. The pulse generating unit sends the generated square wave pulse signal to the clock distribution module and counts the square wave pulse signal while generating it.
4. The system according to claim 2, characterized in that, All communication modules, except the first communication module, that are electrically connected to the communication bus in a preset order receive the square wave pulse signal forwarded by the clock distribution module. The communication module includes a pulse counting unit; The pulse counting unit is electrically connected to the output terminal of the clock distribution module and counts the received square wave pulse signals.
5. The system according to claim 3 or 4, characterized in that, The communication module includes a periodic verification unit and a signal transmission unit; the periodic verification unit and the signal transmission unit are electrically connected, and the signal transmission unit is electrically connected to the communication bus; The periodic verification unit determines the preset time partition corresponding to the communication module based on the counting result of the square wave pulse signal by the pulse generation unit or the pulse counting unit, and controls the signal sending unit to send an output signal to the communication bus in the preset time partition corresponding to the communication module.
6. The system according to claim 2, characterized in that, Each preset time partition includes the same number of square wave pulses.
7. A distributed communication method, characterized in that, The method comprises: The first communication module, which is electrically connected to the communication bus in a preset order, sends a reference clock signal to the clock distribution module; all other communication modules, except the first communication module, which are electrically connected to the communication bus in the preset order, receive the reference clock signal sent by the first communication module, which is synchronously forwarded by the clock distribution module. The communication module determines the corresponding preset time partition based on the reference clock signal, and sends an output signal to the communication bus in the corresponding preset time partition; wherein, the communication module sets the corresponding preset time partitions in the preset order, and the preset time partitions corresponding to each communication module do not overlap. The preset order is determined based on the unique identifier generated when the communication module is electrically connected to the communication bus, or based on the order in which the communication module is electrically connected to the communication bus. The number of communication modules electrically connected to the same communication bus is not greater than the ratio of the smallest communication cycle of each communication module to the duration of the preset time partition. The communication cycles of each communication module are the same, and the communication modules send output signals according to the communication cycle.
8. The method according to claim 7, characterized in that, The reference clock signal is a square wave pulse signal, and the preset time partition includes multiple consecutive square wave pulses.
9. The method according to claim 8, characterized in that, The method comprises: The pulse generation unit sends the generated square wave pulse signal to the clock distribution module, and counts the square wave pulse signal while generating it.
10. The method according to claim 8, characterized in that, The method comprises: The pulse counting unit receives the square wave pulse signal sent by the clock distribution module and counts the received square wave pulse signal.
11. The method according to any one of claims 7-10, characterized in that, The method comprises: The periodic verification unit determines the preset time partition corresponding to the communication module based on the counting result of the square wave pulse signal by the pulse generation unit or the pulse counting unit, and sends the output signal to the communication bus by the control signal sending unit in the preset time partition corresponding to the communication module.
Citation Information
Patent Citations
Data synchronization system and method and storage medium
CN114785658A