A method and system for self-evaluation of RS485 signal quality

By installing a signal quality analysis host computer and data acquisition unit on the RS485 bus, signal quality can be evaluated in real time, solving the problem of difficult signal problem localization in the existing technology and realizing fast and convenient signal quality assessment and maintenance.

CN117312786BActive Publication Date: 2026-01-06AIO CHUANGXIANG INTELLIGENT TECH (WUHAN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311111651.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2026-01-06
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

In RS485 bus communication, existing technologies make it difficult to quickly locate signal quality problems, resulting in devices being unable to communicate normally, and signal measurement equipment is inconvenient to use.

Method used

A host computer for signal quality analysis and a signal quality acquisition device are mounted at the front end, end, and/or middle of the RS485 bus. The signal quality is evaluated from multiple dimensions. The signal quality is calculated in real time using formulas for signal-to-noise ratio, signal variation, and signal voltage drop factors, and the signal quality is monitored and a signal graph is plotted to quickly locate the cause of anomalies.

Benefits of technology

Signal quality problems can be quickly identified without the need for signal measurement equipment, and devices causing signal quality deterioration can be quickly located, enabling predictive maintenance and improving communication reliability and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312786B_ABST
    Figure CN117312786B_ABST
Patent Text Reader

Abstract

The application discloses a kind of RS485 signal quality self-evaluation method and system, method includes S1, signal quality analysis host computer and signal quality collector equipment are mounted in the front end, end or middle of RS485 bus;S2, signal quality analysis host computer and signal quality collector equipment communication, and obtain signal quality related parameters;S3, signal quality analysis host computer carries out multidimensional algorithm processing according to the data of signal quality collector equipment, and gives real-time data signal evaluation result.System includes signal quality acquisition module and signal quality analysis module.The present application does not need signal measurement equipment to quickly find the reason that cannot communicate in RS485 bus type network topology communication due to RS485 signal quality;Quickly find out the equipment that causes RS485 signal quality to be poor;Quickly judge the reason of RS485 signal quality difference;And in the process of equipment operation, implement monitoring signal quality, it is advantageous for maintenance personnel to do predictive operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communications, and specifically to an RS485 signal quality self-assessment method and system. Background Technology

[0002] RS485 is a serial communication standard that defines the physical layer and electrical characteristics of data communication. The RS485 interface can be used for point-to-point or multi-point communication between multiple devices. It uses differential signal transmission, where binary data is represented by positive and negative voltage changes on two data lines. The RS485 interface is widely used in industrial control systems, automation equipment, building automation, and other fields to achieve reliable data communication between multiple devices. Based on the RS485 interface, different protocols (such as Modbus RTU, PROFIBUS, etc.) can be used to achieve higher-level data transmission and protocol processing. RS485 is a commonly used interface in embedded systems, and a bus network topology is generally used when connecting various devices.

[0003] Bus topology is a common computer network layout where all computer nodes are connected through a single, shared transmission medium. In a bus network, all computer nodes share the same transmission line, which is usually called the bus.

[0004] The bus network topology perfectly matches the characteristics and application scenarios of the RS485 interface. The RS485 interface allows multiple devices to be connected via the same transmission line (usually twisted pair) to form a bus. This bus can have one or more master devices and multiple slave devices.

[0005] In an RS485 bus, all devices share the same transmission medium, namely the twisted-pair cable connecting them. The master device can send commands or data via the data lines on the bus, and the slave devices can receive and respond to these commands or data through the same bus. This method enables bidirectional communication and collaborative work between multiple devices.

[0006] However, although RS485 bus is a commonly used communication interface standard widely applied in industrial automation and data acquisition, and has high reliability and anti-interference capabilities, signal problems still exist in the market. These are mainly related to the following factors: 1. Improper installation and wiring: Ignoring RS485 bus specifications during installation and wiring, such as improper cable laying or messy signal lines, can lead to signal problems. 2. Equipment quality issues: Poor quality equipment, such as faulty interface chips, drivers, or terminal devices, can also cause signal problems. 3. External interference: In special environments, such as locations with high electromagnetic interference or near strong current lines, interference may be introduced, affecting the signal quality of the RS485 bus. 4. Incorrect communication rate settings: Mismatched communication rate settings between communication devices can cause data transmission errors or loss. 5. Inappropriate network topology: An unreasonable network topology design, such as excessively long bus lengths, too many branches, or improper terminal placement, can also increase the likelihood of signal problems.

[0007] All of the above situations can cause some devices on the RS485 bus to fail to communicate properly. The conventional approach is to identify which device is unable to communicate when some devices fail, measure the signal quality using a signal measuring device, confirm the cause of the communication failure, and then make improvements to resolve the issue.

[0008] For example, checking the terminating resistors on an RS485 bus typically involves the following steps: 1. Confirm the terminating resistor locations: First, determine the start and end points of the RS485 bus. Terminating resistors are usually installed at both ends of the RS485 bus. 2. Disconnect the power: Before checking the terminating resistors, always disconnect the power supply to the RS485 bus to ensure safe operation. 3. Check the terminating resistor values: Use a multimeter or resistance measuring instrument, set to a measurement range suitable for the terminating resistors (usually the ohms range). Then, measure the resistance value of each terminating resistor in turn. 4. Compare with standard values: Confirm the standard values ​​of the terminating resistors according to the RS485 bus specification or information provided by the equipment manufacturer. Typically, the standard value for the RS485 bus terminating resistor is 120 ohms, but the specific value may vary depending on the system. 5. Check resistor matching: Compare the measured terminating resistor values ​​with the standard values. If the measured resistance value differs significantly from the standard value (e.g., more than 20%), it may indicate a problem requiring further inspection and repair.

[0009] Checking terminating resistors, like the ones described above, is time-consuming and laborious in finding the faulty device and measuring signal quality, and it's also very inconvenient to move the measuring equipment around. Summary of the Invention

[0010] This invention provides a method and system for self-evaluation of RS485 signal quality. By performing real-time, multi-dimensional evaluation of RS485 signal quality and obtaining a real-time signal quality graph, problems in RS485 communication can be quickly located.

[0011] To achieve the above objectives, the present invention employs the following technical solution:

[0012] An RS485 signal quality self-assessment method includes the following steps:

[0013] S1. Connect the signal quality analysis host computer and the signal quality acquisition device to the front end and / or the end and / or the middle of the RS485 bus;

[0014] S2. The host computer for signal quality analysis communicates with the signal quality acquisition device and obtains relevant signal quality parameters through the signal quality acquisition device.

[0015] S3. Signal Quality Analysis: The host computer evaluates the signal quality in real time according to the formula Y=FunA(X)*FunB(X)*FunC(X), where Y is the signal quality, X is the original signal, FunA(X) is the signal-to-noise ratio factor, FunB(X) is the signal variation factor, and FunC(X) is the signal voltage drop factor.

[0016] As a preferred embodiment of the above scheme, signal quality-related parameters include voltage value, signal amplitude, signal rise time / fall time, and delay.

[0017] As a preferred option of the above scheme, the signal-to-noise ratio factor FunA(X) is calculated according to the following formula (1):

[0018]

[0019] In the formula, SNR represents the signal-to-noise ratio; a represents the reasonable value of the signal-to-noise ratio, which is a constant and ranges from 20 to 30; signal amplitude represents the amplitude of the RS485 signal, that is, the voltage difference between the highest and lowest levels of the signal; noise amplitude represents the noise amplitude in the RS485 signal, that is, the voltage range of the unrelated parts of the signal.

[0020] As a preferred embodiment of the above scheme, the signal variation factor FunB(X) is calculated according to the following formula (2) or (3):

[0021]

[0022]

[0023] In the formula, b represents the ideal time, which can be taken as 5us; c represents the tolerance limit time, which can be taken as 20us.

[0024] As a preferred option of the above scheme, the signal voltage drop factor FunC(X) is calculated according to the following formula (4):

[0025]

[0026] In the formula, d represents the tolerance limit differential signal, which can be taken as 200mV; e represents the ideal signal, which can be taken as 2000mV.

[0027] As a preferred embodiment of the above solution, the following steps are also included:

[0028] S4. Signal Quality Analysis: The host computer plots the A and B signals of RS485 based on the real-time voltage values.

[0029] S5. Real-time monitoring of the impact on the RS485 bus when plugging and unplugging RS485 terminal devices;

[0030] S6. In the event of an anomaly, if the time of occurrence is known, the cause of the anomaly can be determined by analyzing the quality parameters based on the time of occurrence; if the time of occurrence is unknown, the cause of the anomaly can be determined by analyzing the changes in the quality parameters.

[0031] An RS485 signal quality self-evaluation system includes an RS485 host computer and several RS485 terminals connected together via an RS485 bus; it also includes a signal quality acquisition module and a signal quality analysis module, mounted at the front end and / or the end and / or the middle of the RS485 bus; the signal quality acquisition module is used to introduce the RS485 signal into an embedded ADC interface, sample the RS485 signal in real time through the ADC interface, process and record the sampled data in real time, and send the data to the signal quality analysis module after encapsulating it into a specific format; the signal quality analysis module is used to perform multi-dimensional algorithm processing based on the data from the signal quality acquisition module and provide real-time data signal evaluation results.

[0032] As a preferred embodiment of the above scheme, the signal quality acquisition module adopts a signal quality acquisition terminal, and the signal quality analysis module adopts a signal quality analysis host computer, and the two are connected through UART.

[0033] As a preferred embodiment of the above scheme, the signal quality acquisition terminal integrates an RS485 transceiver circuit, a microcontroller, and RS485 communication port AB signal lines. The RS485 communication port AB signal lines can reduce the voltage to a range that the microcontroller can sample through voltage division and connect to the microcontroller's IO port. The microcontroller determines the occurrence edge of the signal high-low transition through the RS485 transceiver circuit, determines the ADC conversion period and data stabilization period of the signal edge, and acquires data of signal quality-related parameters through the embedded ADC interface.

[0034] As a preferred embodiment of the above scheme, the signal quality acquisition module is integrated within the signal quality analysis module.

[0035] Due to the above structure, the beneficial effects of the present invention are as follows:

[0036] This application can quickly locate the cause of communication failure due to RS485 signal quality in RS485 bus network topology communication without the need for signal measurement equipment; quickly find the device causing the RS485 signal quality to deteriorate; quickly determine the cause of the poor RS485 signal quality; and monitor the signal quality during equipment operation, which is beneficial for maintenance personnel to perform predictive operations. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0038] Figure 1 This is a flowchart of the process of the present invention;

