WO2016101084A1 - System and method for detecting and correcting transmission errors in industrial communications networks using the modbus rtu protocol - Google Patents

System and method for detecting and correcting transmission errors in industrial communications networks using the modbus rtu protocol Download PDF

Info

Publication number
WO2016101084A1
WO2016101084A1 PCT/CL2015/050055 CL2015050055W WO2016101084A1 WO 2016101084 A1 WO2016101084 A1 WO 2016101084A1 CL 2015050055 W CL2015050055 W CL 2015050055W WO 2016101084 A1 WO2016101084 A1 WO 2016101084A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
modbus
errors
communications network
symbols
Prior art date
Application number
PCT/CL2015/050055
Other languages
Spanish (es)
French (fr)
Inventor
Claudio Urrea Oñate
Claudio MORALES DÍAZ
Original Assignee
Universidad De Santiago De Chile
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Universidad De Santiago De Chile filed Critical Universidad De Santiago De Chile
Publication of WO2016101084A1 publication Critical patent/WO2016101084A1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/13Linear codes
    • H03M13/15Cyclic codes, i.e. cyclic shifts of codewords produce other codewords, e.g. codes defined by a generator polynomial, Bose-Chaudhuri-Hocquenghem [BCH] codes

Definitions

  • the present invention corresponds to a method and system for the detection and correction of errors in communications using the MODBUS-RTU protocol, by applying Reed-Solomon coding to the frame, while maintaining the compatibility of the MODBUS-RTU protocol.
  • the present invention corresponds to a method and system that has the ability to detect and correct transmission errors in industrial communications networks using the MODBUS-RTU communications protocol.
  • the design and implementation of a transmission error detection and correction system using Reed-Solomon coding is specified, which allows improving the quality of the transmission, while maintaining compatibility with the protocol and, by Therefore, with the entire plant preinstalled.
  • fault tolerance is of great relevance in those processes that require ensuring continuous operation and preventing eventual failures from ending up in damage to the process and / or human or material losses.
  • fault tolerance involves equipment redundancy and the use of protocols and transmission methods that ensure the integrity of the data transmitted to random transmission errors, which are usually introduced by the intense existing electromagnetic interference in industrial environments.
  • MODBUS-RTU protocol is one of the most used industrial communications protocols worldwide, both in process control applications, as well as in energy management and building automation systems [1], [2], [3] . Since its creation in 1979, MODBUS has gained wide acceptance among the manufacturers of automation and control equipment, thanks to its simplicity and ease of implementation. Currently, about 40% of all industrial equipment uses MODBUS in some of its variants, mainly MODBUS-RTU (MODBUS Remote Terminal Unit) and MODBUS-TCP (MODBUS Transmission Control Protocol) [4], [5].
  • MODBUS has developed as a Open standard protocol, supported by the MODBUS-IDA group, whose specifications are available for public access at www.modbus.org. Being an old protocol, MODBUS has limitations in relation to the current needs of automation and control systems, such as a low transmission rate, limited number of devices that can be included in the network and the lack of mechanisms to authenticate messages and to correct corrupt messages due to transmission errors.
  • MODBUS-RTU protocol lacks efficient mechanisms for detection and correction of transmission errors and, therefore, is usually not used in systems that require fault tolerance.
  • MODBUS-RTU establishes in each message a 16-bit cyclic redundancy code field, giving the possibility of detecting transmission errors but not correcting them.
  • the receiver of a MODBUS-RTU frame detects an error, it simply discards the message without issuing any type of notification to the sender [5]. This implies that if a message fails in the transmission, there will inevitably be loss of information in case there are no retransmission routines. But even if it were possible to recover lost data through retransmission, this implies greater use of the communications channel and delays in reading the other devices on the network, which negatively affects the performance of the entire system.
  • the solution of the present invention uses Reed-Solomon codes in a manner suitable to maintain compatibility with the MODBUS-RTU protocol. In this way it is possible to extend the functionalities of the MODBUS-RTU protocol by introducing the ability to detect and correct transmission errors. Since the method of error detection and correction of the invention conforms to the specifications of the protocol, it can be implemented by means of devices that can only be used in those segments that require it, keeping the communications link unchanged with the other devices in the network, resulting in an economical and easy implementation solution, since it positively impacts the transmission quality and, thus, the efficiency and productivity of the facilities, without the need for modifications on plant installation or replacement of equipment currently in operation.
  • a system and method for error detection and correction is described that uses the traditional Reed-Solomon coding / decoding algorithms, separates the message symbols from the parity symbols and sends them to the communication channel by adjusting them to the defined time windows in the MODBUS-RTU protocol, thus allowing the information of the MODBUS-RTU frames to be transmitted plus the parity symbols, maintaining compatibility with the protocol.
  • FIG. 1 Reed-Solomon encoded message structure.
  • Fig. 2 Time diagram for the traditional Reed-Solomon coding and decoding process.
  • Fig. 4. Diagram of permissible times between MODBUS-RTU frames.
  • Fig. 6. Processing time in master-slave transactions.
  • FIG. 9A Plant diagram using MODBUS protocol without the solution of the present invention.
  • FIG. 9B Plant diagram using MODBUS protocol with the solution of the invention.
  • Fig. 10 MODBUS-RTU Transaction Diagram between master and slave through repeaters / error correctors.
  • Fig. 1 MODBUS-RTU transactions between master with repeater / corrector and slave connected directly to the communications bus.
  • Reed-Solomon codes are a subclass of the RC Bose, A. Hocquenghem and DK Ray-Chaudhuri (BHC) block codes corresponding to a generalization of Hamming codes in multi-error correction codes. These BHC codes, non-binary, systematic, cyclic and linear, are widely used in various applications of data storage and transmission, given its effectiveness in correcting random errors and burst errors.
  • Reed-Solomon coding can be done by multiple methods, however, the basic coding principle is the same in each case: first, transfer the k information symbols from the original message and then add the nk verification symbols of parity [13] (see Fig. 1).
  • the traditional way to use Reed-Solomon codes requires the use of encoders and decoders to form an encoded message from the original message and subsequently retrieve the original message from the encoded message.
  • the encoded message cannot be read directly by the receiving equipment, as it has a different frame structure from the original message. So that the encoded message can be read by the receiver is required in all cases of the decoding process. Due to this feature, the traditional Reed-Solomon encoding and decoding process cannot be used directly in MODBUS-RTU communications, since it modifies the data frame that is sent to the communications bus and, therefore, contravenes the specifications of the protocol of communications
  • RTU is transmitted serially.
  • the messages are transmitted as a continuous frame of characters in which it is possible to clearly detect the beginning and end of each message. This is achieved with the definition of time limits between characters and between frames.
  • Fig. 4 shows how the message frames are separated by time intervals of at least 3.5 times the duration of a character, which is designated as .3,5- On the other hand, if a longer time interval occurs At 1, 5 times the duration of a character (t-1, 5), the message frame will be considered incomplete and will be discarded by the receiver without issuing any notification response.
  • the receiver detects the end of the message, it performs a cyclic redundancy verification process to verify the integrity of received data. Yes there are no errors the message is processed, otherwise it is discarded without issuing any type of notification to the sender.
  • this way of carrying out transactions generates time windows after each message, which in the process of the present invention are used to add Reed-Solomon parity symbols for purposes of error detection and correction. .
  • the polling rate corresponds to a configuration parameter that determines the frequency at which the master sends requirements to a slave and its value is adjusted according to the number of devices connected to the communication bus; typically to get the master team to make 16 requirements per second to the different slaves.
  • polling rates are large enough to place parity symbols on the bus. The same does not occur between the term of a teacher's requirement and the slave's response.
  • the time window is much narrower, since it corresponds only to the time it takes for the slave to process the message from the master and form the response frame. This time is determined by:
  • the first two variables are defined by the transmission format configuration and are related to the moment in which the slave detects the end of the request message, which corresponds to a time equal to 3.5 characters (t 35 ). For a given transmission rate and frame format, these variables determine a minimum processing time for each requirement. For example, for a transmission rate of 19,200 bps, with 8N1 frame format (8 data bits, no parity and one stop bit, 10 bits in total), each character takes a time equal to being transmitted with which the detection of
  • the execution time (t e ) depends on the speed of data processing on the slave equipment, the priority of the requirement with respect to other tasks performed by the slave and the complexity of execution of the requirement itself. This time is usually very variable and depends entirely on the characteristics of the equipment. As shown in Figure 6, the total processing time (t p ) is made up of the end of message detection time (t 3.5 ) and the execution time (t e ), where this being the time window (t p ) available to add parity symbols.
  • the maximum number of parity symbols N that can be added for the 8N1 transmission format (8 data bits, one stop bit and no parity) will depend on the amplitude of the runtime window (t e , in seconds) , the Transmission Rate (Baud Rate (BR), in baud), according to the following relationship:
  • N Reed-Solomon parity symbols it is possible to detect and correct transmission errors in up to N / 2 symbols of the original message, whether these occur as errors in isolated bits or as burst errors.
  • This method allows the MODBUS-RTU protocol to be equipped with the ability to detect and correct transmission errors, while maintaining compatibility with the protocol specifications.
  • the error detection and correction process uses parity symbols generated by the traditional Reed-Solomon encoding / decoding algorithms, but conveniently adjusted to the time windows defined in the MODBUS-RTU protocol specifications to maintain compatibility with pre-installed equipment, according to the process described below.
  • the encoder takes the original message and relays it without changes to the communications channel. When the end of the message is detected, it calculates the Reed-Solomon parity symbols and sends them to the communications channel after a time equivalent to 3.5 characters from the end of the original message, in order to maintain compatibility with the MODBUS-RTU protocol . Once the transmission is finished, the encoder deletes the previous message and waits for a new message.
  • Fig. 7 graphically describes the stages of the coding process. Decoding Process
  • Fig. 8 graphically describes the stages of the decoding process.
  • the communications system that uses the MODBUS protocol is physically constituted by a Master device and one or several Slave devices, in which the communication link can be affected by electromagnetic interference that introduce errors in the communication, generating problems in the system operation (Fig. 9A).
  • the error detection and correction process in MODBUS-RTU communications of the present invention is implemented by using a Reed-Solomon encoder / decoder device that functions as a MODBUS-RTU repeater with the ability to detect and correct transmission errors.
  • this device will be called Repeater / Error Corrector.
  • Figure 9B shows a preferred application according to the present invention in which a MODBUS-RTU network is comprised of a master device and several slave devices, where communications between master and slave n pass through a segment prone to errors by electromagnetic interference, while communications between the master and the remaining slaves are carried out without problems.
  • a MODBUS-RTU error repeater / corrector is inserted on the master side and another on the slave side n.
  • the error repeaters / correctors allow the corrupted frames to be recomposed by transmission errors between master and slave n, maintaining the communication link between master and the other slaves connected directly to the bus.
  • the error repeater / corrector device In transmission, the error repeater / corrector device encodes the MODBUS-RTU frame from the side of the transmitter device and places it on the communication bus.
  • the code word Reed-Solomon that is transmitted to the bus consists of the repetition of the original message, followed by the necessary parity characters for error detection and correction.
  • the error repeater / corrector takes the information and parity data from the communications bus, decodes the Reed-Solomon code word to detect if transmission errors have occurred and, if possible, recomposes the message before transmitting it to the destination device (slave).
  • Figure 10 illustrates, in time, the error detection and correction process for MODBUS-RTU transactions between master and slave, by means of the use of error repeaters / correctors.
  • the parity characters that follow a requirement sent by the master are transmitted after a time equal to 3.5 characters from the last bit of the data frame.
  • transmitted information (t 3 5 ) which is the time after which the MODBUS-RTU slaves detect the end of the message.
  • the response frames from a slave connected directly to the bus will be received by the error detector / corrector on the side of the master, which will detect a message without parity that cannot be analyzed for the purpose of detection and correction of errors, so it will simply be relayed to the teacher.
  • Figure 1 1 illustrates this process.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Error Detection And Correction (AREA)

