Dynamic terminal resistance adaptive adjustment method, device, equipment and medium

By using a dynamic terminating resistor adaptive adjustment method, the system automatically identifies the bus end and iteratively adjusts the terminating resistor value, solving the problem that fixed resistance values ​​cannot match the actual characteristic impedance of the cable, thus improving the stability and adaptability of the communication system.

CN122247806APending Publication Date: 2026-06-19GUANGDONG TOPWAY NETWORK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG TOPWAY NETWORK
Filing Date
2026-05-22
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, in differential bus communication systems such as RS485 and CAN, the fixed-value terminating resistor cannot perfectly match the characteristic impedance of the actual cable, resulting in signal distortion and increased communication error rate. In particular, it is difficult to maintain signal integrity when there are complex wiring and environmental changes.

Method used

A dynamic terminating resistor adaptive adjustment method is adopted. By determining whether a node is a physical end of the bus, a calibration pulse is injected to collect the reflected signal. The terminating resistor value is iteratively adjusted using a variable step size strategy until the matching condition is met. Periodic recalibration is performed when the environment changes.

Benefits of technology

It enables automatic identification of end nodes and adaptive adjustment of terminating resistors, reducing installation and maintenance complexity, improving the reliability and stability of communication systems, and adapting to impedance matching under different cable and environmental conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122247806A_ABST
    Figure CN122247806A_ABST
Patent Text Reader

Abstract

This invention discloses a dynamic adaptive adjustment method, apparatus, device, and medium for terminating resistance, belonging to the field of industrial fieldbus communication technology. The method includes: determining whether the current node is a physical end of the bus; if not, disconnecting the terminating match; if it is, injecting a calibration pulse with a preset rising edge into the bus; acquiring the reflected signal generated by the calibration pulse on the bus, and recording waveform characteristic parameters including at least overshoot amplitude and ringing duration; iteratively adjusting the terminating resistance value using a variable step-size strategy based on the waveform characteristic parameters; increasing the resistance value when the overshoot amplitude exceeds a preset amplitude threshold, and decreasing the resistance value when the ringing duration exceeds a preset time threshold, until the matching completion condition is met; and locking the optimal terminating resistance configuration to the matching resistance value in the current communication mode. This invention achieves automatic identification of end nodes and closed-loop adaptive adjustment of the terminating resistance, significantly improving the signal integrity and reliability of bus communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial fieldbus communication technology, and in particular to a method, apparatus, device and medium for adaptive adjustment of dynamic termination resistor. Background Technology

[0002] In differential bus communication systems such as RS485 and CAN, in order to eliminate signal reflection at the ends of the bus, a terminating resistor is usually connected at each of the farthest ends of the bus. Its typical value is 120Ω, which matches the characteristic impedance of the cable.

[0003] However, in practical engineering applications, the characteristic impedance of the bus is affected by various factors such as cable length, core diameter, insulation material, wiring method, and ambient temperature, and is not a constant 120Ω. Using a fixed-value terminating resistor cannot perfectly match the characteristic impedance of the actual cable. In harsh wiring or long-distance transmission scenarios, signal distortion phenomena such as overshoot and ringing will still occur, leading to increased communication error rate or even communication interruption.

[0004] On the other hand, in complex bus topologies (such as daisy-chained or star wiring), engineers often struggle to accurately determine which node is the true physical terminator, leading to incorrect or missing terminating resistors. Even if the terminator is correctly identified and a fixed resistor is connected, the original matching conditions no longer apply when the number of bus nodes changes, cables age, or ambient temperature fluctuates, causing signal integrity to decline again.

[0005] Therefore, how to automatically identify bus end nodes without relying on manual intervention, and dynamically adjust the terminating resistance value according to the actual signal quality of the bus to adapt to changes in cable characteristics and environmental drift, is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] The main objective of this invention is to provide a dynamic terminating resistor adaptive adjustment method, apparatus, device, and medium, aiming to solve the technical problems in the prior art where manual searching of bus end nodes is required and the use of fixed-value terminating resistors cannot fully match the characteristic impedance of actual cables.

[0007] To achieve the above-mentioned objective, the first aspect of this invention proposes a dynamic terminal resistor adaptive adjustment method, characterized by comprising the following steps: Determine if the current node is a physical end of the bus; If not, disconnect the terminal match; If so, a calibration pulse with a preset rising edge is injected into the bus; Acquire the reflected signal generated on the bus by the calibration pulse, and record waveform characteristic parameters including at least the overshoot amplitude and ringing duration; Based on the waveform characteristic parameters, a variable step size strategy is used to iteratively adjust the terminal resistance value until the preset matching completion condition is met; wherein, when the overshoot amplitude exceeds the preset amplitude threshold, the resistance value is increased, and when the ringing duration exceeds the preset time threshold, the resistance value is decreased. The terminating resistor configuration is locked to the matching resistor value in the current communication mode when the matching completion condition is met.

[0008] Further, the step of iteratively adjusting the terminating resistance value using a variable step-size strategy based on the waveform characteristic parameters until a preset matching completion condition is met includes: In the initial stage of the iteration, the terminal resistance value is adjusted using a preset large step size; When the deviation between the overshoot amplitude and the preset amplitude threshold is detected to be less than the preset first threshold, and / or when the deviation between the ringing duration and the preset time threshold is detected to be less than the preset second threshold, the terminal resistance value is switched to a preset small step size adjustment, wherein the resistance value of the large step size is greater than the resistance value of the small step size. The terminal resistance value is repeatedly adjusted based on the small step size until the overshoot amplitude does not exceed the overshoot threshold and the ringing duration does not exceed the ringing threshold, at which point it is determined that the matching completion condition is met.

[0009] Furthermore, the adjustment of the large-step resistance value and the small-step resistance value is achieved dynamically through a programmable impedance matching array.

[0010] Furthermore, the method also includes: When the preset time interval is reached, or when the ambient temperature change is detected to exceed the preset temperature threshold, determine whether the bus is in an idle state; If the bus is idle, the step of injecting calibration pulses into the bus to lock the terminating resistor configuration is re-executed to update the matched terminating resistor value.