[0039] Figure 2 This is the signal ripple diagram of the present invention;

[0040] Figure 3 This is a flowchart of the signal-to-noise ratio factor calculation for the present invention;

[0041] Figure 4 This is a waveform diagram of the rising and falling edges of the present invention;

[0042] Figure 5 This is a flowchart illustrating the calculation of signal change factors in this invention.

[0043] Figure 6 This is a system structure diagram of the front-end data acquisition process of this invention;

[0044] Figure 7 This is a system structure diagram of the terminal acquisition process of this invention;

[0045] Figure 8 This is a diagram showing the connection between the signal quality acquisition terminal and the signal quality analysis host computer of this invention.

[0046] Figure 9 This is a hardware structure diagram of the quality acquisition terminal of this invention. Detailed Implementation

[0047] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0048] like Figure 1 As shown, this embodiment provides a self-evaluation method for RS485 signal quality, including the following steps:

[0049] S1. Connect the signal quality analysis host computer and the signal quality acquisition device to the front end and / or the end and / or the middle of the RS485 bus; wherein, the front end acquisition is suitable for analyzing the data transmission capability of the RS485 terminal (node); the end end acquisition is suitable for analyzing the data reception capability of the RS485 terminal (node).

[0050] S2. The host computer for signal quality analysis communicates with the signal quality acquisition device and obtains relevant signal quality parameters through the signal quality acquisition device. These parameters include voltage value, signal amplitude, signal rise time / fall time (signal change), delay, etc.