Abstract

The invention relates to a system and method for the detection and correction of errors, using the traditional Reed-Solomon encoding/decoding algorithms. The system separates the message symbols from the parity symbols and sends them to the communications channel, adjusting them to the time windows defined in the Modbus RTU protocol, thereby allowing the transmission of the information from the Modbus RTU frames along with the parity symbols, maintaining compatibility with said protocol.

Description

SISTEMA Y METODO PARA DETECTAR Y CORREGIR ERRORES DE SYSTEM AND METHOD TO DETECT AND CORRECT ERRORS OF
TRANSMISIÓN EN REDES DE COMUNICACIONES INDUSTRIALES QUE EMPLEAN EL PROTOCOLO MODBUS-RTU TRANSMISSION IN INDUSTRIAL COMMUNICATIONS NETWORKS THAT USE THE MODBUS-RTU PROTOCOL
MEMORIA DESCRIPTIVA DESCRIPTIVE MEMORY
CAMPO DE APLICACIÓN. SCOPE.
La presente invención corresponde a un método y sistema para la detección y corrección de errores en comunicaciones que utilizan el protocolo MODBUS-RTU, mediante la aplicación de codificación Reed-Solomon a la trama, manteniendo la compatibilidad del protocolo MODBUS-RTU. The present invention corresponds to a method and system for the detection and correction of errors in communications using the MODBUS-RTU protocol, by applying Reed-Solomon coding to the frame, while maintaining the compatibility of the MODBUS-RTU protocol.
ANTECEDENTES. BACKGROUND.
La presente invención corresponde a un método y sistema que tiene la capacidad de detectar y corregir errores de transmisión en redes de comunicaciones industriales que emplean el protocolo de comunicaciones MODBUS-RTU. Para esto, se especifica el diseño e implementación de un sistema de detección y corrección de errores de transmisión utilizando codificación Reed-Solomon, el cual permite mejorar la calidad de la transmisión, a la vez que se mantiene la compatibilidad con el protocolo y, por tanto, con toda la planta preinstalada. The present invention corresponds to a method and system that has the ability to detect and correct transmission errors in industrial communications networks using the MODBUS-RTU communications protocol. For this, the design and implementation of a transmission error detection and correction system using Reed-Solomon coding is specified, which allows improving the quality of the transmission, while maintaining compatibility with the protocol and, by Therefore, with the entire plant preinstalled.
En la actualidad, existe un creciente número de empresas de los más diversos rubros que emplean redes de comunicaciones industriales como parte de sus sistemas automatizados. Sus aplicaciones han ido mucho más allá de la transmisión de información entre dispositivos y equipos que forman parte de los procesos productivos críticos de la empresa, permitiendo acceder a información en tiempo real en todos los niveles de la planta, conformando sistemas integrados de supervisión y gestión, sistemas de alertas y seguridad, control de stocks y otras variadas aplicaciones. La tolerancia a fallas es de gran relevancia en aquellos procesos que requieren asegurar el funcionamiento continuo y evitar que eventuales fallas terminen en daños al proceso y/o pérdidas humanas o materiales. En lo que refiere a los sistemas de comunicaciones industriales, la tolerancia a fallas involucra redundancia de equipos y el empleo de protocolos y métodos de transmisión que aseguren la integridad de los datos transmitidos ante errores de transmisión aleatorios, los cuales suelen ser introducidos por la intensa interferencia electromagnética existente en los ambientes industriales. Currently, there is a growing number of companies of the most diverse sectors that use industrial communications networks as part of their Automated systems. Its applications have gone far beyond the transmission of information between devices and equipment that are part of the critical production processes of the company, allowing access to real-time information at all levels of the plant, forming integrated monitoring and management systems , alert and security systems, stock control and other varied applications. Fault tolerance is of great relevance in those processes that require ensuring continuous operation and preventing eventual failures from ending up in damage to the process and / or human or material losses. With regard to industrial communications systems, fault tolerance involves equipment redundancy and the use of protocols and transmission methods that ensure the integrity of the data transmitted to random transmission errors, which are usually introduced by the intense existing electromagnetic interference in industrial environments.
El protocolo MODBUS-RTU es uno de los protocolos de comunicaciones industriales más utilizados a nivel mundial, tanto en aplicaciones de control de procesos, como también en sistemas de gestión de energía y automatización de edificios [1 ], [2], [3]. Desde su creación en 1979, MODBUS consiguió amplia aceptación entre los fabricantes de equipos de automatización y control, gracias a su simplicidad y facilidad de implementación. Actualmente, cerca del 40% de todo el equipamiento industrial utiliza MODBUS en algunas de sus variantes, principalmente MODBUS- RTU (MODBUS Remote Terminal Unit) y MODBUS-TCP (MODBUS Transmission Control Protocol) [4], [5]. Actualmente, MODBUS se ha desarrollado como un protocolo de estándar abierto, soportado por el grupo MODBUS-IDA, cuyas especificaciones se encuentran disponibles para acceso público en el sitio www.modbus.org. Por ser un protocolo antiguo, MODBUS tiene limitaciones en relación a las necesidades actuales de los sistemas de automatización y control, tales como una baja tasa de transmisión, limitado número de dispositivos que pueden incluirse en la red y la carencia de mecanismos para autenticar mensajes y para corregir mensajes corruptos por errores de transmisión. The MODBUS-RTU protocol is one of the most used industrial communications protocols worldwide, both in process control applications, as well as in energy management and building automation systems [1], [2], [3] . Since its creation in 1979, MODBUS has gained wide acceptance among the manufacturers of automation and control equipment, thanks to its simplicity and ease of implementation. Currently, about 40% of all industrial equipment uses MODBUS in some of its variants, mainly MODBUS-RTU (MODBUS Remote Terminal Unit) and MODBUS-TCP (MODBUS Transmission Control Protocol) [4], [5]. Currently, MODBUS has developed as a Open standard protocol, supported by the MODBUS-IDA group, whose specifications are available for public access at www.modbus.org. Being an old protocol, MODBUS has limitations in relation to the current needs of automation and control systems, such as a low transmission rate, limited number of devices that can be included in the network and the lack of mechanisms to authenticate messages and to correct corrupt messages due to transmission errors.
Considerando el extensivo uso del protocolo y la magnitud de la planta instalada con dispositivos MODBUS, no es fácil migrar a otros protocolos para salvar estas dificultades, lo cual ha motivado investigaciones recientes a fin de mejorar las características de MODBUS y adaptarlas a los requerimientos actuales. Estas investigaciones incluyen extender el número de equipos que pueden conectarse al bus de comunicaciones [6] y métodos de autenticación para protección de infraestructura crítica [7]. En cuanto a tolerancia a fallas en transmisión no existen publicaciones referidas a sistemas de aplicación industrial para detección y corrección de errores con el protocolo MODBUS-RTU. La única investigación relacionada que es parte del estado de la técnica es el trabajo de Zhang [8], que presenta un algoritmo para detección y corrección de errores en comunicaciones Ethernet con protocolo MODBUS-TCP, el cual es implementado en computadores personales. Considering the extensive use of the protocol and the magnitude of the plant installed with MODBUS devices, it is not easy to migrate to other protocols to overcome these difficulties, which has motivated recent research to improve the characteristics of MODBUS and adapt them to current requirements. These investigations include extending the number of equipment that can be connected to the communications bus [6] and authentication methods for critical infrastructure protection [7]. Regarding tolerance to transmission failures, there are no publications referring to industrial application systems for error detection and correction with the MODBUS-RTU protocol. The only related research that is part of the state of the art is the work of Zhang [8], which presents an algorithm for error detection and correction in Ethernet communications with MODBUS-TCP protocol, which is implemented in personal computers.
El protocolo MODBUS-RTU carece de mecanismos eficientes para detección y corrección de errores de transmisión y, por tanto, usualmente no es utilizado en sistemas que requieran tolerancia a fallas. Como único método de verificación de la integridad de datos definido en sus especificaciones, MODBUS-RTU establece en cada mensaje un campo de código de redundancia cíclica de 16 bits, dando la posibilidad de detectar errores de transmisión pero no corregirlos. De acuerdo a las especificaciones del estándar, una vez que el receptor de una trama MODBUS-RTU detecta un error, simplemente descarta el mensaje sin emitir ningún tipo de notificación al emisor [5]. Esto implica que si en un mensaje se produce un error en la transmisión, inevitablemente existirá pérdida de información en caso que no existan rutinas de retransmisión. Pero aun si fuera posible recuperar los datos perdidos mediante retransmisión, esto implica mayor uso del canal de comunicaciones y retrasos en la lectura de los otros dispositivos de la red, lo cual afecta negativamente el desempeño de todo el sistema. The MODBUS-RTU protocol lacks efficient mechanisms for detection and correction of transmission errors and, therefore, is usually not used in systems that require fault tolerance. As the only method of verifying data integrity defined in its specifications, MODBUS-RTU establishes in each message a 16-bit cyclic redundancy code field, giving the possibility of detecting transmission errors but not correcting them. According to the specifications of the standard, once the receiver of a MODBUS-RTU frame detects an error, it simply discards the message without issuing any type of notification to the sender [5]. This implies that if a message fails in the transmission, there will inevitably be loss of information in case there are no retransmission routines. But even if it were possible to recover lost data through retransmission, this implies greater use of the communications channel and delays in reading the other devices on the network, which negatively affects the performance of the entire system.
Frente a este problema el estado de la técnica no describe soluciones como la de la presente invención. Las soluciones existentes suelen ser soluciones ad-hoc y de alto costo, lo cual hace restrictivo su uso únicamente a la gran industria. Faced with this problem, the state of the art does not describe solutions such as that of the present invention. Existing solutions are usually ad-hoc and high-cost solutions, which makes their use restrictive only to large industry.
La solución de la presente invención utiliza códigos Reed-Solomon de una manera adecuada para mantener compatibilidad con el protocolo MODBUS-RTU. De esta forma es posible extender las funcionalidades del protocolo MODBUS-RTU introduciendo la capacidad de detectar y corregir errores de transmisión. Dado que el método de detección y corrección de errores de la invención se ajusta a las especificaciones del protocolo, puede ser implementado mediante dispositivos que pueden ser empleados únicamente en aquellos segmentos que lo requieran, manteniendo inalterado el enlace de comunicaciones con los restantes dispositivos de la red, resultando una solución económica y de fácil implementacion, puesto que impacta positivamente en la calidad de transmisión y, con ello, en la eficiencia y productividad de las instalaciones, sin necesidad de modificaciones sobre la instalación de planta ni reemplazo de los equipos actualmente en operación. The solution of the present invention uses Reed-Solomon codes in a manner suitable to maintain compatibility with the MODBUS-RTU protocol. In this way it is possible to extend the functionalities of the MODBUS-RTU protocol by introducing the ability to detect and correct transmission errors. Since the method of error detection and correction of the invention conforms to the specifications of the protocol, it can be implemented by means of devices that can only be used in those segments that require it, keeping the communications link unchanged with the other devices in the network, resulting in an economical and easy implementation solution, since it positively impacts the transmission quality and, thus, the efficiency and productivity of the facilities, without the need for modifications on plant installation or replacement of equipment currently in operation.
RESUMEN SUMMARY
Se describe un sistema y método para la detección y corrección de errores que utiliza los algoritmos tradicionales de codificación/decodificación Reed-Solomon, separa los símbolos de mensaje de los símbolos de paridad y los envía al canal de comunicaciones ajustándolos a las ventanas de tiempo definidas en el protocolo MODBUS-RTU, permitiendo de esta forma transmitir la información de las tramas MODBUS-RTU más los símbolos de paridad, manteniendo compatibilidad con el protocolo. A system and method for error detection and correction is described that uses the traditional Reed-Solomon coding / decoding algorithms, separates the message symbols from the parity symbols and sends them to the communication channel by adjusting them to the defined time windows in the MODBUS-RTU protocol, thus allowing the information of the MODBUS-RTU frames to be transmitted plus the parity symbols, maintaining compatibility with the protocol.
BREVE DESCRIPCIÓN DE LAS FIGURAS. Fig. 1 . Estructura de mensaje codificado Reed-Solomon. BRIEF DESCRIPTION OF THE FIGURES. Fig. 1. Reed-Solomon encoded message structure.
Fig. 2. Diagrama de tiempo para el proceso tradicional de codificación y decodificación Reed-Solomon. Fig. 2. Time diagram for the traditional Reed-Solomon coding and decoding process.
Fig. 3. Mensaje Reed-Solomon modificado para mantener compatibilidad con el protocolo MODBUS-RTU. Fig. 4. Diagrama de tiempos admisibles entre tramas MODBUS-RTU. Fig. 5. Ventanas de tiempo disponibles entre transacciones MODBUS-RTU. Fig. 6. Tiempo de procesamiento en transacciones maestro-esclavo. Fig. 7. Diagrama Proceso de Codificación. Fig. 8. Diagrama Proceso de Decodificación. Fig. 3. Reed-Solomon message modified to maintain compatibility with the MODBUS-RTU protocol. Fig. 4. Diagram of permissible times between MODBUS-RTU frames. Fig. 5. Available time windows between MODBUS-RTU transactions. Fig. 6. Processing time in master-slave transactions. Fig. 7. Coding Process Diagram. Fig. 8. Decoding Process Diagram.
Fig. 9A Diagrama de planta que utiliza protocolo MODBUS sin la solución de la presente invención. Fig. 9A Plant diagram using MODBUS protocol without the solution of the present invention.
Fig. 9B. Diagrama de planta que utiliza protocolo MODBUS con la solución de la invención. Fig. 9B. Plant diagram using MODBUS protocol with the solution of the invention.
Fig. 10. Diagrama de Transacciones MODBUS-RTU entre maestro y esclavo por medio de repetidores/correctores de errores. Fig. 10. MODBUS-RTU Transaction Diagram between master and slave through repeaters / error correctors.
Fig. 1 1 . Transacciones MODBUS-RTU entre maestro con repetidor/corrector y esclavo conectado directamente al bus de comunicaciones. Fig. 1 1. MODBUS-RTU transactions between master with repeater / corrector and slave connected directly to the communications bus.
DESCRIPCIÓN DETALLADA DETAILED DESCRIPTION
En la teoría de códigos, los códigos Reed-Solomon son una subclase de los códigos de bloque R.C. Bose, A. Hocquenghem y D.K. Ray-Chaudhuri (BHC) correspondientes a una generalización de los códigos Hamming en códigos de corrección de múltiples errores. Estos códigos BHC, no binarios, sistemáticos, cíclicos y lineales, son ampliamente utilizados en variadas aplicaciones de almacenamiento y transmisión de datos, dada su efectividad en corregir errores aleatorios y errores en ráfaga. La codificación Reed-Solomon puede hacerse por múltiples métodos, sin embargo, el principio básico de codificación es el mismo en cada caso: en primer lugar, transferir los k símbolos de información del mensaje original y, a continuación, agregar los n-k símbolos de verificación de paridad [13] (ver Fig. 1 ). In code theory, Reed-Solomon codes are a subclass of the RC Bose, A. Hocquenghem and DK Ray-Chaudhuri (BHC) block codes corresponding to a generalization of Hamming codes in multi-error correction codes. These BHC codes, non-binary, systematic, cyclic and linear, are widely used in various applications of data storage and transmission, given its effectiveness in correcting random errors and burst errors. Reed-Solomon coding can be done by multiple methods, however, the basic coding principle is the same in each case: first, transfer the k information symbols from the original message and then add the nk verification symbols of parity [13] (see Fig. 1).
Como se observa en la Fig. 2, la forma tradicional para utilizar códigos Reed- Solomon requiere el uso de codificadores y decodificadores para conformar un mensaje codificado a partir del mensaje original y, posteriormente, recuperar el mensaje original a partir del mensaje codificado. Bajo este método, el mensaje codificado no puede ser leído directamente por el equipo receptor, pues tiene una estructura de trama diferente del mensaje original. Para que el mensaje codificado pueda ser leído por el receptor se requiere en todos los casos del proceso de decodificación. Debido a esta característica, el proceso tradicional de codificación y decodificación Reed-Solomon no puede ser empleado directamente en comunicaciones MODBUS-RTU, pues modifica la trama de datos que se envía al bus de comunicaciones y, por tanto, contraviene las especificaciones del protocolo de comunicaciones. As seen in Fig. 2, the traditional way to use Reed-Solomon codes requires the use of encoders and decoders to form an encoded message from the original message and subsequently retrieve the original message from the encoded message. Under this method, the encoded message cannot be read directly by the receiving equipment, as it has a different frame structure from the original message. So that the encoded message can be read by the receiver is required in all cases of the decoding process. Due to this feature, the traditional Reed-Solomon encoding and decoding process cannot be used directly in MODBUS-RTU communications, since it modifies the data frame that is sent to the communications bus and, therefore, contravenes the specifications of the protocol of communications
Para emplear codificación Reed-Solomon con propósitos de detección y corrección de errores en comunicaciones MODBUS-RTU es requerido un proceso que separe el mensaje codificado en dos partes, mensaje original y símbolos de paridad, y transmita estas partes ajustándose a las ventanas de tiempo especificadas en el protocolo MODBUS-RTU (Fig. 3). Este método permite que los mensajes codificados puedan ser interpretados por los dispositivos receptores como si se tratase del protocolo MODBUS-RTU convencional, al mismo tiempo que los caracteres de paridad pueden ser leídos por el decodificador para realizar la detección y corrección de errores. To use Reed-Solomon coding for the purpose of error detection and correction in MODBUS-RTU communications, a process is required that separates the message encoded into two parts, the original message and parity symbols, and transmits these parts in accordance with the time windows specified in the MODBUS-RTU protocol (Fig. 3). This method allows the encoded messages to be interpreted by the receiving devices as if it were the conventional MODBUS-RTU protocol, at the same time that the parity characters can be read by the decoder to detect and correct errors.
La posibilidad de agregar símbolos de paridad Reed-Solomon a las tramas MODBUS-RTU con propósitos de detección y corrección de errores queda establecida por la existencia de ventanas de tiempo que han sido especificadas por el propio protocolo MODBUS-RTU. De acuerdo con las especificaciones de dicho protocolo, la trama MODBUS-The possibility of adding Reed-Solomon parity symbols to MODBUS-RTU frames for error detection and correction purposes is established by the existence of time windows that have been specified by the MODBUS-RTU protocol itself. According to the specifications of said protocol, the MODBUS- frame
RTU es transmitida en forma serial. Los mensajes son transmitidos como una trama continua de caracteres en los cuales es posible detectar claramente el inicio y término de cada mensaje. Esto se consigue con la definición de intervalos de tiempo límite entre caracteres y entre tramas. La Fig. 4 muestra como las tramas de mensaje están separadas por intervalos de tiempo de al menos 3,5 veces la duración de un carácter, que se designa como .3,5- Por otra parte, si se produce un intervalo de tiempo mayor a 1 ,5 veces la duración de un carácter (t-1 ,5), la trama de mensaje se considerará incompleta y será descartada por el receptor sin emitir ninguna respuesta de notificación. Una vez que el receptor detecta el fin de mensaje, realiza un proceso de verificación de redundancia cíclica para verificar la integridad de datos recibidos. Si no existen errores el mensaje se procesa, en caso contrario se descarta sin emitir ningún tipo de notificación al emisor. RTU is transmitted serially. The messages are transmitted as a continuous frame of characters in which it is possible to clearly detect the beginning and end of each message. This is achieved with the definition of time limits between characters and between frames. Fig. 4 shows how the message frames are separated by time intervals of at least 3.5 times the duration of a character, which is designated as .3,5- On the other hand, if a longer time interval occurs At 1, 5 times the duration of a character (t-1, 5), the message frame will be considered incomplete and will be discarded by the receiver without issuing any notification response. Once the receiver detects the end of the message, it performs a cyclic redundancy verification process to verify the integrity of received data. Yes there are no errors the message is processed, otherwise it is discarded without issuing any type of notification to the sender.
Como se aprecia en la Fig. 5, esta forma de realizar las transacciones genera ventanas de tiempo tras cada mensaje, las cuales en el proceso de la presente invención son utilizadas para agregar símbolos de paridad Reed-Solomon con propósitos de detección y corrección de errores. As can be seen in Fig. 5, this way of carrying out transactions generates time windows after each message, which in the process of the present invention are used to add Reed-Solomon parity symbols for purposes of error detection and correction. .
En el caso de las ventanas de tiempo que se producen tras la respuesta del esclavo, éstas quedan determinadas por la tasa de sondeo {polling rate). En comunicaciones MODBUS esta tasa de sondeo corresponde a un parámetro de configuración que determina la frecuencia en que el maestro envía requerimientos a un esclavo y su valor el valor se ajusta de acuerdo al número de dispositivos conectados al bus de comunicaciones; típicamente para conseguir que el equipo maestro realice 16 requerimientos por segundo a los distintos esclavos. Para la mayoría de las redes industriales, las tasas de sondeo son suficientemente amplias como para colocar sobre el bus los símbolos de paridad. No ocurre lo mismo entre el término de un requerimiento del maestro y la respuesta del esclavo. Como se aprecia en la figura 5, en este caso la ventana de tiempo es mucho más estrecha, pues corresponde únicamente al tiempo que tarda el esclavo en procesar el mensaje proveniente del maestro y conformar la trama de respuesta. Este tiempo está determinado por: In the case of time windows that occur after the slave response, these are determined by the polling rate. In MODBUS communications this polling rate corresponds to a configuration parameter that determines the frequency at which the master sends requirements to a slave and its value is adjusted according to the number of devices connected to the communication bus; typically to get the master team to make 16 requirements per second to the different slaves. For most industrial networks, polling rates are large enough to place parity symbols on the bus. The same does not occur between the term of a teacher's requirement and the slave's response. As can be seen in Figure 5, in this case the time window is much narrower, since it corresponds only to the time it takes for the slave to process the message from the master and form the response frame. This time is determined by:
- La velocidad de transmisión de datos, medida en bits por segundo; - El formato de paridad: 1 ó 2 bits de parada; y - The speed of data transmission, measured in bits per second; - The parity format: 1 or 2 stop bits; Y
- El tiempo que tarda el esclavo MODBUS en ejecutar el requerimiento y conformar el mensaje de respuesta. - The time it takes for the MODBUS slave to execute the request and form the response message.
Las dos primeras variables quedan definidas por la configuración del formato de transmisión y tienen relación con el instante en que el esclavo detecta el fin del mensaje de requerimiento, el cual corresponde a un tiempo igual a 3,5 caracteres ( t35 ). Para una velocidad de transmisión y formato de trama dados, estas variables determinan un tiempo mínimo de procesamiento para cada requerimiento. Por ejemplo, para una tasa de transmisión de 19.200 bps, con formato de trama 8N1 (8 bits de datos, sin paridad y un bit de parada, 10 bits en total), cada carácter tarda en ser transmitido un tiempo igual a con lo cual la detección de
Figure imgf000012_0001
The first two variables are defined by the transmission format configuration and are related to the moment in which the slave detects the end of the request message, which corresponds to a time equal to 3.5 characters (t 35 ). For a given transmission rate and frame format, these variables determine a minimum processing time for each requirement. For example, for a transmission rate of 19,200 bps, with 8N1 frame format (8 data bits, no parity and one stop bit, 10 bits in total), each character takes a time equal to being transmitted with which the detection of
Figure imgf000012_0001
fin de mensaje por parte del esclavo ocurrirá transcurrido un tiempo igual a t3,5 = 1 ,82 ms. El tiempo de ejecución ( te ), por su parte, depende de la velocidad de procesamiento de datos en el equipo esclavo, de la prioridad que tenga el requerimiento respecto de otras tareas que ejecute el esclavo y la complejidad de ejecución del propio requerimiento. Este tiempo suele ser muy variable y depende completamente de las características del equipo. Como se muestra en la figura 6, el tiempo de procesamiento total (tp) queda conformado por el tiempo de detección de fin de mensaje (t3,5)y el tiempo de ejecución (te), donde
Figure imgf000012_0002
siendo ésta la ventana de tiempo (tp) disponible para agregar símbolos de paridad.
end of message by the slave will occur after a time equal to 3.5 = 1.82 ms. The execution time (t e ), for its part, depends on the speed of data processing on the slave equipment, the priority of the requirement with respect to other tasks performed by the slave and the complexity of execution of the requirement itself. This time is usually very variable and depends entirely on the characteristics of the equipment. As shown in Figure 6, the total processing time (t p ) is made up of the end of message detection time (t 3.5 ) and the execution time (t e ), where
Figure imgf000012_0002
this being the time window (t p ) available to add parity symbols.
El número máximo de símbolos de paridad N que es posible agregar para el formato de transmisión 8N1 (8 bits de datos, un bit de parada y sin paridad) dependerá de la amplitud de la ventana de tiempo de ejecución ( te,en segundos), la Tasa de Transmisión (Baud Rate (BR), en baudios), de acuerdo a la siguiente relación:
Figure imgf000013_0001
The maximum number of parity symbols N that can be added for the 8N1 transmission format (8 data bits, one stop bit and no parity) will depend on the amplitude of the runtime window (t e , in seconds) , the Transmission Rate (Baud Rate (BR), in baud), according to the following relationship:
Figure imgf000013_0001
Con N símbolos de paridad Reed-Solomon es posible detectar y corregir errores de transmisión en hasta N/2 símbolos del mensaje original, sea que estos se produzcan como errores en bits aislados o como errores en ráfaga.  With N Reed-Solomon parity symbols it is possible to detect and correct transmission errors in up to N / 2 symbols of the original message, whether these occur as errors in isolated bits or as burst errors.
Las mediciones experimentales realizadas con equipos industriales típicos a tasa de transmisión estándar de 19.200 bps permiten verificar que en todos los casos existe una ventana de tiempo disponible para agregar al menos dos símbolos de paridad con propósitos de detección y corrección de errores, con lo cual es posible detectar y corregir errores aislados o en ráfaga de hasta 8 bits en hasta un carácter del mensaje original. Si los caracteres de paridad se ubican una vez transcurrido el intervalo t3,5 los esclavos conectados directamente al bus podrán leer e interpretar correctamente el mensaje de requerimiento (en caso que esté libre de errores), mientras descartarán los caracteres de paridad. Los caracteres de paridad, por su parte, serán utilizados por dispositivos decodificadores con propósitos de detección y corrección de error. Experimental measurements made with typical industrial equipment at a standard transmission rate of 19,200 bps allow verifying that in all cases there is a time window available to add at least two parity symbols for purposes of error detection and correction, which is why possible to detect and correct isolated or burst errors of up to 8 bits in up to one character of the original message. If the parity characters are located after the t 3.5 interval has elapsed, slaves directly connected to the bus will be able to read and interpret the request message correctly (if it is error free), while discarding the parity characters. Parity characters, on the other hand, they will be used by decoding devices for detection and error correction purposes.
Este método permite dotar al protocolo MODBUS-RTU con la capacidad de detectar y corregir errores de transmisión, manteniendo compatibilidad con las especificaciones del protocolo. This method allows the MODBUS-RTU protocol to be equipped with the ability to detect and correct transmission errors, while maintaining compatibility with the protocol specifications.
Proceso de codificación y decodificación Reed-Solomon para MODBUS-RTU Reed-Solomon encoding and decoding process for MODBUS-RTU
El proceso de detección y corrección de errores utiliza símbolos de paridad generados mediante los algoritmos tradicionales de codificación/decodificación Reed-Solomon, pero ajustados convenientemente a las ventanas de tiempo definidas en las especificaciones del protocolo MODBUS-RTU para mantener compatibilidad con los equipos preinstalados, según el proceso que se describe a continuación. The error detection and correction process uses parity symbols generated by the traditional Reed-Solomon encoding / decoding algorithms, but conveniently adjusted to the time windows defined in the MODBUS-RTU protocol specifications to maintain compatibility with pre-installed equipment, according to the process described below.
Proceso de Codificación Coding Process
En el proceso de codificación, el codificador toma el mensaje original y lo retransmite sin cambios al canal de comunicaciones. Al detectar fin del mensaje, calcula los símbolos de paridad Reed-Solomon y los envía al canal de comunicaciones transcurrido un tiempo equivalente a 3,5 caracteres a partir del término del mensaje original, con el propósito de mantener compatibilidad con el protocolo MODBUS-RTU. Concluida la transmisión el codificador borra el mensaje anterior y se queda a la espera de un nuevo mensaje. La Fig. 7 describe de manera gráfica las etapas del proceso de codificación. Proceso de Decodificación In the coding process, the encoder takes the original message and relays it without changes to the communications channel. When the end of the message is detected, it calculates the Reed-Solomon parity symbols and sends them to the communications channel after a time equivalent to 3.5 characters from the end of the original message, in order to maintain compatibility with the MODBUS-RTU protocol . Once the transmission is finished, the encoder deletes the previous message and waits for a new message. Fig. 7 graphically describes the stages of the coding process. Decoding Process
En la decodificación se recibe el mensaje original y los símbolos de paridad desde el canal de comunicaciones, se realiza la verificación Reed-Solomon para detectar la presencia de errores y, en caso necesario, se recompone el mensaje a partir de los símbolos de paridad y se transmite al receptor. Concluida la transmisión se limpia el mensaje anterior y se vuelve a la espera del siguiente mensaje. La Fig. 8 describe de manera gráfica las etapas del proceso de decodificación. In decoding the original message and parity symbols are received from the communications channel, Reed-Solomon verification is performed to detect the presence of errors and, if necessary, the message is recomposed from the parity symbols and It is transmitted to the receiver. Once the transmission is finished, the previous message is cleared and the next message is waiting again. Fig. 8 graphically describes the stages of the decoding process.
En la actualidad los sistema de comunicaciones que utilizan el protocolo MODBUS están físicamente constituidos por un equipo Maestro y uno o varios equipos Esclavos, en el cual el enlace de comunicación puede ser afectado por interferencias electromagnéticas que introducen errores en la comunicación, generando problemas en la operación del sistema (Fig. 9A). At present, the communications system that uses the MODBUS protocol is physically constituted by a Master device and one or several Slave devices, in which the communication link can be affected by electromagnetic interference that introduce errors in the communication, generating problems in the system operation (Fig. 9A).
El proceso de detección y corrección de errores en comunicaciones MODBUS-RTU de la presente invención se implementa mediante la utilización de un dispositivo codificador/decodificador Reed-Solomon que funciona como repetidor MODBUS-RTU con capacidad para detectar y corregir errores de transmisión. En adelante, este dispositivo se denominará Repetidor/Corrector de Errores. The error detection and correction process in MODBUS-RTU communications of the present invention is implemented by using a Reed-Solomon encoder / decoder device that functions as a MODBUS-RTU repeater with the ability to detect and correct transmission errors. Hereinafter, this device will be called Repeater / Error Corrector.
La inserción de un par de estos dispositivos en el bus de comunicaciones MODBUS-RTU, permite mejorar la calidad de transmisión entre equipos que se comunican sobre tramos susceptibles a errores por interferencia electromagnética, manteniendo inalterado el funcionamiento de los restantes equipos conectados al bus. Actualmente, el estado de la técnica no describe dispositivos que provean esta funcionalidad. The insertion of a pair of these devices in the MODBUS-RTU communication bus, allows to improve the transmission quality between devices that communicate on stretches susceptible to errors due to electromagnetic interference, keeping the operation of the remaining equipment connected to the bus Currently, the state of the art does not describe devices that provide this functionality.
La figura 9B muestra una aplicación preferida de acuerdo a la presente invención en la cual una red MODBUS-RTU está conformada por un equipo maestro y varios equipos esclavos, en donde las comunicaciones entre maestro y el esclavo n pasan por un segmento propenso a errores por interferencia electromagnética, mientras las comunicaciones entre el maestro y los restantes esclavos se realizan sin problemas. Para mejorar la calidad de transmisión entre maestro y el esclavo n, se inserta un repetidor/corrector de errores MODBUS-RTU en el lado del maestro y otro en el lado del esclavo n. Los repetidores/correctores de errores permiten recomponer las tramas corruptas por errores de transmisión entre maestro y el esclavo n, manteniendo el enlace de comunicaciones entre maestro y los demás esclavos conectados directamente al bus. Figure 9B shows a preferred application according to the present invention in which a MODBUS-RTU network is comprised of a master device and several slave devices, where communications between master and slave n pass through a segment prone to errors by electromagnetic interference, while communications between the master and the remaining slaves are carried out without problems. To improve the transmission quality between master and slave n, a MODBUS-RTU error repeater / corrector is inserted on the master side and another on the slave side n. The error repeaters / correctors allow the corrupted frames to be recomposed by transmission errors between master and slave n, maintaining the communication link between master and the other slaves connected directly to the bus.
En la transmisión, el dispositivo repetidor/corrector de errores codifica la trama MODBUS-RTU proveniente del lado del dispositivo transmisor y la coloca sobre el bus de comunicaciones. La palabra de código Reed-Solomon que se transmite al bus consiste en la repetición del mensaje original, seguido de los caracteres de paridad necesarios para la detección y corrección de errores. En la recepción, el repetidor/corrector de errores toma los datos de información y paridad desde el bus de comunicaciones, decodifica la palabra de código Reed-Solomon para detectar si se han producido errores de transmisión y, en caso que sea posible, recompone el mensaje antes de transmitirlo al equipo de destino (esclavo). La figura 10 ilustra, en el tiempo, el proceso de detección y corrección de errores para transacciones MODBUS-RTU entre maestro y esclavo, mediante la utilización de repetidores/correctores de errores. In transmission, the error repeater / corrector device encodes the MODBUS-RTU frame from the side of the transmitter device and places it on the communication bus. The code word Reed-Solomon that is transmitted to the bus consists of the repetition of the original message, followed by the necessary parity characters for error detection and correction. At reception, the error repeater / corrector takes the information and parity data from the communications bus, decodes the Reed-Solomon code word to detect if transmission errors have occurred and, if possible, recomposes the message before transmitting it to the destination device (slave). Figure 10 illustrates, in time, the error detection and correction process for MODBUS-RTU transactions between master and slave, by means of the use of error repeaters / correctors.
Para no afectar el funcionamiento de los equipos que se conectan directamente al bus, los caracteres de paridad que siguen a un requerimiento enviado por el maestro se transmiten luego de transcurrido un tiempo igual a 3,5 caracteres a partir del último bit de la trama de información transmitida (t3 5), que es el tiempo tras el cual los esclavos MODBUS-RTU detectan el fin de mensaje. De esta forma, los caracteres de paridad serán descartados por esclavos que estén conectados directamente al bus de comunicaciones. Por otra parte, las tramas de respuesta provenientes de un esclavo conectado directamente al bus serán recibidas por el detector/corrector de errores en el lado del maestro, el cual detectará un mensaje sin paridad que no puede ser analizado para efectos de detección y corrección de errores, por lo cual simplemente será retransmitido al maestro. La figura 1 1 ilustra este proceso. In order not to affect the operation of the equipment that is connected directly to the bus, the parity characters that follow a requirement sent by the master are transmitted after a time equal to 3.5 characters from the last bit of the data frame. transmitted information (t 3 5 ), which is the time after which the MODBUS-RTU slaves detect the end of the message. In this way, parity characters will be discarded by slaves that are directly connected to the communication bus. On the other hand, the response frames from a slave connected directly to the bus will be received by the error detector / corrector on the side of the master, which will detect a message without parity that cannot be analyzed for the purpose of detection and correction of errors, so it will simply be relayed to the teacher. Figure 1 1 illustrates this process.
REFERENCIAS BIBLIOGRÁFICAS. BIBLIOGRAPHIC REFERENCES.
[1 ] Mackay S., Wright, E., y otros (2003). "Practical Data Communications for Instrumentation and Control", Newnes, 2003. [2] Strauss, C (2003). "Practical Electrical Network Automation and Communication Systems". Newnes, 2003. [1] Mackay S., Wright, E., and others (2003). "Practical Data Communications for Instrumentation and Control", Newnes, 2003. [2] Strauss, C (2003). "Practical Electrical Network Automation and Communication Systems". Newnes, 2003.
[3] Real Time Automation, "MODBUS Overview", disponible en http://www.rtaautomation.com/modbus/ [3] Real Time Automation, "MODBUS Overview", available at http://www.rtaautomation.com/modbus/
[4] MODBUS Organization (2012). "MODBUS Application Protocol Specification V1 .1 b3". Disponible en: h t t p :/ / www.modbus.org g/specs.pho/specs.php. [4] MODBUS Organization (2012). "MODBUS Application Protocol Specification V1 .1 b3". Available at: h t t p: / / www.modbus.org g / specs.pho / specs.php.
[5] MODBUS Organization (2006). "MODBUS Over Serial Line Specification and Implementation Guide V1 .02". Disponible en: h t t p :/ / www.modbus.org g/specs.pho/specs.php [5] MODBUS Organization (2006). "MODBUS Over Serial Line Specification and Implementation Guide V1 .02". Available at: h t t p: / / www.modbus.org g / specs.pho / specs.php
[6] Cena, G., Cereia, M. y otros (2010). "A MODBUS Extensión for Inexpensive Distributed Embedded Systems", 8th IEEE International Workshop on Factory Communication Systems (WFCS), 2010. [6] Cena, G., Cereia, M. and others (2010). "A MODBUS Extension for Inexpensive Distributed Embedded Systems", 8th IEEE International Workshop on Factory Communication Systems (WFCS), 2010.
[7] Raphael, C, Phan, W. (2012). "Authenticated Modbus Protocol for Critical Infrastructure Protection", IEEE Transactions on Power Delivery, Vol. 27, No. 3, July 2012. [7] Raphael, C, Phan, W. (2012). "Authenticated Modbus Protocol for Critical Infrastructure Protection", IEEE Transactions on Power Delivery, Vol. 27, No. 3, July 2012.
[8] Zhang, Yang-Jun (2010). "Reed-Solomon Error Correction Code and Modbus Communication Protocol", University of Electronic Science and Technology of China, Chengdu, R.P. China. [9] Reynders, D., Mackay S. y otros (2005). "Practical Industrial Data Communications", Newnes, 2005. [8] Zhang, Yang-Jun (2010). "Reed-Solomon Error Correction Code and Modbus Communication Protocol", University of Electronic Science and Technology of China, Chengdu, RP China. [9] Reynders, D., Mackay S. et al. (2005). "Practical Industrial Data Communications", Newnes, 2005.
[10] Bravo, C. y otros (201 1 ). "Arquitectura Basada en Inteligencia Artificial Distribuida para la Gerencia Integrada de Producción Industrial" en Revista Iberoamericana de Automática e Informática industrial 8 (201 1 ) 405-417. [10] Bravo, C. and others (201 1). "Architecture Based on Distributed Artificial Intelligence for the Integrated Management of Industrial Production" in the Ibero-American Journal of Automation and Industrial Computing 8 (201 1) 405-417.
[1 1 ] SMAR, "Redes Industriales - Parte 1 ". Disponible en:
Figure imgf000019_0001
[1 1] SMAR, "Industrial Networks - Part 1". Available in:
Figure imgf000019_0001
[12] Wicker S., Bhargava, V. (1994). "Reed-Solomon Codes and Their Applications". IEEE Press, 1994. [13] Agrawal, M. (201 1 ). "Implementation of Reed Solomon Error Correcting Codes", Department of Electronics & Communication Engineering, National Institute of Technology, Rourkela, India, 2001 . Disponible en:
Figure imgf000019_0002
[12] Wicker S., Bhargava, V. (1994). "Reed-Solomon Codes and Their Applications". IEEE Press, 1994. [13] Agrawal, M. (201 1). "Implementation of Reed Solomon Error Correcting Codes", Department of Electronics & Communication Engineering, National Institute of Technology, Rourkela, India, 2001. Available in:
Figure imgf000019_0002
[14] Shehab, H., Ismail, W. (2009). "Hardware Implementation for Error Correction Using Software-Defined Radio Platform", European Journal of Scientific Research, Vol.38 No.2 (2009), pp.337-350. Disponible en:  [14] Shehab, H., Ismail, W. (2009). "Hardware Implementation for Error Correction Using Software-Defined Radio Platform", European Journal of Scientific Research, Vol.38 No.2 (2009), pp.337-350. Available in:
Figure imgf000019_0003
[15] Alotaibi, A. (201 2). "Implementation of (255,223) Reed Solomon Code Encoder/Decoder", California State University, Northridge, USA. Disponible en http://scholarworks.csun.edU/bitstream/handle/1 021 1 .21
Figure imgf000019_0003
[15] Alotaibi, A. (201 2). "Implementation of (255,223) Reed Solomon Code Encoder / Decoder", California State University, Northridge, USA. Available at http://scholarworks.csun.edU/bitstream/handle/1 021 1 .21
2732/AlotaibiMasterProject.pdf [16] Sklar, Bernard (2002). "Reed-Solomon Codes". Disponible en:
Figure imgf000020_0001
2732 / AlotaibiMasterProject.pdf [16] Sklar, Bernard (2002). "Reed-Solomon Codes". Available in:
Figure imgf000020_0001
[17] MIT Media Lab. "Reed-Solomon Coding and Decoding". Disponible en:
Figure imgf000020_0002
[17] MIT Media Lab. "Reed-Solomon Coding and Decoding". Available in:
Figure imgf000020_0002
[18] Vanstone, S., Oorschot, P. (1 989). "An Introduction to Error Correcting Codes with Applications", Kluwer Academic Publishers, octava reimpresión, 2001 .  [18] Vanstone, S., Oorschot, P. (1 989). "An Introduction to Error Correcting Codes with Applications", Kluwer Academic Publishers, eighth reprint, 2001.
[19] Sundar, A., Bhaumik, J. (201 3), "Design of RS (255, 251 ) Encoder and Decoder in FPGA", International Journal of Soft Computing and Engineering (IJSCE), Volume- 2, lssue-6, January 201 3. [19] Sundar, A., Bhaumik, J. (201 3), "Design of RS (255, 251) Encoder and Decoder in FPGA", International Journal of Soft Computing and Engineering (IJSCE), Volume-2, lssue- 6, January 201 3.
[20] Demir, U., Aktas, Ó. "Raptor versus Reed Solomon Forward Error Correction Codes", Proceedings of the Seventh IEEE International Symposium on Computer Networks, 2006. [20] Demir, U., Aktas, Ó. "Raptor versus Reed Solomon Forward Error Correction Codes", Proceedings of the Seventh IEEE International Symposium on Computer Networks, 2006.
[21 ] Karn, P. (1 996) "Reed-Solomon coding/decoding package v1 .0". Disponible en:
Figure imgf000020_0003
[22] SMAR. "Tutorial on the AS-i Technology". Disponible en:
Figure imgf000021_0001
[21] Karn, P. (1 996) "Reed-Solomon coding / decoding package v1 .0". Available in:
Figure imgf000020_0003
[22] SMAR. "Tutorial on the AS-i Technology". Available in:
Figure imgf000021_0001