[0011] Further, the acquisition of the reflected signal generated on the bus by the calibration pulse, and the recording of waveform characteristic parameters including at least the overshoot amplitude and ringing duration, include: The reflected signal on the bus is captured at a sampling rate higher than the calibration pulse frequency; the reflected signal is a differential signal. The overshoot amplitude and ringing duration are extracted and recorded from the reflected signal, wherein the maximum value of the voltage amplitude in the reflected signal exceeding the stable level is taken as the overshoot amplitude, and the duration required for the reflected signal to oscillate to the stable level is taken as the ringing duration.

[0012] Furthermore, the waveform characteristic parameters also include rise time and undershoot amplitude.

[0013] Furthermore, determining whether the current node is a physical end of the bus includes: Control the transceiver of the current node to send a probe signal to the bus; Collect the characteristics of the reflected signal generated on the bus by the probe signal; If the reflected signal characteristics meet the preset end determination conditions, then the current node is determined to be an end node; otherwise, it is determined to be a non-end node.

[0014] A second aspect of the present invention provides a dynamic terminating resistor adaptive adjustment device, comprising: The judgment module is used to determine whether the current node is a physical end of the bus; The disconnect matching module is used to disconnect the terminal match if the current node is not the physical end of the bus. An injection module is used to inject a calibration pulse with a preset rising edge into the bus if the current node is the physical end of the bus. The acquisition and recording module is used to acquire the reflected signal generated by the calibration pulse on the bus and record waveform characteristic parameters including at least the overshoot amplitude and the ringing duration. The adjustment module is used to iteratively adjust the terminal resistance value according to the waveform characteristic parameters using a variable step size strategy until the preset matching completion condition is met; wherein, when the overshoot amplitude exceeds the preset amplitude threshold, the resistance value is increased, and when the ringing duration exceeds the preset time threshold, the resistance value is decreased. The locking module is used to lock the terminal resistor configuration to the matching resistor value in the current communication mode when the matching completion condition is met.

[0015] A third aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the dynamic terminal resistor adaptive adjustment method described in any of the preceding claims.

[0016] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the dynamic terminal resistor adaptive adjustment method described in any of the preceding claims.

[0017] Compared with the prior art, the dynamic terminal resistor adaptive adjustment method described in claim 1 of this invention has the following beneficial effects: (1) Automatic identification of end nodes is achieved without manual judgment or DIP switch settings. First, it is determined whether the current node is a physical end of the bus. If it is not the end, the matching is disconnected. If it is the end, the subsequent adjustment process is started. This fundamentally solves the problem of incorrect or missing terminal resistors in the engineering field and reduces the complexity of installation and maintenance.

[0018] (2) Achieving closed-loop adaptive adjustment based on actual reflected signals. By injecting a calibration pulse with a preset rising edge into the bus, the overshoot amplitude and ringing duration in the reflected signal are collected. These two parameters are used as feedback quantities, and the terminal resistance value is iteratively adjusted according to the rule of "increasing the resistance when the overshoot exceeds the limit and decreasing the resistance when the ringing exceeds the limit" until the matching conditions are met. Compared with the existing open-loop fixed resistance matching or manual adjustment after observing the waveform, this invention can automatically adapt to the actual characteristic impedance of different cables, eliminating the impedance mismatch problem caused by factors such as cable length, wire diameter, material, and ambient temperature.

[0019] (3) A variable step size iterative strategy is adopted to balance adjustment speed and matching accuracy. A variable step size strategy is adopted in the iterative adjustment process. The initial large step size can quickly approach the optimal resistance range. After approaching the matching condition, it automatically switches to small step size for fine adjustment, which shortens the matching time in the start-up stage and ensures the final matching accuracy.

[0020] (4) Configure a locking mechanism to ensure communication stability. The terminal resistor configuration is locked to the matching resistor value of the current communication mode when the matching conditions are met, which avoids the terminal resistor value from changing unexpectedly due to bus noise or false triggering during normal communication, and ensures the reliable operation of the communication system. Attached Figure Description

[0021] Figure 1 A flowchart illustrating an embodiment of the dynamic terminal resistor adaptive adjustment method of the invention; Figure 2 A schematic block diagram of the structure of a dynamic terminal resistance adaptive adjustment device according to an embodiment of the invention; Figure 3 This is a schematic block diagram of a computer device according to an embodiment of the invention.

[0022] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0024] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any modules and all combinations of one or more associated listed items.

[0025] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0026] Before describing in detail embodiments of the dynamic terminating resistor adaptive adjustment method, the hardware system upon which this invention relies will first be described. The dynamic terminating resistor adaptive adjustment system of this invention is deployed in each node on the bus. Each node includes the following hardware modules: MCU Main Control Unit: The MCU (Microcontroller Unit) is the core controller of the node, with built-in or external necessary memory, timers, analog-to-digital converters (ADCs), and general-purpose input / output interfaces (GPIO). The MCU is responsible for running the adaptive compensation algorithm, including end-node determination, calibration pulse generation control, reflected signal data processing, impedance optimization iterative calculation, and coordinated scheduling of various modules. The selected MCU should have sufficient computing power to support real-time extraction of waveform characteristic parameters; typically, an ARM Cortex-M series or an equivalent industrial-grade MCU can be used.

[0027] Transceiver: This is a differential bus transceiver chip for RS-485, CAN, etc., which realizes bidirectional conversion between the MCU's TTL level signals and the bus differential signals. In transmit mode, the transceiver converts the single-ended signal output by the MCU into a differential signal to drive the bus; in receive mode, the transceiver converts the bus differential signal into a single-ended signal and sends it to the MCU or signal quality detection unit. The transceiver's enable pin is controlled by the MCU to achieve precise switching between transmit and receive states.

[0028] Programmable impedance matching array: This is the actuator that enables dynamic adjustment of the terminating resistance value. The array consists of multiple parallel resistor branches, each branch composed of a MOSFET switch connected in series with a fixed resistor. The gate of each MOSFET is connected to a different GPIO pin of the MCU, and the MCU outputs high or low levels to control the conduction or cutoff of each branch. By combining different branches, various equivalent parallel resistance values ​​can be obtained.

