An adaptive wave impedance matching system and matching method for hand-in-hand communication
By using the adaptive wave impedance matching system in the industrial communication system, using the Flash impedance setting module and the impedance adjustment module, combined with the microcontroller to achieve dynamic impedance adjustment, the problem of difficult matching between the dial switch and the external resistor in the traditional technology is solved. Automatic impedance debugging and communication quality optimization are achieved.
Patent Information
- Application Number
- CN202410032905.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-01-10
AI Technical Summary
In industrial communications, traditional DIP switches and external resistors are difficult to achieve reliable wave impedance matching. Especially during long-distance transmission, communication interference caused by reflected waves is prone to occur. Moreover, the process complexity is high and it is difficult to meet high reliability requirements.
The adaptive wave impedance matching system of hand-in-hand communication is adopted. By setting up the Flash impedance setting module and the impedance adjustment module on the communication AB differential bus, the digital potentiometer or analog impedance circuit is used, combined with the microcontroller, to realize dynamic impedance adjustment and automatic matching. Impedance to adapt to different line conditions.
There is no need to use DIP switches and external resistors to realize automatic impedance debugging and adaptation, ensuring the optimization of communication quality, and ensuring the stability and reliability of the adjustment process through digital terminal isolation.
Smart Images

Figure CN117768268B
Abstract
Description
Technical Field
[0001] The invention relates to an adaptive wave impedance matching system and a matching method for hand-in-hand communication, belonging to the technical field of industrial communication. Background Art
[0002] In industrial communication, when multiple machines need to run in parallel, it is often necessary to set up communication links between machines. Among them, a common way is to communicate hand in hand through RS485 protocol or CAN protocol. Among them, the master-slave connection method may be adopted, or a dedicated communication switchboard (PMU) may be adopted to connect all working devices in a hand-in-hand manner.
[0003] In the case of long-distance hand-in-hand transmission, in order to avoid the influence of wave reflection signal on signal quality, the two ends of the communication line should be matched with the line resistance. The general practice is to add a typical value of 120Ω resistor at each end of the first end of the communication chain. There are two main problems with this approach. First: If the process risk of the dip switch during the PCBA production and patch furnace is considered, the dip switch is generally not easily used for products with high reliability requirements. In this case, the impedance can only be added at the communication connector at both ends, but it is very difficult to add external resistors to some connectors due to their size and shape; second, the actual communication line length on site varies, and the actual line resistance cannot be determined. The use of a typical value of 120Ω resistor cannot completely match the impedance conditions on site, and communication interference caused by reflected waves still exists in harsh conditions. Summary of the invention
[0004] The purpose of the present invention is to solve the deficiencies of the above-mentioned prior art, and to propose an adaptive wave impedance matching system and matching method for hand-in-hand communication in view of the problem that traditional resistors and dip switches are difficult to set up and inconvenient to modulate.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] An adaptive wave impedance matching system for hand-in-hand communication includes a communication AB differential bus with a communication source, and a plurality of single machines arranged on the communication AB differential bus, wherein the communication conversion module of any single machine is connected to the AB differential bus through an A line and a B line respectively.
[0007] Any of the single machines is provided with a Flash impedance setting module and an impedance adjustment module connecting the A line and the B line, and the impedance adjustment module is a digital potentiometer or an analog impedance circuit.
[0008] The Flash impedance setting module is provided with a default impedance element and a dynamic adjustment impedance element.
[0009] Preferably, a microcontroller MCU is provided in any of the single machines, the communication conversion module is electrically connected to the microcontroller MCU via an isolation device A, and the impedance adjustment module is electrically connected to the microcontroller MCU via an isolation device B.
[0010] Preferably, a communication switchboard PMU is provided on the communication AB differential bus.
[0011] The present invention also proposes a matching method for an adaptive wave impedance matching system for hand-in-hand communication, comprising the following steps:
[0012] S1 first and last machine definition, define the first single machine and the last single machine as the first and last machine according to the order on the communication AB differential bus;
[0013] S2 impedance setting, detect whether the current single machine is the first or last machine. If the current single machine is not the first or last machine, read the impedance in the default impedance element to adjust the impedance adjustment module. If the current single machine is the first or last machine, proceed to the next step;
[0014] S3 impedance adjustment, reads the impedance set in the Flash impedance setting module to adjust the impedance value to increase or decrease, adapts the impedance value by the communication bad packet rate with the communication source, and dynamically adjusts the impedance element to update the adapted impedance value.
[0015] Preferably, in step 3, the impedance value read in the Flash impedance setting module is used as the basic impedance value, and the impedance span value and the bad packet rate threshold are set.
[0016] The single machine sets the basic impedance value to communicate with the communication source and records the current bad packet rate. When the current bad packet rate is lower than the bad packet rate threshold, the impedance value in the dynamic adjustment impedance element is updated.
[0017] When the current bad packet rate is not lower than the bad packet rate threshold, the adjusted impedance span value is added and / or subtracted on the basic impedance value to obtain an adjusted impedance value whose bad packet rate is lower than the bad packet rate threshold, and the impedance value in the dynamic adjusted impedance element is updated according to the adjusted impedance value.
[0018] Preferably, in step 3, a first-order adjustment impedance span value and a second-order adjustment impedance span value are set, and the first-order adjustment impedance span value is greater than the second-order adjustment impedance span value.
[0019] When the current bad packet rate is not lower than the bad packet rate threshold, the first-order adjustment impedance span value is first increased or decreased to obtain the first adjustment bad packet rate closest to the bad packet rate threshold. When the first adjustment bad packet rate is lower than the bad packet rate threshold, the impedance value in the dynamic adjustment impedance element is directly updated.
[0020] When the first adjusted bad packet rate is higher than the bad packet rate threshold, the second order adjustment impedance span value is increased or decreased to obtain a final adjusted bad packet rate lower than the bad packet rate threshold, and the impedance value corresponding to the current final adjusted bad packet rate is updated.
[0021] Preferably, in step S3, when reading the impedance set in the Flash impedance setting module, the impedance value in the dynamically adjusted impedance element is read first, and when there is no impedance value record in the dynamically adjusted impedance element, the impedance value in the default impedance element is read.
[0022] Preferably, a communication switchboard PMU is provided on the communication AB differential bus.
[0023] In step S1, the communication switchboard PMU defines the end single machine on the communication AB differential bus as the first and last machine.
[0024] The beneficial effects of the present invention are mainly reflected in:
[0025] 1. No need to use DIP switches and external resistors to meet the needs of automated impedance debugging and adaptation, and optimize communication quality.
[0026] 2. It can achieve digital end isolation, ensure that impedance adjustment will not be disturbed, and operate reliably and stably. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0028] Figure 1 It is a structural schematic diagram of an adaptive wave impedance matching system for hand-in-hand communication of the present invention.
[0029] Figure 2 It is a schematic structural diagram of another embodiment of an adaptive wave impedance matching system for hand-in-hand communication of the present invention.
[0030] Figure 3 The present invention is a flow chart of a matching method of an adaptive wave impedance matching system for hand-in-hand communication.
[0031] Figure 4 It is a flow chart of a preferred embodiment of a matching method of an adaptive wave impedance matching system for hand-in-hand communication of the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0033] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the inventions. It should also be noted that, for ease of description, only the parts related to the relevant inventions are shown in the accompanying drawings. It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0034] The present invention provides an adaptive wave impedance matching system for hand-in-hand communication, comprising a communication AB differential bus with a communication source, and a plurality of single machines arranged on the communication AB differential bus, wherein a communication conversion module of any single machine is respectively connected to the AB differential bus for communication via an A line and a B line.
[0035] The above communication connection methods belong to the prior art and will not be described in detail here.
[0036] like Figure 1 and Figure 2 In the present invention, any single machine is provided with a Flash impedance setting module and an impedance adjustment module connecting line A and line B, the impedance adjustment module is a digital potentiometer or an analog impedance circuit, and the Flash impedance setting module is provided with a default impedance element and a dynamic adjustment impedance element.
[0037] Specifically, traditional impedance adjustment uses a dial or external resistor. Both the dial and external resistor increase equipment cost and process difficulty. At the same time, their matching impedance conditions are poor, the adjustment is not flexible enough, and communication interference caused by reflected waves still exists in communication.
[0038] In this case, the default impedance element can be used to meet the setting requirements of the set impedance value, and the dynamically adjusted impedance element can realize the update of the adjusted impedance value. When building communication, after the updated impedance value is adopted, the impedance adjustment module can respond, meet the digital control requirements, and improve the communication quality.
[0039] In a specific embodiment, Figure 1 and Figure 2 As shown, any single machine is provided with a microcontroller MCU, the communication conversion module is electrically connected to the microcontroller MCU through an isolation device A, and the impedance adjustment module is electrically connected to the microcontroller MCU through an isolation device B.
[0040] The communication end and the operator form a digital isolation, so that the automatic impedance adjustment will not be affected. The automatic impedance adjustment is more reliable and stable, maintaining better communication quality.
[0041] In a specific embodiment, a communication switchboard PMU is provided on the communication AB differential bus. The communication switchboard PMU can realize the automatic definition of the head and the end machine, and only the end machine needs to perform the head and the end machine definition to meet the needs.
[0042] A matching method of an adaptive wave impedance matching system for hand-in-hand communication in this case is described in detail. Figure 3 As shown, the following steps are included:
[0043] Definition of the first and last machines: define the first and last machines as the first and last machines in the order on the communication AB differential bus. The first and last machines are the host, and the other machines in hand in hand are the slaves of the host. Only impedance adaptation of the host is required to meet the adaptation requirements of the slaves.
[0044] Impedance setting: detect whether the current single machine is the first or last machine. If the current single machine is not the first or last machine, read the impedance in the default impedance element to adjust the impedance adjustment module. If the current single machine is the first or last machine, proceed to the next step.
[0045] Generally speaking, the head and end machines are software-defined or identifier-defined, and only the current head and end machines need to be judged. They can use the numbering identification of a single machine or the recognition judgment of software, etc. How to judge, mark, and identify the head-end single machine and the end-end single machine are all within the protection scope of this case.
[0046] Impedance adjustment: read the impedance set in the Flash impedance setting module to adjust the impedance value to a larger or smaller value, adapt the impedance value by matching the communication bad packet rate with the communication source, and dynamically adjust the impedance element to update the adapted impedance value.
[0047] That is, through digital adjustment, the precise adjustment requirements of the adaptive impedance value can be met, and efficient adaptation can be achieved based on the updated impedance value, and relative adjustment can also respond.
[0048] In a specific embodiment, the impedance value read in the Flash impedance setting module is used as the basic impedance value, and the impedance span value and the bad packet rate threshold are set.
[0049] The single machine sets the basic impedance value to communicate with the communication source and records the current bad packet rate. When the current bad packet rate is lower than the bad packet rate threshold, the impedance value in the dynamic adjustment impedance element is updated.
[0050] When the current bad packet rate is not lower than the bad packet rate threshold, the impedance span value is adjusted by adding and / or subtracting the basic impedance value to obtain an adjusted impedance value whose bad packet rate is lower than the bad packet rate threshold, and the impedance value in the impedance element is dynamically adjusted according to the adjusted impedance value.
[0051] Specifically, under normal circumstances, there is a certain bad packet rate threshold to ensure stable communication. This parameter is based on actual communication needs. The bad packet rate threshold can be a percentage or the number of short-term errors, such as 1%, or 3 times, 5 times, etc.
[0052] When the impedance value in the Flash impedance setting module is directly read as the basic impedance value for adjustment, when the bad packet rate is lower than the bad packet rate threshold, it can be determined that the impedance value meets the requirement at this time. At this time, the impedance value is updated. This update is not an update action, but an action of confirming the current impedance value is also called an update.
[0053] When it does not reach the first bad packet rate threshold, that is, it is adjusted by adjusting the impedance cross-server value. Various logics can be used, such as comparing the previous and subsequent values for positive accumulation or negative reduction, and finally it is satisfied that it is lower than the bad packet rate threshold, and dynamic update is performed at this time.
[0054] In a preferred embodiment, if Figure 4 As shown, a first-order adjustment impedance span value and a second-order adjustment impedance span value are set, and the first-order adjustment impedance span value is greater than the second-order adjustment impedance span value.
[0055] When the current bad packet rate is not lower than the bad packet rate threshold, the first-order adjustment impedance span value is first increased or decreased to obtain the first adjusted bad packet rate closest to the bad packet rate threshold. When the first adjusted bad packet rate is lower than the bad packet rate threshold, the impedance value in the dynamic adjustment impedance element is directly updated.
[0056] When the first adjusted bad packet rate is higher than the bad packet rate threshold, the second order adjustment impedance span value is increased or decreased to obtain a final adjusted bad packet rate lower than the bad packet rate threshold, and the impedance value corresponding to the current final adjusted bad packet rate is updated.
[0057] Specifically, each time the impedance span value is adjusted, there is a response cycle of the bad packet rate. Therefore, for this situation, a gradient adjustment method is adopted, that is, a larger step adjustment is made through the first-order adjustment of the impedance span value to make it respond quickly, and a smaller step adjustment is made through the second-order adjustment of the impedance span value. This can shorten the adjustment cycle and make it respond quickly.
[0058] In a specific embodiment, when reading the impedance set in the Flash impedance setting module, the impedance value in the dynamic adjustment impedance element is read first. When there is no impedance value record in the dynamic adjustment impedance element, the impedance value in the default impedance element is read.
[0059] That is, when there is an updated impedance value in the dynamic impedance adjustment element, this value is enabled first. When there is no updated impedance value, the default impedance value is used for adjustment.
[0060] In a specific embodiment, a communication switchboard PMU is provided on the communication AB differential bus, and the communication switchboard PMU defines the terminal single machine on the communication AB differential bus as the first and last machine, that is, only one first and last machine of the terminal single machine is needed to meet the adaptive communication quality adjustment requirements.
[0061] From the above description, it can be found that the automatic impedance debugging and adaptation requirements can be met without using a dip switch and an external resistor, and the communication quality can be optimized. The digital end can be isolated to ensure that the impedance adjustment will not be disturbed and the operation is reliable and stable.
[0062] The term "comprise" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that includes a list of elements includes not only those elements but also other elements not expressly listed, or also includes elements inherent to such process, method, article, or apparatus / device.
[0063] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. An adaptive wave impedance matching system for hand-in-hand communication, comprising a communication AB differential bus with a communication source, and a plurality of stand-alone machines arranged on the communication AB differential bus, wherein the communication conversion module of any of the stand-alone machines is respectively connected to the AB differential bus through an A line and a B line, and characterized in that: Any of the single machines is provided with a Flash impedance setting module and an impedance adjustment module connecting the A line and the B line, and the impedance adjustment module is a digital potentiometer or an analog impedance circuit. The Flash impedance setting module is provided with a default impedance element and a dynamic adjustment impedance element.
2. According to claim 1, an adaptive wave impedance matching system for hand-in-hand communication, characterized in that: A microcontroller MCU is provided in any of the single machines, the communication conversion module is electrically connected to the microcontroller MCU via an isolation device A, and the impedance adjustment module is electrically connected to the microcontroller MCU via an isolation device B.
3. According to claim 1, the adaptive wave impedance matching system for hand-in-hand communication is characterized in that: A communication switchboard PMU is arranged on the communication AB differential bus.
4. A matching method based on an adaptive wave impedance matching system for hand-in-hand communication according to any one of claims 1 to 3, characterized in that The steps include: S1 first and last machine definition, define the first single machine and the last single machine as the first and last machine according to the order on the communication AB differential bus; S2 impedance setting, detect whether the current single machine is the first or last machine. If the current single machine is not the first or last machine, read the impedance in the default impedance element to adjust the impedance adjustment module. If the current single machine is the first or last machine, proceed to the next step; S3 impedance adjustment, reads the impedance set in the Flash impedance setting module to adjust the impedance value to increase or decrease, adapts the impedance value by the communication bad packet rate with the communication source, and dynamically adjusts the impedance element to update the adapted impedance value.
5. The matching method of the adaptive wave impedance matching system for hand-in-hand communication according to claim 4, characterized in that: In step 3, the impedance value read in the Flash impedance setting module is used as the basic impedance value, and the impedance span value and the bad packet rate threshold are set. The single machine sets the basic impedance value to communicate with the communication source and records the current bad packet rate. When the current bad packet rate is lower than the bad packet rate threshold, the impedance value in the dynamic adjustment impedance element is updated. When the current bad packet rate is not lower than the bad packet rate threshold, the adjusted impedance span value is added and / or subtracted on the basic impedance value to obtain an adjusted impedance value whose bad packet rate is lower than the bad packet rate threshold, and the impedance value in the dynamic adjusted impedance element is updated according to the adjusted impedance value.
6. The matching method of the adaptive wave impedance matching system for hand-in-hand communication according to claim 5, characterized in that: In the step 3, a first-order adjustment impedance span value and a second-order adjustment impedance span value are set, and the first-order adjustment impedance span value is greater than the second-order adjustment impedance span value. When the current bad packet rate is not lower than the bad packet rate threshold, the first-order adjustment impedance span value is first increased or decreased to obtain the first adjustment bad packet rate closest to the bad packet rate threshold. When the first adjustment bad packet rate is lower than the bad packet rate threshold, the impedance value in the dynamic adjustment impedance element is directly updated. When the first adjusted bad packet rate is higher than the bad packet rate threshold, the second order adjustment impedance span value is increased or decreased to obtain a final adjusted bad packet rate lower than the bad packet rate threshold, and the impedance value corresponding to the current final adjusted bad packet rate is updated.
7. The matching method of the adaptive wave impedance matching system for hand-in-hand communication according to claim 5, characterized in that: In the step S3, when reading the impedance set in the Flash impedance setting module, the impedance value in the dynamic adjustment impedance element is first read. When there is no impedance value record in the dynamic adjustment impedance element, the impedance value in the default impedance element is read.
8. The matching method of the adaptive wave impedance matching system for hand-in-hand communication according to claim 5, characterized in that: The communication AB differential bus is provided with a communication switchboard PMU. In step S1, the communication switchboard PMU defines the end single machine on the communication AB differential bus as the first and last machine.