Claims

REIVINDICACIONES
1. Método de codificación para la detección y corrección de errores en una red de comunicaciones que utiliza protocolo MODBUS-RTU, CARACTERIZADO porque comprende las siguientes etapas de manera automática: a) recibir, desde la red de comunicaciones, en un dispositivo repetidor lado maestro, un mensaje generado por un equipo maestro; b) retransmitir el mensaje a la red de comunicaciones; c) si se detecta el fin de mensaje pasar a la etapa d), de lo contrario volver al punto a); d) calcular símbolos de paridad mediante la utilización de codificación Reed- Solomon; e) enviar símbolos de verificación de paridad a la red de, una vez que ha transcurrido el tiempo equivalente a 3,5 veces la duración de un carácter del protocolo MODBUS-RTU, después de detectado el fin de mensaje, en donde el envío de los símbolos de verificación se realiza dentro de una ventana de tiempo, antes que un equipo esclavo de la red ejecute la respuesta al mensaje recibido. 1. Coding method for the detection and correction of errors in a communications network using MODBUS-RTU protocol, CHARACTERIZED because it comprises the following stages automatically: a) receive, from the communications network, in a master side repeater device , a message generated by a master team; b) relay the message to the communications network; c) if the end of the message is detected go to step d), otherwise return to point a); d) calculate parity symbols by using Reed-Solomon coding; e) send parity verification symbols to the network of, once the time equivalent to 3.5 times the duration of a character of the MODBUS-RTU protocol has elapsed, after the end of the message has been detected, where the sending of The verification symbols are carried out within a time window, before a slave computer of the network executes the response to the received message.
2. Método de decodificación para la detección y corrección de errores en una red de comunicaciones que utiliza protocolo MODBUS-RTU, CARACTERIZADO porque comprende las siguientes etapas de manera automática: a) recibir, desde la red de comunicaciones, en un dispositivo repetidor esclavo, un mensaje original y los símbolos de verificación de paridad; b) si se detecta el fin de mensaje continuar con la etapa c), de lo contrario volver a la etapa a); c) realizar la verificación Reed-Solomon para detectar la presencia de errores en el mensaje recibido; d) si se detectan errores en el mensaje, recomponer el mensaje a partir de los símbolos de paridad; y e) transmitir el mensaje al equipo esclavo receptor. 2. Decoding method for the detection and correction of errors in a communications network using MODBUS-RTU protocol, CHARACTERIZED because it comprises the following stages automatically: a) receive, from the communications network, in a slave repeater device, an original message and the parity verification symbols; b) if the end of the message is detected continue with stage c), otherwise return to stage a); c) perform the Reed-Solomon verification to detect the presence of errors in the received message; d) if errors are detected in the message, recompose the message from the parity symbols; and e) transmit the message to the receiving slave device.
3. Un dispositivo transmisor para la detección y corrección de errores en una red de comunicaciones que utiliza protocolo MODBUS-RTU, CARACTERIZADO porque comprende: a) medios para recibir desde la red de comunicaciones, un mensaje generado por un equipo maestro; b) medios para retransmitir el mensaje a la red de comunicaciones; c) medios para detectar el fin del mensaje; d) medios para calcular símbolos de paridad mediante la utilización de codificación Reed-Solomon; e) medios para enviar símbolos de verificación de paridad a la red de comunicaciones, una vez que ha transcurrido el tiempo equivalente a 3,5 veces la duración de un carácter del protocolo MODBUS-RTU, después de detectado el fin de mensaje, en donde el envío de los símbolos de verificación se realiza dentro de una ventana de tiempo que existe entre dicho fin de mensaje y antes que un equipo esclavo de la red ejecute la respuesta al mensaje recibido. 3. A transmitting device for the detection and correction of errors in a communications network using MODBUS-RTU protocol, CHARACTERIZED because it comprises: a) means for receiving from the communications network, a message generated by a master equipment; b) means for relaying the message to the communications network; c) means to detect the end of the message; d) means for calculating parity symbols by using Reed-Solomon coding; e) means for sending parity verification symbols to the communications network, once the time equivalent to 3.5 times the duration of a character of the MODBUS-RTU protocol has elapsed, after the end of the message has been detected, where The verification symbols are sent within a time window that exists between said message end and before a slave device of the network executes the response to the received message.
4. Un dispositivo receptor para la detección y corrección de errores en una red de comunicaciones que utiliza protocolo MODBUS, CARACTERIZADO porque comprende: a) medios para recibir, desde la red de comunicaciones, un mensaje original y los símbolos de verificación de paridad; b) medios para realizar verificación Reed-Solomon para detectar la presencia de errores en el mensaje recibido; c) en caso de detectar errores, medios para recomponer el mensaje a partir de los símbolos de paridad; y d) medios para transmitir el mensaje al equipo esclavo receptor. 4. A receiving device for the detection and correction of errors in a communications network using MODBUS protocol, CHARACTERIZED because it comprises: a) means to receive, from the communications network, an original message and the parity verification symbols; b) means to perform Reed-Solomon verification to detect the presence of errors in the received message; c) in case of detecting errors, means to recompose the message from the parity symbols; and d) means for transmitting the message to the receiving slave equipment.
5. Un sistema para la detección y corrección de errores en una red de comunicaciones que utiliza protocolo MODBUS-RTU, CARACTERIZADO porque comprende: 5. A system for the detection and correction of errors in a communications network that uses MODBUS-RTU protocol, CHARACTERIZED because it comprises:
-un dispositivo transmisor ubicado en un lado maestro; y - al menos un dispositivo receptor, ubicado en al menos uno de los dispositivos esclavos de la red, en donde el dispositivo transmisor recibe un mensaje desde un equipo maestro y lo transmite junto a símbolos de verificación una vez que ha transcurrido el tiempo equivalente a 3,5 veces la duración de un carácter del protocolo MODBUS-RTU, después de detectado el fin de mensaje, dentro de una ventana de tiempo que existe entre dicho fin de mensaje y antes que un equipo esclavo de la red ejecute la respuesta al mensaje recibido; y donde el dispositivo receptor recibe el mensaje y símbolos de verificación y en caso de detectar errores corrige el mensaje antes de transmitirlo a la red hacia el equipo esclavo. -a transmitter device located on a master side; and - at least one receiving device, located in at least one of the slave devices of the network, where the transmitting device receives a message from a master device and transmits it together with verification symbols once the time equivalent to 3.5 times the duration of a character of the MODBUS-RTU protocol, after the end of the message has been detected, within a time window that exists between said end of message and before a network slave executes the response to the message received; and where the receiving device receives the message and verification symbols and in case of detecting errors corrects the message before transmitting it to the network to the slave equipment.
6. El sistema según reivindicación 5, CARACTERIZADO porque posee medios para detectar y corregir errores aleatorios en bits aislados o en ráfagas, provocados por interferencia electromagnética u otras perturbaciones que afectan la transmisión de información en comunicaciones que utilizan el protocolo MODBUS-RTU. 6. The system according to claim 5, CHARACTERIZED in that it has means for detecting and correcting random errors in isolated bits or in bursts, caused by electromagnetic interference or other disturbances that affect the transmission of information in communications using the MODBUS-RTU protocol.
PCT/CL2015/050055 2014-12-22 2015-12-21 System and method for detecting and correcting transmission errors in industrial communications networks using the modbus rtu protocol WO2016101084A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CL3487-2014 2014-12-22
CL2014003487A CL2014003487A1 (en) 2014-12-22 2014-12-22 System and method to detect and correct transmission errors in industrial communications networks that use the modbus-rtu protocol.