[0029] Signal Quality Detection Unit: This unit monitors the waveform characteristics of the bus differential signals in real time. It contains at least one high-speed analog-to-digital converter (ADC) with a sampling rate at least 10 times the calibration pulse frequency to ensure accurate capture of transient details such as overshoot and ringing. The ADC input is directly connected to the bus differential signal line (or via appropriate signal conditioning circuitry) to convert the analog differential voltage into digital values ​​for MCU processing. The MCU then performs post-processing on the acquired waveform data to extract parameters such as overshoot amplitude, ringing duration, rise time, and undershoot amplitude.

[0030] Bus Status Detection Unit: The bus status detection unit is used to determine whether the current node is the physical end of the bus. This unit can reuse the hardware of the signal quality detection unit to achieve end-of-bus identification by analyzing the idle timing characteristics on the bus or the reflection characteristics after actively sending a probe signal.

[0031] Non-volatile memory (such as Flash or EEPROM): Used to store data such as optimal impedance configuration parameters, threshold settings, and historical temperature references after calibration. The MCU writes the configuration parameters to the non-volatile memory after each matching process to quickly restore the optimal matching state upon the next power-on, avoiding repeated calibration. Simultaneously, during periodic recalibration, the MCU reads the previous configuration parameters from the non-volatile memory as the initial values ​​for the iteration.

[0032] The aforementioned hardware modules work together to form a closed-loop adaptive adjustment system. The following method embodiments are all described based on this hardware architecture. It should be noted that the usage of the same hardware module may differ slightly in different embodiments (e.g., passive listening or active detection may be used for end-point identification), but all will not exceed the functional scope of the aforementioned hardware.

[0033] Reference Figure 1 This invention provides a dynamic terminating resistor adaptive adjustment method, comprising the following steps: S1: Determine whether the current node is the physical end of the bus.

[0034] In a differential bus topology (such as RS-485 or CAN bus), the physical terminator is the node located at the farthest end of a bus branch that is no longer connected to other downstream nodes. In linear or daisy-chain topologies, there are usually two terminators; in star or hybrid topologies, identifying the terminator node is more complex.

[0035] In this embodiment, after the system powers on, the MCU main control unit of each node first executes the end-point identification process. Specifically, the node switches its transceiver to receive mode, listens for specific timing characteristics or idle states on the bus, and determines whether the node is a physical end point through the bus status detection unit. This process requires no manual intervention and does not rely on DIP switches or manual observation. Automatic end-point node identification fundamentally solves the problem of incorrect or missing terminating resistors caused by incorrect end-point identification in engineering sites, reduces the complexity of installation and maintenance, and provides a technical possibility for non-professionals to correctly deploy communication networks in complex topologies.

[0036] S2: If not, disconnect the terminal match.

[0037] Disconnecting the termination match means removing the terminating resistor connected between the bus differential signal lines (A and B lines) from the circuit, making the terminating resistor branch of that node present a high impedance state, which is equivalent to that node not participating in the bus termination match.

[0038] In this embodiment, when step S1 determines that the current node is not a physical end of the bus, the MCU controls all MOSFET switches in the programmable impedance matching array to turn off via GPIO, thus isolating the terminating resistor branch of that node from the bus. This step avoids excessive bus load and signal attenuation caused by non-end nodes incorrectly connecting to terminating resistors, ensuring that only the end nodes that truly require matching participate in impedance matching, maintaining the normal driving capability and signal integrity of the bus.

[0039] S3: If so, inject a calibration pulse with a preset rising edge into the bus.

[0040] A calibration pulse is a voltage signal with a fast rise time (typically on the nanosecond scale) used to excite an observable reflected waveform on a bus. A preset rise time means that the rate of change of the pulse's edge is pre-set and known; typically, a square wave signal with a frequency of 1 MHz and a duration of 5 cycles can be used.

[0041] In this embodiment, after determining that the current node is an end node, the MCU injects a calibration pulse with a fast rising edge into the bus via a DAC (digital-to-analog converter) or directly via an RS-485 transceiver. This pulse propagates in the bus and is reflected when it encounters impedance discontinuities (such as cable ends or branch points). This step, by injecting an excitation signal with known characteristics, creates controllable and repeatable test conditions for subsequent signal quality detection, making the reflected signals collected from different nodes and at different time points comparable, thus providing a benchmark for adaptive adjustment.

[0042] S4: Acquire the reflected signal generated by the calibration pulse on the bus and record waveform characteristic parameters including at least the overshoot amplitude and ringing duration.

[0043] A reflected signal is a portion of the incident signal that returns at the point of impedance discontinuity when the characteristic impedance of a transmission line (bus) is mismatched with the termination impedance. Its amplitude and phase depend on the degree of impedance mismatch. Overshoot amplitude (V) overshoot Overshoot is the maximum voltage amplitude that exceeds the target stable level after a signal transition, usually measured in volts (V). Overshoot reflects excess energy caused by low impedance. Ringing duration (T) ringing The duration required for a signal waveform to oscillate after a transition until its amplitude decays to within ±5% of a stable level is typically measured in nanoseconds (ns) or microseconds (μs). Ringing reflects the back-and-forth reflection of energy caused by high impedance.

[0044] In this embodiment, the signal quality detection unit captures the bus differential signal at a sampling rate more than 10 times higher than the calibration pulse frequency (for example, if the calibration pulse is 1MHz, the sampling rate is no less than 10MHz). From the captured waveform, two core parameters, overshoot amplitude and ringing duration, are extracted. After sampling, these parameters are transmitted to the MCU for analysis. This step uses overshoot amplitude and ringing duration as feedback quantities, directly mapping the degree and nature of impedance mismatch, providing a physical basis for subsequent iterative optimization. These two parameters are the easiest to measure in engineering and have the strongest correlation with impedance mismatch, avoiding the computational overhead of complex frequency domain analysis.

[0045] S5: Based on the waveform characteristic parameters, the terminal resistance value is iteratively adjusted using a variable step size strategy until the preset matching completion condition is met; wherein, when the overshoot amplitude exceeds the preset amplitude threshold, the resistance value is increased, and when the ringing duration exceeds the preset time threshold, the resistance value is decreased.