[0051] S3. The host computer performs multi-dimensional algorithm processing on the data from the signal quality acquisition terminal to provide real-time data signal evaluation results. Specifically, since the signal-to-noise ratio (SNR), signal variation, and signal voltage drop all have a decisive impact on signal transmission, this scheme uses the formula Y = FunA(X) * FunB(X) * FunC(X) to evaluate the signal quality in real time. Here, Y is the signal quality; X is the original signal; FunA(X) is the SNR, with a range of 0-100%; FunB(X) is the signal variation, with a range of 0-100%; and FunC(X) is the signal voltage drop, with a range of 0-100%. According to the above formula, the final signal quality will be 100% when all three dimensions are at 100%. If any one dimension is low, the overall signal quality will be low.

[0052] In this embodiment, the signal-to-noise ratio factor FunA(X) is calculated according to the following formula (1):

[0053]

[0054] In the formula, SNR represents the signal-to-noise ratio (SNR) in RS485 communication. The SNR is the ratio between the signal strength and the noise strength, usually expressed in decibels (dB). (Taking AB signal 6V as a reference standard, if the noise amplitude is 0.6V, the SNR is 20dB); 'a' represents the reasonable value of the SNR, which is a constant, ranging from 20 to 30, and can be taken as 25. 25 is a non-typical value and can be adjusted according to the actual application; signal amplitude represents the amplitude of the RS485 signal, that is, the peak-to-peak value of the signal (the voltage difference between the highest and lowest levels); noise amplitude represents the noise amplitude in the RS485 signal, that is, the voltage range of the uncorrelated part of the signal.