Publications (1)

Publication Number Publication Date
WO2016101084A1 true WO2016101084A1 (en) 2016-06-30

Family

ID=56080945

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CL2015/050055 WO2016101084A1 (en) 2014-12-22 2015-12-21 System and method for detecting and correcting transmission errors in industrial communications networks using the modbus rtu protocol

Country Status (2)

Country Link
CL (1) CL2014003487A1 (en)
WO (1) WO2016101084A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106444657A (en) * 2016-09-14 2017-02-22 长飞光纤光缆股份有限公司 Modbus main station command processing method and master station controller
CN109743301A (en) * 2018-12-24 2019-05-10 武汉工程大学 A kind of data receiving-transmitting system and method based on Modbus agreement

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746783A (en) * 2013-11-29 2014-04-23 国电南瑞科技股份有限公司 Extended communication method based on Modbus communication protocol
WO2014133241A1 (en) * 2013-02-28 2014-09-04 금오공과대학교 산학협력단 Method for detecting faulty node in distributed network system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014133241A1 (en) * 2013-02-28 2014-09-04 금오공과대학교 산학협력단 Method for detecting faulty node in distributed network system
CN103746783A (en) * 2013-11-29 2014-04-23 国电南瑞科技股份有限公司 Extended communication method based on Modbus communication protocol

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MORALES, C.: "Diseño e implementación de un sistema de detección y corrección de errores para comunicaciones Modbus-RTU utilizando codificación Reed-Solomon [tesis de grado, en línea].", 2013, Santiago, Retrieved from the Internet <URL:http://repositorio.usach.cl/webclient/DeliveryManager?pid=26673&custom_att_2=simple_viewer&search_terms=morales%20diaz&pds_handle=> [retrieved on 20160319] *
URREA, C. ET AL.: "Methodology for fault-tolerant industrial communication by means of the Modbus protocol [en linea].", SYLWAN JOURNAL., vol. 158, no. 5, pages 187 - 199, ISSN: 0039-7660, [retrieved on 20160318] *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106444657A (en) * 2016-09-14 2017-02-22 长飞光纤光缆股份有限公司 Modbus main station command processing method and master station controller
CN106444657B (en) * 2016-09-14 2019-11-22 长飞光纤光缆股份有限公司 A kind of Modbus main website command processing method and main station controller
CN109743301A (en) * 2018-12-24 2019-05-10 武汉工程大学 A kind of data receiving-transmitting system and method based on Modbus agreement
CN109743301B (en) * 2018-12-24 2021-03-16 武汉工程大学 Modbus protocol-based data receiving and transmitting system and method

