Wiznet makers

sophia

Published December 16, 2025 ©

30 UCC

6 VAR

0 Contests

0 Followers

1 Following

Original Link

Enhancing Bidirectional Modbus TCP ↔ RTU Gateway Performance:

A UDP Mechanism and Markov Chain Approach

COMPONENTS Hardware components

WIZnet - W5500

x 1


PROJECT DESCRIPTION

*상기 이미지는 내용 기반해서 Gemini로 제작되었습니다.


STM32 + W5500로 산업용 Modbus 게이트웨이를 더 빠르고 더 믿을 수 있게: TCP↔RTU 병목을 AUDP(개선 UDP)로 해결한 논문 기반 구현

산업 현장(IIoT)에서 흔한 Modbus TCP(이더넷) ↔ Modbus RTU(RS485) 변환 게이트웨이는 “연결은 되지만 느리다/불안정하다”는 문제가 자주 발생합니다. 이 논문은 TCP 기반 구조의 오버헤드와 지연을 줄이기 위해 **UDP 기반 변형(AUDP)**을 제안하고, UDP의 약점(신뢰성)을 보완하기 위해 CRC·재전송·트랜잭션 매칭·백오프를 결합했습니다. 또한 STM32 + WIZnet W5500 + RS485로 실제 게이트웨이를 구현해, 실험을 통해 지연과 성공률을 함께 개선할 수 있음을 보여줍니다.

논문/저자 정보

  • 논문명: Enhancing Bidirectional Modbus TCP ↔ RTU Gateway Performance: A UDP Mechanism and Markov Chain Approach
  • 저널/연도: Sensors (MDPI), 2025 (Published: 2025-06-21)
  • 저자: Shuang Zhao, Qinghai Zhang, Qingjian Zhao, Xiaoqian Zhang, Yang Guo, Shilei Lu, Liqiang Song, Zhengxu Zhao
  • 소속: Qingdao University of Technology 중심 + Chinese Academy of Sciences 포함

1) 배경: Modbus 게이트웨이가 왜 느려지는가

Modbus는 산업 자동화에서 가장 널리 쓰이는 프로토콜 중 하나입니다. 문제는 현장에 Ethernet 기반(Modbus TCP) 장비와 RS485 기반(Modbus RTU) 장비가 함께 존재한다는 점이고, 그래서 둘을 이어주는 양방향 게이트웨이가 거의 필수로 등장합니다.

하지만 일반적인 Modbus TCP↔RTU 게이트웨이는 TCP 통신을 그대로 사용하다 보니,

  • 연결/재전송/흐름제어 등 “신뢰성”을 얻는 대신
  • 스택 오버헤드와 지연이 커지고
  • 네트워크 품질이 나쁠 때(손실/지터/혼잡) 실시간성이 급격히 흔들릴 수 있습니다.

평가 기준 연결(외부 가치): Modbus는 적용 시장이 큰 프로토콜이라, “성능 개선형 게이트웨이”는 바로 산업 현장 니즈에 닿는 주제입니다.

 

2) 아이디어: UDP를 쓰되, 산업용으로 쓸 만큼만 ‘신뢰성’을 더한 AUDP

저자들이 선택한 방향은 단순합니다.
“TCP가 주는 신뢰성은 무겁다. UDP의 가벼움을 쓰자. 대신 산업용에서 필요한 최소한의 신뢰성만 얹자.”

그래서 제안한 것이 **AUDP(Advanced UDP)**이고, 핵심 구성은 아래 4가지입니다.

  • CRC: 프레임 오류 검출
  • 재전송: 손실 발생 시 재요청/재전송
  • Transaction ID 매칭: 요청–응답 짝을 확실히 맞춤
  • Exponential Backoff: 재전송 간격을 상황에 따라 조절해 혼잡/손실을 악화시키지 않음