[0046] Variable step size strategy refers to a strategy that dynamically adjusts the resistance increment for each adjustment based on how close the current parameters are to the target value during impedance optimization. Matching completion condition means that the overshoot amplitude does not exceed a preset amplitude threshold, i.e., the preset overshoot threshold voltage (V).th_high (e.g., 0.3V), and the ringing duration does not exceed a preset time threshold, i.e., the preset ringing threshold duration (T). th_ring (e.g., a state of 100ns).

[0047] In this embodiment, the MCU runs an impedance optimization algorithm, initially using large step sizes (e.g., 15Ω) to quickly approach the optimal resistance range. When the deviation between the overshoot amplitude and a preset amplitude threshold is detected to be less than a preset first threshold, and / or when the deviation between the ringing duration and a preset time threshold is detected to be less than a preset second threshold, it switches to fine adjustment using small step sizes (e.g., 3.75Ω). The rule for determining the adjustment direction is: if V overshoot >V th_high This indicates that the current impedance is too low relative to the characteristic impedance, resulting in excess energy and overshoot. In this case, the resistance value should be increased; if T ringing >T th_ring This indicates that the current impedance is too high relative to the characteristic impedance, and the energy cannot be completely absorbed at the end, resulting in multiple reflections and ringing. In this case, the resistance value should be reduced. Repeat the above adjustment until both parameters meet the corresponding preset threshold conditions. The variable step-size strategy in this step balances optimization speed and accuracy. Compared with the fixed step-size scheme, it can achieve optimal matching in fewer iterations, reducing the communication interruption time during system startup. The binary judgment rule based on overshoot and ringing is simple and reliable, avoiding complex mathematical fitting calculations, and is suitable for real-time operation on low-cost MCUs.

[0048] S6: Lock the terminating resistor configuration when the matching completion condition is met to the matching resistor value in the current communication mode.

[0049] Locking refers to fixing the control state of the programmable impedance matching array so that it no longer changes with subsequent temporary interference signals, and the configuration parameters can be written into non-volatile memory for quick recovery after power failure and restart.

[0050] In this embodiment, after the matching is determined in step S5, the MCU records the on / off state of each MOSFET switch, writes the configuration to the Flash memory, and locks the programmable impedance matching array to this configuration. The node then enters normal communication mode. This locking mechanism ensures that the terminal resistance value will not change due to noise or false triggering on the bus during normal communication, guaranteeing communication stability. Simultaneously, storing the configuration in non-volatile memory allows the system to directly reuse the optimized matching value upon the next power-on, eliminating the need for a complete re-optimization process and further shortening startup time.

[0051] This embodiment's dynamic terminating resistor adaptive adjustment method forms a fully closed-loop adaptive adjustment system, starting from end-node identification, through calibration pulse injection, reflected signal acquisition, and variable-step-size iterative optimization based on overshoot and ringing feedback, finally locking in the optimal configuration. This invention can be fully automated, requiring no manual intervention. The entire process from end-node identification to impedance matching is completed automatically by the system, eliminating reliance on professionals and instruments such as oscilloscopes, significantly lowering the threshold for on-site debugging. It uses closed-loop feedback adjustment, rather than open-loop fixed matching. This embodiment dynamically adjusts based on the measurement results of the actual reflected waveform, adapting to the actual characteristic impedance under different cable lengths and temperature conditions, fundamentally solving the problem of a fixed 120Ω resistor not being able to achieve complete matching. The adjustment rules are simple: overshoot corresponds to lower impedance, and ringing corresponds to higher impedance. This judgment rule is directly derived from transmission line theory, making it easy for engineers to understand and verify, and requiring minimal computation, making it suitable for embedded implementation.

[0052] In one embodiment, the above-mentioned iterative adjustment of the terminating resistance value using a variable step size strategy based on the waveform characteristic parameters until a preset matching completion condition is met includes: S51: In the initial stage of iteration, the terminal resistance value is adjusted by a preset large step size.

[0053] Large step size refers to a larger resistance adjustment increment used in the early stages of impedance optimization, typically 15Ω. This value is approximately 25% of the target adjustment range (60Ω to 120Ω), enabling the traversal of most of the search range in fewer steps.

[0054] In this embodiment, after the system completes end-point identification and calibration pulse injection, during the initial impedance adjustment, the MCU sets the equivalent resistance value of the programmable impedance matching array to a default starting value (e.g., 60Ω or 120Ω), and then adjusts it in 15Ω increments to improve signal quality. For example, if the overshoot amplitude measured for the first time after power-on exceeds the limit, it indicates that the current resistance value is too low, and the first adjustment will increase the resistance value by 15Ω. This large step adjustment allows the system to quickly approach the optimal impedance range. Under typical cable conditions, it usually only takes 2-3 steps to reach the vicinity of the threshold, significantly shortening the matching time during the startup phase.

[0055] S52: When the deviation between the overshoot amplitude and the preset amplitude threshold is detected to be less than the preset first threshold, and / or when the deviation between the ringing duration and the preset time threshold is detected to be less than the preset second threshold, switch to a preset small step size to adjust the terminal resistance value, wherein the large step size resistance value is greater than the small step size resistance value.

[0056] The proximity threshold is a deviation limit used to determine whether the current waveform parameters have entered the vicinity of the optimal value. For example, when the difference between the overshoot amplitude and the overshoot threshold is less than 0.1V, or the difference between the ringing duration and the ringing threshold is less than 20ns, a step size switch is triggered. A small step size is a step size relative to a large step size, meaning that the resistance value of the large step size is greater than the resistance value of the small step size.

[0057] In this embodiment, the MCU calculates the deviation between the current parameter and the threshold after each iteration:

[0058] Among them, V dev T represents the deviation between the overshoot amplitude and the preset amplitude threshold. dev The deviation between the ringing duration and a preset time threshold, when V dev <ΔV close And T dev <ΔT close Time (where ΔV) close For the first threshold, ΔT close (As the second threshold), the system determines that it has entered the neighborhood of the optimal value, and at this time, the step size will be adjusted from a large step size (ΔR). large =15Ω) Switch to small step size (ΔR) small =3.75Ω).

[0059] To more accurately describe this switching logic, this invention proposes a formula for calculating the proximity factor α:

[0060] Where α is a dimensionless proximity factor. When α > α high (α) high For a preset proximity factor threshold, such as α high When α = 0.3), the system is in the far region and a large step size is used; when α ≤ α high When the system enters the near-range, it switches to a small step size. The significance of this formula lies in normalizing two physical quantities (voltage and time) by dividing them by their respective thresholds, and using the maximum value as the switching criterion. This ensures that the system will not decelerate prematurely if either parameter is not close to its threshold, thus avoiding getting trapped in a local spurious optimum. The switching criterion based on the normalized proximity factor avoids the difficulty of parameter tuning caused by setting independent thresholds for voltage and time. At the same time, taking the maximum value ensures the robustness of the adjustment—deceleration only occurs when both parameters are sufficiently close to the target, preventing premature entry into slow adjustment due to a single parameter "falsely reaching the target."

[0061] S53: Based on the small step size, repeatedly adjust the terminal resistance value until the overshoot amplitude does not exceed the overshoot threshold and the ringing duration does not exceed the ringing threshold, and determine that the matching completion condition is met.

[0062] In this embodiment, after switching to a small step size, the system continues to perform fine adjustments according to the rule of increasing resistance when overshoot exceeds the limit and decreasing resistance when ringing exceeds the limit. At this time, the resistance change for each adjustment is 3.75Ω, approximately one-quarter of that for a large step size. This process is repeated until V... overshoot ≤V th_high And T ringing ≤T th_ring At this point, the matching is considered complete. Fine-tuning with small steps ensures the final matching accuracy and avoids the "over-adjustment" phenomenon that may be caused by large steps. This allows the terminating resistance value to be accurately matched to the actual characteristic impedance of the cable, suppressing reflection to the greatest extent.

[0063] This embodiment specifically defines the variable step size strategy, forming a two-stage optimization architecture of "coarse adjustment + fine adjustment," and introduces an original proximity factor α as a quantitative criterion for step size switching. It boasts high convergence efficiency, with large step sizes quickly traversing the search interval and small step sizes achieving precise convergence. The total number of iterations is typically controlled to within five, reducing the number of iterations by approximately 40% compared to the fixed step size scheme. The switching timing is precise; by normalizing the proximity factor α, information from both voltage and time dimensions is fused into a dimensionless index, avoiding the tediousness and uncertainty of manually setting switching thresholds for two different physical quantities. It exhibits strong robustness; the maximum value strategy ensures that switching occurs when all parameters are sufficiently close to the target, preventing premature deceleration due to a single parameter accidentally reaching its target, thus improving the optimization success rate in complex cable environments.

[0064] In one embodiment, the adjustment of the large-step resistance value and the small-step resistance value is achieved dynamically through a programmable impedance matching array.

[0065] A programmable impedance matching array is a circuit module composed of multiple parallel resistor branches, each branch consisting of a MOSFET switch and a resistor connected in series. By controlling the on / off state of each MOSFET through the MCU's GPIO (General Purpose Input / Output Interface), different equivalent parallel resistance values ​​can be combined.

[0066] In this embodiment, the programmable impedance matching array adopts an N parallel branch structure, typically configured with 4 branches, with resistance values ​​of R1=60Ω, R2=30Ω, R3=15Ω, and R4=7.5Ω. The switch control signals for each branch are binary bits b1, b2, b3, b4, where b... i =1 indicates that the corresponding MOSFET is turned on, and the resistance of this branch is connected to the parallel network. Equivalent terminating resistance value R eqThe calculation formula is:

[0067] Where b i For each element in the range {0,1}, 1 represents on and 0 represents off. This array can achieve 16 discrete resistance values, ranging from 60Ω (b1 only conducting) to approximately 3.75Ω (parallel resistance approximately 3.75Ω when all branches are on). Large-step adjustments of 15Ω can be achieved by turning a single 15Ω branch on or off; small-step adjustments of 3.75Ω can be achieved by turning a single 7.5Ω branch on or off, or by adjusting multiple branches simultaneously for finer stepping.

[0068] To describe the switching relationship between large and small step sizes, this invention provides a definition for the step size ratio factor β:

[0069] Where ΔR large For large-step resistance changes, ΔR small R represents the resistance change in small steps. max and R min These represent the maximum and minimum adjustable resistance values ​​of the array, respectively; N is the number of branches; and δ is the ratio of the minimum branch resistance value to the maximum branch resistance value. In the configuration, ΔR... large =15Ω, ΔR small =3.75Ω, then β=4. The significance of this factor lies in quantifying the granular difference between coarse and fine adjustment. The larger the β, the more obvious the stages of the adjustment process and the more significant the effect of the convergence strategy, but it also increases the risk of residuals after matching. Through extensive experimental verification, a β value between 3 and 5 can achieve the optimal balance between convergence speed and matching accuracy.

[0070] In this embodiment, a parallel programmable resistor array is used to achieve variable step size adjustment. All resistors are discrete MOSFETs and ordinary resistors, eliminating the need for dedicated digital potentiometers or variable gain amplifiers, resulting in low cost. The switching state is directly controlled by the MCU's GPIO, providing fast response and eliminating the need for an additional control bus. The resistors in each branch are weighted in a binary manner, enabling uniform step size adjustment and facilitating software algorithm implementation. Furthermore, a step size ratio factor β is introduced to quantify the relationship between coarse and fine adjustment, providing theoretical guidance for array design in different application scenarios (selecting the number of branches and the values ​​of the resistors in each branch).

[0071] In one embodiment, the above-described dynamic termination resistor adaptive adjustment method further includes: S7: Determine whether the bus is in an idle state when the preset time interval is reached, or when the ambient temperature change is detected to exceed the preset temperature threshold.

[0072] The preset time interval is the system-defined periodic recalibration trigger cycle, typically 1 hour, and can be configured by the user according to the level of communication activity on site. Ambient temperature change is monitored by an onboard temperature sensor (such as a DS18B20 or an internal temperature sensor of the MCU) to detect changes in the operating environment temperature. The temperature threshold is the minimum temperature change required to trigger recalibration, typically set to 5°C, because the characteristic impedance of the cable exhibits a certain temperature coefficient with temperature changes; typically, the temperature coefficient for copper cables is approximately 0.0039 / °C.