[0055] Signal ripple diagram as follows Figure 2 As shown, the flowchart for calculating the signal-to-noise ratio factor is as follows: Figure 3 As shown.

[0056] In RS485 communication, a suitable signal-to-noise ratio (SNR) depends on various factors, including the communication environment, transmission distance, and communication rate. Generally, a higher SNR helps reduce noise interference and improve communication reliability. However, the specific suitable SNR can vary depending on the application. Typically, the SNR for RS485 communication should be kept positive to ensure the signal is significantly higher than the noise level, thereby reducing bit error rate and communication errors. Generally, an SNR between 20dB and 30dB is reasonable, but some special applications may require a higher SNR.

[0057] In this embodiment, the signal variation factor FunB(X) is calculated according to the following formula (2) or (3):

[0058]

[0059]

[0060] In the formula, b represents the ideal time, which can be taken as 5us; c represents the tolerance limit time, which can be taken as 20us.

[0061] To avoid signal interference, the signal variation factor FunB(X) can be taken as the time required for the signal to rise from 20% to 80%, or conversely, the time required for it to fall from 80% to 20%. The longer the time, the worse the signal quality. Ideally, both rise and fall times should be zero. Figure 4 As shown, with an RS485 transmission rate of 9600bps, 1ms is approximately 10 bits. Based on real-world scenarios, we define 5µs as the ideal time and 20µs as the tolerance limit. The values ​​of 5 and 20µs are atypical and can be adjusted according to actual conditions. The flowchart for calculating signal variation factors is shown below. Figure 5 As shown.

[0062] In this embodiment, the signal voltage drop factor FunC(X) is calculated according to the following formula (4):

[0063]

[0064] In the formula, d represents the tolerance limit differential signal, which can be taken as 200mV; e represents the ideal signal, which can be taken as 2000mV.