이 방식은 “UDP는 빠르지만 불안정하다”는 고정관념을 깨는 설계입니다. UDP를 그대로 쓰는 게 아니라, 게이트웨이 목적에 딱 맞는 신뢰성만 응용계층에서 구현하는 것이 포인트입니다.

평가 기준 연결(신규성): 단순 구현이 아니라, “UDP + 신뢰성 레이어”라는 설계 결정을 산업용 게이트웨이 문제에 정확히 꽂아 넣었다는 점이 신규성 포인트입니다.

 

3) 프로젝트 구현: STM32 + W5500 + RS485로 ‘실제로’ 만든 양방향 게이트웨이

이 연구가 메이커 콘텐츠로 좋은 이유는, 아이디어만 제시한 게 아니라 실제 게이트웨이 하드웨어를 구현하고 검증했다는 점입니다.

하드웨어 구성(논문 기반 구현 관점)

  • STM32 MCU: 프로토콜 변환 로직, 버퍼 관리, AUDP 신뢰성 처리(재전송/ID 매칭/백오프)
  • WIZnet W5500: Ethernet(UDP 포함) 통신 처리
  • RS485 트랜시버: Modbus RTU(시리얼) 통신 처리

즉, **Ethernet(Modbus 측) ↔ RS485(Modbus 측)**를 안정적으로 변환하는 “현장형 박스” 구조입니다.

왜 WIZnet W5500인가

논문은 W5500을 게이트웨이의 Ethernet 액세스 코어로 두면서, 하드웨어 특성을 분명히 설명합니다.
핵심은 “MCU가 네트워크 스택을 무겁게 떠안지 않게 해주는 오프로딩”입니다.

  • 10/100 PHY 내장 + 하드웨어 TCP/IP 스택
  • 32KB 버퍼
  • 최대 8개의 하드웨어 소켓

메이커/개발자 입장에서 이 선택은 매우 실전적입니다. MCU는 네트워킹 자체보다 Modbus 프레임 변환, 예외 처리, 실시간성/신뢰성 제어에 더 많은 자원을 쓸 수 있고, 장시간 동작하는 게이트웨이 설계가 단순해집니다.

평가 기준 연결(성실성): “어떤 칩으로 무엇을 맡겼는지”가 명확해서, maker 글로 옮길 때 발표자료 없이도 이해되는 구조를 만들기 쉽습니다.

 

4) 동작 흐름: 들어오면 ‘검증/매칭’하고, 나가면 ‘변환/포장’한다

게이트웨이의 핵심은 단순 전달이 아니라, 프레임 변환 + 신뢰성 처리입니다.

(A) Ethernet(AUDP) → RS485(RTU)

  1. W5500이 UDP 데이터를 수신
  2. STM32가 데이터를 읽고 AUDP 규칙에 따라 프레임을 파싱
  3. CRC 확인, 트랜잭션 ID 확인(요청 관리)
  4. Modbus RTU 프레임으로 변환해 RS485로 전송
  5. 응답이 없으면 재전송/백오프 정책 수행

(B) RS485(RTU) → Ethernet(AUDP)

  1. RS485로 RTU 응답 프레임 수신
  2. CRC 확인 후 PDU 등을 추출
  3. 기존 요청의 트랜잭션 ID와 매칭
  4. AUDP 형식으로 패킹해 Ethernet으로 송신

평가 기준 연결(성실성): 위 흐름을 다이어그램/표로 한 번만 정리해도 “발표자료 없이 이해 가능한 구성”을 만들 수 있습니다.

 

5) 결과 요약: TCP보다 낮은 지연, 단순 UDP보다 높은 성공률

논문은 실험을 통해 AUDP 게이트웨이가

  • 기존 Modbus TCP-RTU 대비 지연(latency)을 줄이고
  • 단순 Modbus UDP-RTU 대비 전송 성공률(신뢰성)을 끌어올린다
    는 결론을 제시합니다.