[0073] In this embodiment, the system sets up a timer interrupt and a temperature monitoring task in the main communication loop. Whenever the timer reaches a preset interval (e.g., 1 hour), or when the detected temperature differs from the reference temperature recorded during the last calibration by more than 5°C, the system triggers a recalibration preparation process. First, the bus status detection unit continuously monitors communication activity on the bus to determine if the bus is idle (i.e., no node is sending data). This dual-trigger mechanism combines periodic prevention and event-driven response: the time interval ensures the system can periodically optimize the matching state; the temperature threshold trigger ensures timely compensation when cable characteristics drift due to environmental changes, without waiting for the hour.

[0074] S8: If the bus is idle, re-execute the step of injecting calibration pulses into the bus to lock the terminating resistor configuration to update the matched terminating resistor value. The bus idle window refers to the period of time during which no node on the bus transmits data. It is usually characterized by the differential signal being maintained at a fixed recessive level (AB≈0V or a weak bias voltage in RS-485) for more than one minimum character transmission time.

[0075] In this embodiment, when the bus is determined to be idle, the system will re-execute the dynamic termination resistor adaptive adjustment method described in the above embodiment: inject calibration pulses, acquire reflected signals, perform variable step-size iterative optimization, and lock the new configuration. If the bus is not currently idle, the system will postpone the recalibration task and continue listening, waiting for the next idle window to attempt execution again.

[0076] To quantitatively describe the comprehensive conditions triggering recalibration, this invention proposes a formula for calculating the recalibration demand index γ:

[0077] Where t is the current time, t last T is the time when the last calibration was completed. interval For a preset time interval (e.g., 3600 seconds), T temp T represents the current temperature. ref The temperature recorded during the last calibration, ΔT thThe temperature threshold is set to 5℃. When γ ≥ 1, a recalibration condition detection is triggered. The significance of this formula is that it linearly superimposes the time and temperature factors after normalization, with both the time interval weight and temperature change weight being 1. Any single factor reaching the threshold (i.e., any term in γ ≥ 1) or the partial accumulation of both factors (e.g., half the time has passed while the temperature has changed by half) can trigger a recalibration judgment, avoiding the problem of a factor "getting stuck at the threshold edge" and failing to trigger for a long time. Recalibration is performed during the bus idle window, ensuring that the communication process is not interfered with, and the recalibration action is completely transparent to normal data transmission. The updated optimal impedance configuration can adapt in real time to dynamic factors such as cable aging, temperature drift, and changes in the number of nodes, ensuring that the system always maintains optimal signal integrity.

[0078] This embodiment adds a periodic recalibration mechanism, upgrading from a "one-time fix" to "continuous optimization." The system no longer assumes the matching configuration remains unchanged after initial settings, but introduces a dual-mode proactive maintenance strategy triggered by both time and temperature, and proposes a recalibration demand index γ as a comprehensive criterion. This solves the fundamental defect in existing technologies where "fixed matching cannot adapt to dynamic changes." In practical engineering, communication nodes may be added or removed online, cables may age over time, and outdoor equipment may experience large daily temperature fluctuations. This embodiment enables the matching impedance to automatically adjust to these changes, significantly extending the stable operating cycle of the communication system and reducing maintenance costs throughout its lifecycle. The comprehensive evaluation mechanism of the recalibration demand index γ allows the system to collaboratively judge time and temperature factors, avoiding excessive reliance on a single fixed time interval or temperature threshold, and improving the rationality and timeliness of recalibration triggering.

[0079] In one embodiment, the above-mentioned acquisition of the reflected signal generated on the bus by the calibration pulse, and recording of waveform characteristic parameters including at least overshoot amplitude and ringing duration, includes: S41: Capture the reflected signal on the bus at a sampling rate higher than the calibration pulse frequency, the reflected signal being a differential signal; The sampling rate is the number of times an analog-to-digital converter (ADC) samples an analog signal per unit of time, measured in samples per second. A sampling rate higher than the calibration pulse frequency means that the sampling rate is at least 10 times the calibration pulse frequency to meet the Nyquist sampling theorem's requirement for capturing signal details.

[0080] In this embodiment, the signal quality detection unit incorporates a high-speed ADC with a sampling rate configured to be at least 10 times the calibration pulse frequency. For example, when the injected calibration pulse is a 1MHz square wave, the ADC sampling rate is no less than 10MHz. The object being acquired is the differential signal on the bus (i.e., the voltage difference between line A and line B in the RS-485 standard), rather than the single-ended signal to ground, because the differential signal is the basis for the receiver's actual decision. A sufficiently high sampling rate ensures that overshoot spikes and ringing details in the reflected waveform can be accurately captured, avoiding the loss of waveform distortion information due to insufficient sampling. Acquiring the differential signal instead of the single-ended signal ensures that the measurement results are consistent with the actual input of the receiver, eliminating the interference of common-mode noise on the measurement.

[0081] S42: Extract and record the overshoot amplitude and ringing duration from the reflected signal, wherein the maximum value of the voltage amplitude in the reflected signal exceeding the stable level is taken as the overshoot amplitude, and the duration required for the reflected signal to oscillate to the stable level is taken as the ringing duration.

[0082] The steady-state level is the stable DC voltage value that the signal waveform reaches without further oscillation after a sufficient period of time following the calibration pulse transition (typically 5 times the ringing duration). The maximum voltage amplitude exceeding the steady-state level refers to the absolute value of the positive peak value of the signal voltage exceeding the steady-state level during the transition process after the pulse edge.

[0083] In this embodiment, the MCU performs post-processing on the acquired reflected signal waveform data. First, it identifies the rising and falling edges of the calibration pulse. Then, within the transition interval after each edge, it searches for the global maximum value of the voltage waveform, calculates the difference between it and the stable level, and obtains the overshoot amplitude V. overshoot Simultaneously, starting from the edge transition moment, the process of the waveform amplitude gradually decaying is detected. The moment when the waveform first enters the stable level ±5% range and remains within this range is recorded. The time difference between this moment and the edge transition moment is taken as the ringing duration T. ringing Overshoot and ringing are extracted using the maximum voltage method and steady-state threshold method, respectively. The algorithms are simple, robust, and do not require complex curve fitting or frequency domain transformation, allowing for real-time processing on low-computing-power MCUs. The two parameters characterize the severity of reflection in the amplitude and time domains, respectively, complementing each other and forming a comprehensive basis for judging impedance mismatch.