[0065] During the transmission of a signal on an RS485 bus, signal attenuation due to line loss and load requirements is normal. The amplitude of the RS485 signal affects the communication quality. Signal amplitude refers to the voltage difference between a low and high level, also known as peak-to-peak value. The magnitude of the signal amplitude has a significant impact on communication quality and system performance because it directly relates to the signal's anti-interference capability, transmission distance, and noise tolerance. Here are some aspects of how signal amplitude affects communication quality: (1) Anti-interference capability: A larger signal amplitude can improve the anti-interference capability of the signal. The larger the signal amplitude, the higher the noise tolerance of the signal, and the better it can resist the influence of external electromagnetic interference and other noise sources. (2) Transmission distance: A larger signal amplitude can usually achieve a longer transmission distance. The signal will gradually attenuate during transmission, and a larger amplitude can maintain sufficient signal strength over a longer distance, thereby extending the communication distance. (3) Noise tolerance: An increase in signal amplitude can reduce the impact of noise on the signal. During signal transmission, noise may be superimposed on the signal. If the signal amplitude is small, noise may more easily cause signal distortion. (4) Signal Loss: A larger signal amplitude can offset the transmission loss of the signal in the transmission line, thus maintaining a high signal strength. The RS485 standard requires a minimum voltage difference of 200mV for differential signals. This means that the differential voltage between signal lines A and B should be at least 200mV to ensure reliable signal transmission. We take 200mV as the tolerance limit for differential signals, 2000mV as the ideal signal, and 200 and 2000 as non-typical values, which can be adjusted according to the actual situation.

[0066] In this embodiment, the system also includes the following steps, meaning it can also perform the following functions:

[0067] S4. Signal Quality Analysis: The host computer plots the A and B signals of RS485 based on the real-time voltage values.

[0068] S5. Real-time monitoring of the impact on the RS485 bus when plugging and unplugging RS485 terminal devices;

[0069] S6. In the event of an anomaly, if the time of occurrence is known, the cause of the anomaly can be determined by analyzing the quality parameters based on the time of occurrence; if the time of occurrence is unknown, the cause of the anomaly can be determined by analyzing the changes in the quality parameters.

[0070] like Figure 6 , Figure 7 As shown, this embodiment also provides an RS485 signal quality self-evaluation system, including an RS485 host computer and several RS485 terminals connected together via an RS485 bus; it also includes a signal quality acquisition module and a signal quality analysis module, mounted at the front end and / or end and / or middle of the RS485 bus. The signal quality acquisition module can also be integrated inside the signal quality analysis module. The signal quality acquisition module is used to introduce the RS485 signal into an embedded ADC interface, sample the RS485 signal in real time through the ADC interface, process and record the sampled data in real time, and send the data to the signal quality analysis module after encapsulating it into a specific format; the signal quality analysis module is used to perform multi-dimensional algorithm processing based on the data from the signal quality acquisition module and provide real-time data signal evaluation results.

[0071] Differences between front-end and back-end data collection:

[0072] With front-end acquisition, the signal quality acquisition terminal is integrated with the RS485 host computer, enabling effective quality assessment of data transmitted from the RS485 node to confirm whether the data can reach the RS485 host computer reliably. With back-end acquisition, the signal quality acquisition terminal is placed at the very end of the bus, enabling effective quality assessment of data transmitted from the RS485 host computer to confirm whether the data can reach the RS485 node reliably. If the signal quality acquisition terminal is integrated into the RS485 host computer, the host computer can perform signal quality assessment in a low-cost manner.

[0073] In this embodiment, as Figure 8 As shown, the signal quality acquisition module uses a signal quality acquisition terminal, and the signal quality analysis module uses a signal quality analysis host computer. The two are connected via UART.

[0074] In this embodiment, as Figure 9As shown, the signal quality acquisition terminal integrates an RS485 transceiver circuit, a microcontroller, and RS485 communication port AB signal lines. The RS485 communication port AB signal lines can reduce the voltage to a range that the microcontroller can sample through voltage division and connect to the microcontroller's IO port. The microcontroller determines the occurrence edge of the signal high-low transition through the RS485 transceiver circuit, determines the ADC conversion period and data stabilization period of the signal edge, and acquires data of signal quality-related parameters through the embedded ADC interface.

