Announcement

Collapse
No announcement yet.

acquire EMG and kinematic data simultaneously

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • acquire EMG and kinematic data simultaneously

    Hello,

    I am working on a project which requires me to measure the EMG and the kinematic data at the same time using matlab.
    The EMG data(2500 Hz) came in through the NI-USB 6363 DAQ, the kinematic data(500Hz) came in through UDP via the ethernet cable.

    I am using the Instrument Control Toolbox and the Data Acquisition Toolbox to gather the data and time clocked them by using 'toc' as the time stamp.
    For the EMG data from the DAQ, I created an analog data acquisition session and log the data into a file in the background, for the UDP packet, I created an UDP object and simply use a while loop to keep scan for the data packet using fscan(u). However, from what I have recorded, the UDP packet is very unstable, I can only get data at about 200Hz.

    I was wondering is anyone has experiences dealing with this situation? Could you please provide any suggestion or thoughts.
    Thank you very much! I really appreciate anytime you can give me.

    Best,
    Xi Zong
    Arizona State University

  • #2
    Re: acquire EMG and kinematic data simultaneously

    Maintaining accurate synchronization of marker and analog data is one reason why 3D motion capture systems cost what they do - it takes a lot of effort to do it right. I'm not familiar with the environment that you're using but to start debugging this I'd suggest that you stop worrying about synchronization until you have a configuration that can consistently stream the data from each interface independently in a reliable manner. Once your data streams are reliable you can set about synchronizing them.

    Comment


    • #3
      Re: acquire EMG and kinematic data simultaneously

      Dear Edmund,

      Thanks a lot for your response.

      We are using an IMT inMotion2 robot arm(http://interactive-motion.com), when we conduct the experiments, we will ask the subjects to hold the robot arm and do some reaching tasks, the position data will be streaming into the computer through ethernet cable, at the same time the EMG sensors attached on the skin will be streaming data into the DAQ.
      After optimizing the code, I can now getting stable EMG data(2000Hz) and unstable robot data(300Hz), I am using 'Dataavailable' and 'Datagramrecieved' event to trigger two callback functions, I am suspecting that the reason why the robot data is unstable is because I do not have a buffer for the robot data. I could not find a way to get the time stamp(1ms accuracy) of the UDP packet, so I was using tic-toc to record the time when I receive the UDP packet which is very stupid. There got to be a way to time stamp the incoming UDP packet.

      I was wondering has anyone done UDP communication before? Or would you suggest TCP/IP instead?

      Thanks a lot for your time.

      Best,

      Xi Zong

      Comment


      • #4
        Re: acquire EMG and kinematic data simultaneously

        It's probably best to contact the manufacturer to discuss your problems with streaming the data from the IMT inMotion2 robot arm as they have probably been asked this question before. It's also worth considering what sort of data rate is reasonable when dealing with human motion. Do you need 300Hz? If you are simply looking for positional data then a sample rate of 60Hz may be adequate and the lower data rates may be far more stable.

        The main factor that you will need to take into account - once the positional data is stable - is the measurement of the latencies in the systems so that the two data streams can be shown to be synchronized - this will involve applying some form of stimulus to both the arm and the EMG system simultaneously so that you can measure relative time delays in the two data streams.

        Comment

        Working...
        X