특히 “빠르긴 한데 불안정한 UDP”를 산업용으로 쓰기 위해, 성공률을 의미 있게 개선했다는 점이 핵심입니다. 즉, 실시간성(낮은 지연)과 신뢰성(높은 성공률)을 함께 잡으려는 게이트웨이 설계로 이해하면 좋습니다.

평가 기준 연결(외부 가치): 산업 현장에 바로 적용 가능한 지표(지연/성공률)로 메시지가 떨어져, 제품/솔루션 관점의 설득력이 큽니다.

 

6) maker.wiznet.io에서의 ‘응용’ 아이디어 (콘텐츠 확장성)

이 논문을 그대로 소개하는 것에서 끝내지 말고, 아래처럼 “응용 편”으로 확장하면 펜타코드 점수가 더 좋아집니다.

응용 1) “산업용 저지연 게이트웨이 레퍼런스” 시리즈화

  • W5500 기반으로 Modbus 외에도 다른 산업 프로토콜 브리지(단순 텔레메트리/제어)로 확장
  • 네트워크 손실/지터 조건에서 TCP/UDP/AUDP 비교를 그래프로 보여주면, 외부 반응(공유/조회)을 만들기 좋습니다.

응용 2) 보안까지 얹은 ‘Secure Industrial Gateway’

현장망이 클라우드/원격 유지보수로 연결되는 순간, 신뢰성뿐 아니라 보안이 핵심이 됩니다.
AUDP가 UDP 기반이므로, “외부로 나가는 구간”에 DTLS 같은 보안 계층을 연결하는 확장 스토리도 자연스럽습니다.

응용 3) WIZnet 신규 제품군으로 교차 검증

같은 벤치마크를 신규 칩/보드로 확장하면 “자사 기준 신규 제품 적용”을 명확히 만들 수 있습니다.

평가 기준 연결(신규성 + 외부 가치): ‘다른 사람이 아직 안 한 조합(신규 제품 × 산업 게이트웨이 × 실전 지표)’로 확장하기 가장 좋은 소재입니다.

 

References

MDPI Sensors (2025): Enhancing Bidirectional Modbus TCP ↔ RTU Gateway Performance: A UDP Mechanism and Markov Chain Approach

Building a Faster and More Reliable Industrial Modbus Gateway with STM32 + WIZnet W5500: A Paper-Inspired AUDP (Advanced UDP) Approach for Modbus TCP ↔ RTU

In industrial IIoT deployments, Modbus TCP (Ethernet) and Modbus RTU (RS485) often coexist, making bidirectional gateways essential. However, conventional TCP-based gateways can suffer from protocol overhead and latency, especially under lossy or jittery networks. This paper proposes AUDP (Advanced UDP)—UDP augmented with application-layer reliability mechanisms such as CRC, retransmission, transaction matching, and exponential backoff—and validates the idea by implementing a real gateway prototype using STM32 + WIZnet W5500 + RS485. The reported outcome is practical: reduced latency compared to Modbus TCP-RTU while achieving higher reliability than plain UDP-based gateways.

Paper / Author Information

  • Title: Enhancing Bidirectional Modbus TCP ↔ RTU Gateway Performance: A UDP Mechanism and Markov Chain Approach
  • Journal / Year: Sensors (MDPI), 2025 (Published: 2025-06-21)
  • Authors: Shuang Zhao, Qinghai Zhang, Qingjian Zhao, Xiaoqian Zhang, Yang Guo, Shilei Lu, Liqiang Song, Zhengxu Zhao
  • Affiliations: Qingdao University of Technology (core) + Chinese Academy of Sciences (included)

1) Background: Why conventional Modbus gateways become “slow”

Modbus remains one of the most widely adopted industrial protocols. In real plants, Ethernet-based Modbus TCP devices frequently need to communicate with RS485-based Modbus RTU devices, which is why TCP↔RTU gateways are so common.