[0075] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for RS485 signal quality self-evaluation, characterized in that: The method comprises the following steps: S1, mounting the signal quality analysis host computer and the signal quality collector device at the front end and / or the end and / or the middle of the RS485 bus; S2, the signal quality analysis host computer communicates with the signal quality collector device and acquires the signal quality related parameters through the signal quality collector device; S3, the signal quality analysis host computer evaluates the signal quality in real time according to the formula Y=FunA(X)* FunB(X)* FunC(X), wherein Y is the signal quality, X is the original signal, FunA(X) is the signal-to-noise ratio factor, FunB(X) is the signal change factor, and FunC(X) is the signal pressure drop factor; The signal-to-noise ratio factor FunA(X) is calculated according to the following formula (1): , In the formula, SNR represents the signal-to-noise ratio; a represents a reasonable signal-to-noise ratio value, which is a constant and ranges from 20 to 30; the signal amplitude represents the amplitude of the RS485 signal, that is, the voltage difference between the highest level and the lowest level of the signal; and the noise amplitude represents the noise amplitude in the RS485 signal, that is, the voltage range of the irrelevant part in the signal; The signal change factor FunB(X) is calculated according to the following formula (2) or (3): , In the formula, b represents an ideal time, which is 5us; and c represents a tolerance limit time, which is 20us; The signal pressure drop factor FunC(X) is calculated according to the following formula (4): , In the formula, d represents a tolerance limit difference signal, which is 200mV; and e represents an ideal signal, which is 2000mV.

2. The method for RS485 signal quality self-evaluation according to claim 1, characterized in that: The signal quality related parameters include voltage value, signal amplitude, signal rise time / fall time, and delay.

3. The method of claim 1, wherein: The method further comprises the following steps: S4, the signal quality analysis host computer draws the A and B signals of the RS485 through the real-time voltage value; S5, real-time monitoring of the influence on the RS485 bus when the RS485 terminal device is plugged in or out; S6, in the case of abnormal conditions, determining the abnormal reason according to the quality parameter analysis of the occurrence time, or determining the abnormal reason according to the quality parameter change when the occurrence time is unknown.

4. A system for self-evaluation of RS485 signal quality, characterized by: The system comprises an RS485 host computer and a plurality of RS485 terminals connected together through an RS485 bus; further comprising a signal quality collection module and a signal quality analysis module mounted at the front end and / or the end and / or the middle of the RS485 bus; the signal quality collection module is used for introducing the RS485 signal into an embedded ADC interface, performing real-time sampling on the RS485 signal through the ADC interface, simultaneously performing real-time processing and recording the sampling data, and sending the data to the signal quality analysis module in a specific format; and the signal quality analysis module is used for performing multi-dimensional algorithm processing according to the data of the signal quality collection module and giving a real-time data signal evaluation result.

5. The RS485 signal quality self-evaluation system according to claim 4, characterized in that: The signal quality collection module adopts a signal quality collector terminal, and the signal quality analysis module adopts a signal quality analysis host computer, which are connected through UART.

6. The RS485 signal quality self-evaluation system according to claim 5, characterized in that: The signal quality collector terminal is integrated with a RS485 transceiving circuit, a single-chip microcomputer and RS485 communication port AB signal lines, the RS485 communication port AB signal lines can be reduced to the voltage range that can be sampled by the single-chip microcomputer through voltage division and connected to the IO port of the single-chip microcomputer, the single-chip microcomputer determines the occurrence edge of signal high-low jump through the RS485 transceiving circuit, determines the ADC conversion period and data stable period of the signal edge, and carries out data collection of signal quality related parameters through the embedded ADC interface.

7. The RS485 signal quality self-evaluation system according to claim 4, characterized in that: The signal quality collection module is integrated inside the signal quality analysis module.

Citation Information

Patent Citations

  • Power quality assessment system and method of household solar photovoltaic power generation

    CN103837764A

  • Bus signal monitoring device and method

    CN103856364A