Also Published As

Publication number Publication date
CL2014003487A1 (en) 2016-05-20

Similar Documents

Publication Publication Date Title
US8386901B2 (en) Method, device and software application for transmitting data packets in a communication system
EP3855657B1 (en) Efficient automatic repeat request for free space optical communication
CN101841479B (en) High bit-error long time-delay network self-adaptive transmission method based on network coding
ES2575856T3 (en) Concept for combining encoded data packets with robust header protection
KR20060123059A (en) Collision detection in a non-dominant bit radio network communication system
US8392800B2 (en) Multi-hop network having increased reliability
EP3479507B1 (en) Radio frequency communication system and method
JP2011517162A (en) Adding hybrid ARQ to the WLAN protocol using MAC-based feedback
Urrea et al. Implementation of error detection and correction in the Modbus-RTU serial protocol
JP2017519448A5 (en)
US9645887B2 (en) System for firmware upgrade in AMI and method thereof
CN104038499A (en) MODBUS RTU protocol based data transmission method
CN103490866B (en) HARQ transmission method based on network code in star ground transmission network
WO2016101084A1 (en) System and method for detecting and correcting transmission errors in industrial communications networks using the modbus rtu protocol
KR20110040004A (en) System and apparatus for transferring data only in one direction
Du et al. RLT Code Based Handshake‐Free Reliable MAC Protocol for Underwater Sensor Networks
Yasami et al. Analysis of channel estimation error in physical layer network coding
CN105391518B (en) A kind of document transmission method towards deep space network
JP2016174211A (en) Communication system
CN104796235A (en) Satellite communication self-adaption congestion control method based on packet loss probability
Berger et al. Improving IEEE 802.15. 4e LLDN performance by relaying and extension of combinatorial testing
CN114448522B (en) Noise quantum network transmission control method and system based on quantum Shor code
Bao et al. TCP VON: joint congestion control and online network coding for wireless networks
JP5202376B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION CONTROL METHOD
JP5905844B2 (en) Relay device of communication system using erasure correction code, communication system and relay method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15871402

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15871402

Country of ref document: EP

Kind code of ref document: A1