[0084] In one embodiment, the waveform characteristic parameters mentioned above also include rise time and undershoot amplitude.

[0085] Rise time (T) riseThe rise time is the time required for a signal to rise from 20% to 80% of its stable level, typically measured in nanoseconds (ns). The rise time reflects the steepness of the signal and is influenced by both cable distribution parameters and termination matching. The undershoot (V) undershoot Undershoot refers to the absolute value of the maximum negative amplitude of a signal level below the target stable level after a transition, usually measured in volts (V). Undershoot corresponds to overshoot and reflects under-amplitude oscillations caused by impedance mismatch.

[0086] In this embodiment, after acquiring the reflected signal, the signal quality detection unit extracts not only the overshoot amplitude and ringing duration, but also the rise time and undershoot amplitude simultaneously. The rise time is calculated by identifying the time difference between the waveform at 20% and 80% of the stable level. The undershoot amplitude is calculated by searching for the minimum value of the voltage waveform in the transition region after the pulse edge and calculating the absolute value of the difference between it and the stable level.

[0087] There is an inherent relationship among the above four parameters. In order to comprehensively evaluate signal quality, this invention proposes a formula for calculating the comprehensive signal quality index η:

[0088] Where w1, w2, w3, and w4 are weighting coefficients, satisfying w1 + w2 + w3 + w4 = 1, with typical values ​​of 0.3, 0.2, 0.4, and 0.1, respectively; T rise_min and T rise_max These represent the minimum rise time measured under ideal matching conditions and the maximum rise time measured under extreme mismatch conditions, respectively. A smaller η value indicates better signal quality; when η ≤ 1, the communication requirements are considered met. The significance of this formula lies in integrating multiple waveform characteristic parameters into a comprehensive score, which can be used to assist in judging matching completion conditions or as a basis for ranking the merits of different matching schemes.

[0089] In this embodiment, rise time and undershoot amplitude are added as auxiliary parameters to provide an additional dimension for discrimination when overshoot and ringing are insufficient to distinguish certain complex mismatches. For example, when undershoot is significant but ringing is not, it may indicate certain specific types of impedance mismatch or cable damage. The introduction of the signal quality comprehensive index η allows the system to no longer rely on a single parameter hard threshold, but to comprehensively evaluate matching quality from multiple dimensions, improving the robustness of judgment in complex cable environments.

[0090] In one embodiment, determining whether the current node is a physical end of the bus includes: S11: Control the transceiver of the current node to send a probe signal to the bus.

[0091] A probe signal is a special detection signal that is different from normal communication data. It is usually a single pulse or a short, specific code pattern. Its function is to generate a reflection in the bus that can be detected by other nodes (mainly the receiver of this node).

[0092] In this embodiment, unlike the previous embodiment where the end node injects a calibration pulse after identifying itself, this embodiment involves the node actively sending a probe signal before determining whether it is an end node. This probe signal is output to the bus via the node's transceiver (such as an RS-485 driver). The width of the probe signal is typically set to be less than the maximum round-trip time of the bus to ensure that the reflected signal returns before the next signal transition. This active probe signal sending method allows each node to independently perform end-node determination without relying on the coordinated instructions of the master station or other nodes, making it suitable for peer-to-peer network topologies without a master station.

[0093] S12: Collect the characteristics of the reflected signal generated on the bus by the detection signal.

[0094] In this embodiment, after sending the probe signal, the node immediately switches its transceiver to receive mode and captures the bus differential signal through the signal quality detection unit. The focus is on analyzing the signal within a specific time window after transmission completion—if the node is not the end node and there are other downstream nodes, the probe signal will be reflected at the downstream nodes; if the node is the end node, the probe signal will be reflected directly at its output (because there is no downstream path for energy absorption at the end node). The amplitude and delay time of reflected signals differ significantly between different types of nodes. By analyzing the characteristics of the reflected signal (such as amplitude and return time), end nodes and non-end nodes can be distinguished. This method is independent of the wiring topology and can accurately determine the node even in star or hybrid topologies.

[0095] S13: If the reflected signal characteristics meet the preset end determination conditions, then the current node is determined to be an end node; otherwise, it is determined to be a non-end node.

[0096] The end-of-line determination criteria can be a set of preset threshold parameters used to determine whether the characteristics of the reflected signal conform to the behavior pattern of the end-of-line node. Typically, if a reflected signal with an amplitude greater than a certain threshold is detected within a short time window after transmission ends (such as the time required for the signal to travel back and forth on the bus once), the current node is identified as the end-of-line node.

[0097] In this embodiment, the MCU compares the collected reflected signal characteristics with preset end-of-line determination conditions. If the reflected signal meets the conditions (e.g., the peak value of the reflected signal exceeds 0.5V and occurs within one round-trip delay after transmission), the current node is determined to be an end-of-line node, and then end-of-line matching and impedance optimization are enabled according to the process described in the above embodiment; otherwise, it is determined to be a non-end-of-line node, and end-of-line matching is disconnected. The determination result can be stored in non-volatile memory for quick reuse upon the next power-on. Unifying end-of-line identification and subsequent adaptive impedance adjustment into the same hardware architecture (eliminating the need for additional end-of-line detection sensors) reduces system costs. The determination result can be reused, avoiding the time-consuming process of repeated detection.

[0098] This embodiment provides a different implementation scheme for end-node identification than the embodiments described above. In the embodiments above, end-node identification is passively completed by listening to specific timing sequences on the bus; in this embodiment, the node actively sends a probe signal and analyzes the reflection characteristics of its own transmitted signal to determine whether it is an end-node. The difference between the two schemes is that the passive listening method does not inject additional signals into the bus, making it suitable for scenarios with strict requirements on bus interference; the active detection method is more proactive, has more obvious reflection characteristics, and has a higher accuracy rate, but it requires occupying the bus transmission window. Users can choose to use the method according to their actual application scenario.

