Delsys Signal to MATLAB Simulink

조회 수: 11 (최근 30일)
Caly
Caly 2024년 5월 2일
댓글: Caly 2024년 9월 3일
Hello everyone!
I am having troubles streaming emg signals to Simulink to run a continuous expereiment where I can take those live emg signals and analyze them. I was using the TCP/IP client receive block in Simulink to establish the connection between the delsys system and Simulink (ran a previous matlab script in order to establish the Delsys/Matlab connection), but the data points are scattered and though the peaks of the signal rise when muscle contractions occur, the emg signal produces square waves that have many holes in it. Thank you in advance

채택된 답변

Anshuman
Anshuman 2024년 6월 17일
Hi Caly,
The issue you're encountering with scattered data points and "square waves that have many holes in it" could be due to several factors ranging from the way the TCP/IP connection is set up, to the processing of the incoming data stream in Simulink. Here are few things that you can try at your end:
On TCP/IP side:
  1. The default buffer size might be too small, leading to data loss. Increase the buffer size to ensure that all incoming data can be accommodated.
  2. If the block is in non-blocking mode, it might not wait for enough data to arrive before proceeding, leading to "holes" in your data. Try setting it to blocking mode.
Simulink Model configuration:
  1. The execution rate of the Simulink model might be too slow to process the incoming data in real-time. Try increasing the fixed-step size.
  2. If the data is sent in chunks, make sure that your processing script or Simulink model is correctly reassembling these chunks into a continuous stream.
  댓글 수: 1
Caly
Caly 2024년 9월 3일
Thank you so much for your response! The "enable blocking" option fixed what I had trouble with!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by