But when gateways rely on TCP end-to-end, they inherit TCP’s heavier behaviors (connection management, retransmissions, flow control). That reliability comes at a cost—higher overhead and increased latency—especially noticeable when network conditions degrade.

Evaluation fit (External value): Modbus has a massive installed base. Anything that improves gateway responsiveness and robustness speaks directly to a real market pain point.


2) The core idea: Use UDP, but add “just enough” reliability — AUDP

The paper’s direction is straightforward:
keep UDP’s low-latency nature, and implement only the reliability features needed for industrial gateway traffic.

AUDP (Advanced UDP) combines:

  • CRC for error detection
  • Retransmission for loss recovery
  • Transaction ID matching to pair requests and responses reliably
  • Exponential backoff to avoid worsening congestion during retries

Instead of pushing everything into TCP, the design implements targeted reliability at the application layer—optimized for gateway behavior.

Evaluation fit (Novelty): This is not a generic “UDP is faster” claim; it’s a purpose-built reliability layer tailored to the gateway problem.


3) The project: A real bidirectional gateway prototype on STM32 + W5500 + RS485

What makes this maker-friendly is that it goes beyond theory: the authors actually build and test a prototype.

Hardware roles (implementation viewpoint)

  • STM32 MCU: protocol conversion, buffering, and AUDP reliability control logic
  • WIZnet W5500: Ethernet access (including UDP)
  • RS485 transceiver: Modbus RTU interface

Why WIZnet W5500

In the paper, W5500 is positioned as the Ethernet access core, highlighting characteristics that support robust embedded networking:

  • integrated 10/100 PHY and hardware TCP/IP stack
  • on-chip buffer (32 KB)
  • multiple hardware sockets (up to 8)

For engineers, the benefit is clear: offloading networking tasks simplifies firmware design and frees MCU cycles for gateway logic—protocol conversion, edge cases, and real-time/reliability tuning.

Evaluation fit (Sincerity): The system partitioning is explicit, which makes it easy to write a self-explanatory maker post without extra slides.


4) How it works: validate, match, convert, and re-pack

The gateway is not a simple forwarder. It converts frames and enforces reliability rules.

Ethernet (AUDP) → RS485 (RTU)

  • receive UDP frames on W5500
  • parse AUDP on MCU
  • verify CRC, track transaction IDs
  • convert to RTU and transmit over RS485
  • if needed, retry using retransmission/backoff

RS485 (RTU) → Ethernet (AUDP)

  • receive RTU response
  • verify CRC and extract payload
  • match to the original transaction
  • pack into AUDP and send via Ethernet

Evaluation fit (Sincerity): This flow naturally maps into an easy-to-follow “setup → mechanism → results” maker narrative.


5) What the results mean: lower latency than TCP, higher success rate than plain UDP

The paper reports that the proposed gateway reduces latency compared to TCP-based gateways and improves reliability compared to plain UDP-based gateways—an important combination for industrial IIoT where responsiveness and delivery success both matter.

Evaluation fit (External value): Clear, decision-friendly metrics (latency and success rate) make the story persuasive for real deployments.


6) Maker-oriented extensions (how to turn this into a strong WIZnet series)

To score higher on novelty and impact, consider adding practical follow-ups:

  • build a “lossy network test” and compare TCP vs UDP vs AUDP with charts
  • extend the gateway story to other industrial telemetry/control bridges
  • add security for cloud/remote maintenance links (e.g., protecting the UDP-based uplink)
  • replicate the benchmark on newer WIZnet products to create a “protocol × chip” optimization map

Evaluation fit (Novelty + External value): New combinations (newer WIZnet devices + industrial gateway + measurable KPIs) are exactly what strong maker content thrives on.


References

MDPI Sensors (2025): Enhancing Bidirectional Modbus TCP ↔ RTU Gateway Performance: A UDP Mechanism and Markov Chain Approach

Documents
Comments Write