[0099] Reference Figure 2 This invention also provides a dynamic terminating resistor adaptive adjustment device for implementing the dynamic terminating resistor adaptive adjustment method in any of the above embodiments, comprising: Module 10 is used to determine whether the current node is a physical end of the bus; Disconnect matching module 20 is used to disconnect the terminal match if the current node is not the physical end of the bus; The injection module 30 is used to inject a calibration pulse with a preset rising edge into the bus if the current node is the physical end of the bus. The acquisition and recording module 40 is used to acquire the reflected signal generated by the calibration pulse on the bus and record waveform characteristic parameters including at least the overshoot amplitude and the ringing duration. The adjustment module 50 is used to iteratively adjust the terminal resistance value according to the waveform characteristic parameters using a variable step size strategy until the preset matching completion condition is met; wherein, when the overshoot amplitude exceeds the preset amplitude threshold, the resistance value is increased, and when the ringing duration exceeds the preset time threshold, the resistance value is decreased. The locking module 60 is used to lock the terminal resistor configuration to the matching resistor value in the current communication mode when the matching completion condition is met.

[0100] Reference Figure 3The present invention also provides a computer device, the internal structure of which can be as follows: Figure 3 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor is designed to provide computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores operating devices, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores relevant data required for implementing the dynamic termination resistance adaptive adjustment method. The network interface is used to communicate with external terminals via a network connection. Furthermore, the computer device may also include input devices and a display screen. When the computer program is executed by the processor, it implements the dynamic termination resistance adaptive adjustment method described in any of the above embodiments. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.

[0101] One embodiment of this application also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the dynamic termination resistor adaptive adjustment method described in any of the above embodiments. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0102] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0103] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0104] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for adaptive adjustment of dynamic terminating resistor, characterized in that, Includes the following steps: Determine if the current node is a physical end of the bus; If not, disconnect the terminal match; If so, a calibration pulse with a preset rising edge is injected into the bus; Acquire the reflected signal generated on the bus by the calibration pulse, and record waveform characteristic parameters including at least the overshoot amplitude and ringing duration; Based on the waveform characteristic parameters, a variable step size strategy is used to iteratively adjust the terminal resistance value until the preset matching completion condition is met; wherein, when the overshoot amplitude exceeds the preset amplitude threshold, the resistance value is increased, and when the ringing duration exceeds the preset time threshold, the resistance value is decreased. The terminating resistor configuration is locked to the matching resistor value in the current communication mode when the matching completion condition is met.

2. The dynamic terminal resistance adaptive adjustment method according to claim 1, characterized in that, The step of iteratively adjusting the terminating resistance value using a variable step size strategy based on the waveform characteristic parameters until a preset matching completion condition is met includes: In the initial stage of the iteration, the terminal resistance value is adjusted using a preset large step size; When the deviation between the overshoot amplitude and the preset amplitude threshold is detected to be less than the preset first threshold, and / or when the deviation between the ringing duration and the preset time threshold is detected to be less than the preset second threshold, the terminal resistance value is switched to a preset small step size adjustment, wherein the resistance value of the large step size is greater than the resistance value of the small step size. The terminal resistance value is repeatedly adjusted based on the small step size until the overshoot amplitude does not exceed the overshoot threshold and the ringing duration does not exceed the ringing threshold, at which point it is determined that the matching completion condition is met.

3. The dynamic terminal resistance adaptive adjustment method according to claim 2, characterized in that, The adjustment of the large-step resistance value and the small-step resistance value is achieved dynamically through a programmable impedance matching array.

4. The dynamic terminal resistance adaptive adjustment method according to claim 1, characterized in that, The method further includes: When the preset time interval is reached, or when the ambient temperature change is detected to exceed the preset temperature threshold, determine whether the bus is in an idle state; If the bus is idle, the step of injecting calibration pulses into the bus to lock the terminating resistor configuration is re-executed to update the matched terminating resistor value.

5. The dynamic terminal resistance adaptive adjustment method according to claim 1, characterized in that, The process involves acquiring the reflected signal generated on the bus by the calibration pulse and recording waveform characteristic parameters, including at least the overshoot amplitude and ringing duration, including: The reflected signal on the bus is captured at a sampling rate higher than the calibration pulse frequency; the reflected signal is a differential signal. The overshoot amplitude and ringing duration are extracted and recorded from the reflected signal, wherein the maximum value of the voltage amplitude in the reflected signal exceeding the stable level is taken as the overshoot amplitude, and the duration required for the reflected signal to oscillate to the stable level is taken as the ringing duration.

6. The dynamic terminal resistance adaptive adjustment method according to claim 1, characterized in that, The waveform characteristic parameters also include rise time and fall amplitude.

7. The dynamic terminal resistance adaptive adjustment method according to claim 1, characterized in that, The determination of whether the current node is a physical end of the bus includes: Control the transceiver of the current node to send a probe signal to the bus; Collect the characteristics of the reflected signal generated on the bus by the probe signal; If the reflected signal characteristics meet the preset end determination conditions, then the current node is determined to be an end node; otherwise, it is determined to be a non-end node.

8. A dynamic terminal resistance adaptive adjustment device, characterized in that, include: The judgment module is used to determine whether the current node is a physical end of the bus; The disconnect matching module is used to disconnect the terminal match if the current node is not the physical end of the bus. An injection module is used to inject a calibration pulse with a preset rising edge into the bus if the current node is the physical end of the bus. The acquisition and recording module is used to acquire the reflected signal generated by the calibration pulse on the bus and record waveform characteristic parameters including at least the overshoot amplitude and the ringing duration. The adjustment module is used to iteratively adjust the terminal resistance value according to the waveform characteristic parameters using a variable step size strategy until the preset matching completion condition is met; wherein, when the overshoot amplitude exceeds the preset amplitude threshold, the resistance value is increased, and when the ringing duration exceeds the preset time threshold, the resistance value is decreased. The locking module is used to lock the terminal resistor configuration to the matching resistor value in the current communication mode when the matching completion condition is met.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the dynamic terminal resistor adaptive adjustment method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the dynamic terminal resistor adaptive adjustment method as described in any one of claims 1 to 7.